Skip to main content

Python bindings for the OPM-common module of the Open Porous Media project.

To compile with python support:

  • Add the cmake flags -DOPM_ENABLE_PYTHON=ON and -DOPM_INSTALL_PYTHON=ON
  • Optionally add prefix -DCMAKE_INSTALL_PREFIX=/opt/opm to install outside the standard distro directories
  • Optionally specify python binary -DPython3_EXECUTABLE=/home/user/miniconda3/envs/rkt/bin/python3 if you don't want to use the system python, e.g. use a python from pyenv or from a conda environment

Sample compilation on linux:

#! /bin/bash

flags="-DPython3_EXECUTABLE=/home/hakon/miniconda3/envs/rkt/bin/python3 -DOPM_ENABLE_PYTHON=ON -DOPM_INSTALL_PYTHON=ON -DCMAKE_INSTALL_PREFIX=/opt/opm"
for repo in opm-common opm-grid opm-models opm-simulators
do
    cd "$repo"
    mkdir -p build
    cd build
    cmake  $flags ..
    make -j8
    sudo make install
    cd ..
    cd ..
done

Then you should be able to use the module from a Python script. If you installed in a non-standard directory by specifying -DCMAKE_INSTALL_PREFIX you may need to set the PYTHONPATH environment variable before running your Python script, for example:

$ PYTHONPATH=/opt/opm/lib/python3.11/site-packages python3 spe1case1.py

and spe1case1.py could be:

import os
from opm.simulators import BlackOilSimulator
from opm.io.parser import Parser
from opm.io.ecl_state import EclipseState
from opm.io.schedule import Schedule
from opm.io.summary import SummaryConfig

os.chdir("SPE1CASE1")
deck  = Parser().parse('SPE1CASE1.DATA')
state = EclipseState(deck)
schedule = Schedule( deck, state )
summary_config = SummaryConfig(deck, state, schedule)

sim = BlackOilSimulator(deck, state, schedule, summary_config)
sim.step_init()
sim.step()
poro = sim.get_porosity()
poro = poro *.95
sim.set_porosity(poro)
sim.step()
sim.step_cleanup()

Metadata

Release files for opm-simulators 2026.4

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

Built distributions (wheels)

Table of built distributions (wheels) for opm-simulators 2026.4
File
opm_simulators-2026.4-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
opm_simulators-2026.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
opm_simulators-2026.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
opm_simulators-2026.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
opm_simulators-2026.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
opm_simulators-2026.4-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
opm_simulators-2026.4-cp38-cp38-manylinux_2_28_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.28+ x86-64 Details

Total release size: 333.0 MB

Release files / opm_simulators-2026.4-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL opm_simulators-2026.4-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 47.6 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
8714fb2b9e20854be3f659a28fc6c8e4f2ec40472778a22878848a00dbb310ea
BLAKE2b-256 checksum
How to use checksums
e68e2bc8d67a18a26a32f01a4ae1ce48897c5407926073c7864d11ebeeed17bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / opm_simulators-2026.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL opm_simulators-2026.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 47.6 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d84e363ebd44fc4d2462af63f36dad4b0877918c4f3a5f5d433aab2491156250
BLAKE2b-256 checksum
How to use checksums
9645852716a49db502ffe96a4fd0c277370f676e536304023cc700cdf7dd60e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / opm_simulators-2026.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL opm_simulators-2026.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 47.6 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
bf1e77553b0db2e78c0f5b4fefa14d163f175f5ed2acb13848ffb7b1d1a0c8dd
BLAKE2b-256 checksum
How to use checksums
c8755d51828d6ed18eb7bb34ba4bb4b8db1893a260aa0ad0425eb551296a6390
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / opm_simulators-2026.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL opm_simulators-2026.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 47.6 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6c1dfbef141e97b4734fe925da7f43ea078172e023b2f1549230bcd99f9ba788
BLAKE2b-256 checksum
How to use checksums
8535f432d287e44aac6cb294bc7ba569b06d67001963f5da14db99a7877d1aea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / opm_simulators-2026.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL opm_simulators-2026.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 47.6 MB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
2505d40602b2653c8a50d564d32bb0a7b406ac4e9aca445027161bb453459dc3
BLAKE2b-256 checksum
How to use checksums
d5485e0a4cc2fd2326a5b4197b0a1cedbe71626de478a4295dba86a477752af3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / opm_simulators-2026.4-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL opm_simulators-2026.4-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 47.6 MB
Tags CPython 3.9 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e7d228049a532d321601fe983e6929fd0edab0bd2f840c1600098f13494d1670
BLAKE2b-256 checksum
How to use checksums
23ff1935845ffb1ecd5a0d80d1395e92782a0137a1ef3ca62091f780951a822b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / opm_simulators-2026.4-cp38-cp38-manylinux_2_28_x86_64.whl

Download URL opm_simulators-2026.4-cp38-cp38-manylinux_2_28_x86_64.whl
Size 47.6 MB
Tags CPython 3.8 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
cd34aa61a1e1a75b26c1b20c0943e289c4fe11050fad67f1bf9bf93c56513be3
BLAKE2b-256 checksum
How to use checksums
1199438dd1d7e8a9e6de67b8b772e9654a5f4ebf6aac3232b5dda99b9baa1986
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

2026.4 This release

7 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