Calculating shear in vertical wells – python code

Calculating shear in vertical wells – python code
Calculating shear in vertical wells – python code
22 Downloads

Here’s a code to calculate and plot the shear rate in python. The file is in PDF but code can be copied easily. Any feedback is welcome.

Remarks: The code  provided is written in Python and uses the `tkinter` module for GUI. This code is compatible with both Windows and Unix-like operating systems without any modifications. However, there are a few things to note for a seamless experience:

1. **Libraries:** Ensure that you have the required libraries installed (`numpy`, `tkinter`, and `matplotlib`). You can install them using pip:
“`bash
pip install numpy matplotlib
“`

2. **Python Environment:** The code is written for Python 3, so make sure you are running it with Python 3.x.

3. **Matplotlib Backend:** `Matplotlib` uses different backends to render its plots. While it should automatically pick the best one for your OS, if you run into any issues on Windows, you might want to explicitly set the backend to be used with `TkAgg` (which works well with `tkinter`). To do this, add the following lines before importing `matplotlib.pyplot`:
“`python
import matplotlib
matplotlib.use(“TkAgg”)
“`

4. **Windows High DPI Displays:** If you’re running the application on a high DPI display in Windows, the application might appear blurry by default. This can be fixed by adjusting the DPI settings for Python in Windows or by adding a manifest file to your Python application.

For most standard setups, the code will work on Windows without any modifications. However, based on the specifics of the environment, you may need to address the points mentioned above.