Skip to main content

MiniRes

The MiniRes logo

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: PyPI (pip install minires), or demo it in a web browser via Open In Colab (backend: Google) or WASM (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: GitHub CI, with many examples doubling as regression tests.

The Egg model: permeability, pressure, oil saturation, and the adjoint sensitivity of a producer's water cut

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.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for minires 0.3.1
File Size Uploaded
minires-0.3.1.tar.gz 63.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for minires 0.3.1
File Interpreter ABI Platform
minires-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 131.3 kB

Release files / minires-0.3.1.tar.gz

Download URL minires-0.3.1.tar.gz
Size 63.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b240a2ff7e69272aca5ed3e0a0e53bace00c561c022f9996339d9cb579dbc4f8
BLAKE2b-256 checksum
How to use checksums
af4a66beb2cf1e0db2620a1ae84120ef26769822b6160ad1450863db2407c05e
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

Release files / minires-0.3.1-py3-none-any.whl

Download URL minires-0.3.1-py3-none-any.whl
Size 67.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb8a5570e8446bf9813f344fa95a83cc5a99b42f1c60259526d18160542f4537
BLAKE2b-256 checksum
How to use checksums
9cc68f1d1b7feab1ebed9df00fc0ecd1b0b6044fc0cd38033737ef0a9ab78c3f
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

Release history Release notifications | RSS feed

0.3.2

2 release files

This release

0.3.1 This release

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page