Toy petroleum reservoir simulator in python using TPFA
https://patnr.github.io/MiniRes/ ↗// momentum
+3★ since featured on SilentStars (2026-09-15)
featured in
- Edition #13 new featured on Bluesky · shipped a new release · new commits
// why it's here
- Built almost entirely by one person
- Health 55/100 with only 15 stars
- 6 releases in the last 90 days
// how to help
// readme
MiniRes
A lean petroleum reservoir simulator using TPFA (two-point flux approximation). Documentation.
- Small: all of its physics fit in
core.py’s 400 lines of code. - Capable: two-phase, slight compressibility, BHP control, lateral well paths, irregular outlines and faults (inactive cells), aquifers – but a toy: 2D uniform grid, immiscible, isothermal, and simple well models and operation.
- Adjoint model included; verified against finite differences.
- Python: (
pip install minires), or demo it in a web browser via or (no backend!). - Fast: similar to JutulDarcy’s (but no JIT startup/wait) at equal accuracy on 2D two-phase cases of size $100$ – $10^5$.
- Reliable: reproduces the numbers of the Matlab code (2007) from NTNU/Sintef by Jørg E. Aarnes, Tore Gimse, and Knut–Andreas Lie.