Skip to content

Reservoir simulation from Python

PyJutulDarcy wraps JutulDarcy 0.4, a differentiable multiphase reservoir simulator. Run industry DATA files or build a model with Python and NumPy; Julia performs the simulation and adjoint calculations.

Install

Requires Python 3.10 or newer.

python -m pip install jutuldarcy

The first import jutuldarcy installs Julia 1.11 or newer and the registered Julia dependencies automatically. Allow several minutes and network access for this step. Later imports reuse the installation; the first simulation also compiles code for your model.

Run a DATA file

import jutuldarcy as jd

output = jd.simulate_data_file("MODEL.DATA", convert=True)
pressure = output["STATES"][-1]["Pressure"]  # NumPy array, Pa
days = output["DAYS"]

Start with the executed SPE9 example to try a public dataset, or build a model from scratch. The user guide explains indexing, results, backends and plotting; the API reference lists the Python entry points.

Learn more in the Julia documentation

The Python interface exposes a subset of the full simulator. Use the Julia manual for the physics and complete keyword options:

For scientific use, cite the JutulDarcy paper.