Skip to main content

Library for stress calculations from well logs

Project description

BG1

Stresslog

A package to calculate and plot pore pressure and other geomechanical data from las files. It is intended for pre-drill and post-drill studies of wells, and can be used for rudimentary realtime stress prediction.

Features

  • Import las files, dlis files, deviation files, ucs and lithology files

  • Alias logs using user modifiable alias file

  • Pad log data all the way to surface, using appropriate KB, GL or WD values (Option to specify these and correct these in the Log Header)

  • Calculate geomechanical properties using 6 component stress tensor

  • Calculate Pore Pressure, Shmin, SHMax, Sv and UCS and more

  • Plot Stress Polygon, Wellbore Stability and more at drainhole analysis depth

  • Plot the data in user configurable intervals

  • Option to save Plots at custom DPI

  • Export the well data as .csv, so you can run your own plots and calculations in your software of choice

  • Output Las Files (with updated header and new data columns)

  • Parameters for adding mud data, loss/gain data and other data interpreted from drilling and testing history, these are plotted over the calculated data to help visually constrain the model

  • Option to include ascii file with observations from resistivity image logs (or others like ultrasonic calipers) to include tensile fractures and breakouts, which are then used internally to better constrain SHMax

  • Override nu, mu, and UCS and tensile strength from the lithology file

Installation

pip install stresslog

Consult the documentation at https://stresslog.readthedocs.io/ for more help.

Contributing

First things first: Open source does not mean open contribution. While this project is open source, we reserve the right to accept or reject contributions at our discretion. That said, we welcome contributions—feel free to submit a pull request!

Guidelines for Contributions

Pull Requests are Welcome: If you have an improvement, bug fix, or feature, send a PR.
No Code-Style Requirements: We don’t enforce a specific coding style—if the tests pass, your code is valid.
👑 Review is at Our Discretion: We will review PRs if we feel like it. If we don’t, well… we won’t.
🚫 Rejections are Absolute: If your PR gets the reply "rejected by royal decree," that’s it—no further discussion.
Copyright Stays with Us:

  • Contributions do not confer copyright. Everything in this repo remains the property of ROCK LAB PRIVATE LIMITED.
  • Forking Does Not Grant Ownership: This project is licensed under AGPL, meaning modifications and forks must remain AGPL-compliant.
  • All forks and derivative works must retain the original copyright notices in every file. This is a condition of using this codebase under AGPL Section 7.
    🔄 Trademark Protection: The name, branding, and trademarks of ROCK LAB PRIVATE LIMITED are not included in the license and may not be used without explicit permission.
    📜 Additional Licensing Restrictions: If you wish to use this project outside AGPL terms, a commercial license must be obtained from ROCK LAB PRIVATE LIMITED.

Code of Conduct

This project follows a simple rule: Don’t be an ass.

  • Be respectful when engaging with maintainers and other contributors.
  • Don't spam issues or PRs asking for approvals. We review things at our own pace.
  • No entitled behavior—contributing is a privilege, not a right.
  • Forking this repo does not grant ownership. All forks must comply with AGPL, and the original copyright notices must be retained in all files.

That’s it. Play nice, write good code, and we’ll all get along fine. 🚀

Acknowledgements

Jon Jincai Zhang, for his awesome work on pore pressure prediction, and geomechanics at large. This software uses his algorithms wherever possible.

In more detail: The Stability Analysis Plots are after Peska and Zoback, 1995. The Stress Polygon Technique for constraining SHMax is after Zoback et al., 2003 The Pore Pressure equation is from Zhang, 2011 The shmin is calculated in accordance with Dianes, 1982, as well as Zoback and Healy,1992

This software is written in Python, using the python library Welly by Agile Scientific, Canada. Welly itself uses the Lasio library to handle the las files. Dlis files are handles using dlisio package by Equinor. Other libraries used include Pandas, Numpy, Matplotlib, Plotly and Scipy.

Disclaimer

IN MAKING INTERPRETATIONS OF LOGS THIS SOFTWARE AND ITS AUTHOR(S) WILL GIVE USERS THE BENEFIT OF THEIR BEST JUDGEMENT. BUT SINCE ALL INTERPRETATIONS ARE OPINIONS BASED ON INFERENCES FROM ELECTRICAL OR OTHER MEASUREMENTS, WE CANNOT, AND WE DO NOT GUARANTEE THE ACCURACY OR CORRECTNESS OF ANY INTERPRETATION. WE SHALL NOT BE LIABLE OR RESPONSIBLE FOR ANY LOSS, COST, DAMAGES, OR EXPENSES WHATSOEVER INCURRED OR SUSTAINED BY THE USER RESULTING FROM ANY INTERPRETATION MADE BY THE SOFTWARE OR ITS AUTHOR(S).

THERE IS NO WARRANTY FOR THE PROGRAM. THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

IN NO EVENT WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

THE STATEMENTS ABOVE ARE IN ADDITION TO THE CONCERNED SECTIONS OF THE AGPL3.0 LICENSE GOVERNING THE PROGRAM.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stresslog-1.6.1.tar.gz (100.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stresslog-1.6.1-py3-none-any.whl (103.2 kB view details)

Uploaded Python 3

File details

Details for the file stresslog-1.6.1.tar.gz.

File metadata

  • Download URL: stresslog-1.6.1.tar.gz
  • Upload date:
  • Size: 100.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for stresslog-1.6.1.tar.gz
Algorithm Hash digest
SHA256 1727618166cf5d81d8cc8c365351da240fa0152b7b4a745a68e25121fa021b9d
MD5 8b1d1a8abaaaaa15fe2a8ba5275a618a
BLAKE2b-256 a6066474dd8ec17babcc7e56c69d7f38fe9a048056dafc8ae34a51d27d7e966b

See more details on using hashes here.

Provenance

The following attestation bundles were made for stresslog-1.6.1.tar.gz:

Publisher: publish2pypi.yml on GeoArkadeep/Stresslog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stresslog-1.6.1-py3-none-any.whl.

File metadata

  • Download URL: stresslog-1.6.1-py3-none-any.whl
  • Upload date:
  • Size: 103.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for stresslog-1.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6bd6867e77a4547999d91debb070e1f247944bf0361bdfb8e22a97fe5b5890bd
MD5 bd43adcdd16e9f175e935de8ba35adfe
BLAKE2b-256 dc8cbe58c8358125808964b44a48c9b9b455eb3390f090a052c7be0548693210

See more details on using hashes here.

Provenance

The following attestation bundles were made for stresslog-1.6.1-py3-none-any.whl:

Publisher: publish2pypi.yml on GeoArkadeep/Stresslog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page