/flownet

FlowNet - Data-Driven Reservoir Predictions

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Python 3.6 | 3.7 Code style: black Total alerts Language grade: Python

FlowNet

FlowNet aims at solving the following problems:

  • Create data-driven reduced physics models - directly from the data
  • Train the model
  • Assure model predictiveness
  • Use the models to efficiently optimize and make decisions

Contributing

Please check out our contribution guidelines if you want to contribute to FlowNet.

Installation

FlowNet is a Python package. The package itself, and other dependencies, could be installed e.g. using a Python/Conda virtual environment. You will need to choose your favourite environment and install all dependencies to get going.

Install FlowNet

FlowNet uses the open-source reservoir simulator OPM-Flow. To be able to run FlowNet you will need to have OPM-Flow installed first. There are also other dependencies like the Python packages libecl and libres which currently are not easily installable from PyPI.

1. Clone the FlowNet GitHub repository with SSH:
git clone git@github.com:equinor/flownet.git
2. Move into the cloned directory:
cd ddpd-flownet
3. Run the build_environment.sh script containing the building recipe:
bash ./build_environment.sh ./venv

This will automatically create a simple Python virtual environment ./venv

Click here for alternative installation by creating your own environment

A. Python virtual environment

A.1. Create a Python virtual environment named venv yourself:
python3 -m venv ./venv
A.2. Activate the environment:
source ./venv/bin/activate
A.3. Run the build script providing the path to the Python virtual environment:
./build_environment.sh $VIRTUAL_ENV

or

B. Conda environment

B.1. Create a Conda environment
conda create -n venv python=3.7
B.2. Activate the environment:
conda activate venv
B.3. Fix path to Python packages:
conda create -n flownet python=3.7
conda activate flownet
echo "$CONDA_PREFIX/lib/python3.7/dist-packages" > $CONDA_PREFIX/lib/python3.7/site-packages/dist-packages.pth
B.4. Run the build script providing the path to the Conda environment:
./build_environment.sh $CONDA_PREFIX
4. Install the flownet Python module in development mode:
pip install -e .

Omit the -e flag if you want a standard installation.

⚠️ Do you want to run FlowNet through the LSF queue? To be able to have the ERT process, that will be called by FlowNet, run jobs via LSF correctly you will need to update your default shell's configuration file (.cshrc or .bashrc) to automatically source your virtual environment.

Install OPM-data (optional)

To be able to run examples that are dependent on the Norne field simulation, you need to download the OPM-data repository. The preferred installation location is in the home directory, e.g. ~/opm-data:

cd
git clone https://github.com/OPM/opm-data.git

Running FlowNet

You can run FlowNet as a single command line:

flownet ./some_config.yaml ./some_output_folder

Run flownet --help to see all possible command line argument options.

Running webviz to check results

Before running webviz for the first time on your machine, you will need to to create a localhost https certificate by doing:

webviz certificate --auto-install --force

Build documentation

You can build the documentation after installation by running

cd ./docs
make html

and then open the generated ./docs/_build/html/index.html in a browser.

License

FlowNet is, with a few exceptions listed below, GPLv3.