A Python library for petro-elastic modelling. It contains a Material class for representing rocks and fluids, as well as various rock physics models and algorithms such as Hashin-Shtrikman bounds and Gassmann fluid substitution.
pip install open_petro_elasticDevelopers and contributors can download the repository and do uv sync --all-groups to install the package with all its dependencies for development, testing, and building the docs.
The tool can be used as a library, or from the command line using YAML configuration files. For example, see the tutorial config file.
Generally, the open_petro_elastic.material module is used for interfacing with open_petro_elastic as a Python library:
>>> from open_petro_elastic.material import Material
>>> from open_petro_elastic.material.sandstone import hertz_mindlin
>>> mineral = Material(bulk_modulus=1e9, shear_modulus=1e9, density=1000)
>>> sand = hertz_mindlin(mineral, porosity=0.4, pressure=1e6)
>>> print(sand.density)
600.0To get help on the command line interface:
open_petro_elastic --helpSee the docs for more usage instructions.
Tests can be run with:
uv run pytest
Developers should also read the Code of Conduct.