This repository contains scripts to set up a workflow to run near well numerical studies using the OPM-Flow simulator.
You will first need to install
- Flow (https://opm-project.org, Release 2023.10 or current master branches)
You can install the requirements in a virtual environment with the following commands:
# Clone the repo
git clone https://github.com/cssr-tools/pyopmnearwell.git
# Get inside the folder
cd pyopmnearwell
# Create virtual environment
python3 -m venv vpyopmnearwell
# Activate virtual environment
source vpyopmnearwell/bin/activate
# Upgrade pip, setuptools, and wheel
pip install --upgrade pip setuptools wheel
# Install the pyopmnearwell package (in editable mode for contributions/modifications; otherwise, pip install .)
pip install -e .
# For contributions/testing/linting, install the dev-requirements
pip install -r dev-requirements.txt
See the CI.yml script
for installation of OPM Flow (binary packages) and the pyopmnearwell package. If you are a Linux user (including the windows subsystem for Linux), then you could try to build Flow from the master branches with mpi support, by running the script ./build_opm-flow_mpi.bash
, which in turn should build flow in the folder ./build/opm-simulators/bin/flow.
For macOS users with the latest chips (M1/M2, guessing also M3?), the ecl, resdata, and opm Python packages are not available via pip install. Then before installation, remove them from the requirements.txt
, then proceed with the Python requirements installation, install the OPM Flow dependencies (using macports or brew), and once inside the vpyopmnearwell Python environment, run the ./build_opm-flow_macOS.bash
, and deactivate and activate the virtual environment (this script builds OPM Flow as well as the opm Python package, and it exports the required PYTHONPATH).
You can run pyopmnearwell as a single command line:
pyopmnearwell -i some_input.txt -o some_output_folder
Run pyopmnearwell --help
to see all possible command line
argument options. Inside the some_input.txt
file you provide the path to the
flow executable and simulation parameters. See the .txt files in the examples/
,
tests/geometries/
, and tests/models/
folders. For macOS users, then use the flag
-p opm
for plotting (resdata is the default one).
See the documentation.
The pyopmnearwell package is being funded by the HPC Simulation Software for the Gigatonne Storage Challenge project [project number 622059] and Center for Sustainable Subsurface Resources (CSSR) [project no. 331841]. This is work in progress. Contributions are more than welcome using the fork and pull request approach.