Petroleum engineering correlations for Python. MIT licensed.
Online Calculators · Documentation
pip install petroptimport petropt
import numpy as np
# Load a bundled production dataset
df = petropt.datasets.load_sample_production()
# PVT: Standing bubble point pressure
pb = petropt.correlations.standing_bubble_point(api=35, gas_sg=0.65, temp=200)
# Decline: Arps hyperbolic forecast
t = np.arange(0, 60)
q = petropt.correlations.arps_decline(qi=1000, di=0.05, b=0.5, t=t)
# Volumetrics: STOIIP estimate
ooip = petropt.correlations.stoiip(area=640, thickness=50, porosity=0.20, sw=0.30, bo=1.25)
# Petrophysics: water saturation from resistivity
sw = petropt.petrophysics.archie_sw(rt=20.0, phi=0.20, rw=0.05)
# Well logs: read a LAS file
logs = petropt.io.read_las("well.las")- PVT — Standing bubble point / Rs / Bo, Dranchuk Z-factor
- Decline — Arps (exponential, hyperbolic, harmonic)
- Volumetrics — STOIIP, GIIP, recovery factor
- Material balance — gas P/Z
- Vshale — linear, Larionov (Tertiary / older), Clavier
- Porosity — density
- Water saturation — Archie
- LAS files — read well logs into pandas DataFrames (wraps lasio)
- Sample production — bundled 2-well, 12-month dataset for demos
- tools.petropt.com — petroleum engineering web calculators by Groundwork Analytics
- tools.petropt.com/docs/ — documentation
Shirangi, M.G. (2026). petropt: The Python Library for Petroleum Engineering.
https://pypi.org/project/petropt/
MIT — see LICENSE for details.