MiniRes
A simple 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, well paths, irregular outlines and faults (inactive cells), aquifers – but 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(backend: Google) 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. Further validated against Buckley–Leverett's analytic solution, ECLIPSE's numbers on the Egg model and JutulDarcy's on quarter five-spot, SPE-10, and Egg.
- Tested extensively:
, with many examples doubling as regression tests.
Used by
Please let me know (or make a PR) if you use this in your work, and I will add it to this list.
Contributions
To also get the examples and tests, clone instead, and install with uv, in editable mode:
git clone https://github.com/patnr/MiniRes.git
cd MiniRes
uv sync # or: pip install -e .
uv run pytest
uv run ruff check
Release files for minires 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| minires-0.3.2.tar.gz | 63.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| minires-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 131.3 kB
Release files / minires-0.3.2.tar.gz
| Download URL | minires-0.3.2.tar.gz |
|---|---|
| Size | 63.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
37936c5bd85be2225dec4e80765b955939529680ce9965d100bb30fac77f07de
|
|
BLAKE2b-256 checksum How to use checksums |
2184e05069b4077a7ccfe433b7ccd5bc9264fbc8fc436739b10b66e875b50e2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency logRelease files / minires-0.3.2-py3-none-any.whl
| Download URL | minires-0.3.2-py3-none-any.whl |
|---|---|
| Size | 67.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b9da275ce8b5a51e7f578832c737db99d56de80c0c52d4cd80bac34f8b4cf540
|
|
BLAKE2b-256 checksum How to use checksums |
3a391d407df21e73c3e81deeffa9b028931cf78d9bb25ac434b5a8397f54ff4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency log