diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ff45936..9ddf0a9 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,7 +1,4 @@ -# SPDX-FileCopyrightText: 2023 NORCE -# SPDX-License-Identifier: MIT - -name: Run the pyopmspe11 executable +name: Run pyopmspe11 on: push: @@ -40,10 +37,11 @@ jobs: sudo apt-get install libopm-simulators-bin sudo apt-get install texlive-fonts-recommended texlive-fonts-extra dvipng cm-super - - name: Install test dependecies + - name: Install dependecies run: | pip install --upgrade pip setuptools wheel pip install -r dev-requirements.txt + pip install opm - name: Install pyopmspe11 run: | @@ -51,9 +49,9 @@ jobs: - name: Check code style and linting run: | - black --check src/ tests/ setup.py - pylint src/ tests/ setup.py - mypy --ignore-missing-imports src/ tests/ setup.py + black --check src/ tests/ + pylint src/ tests/ + mypy --ignore-missing-imports src/ tests/ - name: Run the tests run: | diff --git a/.gitignore b/.gitignore index 3e8ded3..2b0e3d5 100644 --- a/.gitignore +++ b/.gitignore @@ -178,7 +178,8 @@ examples/finner_grids/spe11b examples/finner_grids/spe11c examples/hello_world/spe11a examples/hello_world/spe11b -examples/hello_world/spe11 +examples/hello_world/spe11c +playground tests/configs/test_compare tests/configs/output tests/configs/spe11a diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 26edc43..2dcbd3b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing -Hola hola :). +Hola hola 🙂. The following is a set of guidelines for contributing to pyopmspe11. ## Ground Rules diff --git a/README.md b/README.md index 2882a7f..f00a618 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![Build Status](https://github.com/OPM/pyopmspe11/actions/workflows/CI.yml/badge.svg)](https://github.com/OPM/pyopmspe11/actions/workflows/CI.yml) - + [![Code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](https://opensource.org/license/mit/) @@ -7,14 +7,20 @@ -This repository contains scripts to set up a workflow in python for the three cases in the [_SPE11 project_](https://www.spe.org/en/csp/). +This repository contains scripts to set up a workflow using Python for the three cases in the [_SPE11 project_](https://www.spe.org/en/csp/). Here we use the [_OPM-Flow_](https://opm-project.org/?page_id=19) simulator. ## Installation You will first need to install * Flow (https://opm-project.org, Release 2024.04 or current master branches) -You can install the Python requirements in a virtual environment with the following commands: +To install the _pyopmspe11_ executable in an existing Python environment: + +```bash +pip install git+https://github.com/OPM/pyopmspe11.git +``` + +If you are interested in modifying the source code, then you can clone the repository and install the Python requirements in a virtual environment with the following commands: ```bash # Clone the repo @@ -27,29 +33,27 @@ python3 -m venv vpyopmspe11 source vpyopmspe11/bin/activate # Upgrade pip, setuptools, and wheel pip install --upgrade pip setuptools wheel -# Install the pyopmspe11 package (in editable mode for contributions/modifications; otherwise, pip install .) +# Install the pyopmspe11 package pip install -e . # For contributions/testing/linting, install the dev-requirements pip install -r dev-requirements.txt ``` -See the [_CI.yml_](https://github.com/OPM/pyopmspe11/blob/main/.github/workflows/CI.yml) script for installation of OPM Flow (binary packages) and the pyopmspe11 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 resdata Python package might not available via pip install, depending on the Python version (e.g., it is not found using Python 3.9, but it is installed using Python 3.10). If you face this issue, then before installation, remove resdata from the `requirements.txt`, then proceed with the Python requirements installation, install the OPM Flow dependencies (using macports or brew), and once inside the vpyopmspe11 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). +See the [_installation_](https://OPM.github.io/pyopmsep11/installation.html) for further details on building OPM Flow from the master branches in Linux, Windows, and macOS, as well as the OPM Python package. ## Running pyopmspe11 You can run _pyopmspe11_ as a single command line: ``` -pyopmspe11 -i some_input.txt -o some_output_folder +pyopmspe11 -i configuration_file.txt ``` Run `pyopmspe11 --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 tests and examples folders. +argument options. Inside the `configuration_file.txt` you provide the path to the flow executable and simulation parameters. See the .txt files in the [_examples_](https://github.com/OPM/pyopmspe11/tree/main/examples), [_benchmark_](https://github.com/OPM/pyopmspe11/tree/main/benchmark), and [_tests_](https://github.com/OPM/pyopmspe11/tree/main/tests/configs) folders. ## Getting started -See the [_documentation_](https://OPM.github.io/pyopmspe11/introduction.html). +See the [_examples_](https://OPM.github.io/pyopmspe11/examples.html) in the [_documentation_](https://OPM.github.io/pyopmspe11/introduction.html). ## About pyopmspe11 The pyopmspe11 package is being funded by the [_HPC Simulation Software for the Gigatonne Storage Challenge project_](https://www.norceresearch.no/en/projects/hpc-simulation-software-for-the-gigatonne-storage-challenge) [project number 622059] and [_Center for Sustainable Subsurface Resources (CSSR)_](https://cssr.no) [project no. 331841]. -This is work in progress. [_Here_](https://www.spe.org/en/csp/) is the link to the spe11 details. +This is work in progress. [_Here_](https://www.spe.org/en/csp/) is the link to the SPE11 details. Contributions are more than welcome using the fork and pull request approach. diff --git a/benchmark/spe11a/result1.txt b/benchmark/spe11a/result1.txt new file mode 100644 index 0000000..2b4cea8 --- /dev/null +++ b/benchmark/spe11a/result1.txt @@ -0,0 +1,54 @@ +"""Set the full path to the flow executable and flags""" +mpirun -np 32 flow --partition-method=2 --edge-weights-method=2 --imbalance-tol=1.1 --nonlinear-solver=nldd --matrix-add-well-contributions=1 --tolerance-mb=1e-7 --linear-solver=cpr_trueimpes --enable-tuning=false --solver-max-time-step-in-days=0.02 --enable-opm-rst-file=true --output-extra-convergence-info=steps,iterations --newton-min-iterations=1 --time-step-control-target-newton-iterations=2 --time-step-control-growth-rate=1.15 --time-step-control-decay-rate=0.85 --newton-max-iterations=6 --relaxed-max-pv-fraction=0 --min-strict-cnv-iter=8 --tolerance-cnv-relaxed=1e-2 --tolerance-cnv=1e-3 --local-domains-ordering-measure=residual --time-step-control=newtoniterationcount --use-update-stabilization=0 --enable-drift-compensation=0 --max-local-solve-iterations=50 --linear-solver-max-iter=50 + +"""Set the model parameters""" +spe11a master #Name of the spe case (spe11a, spe11b, or spe11c) and OPM Flow version (master or release) +complete gaswater #Name of the co2 model (immiscible or complete) and co2store implementation (gaswater or gasoil [oil properties are set to water internally in OPM flow]) +cartesian #Type of grid (cartesian, tensor, or corner-point) +2.8 0.01 1.2 #Length, width, and depth [m] +280 #If cartesian, number of x cells [-]; otherwise, variable array of x-refinment +1 #If cartesian, number of y cells [-]; otherwise, variable array of y-refinment [-] (for spe11c) +120 #If cartesian, number of z cells [-]; if tensor, variable array of z-refinment; if corner-point, fix array of z-refinment (18 entries) +20 20 #Temperature bottom and top rig [C] +1.2 110000 1 #Datum [m], pressure at the datum [Pa], and multiplier for the permeability in the z direction [-] +1e-9 1.6e-5 #Diffusion (in liquid and gas) [m^2/s] +0 0 #Rock specific heat and density (for spe11b/c) +0 0 0 #Added pore volume on top boundary (for spe11a [if 0, free flow bc]), pore volume on lateral boundaries, and width of buffer cell [m] (for spe11b/c) +0 0 #Elevation of the parabola and back boundary [m] (for spe11c) + +"""Set the saturation functions""" +(max(0, (s_w - swi) / (1 - swi))) ** 2 #Wetting rel perm saturation function [-] +(max(0, (1 - s_w - sni) / (1 - sni))) ** 2 #Non-wetting rel perm saturation function [-] +penmax * math.erf(pen * ((s_w-swi) / (1.-swi)) ** (-(1.0 / 2)) * math.pi**0.5 / (penmax * 2)) #Capillary pressure saturation function [Pa] +(np.exp(np.flip(np.linspace(0, 5.0, npoints))) - 1) / (np.exp(5.0) - 1) #Points to evaluate the saturation functions (s_w) [-] + +"""Properties sat functions""" +"""swi [-], sni [-], pen [Pa], penmax [Pa], npoints [-]""" +SWI1 0.32 SNI1 0.1 PEN1 1500 PENMAX1 9.5E4 NPOINTS1 1000 +SWI2 0.14 SNI2 0.1 PEN2 300 PENMAX2 9.5E4 NPOINTS2 1000 +SWI3 0.12 SNI3 0.1 PEN3 100 PENMAX3 9.5E4 NPOINTS3 1000 +SWI4 0.12 SNI4 0.1 PEN4 25 PENMAX4 9.5E4 NPOINTS4 1000 +SWI5 0.12 SNI5 0.1 PEN5 10 PENMAX5 9.5E4 NPOINTS5 1000 +SWI6 0.10 SNI6 0.1 PEN6 1 PENMAX6 9.5E4 NPOINTS6 1000 +SWI7 0 SNI7 0 PEN7 0 PENMAX7 9.5E4 NPOINTS7 2 + +"""Properties rock""" +"""K [mD], phi [-], disp [m]""" +PERM1 44529.9988 PORO1 0.44 DISP1 1e-2 +PERM2 506624.985 PORO2 0.43 DISP2 1e-2 +PERM3 1013249.97 PORO3 0.44 DISP3 1e-2 +PERM4 2026499.95 PORO4 0.45 DISP4 1e-2 +PERM5 4052999.88 PORO5 0.43 DISP5 1e-2 +PERM6 10132499.7 PORO6 0.46 DISP6 1e-2 +PERM7 0 PORO7 0 DISP7 0 + +"""Wells position""" +"""radius (0 to use the SOURCE keyword instead of well keywords), x, y, and z position [m] (final positions as well for spe11c)""" +0 0.9 0.005 0.3 #Well 1 +0 1.7 0.005 0.7 #Well 2 + +"""Define the injection values ([hours] for spe11a; [years] for spe11b/c)""" +"""injection time, time step size to write results, maximum solver time step, injected fluid (0 water, 1 co2) (well1), injection rate [kg/s] (well1), temperature [C] (well1), injected fluid (0 water, 1 co2) (well2), ...""" +2.5 0.5 0.5 1 1.7e-7 20 1 0 20 +2.5 0.5 0.5 1 1.7e-7 20 1 1.7e-7 20 +115 1 1 1 0 20 1 0 20 \ No newline at end of file diff --git a/benchmark/spe11a/result2.txt b/benchmark/spe11a/result2.txt new file mode 100644 index 0000000..a823f33 --- /dev/null +++ b/benchmark/spe11a/result2.txt @@ -0,0 +1,54 @@ +"""Set the full path to the flow executable and flags""" +mpirun -np 32 flow --partition-method=2 --edge-weights-method=2 --imbalance-tol=1.1 --nonlinear-solver=nldd --matrix-add-well-contributions=1 --tolerance-mb=1e-7 --linear-solver=cpr_trueimpes --enable-tuning=false --solver-max-time-step-in-days=0.02 --enable-opm-rst-file=true --output-extra-convergence-info=steps,iterations --newton-min-iterations=1 --time-step-control-target-newton-iterations=2 --time-step-control-growth-rate=1.15 --time-step-control-decay-rate=0.85 --newton-max-iterations=6 --relaxed-max-pv-fraction=0 --min-strict-cnv-iter=8 --tolerance-cnv-relaxed=1e-2 --tolerance-cnv=1e-3 --local-domains-ordering-measure=residual --time-step-control=newtoniterationcount --use-update-stabilization=0 --enable-drift-compensation=0 --max-local-solve-iterations=50 --linear-solver-max-iter=50 + +"""Set the model parameters""" +spe11a master #Name of the spe case (spe11a, spe11b, or spe11c) and OPM Flow version (master or release) +complete gaswater #Name of the co2 model (immiscible or complete) and co2store implementation (gaswater or gasoil [oil properties are set to water internally in OPM flow]) +cartesian #Type of grid (cartesian, tensor, or corner-point) +2.8 0.01 1.2 #Length, width, and depth [m] +280 #If cartesian, number of x cells [-]; otherwise, variable array of x-refinment +1 #If cartesian, number of y cells [-]; otherwise, variable array of y-refinment [-] (for spe11c) +120 #If cartesian, number of z cells [-]; if tensor, variable array of z-refinment; if corner-point, fix array of z-refinment (18 entries) +20 20 #Temperature bottom and top rig [C] +1.2 110000 1 #Datum [m], pressure at the datum [Pa], and multiplier for the permeability in the z direction [-] +1e-9 1.6e-5 #Diffusion (in liquid and gas) [m^2/s] +0 0 #Rock specific heat and density (for spe11b/c) +0 0 0 #Added pore volume on top boundary (for spe11a [if 0, free flow bc]), pore volume on lateral boundaries, and width of buffer cell [m] (for spe11b/c) +0 0 #Elevation of the parabola and back boundary [m] (for spe11c) + +"""Set the saturation functions""" +(max(0, (s_w - swi) / (1 - swi))) ** 2 #Wetting rel perm saturation function [-] +(max(0, (1 - s_w - sni) / (1 - sni))) ** 2 #Non-wetting rel perm saturation function [-] +penmax * math.erf(pen * ((s_w-swi) / (1.-swi)) ** (-(1.0 / 2)) * math.pi**0.5 / (penmax * 2)) #Capillary pressure saturation function [Pa] +(np.exp(np.flip(np.linspace(0, 5.0, npoints))) - 1) / (np.exp(5.0) - 1) #Points to evaluate the saturation functions (s_w) [-] + +"""Properties sat functions""" +"""swi [-], sni [-], pen [Pa], penmax [Pa], npoints [-]""" +SWI1 0.32 SNI1 0.1 PEN1 1500 PENMAX1 2500 NPOINTS1 1000 +SWI2 0.14 SNI2 0.1 PEN2 300 PENMAX2 2500 NPOINTS2 1000 +SWI3 0.12 SNI3 0.1 PEN3 100 PENMAX3 2500 NPOINTS3 1000 +SWI4 0.12 SNI4 0.1 PEN4 25 PENMAX4 2500 NPOINTS4 1000 +SWI5 0.12 SNI5 0.1 PEN5 10 PENMAX5 2500 NPOINTS5 1000 +SWI6 0.10 SNI6 0.1 PEN6 1 PENMAX6 2500 NPOINTS6 1000 +SWI7 0 SNI7 0 PEN7 0 PENMAX7 2500 NPOINTS7 2 + +"""Properties rock""" +"""K [mD], phi [-], disp [m]""" +PERM1 44529.9988 PORO1 0.44 DISP1 1e-2 +PERM2 506624.985 PORO2 0.43 DISP2 1e-2 +PERM3 1013249.97 PORO3 0.44 DISP3 1e-2 +PERM4 2026499.95 PORO4 0.45 DISP4 1e-2 +PERM5 4052999.88 PORO5 0.43 DISP5 1e-2 +PERM6 10132499.7 PORO6 0.46 DISP6 1e-2 +PERM7 0 PORO7 0 DISP7 0 + +"""Wells position""" +"""radius (0 to use the SOURCE keyword instead of well keywords), x, y, and z position [m] (final positions as well for spe11c)""" +0 0.9 0.005 0.3 #Well 1 +0 1.7 0.005 0.7 #Well 2 + +"""Define the injection values ([hours] for spe11a; [years] for spe11b/c)""" +"""injection time, time step size to write results, maximum solver time step, injected fluid (0 water, 1 co2) (well1), injection rate [kg/s] (well1), temperature [C] (well1), injected fluid (0 water, 1 co2) (well2), ...""" +2.5 0.5 0.5 1 1.7e-7 20 1 0 20 +2.5 0.5 0.5 1 1.7e-7 20 1 1.7e-7 20 +115 1 1 1 0 20 1 0 20 \ No newline at end of file diff --git a/benchmark/spe11a/result3.txt b/benchmark/spe11a/result3.txt new file mode 100644 index 0000000..e15fa79 --- /dev/null +++ b/benchmark/spe11a/result3.txt @@ -0,0 +1,54 @@ +"""Set the full path to the flow executable and flags""" +mpirun -np 32 flow --partition-method=2 --edge-weights-method=2 --imbalance-tol=1.1 --min-strict-cnv-iter=5 --tolerance-cnv-relaxed=1e-2 --tolerance-cnv=1e-3 --tolerance-mb=1e-7 --linear-solver=cprw --newton-min-iterations=1 --enable-tuning=true --enable-opm-rst-file=true --output-extra-convergence-info=steps,iterations --enable-drift-compensation=0 + +"""Set the model parameters""" +spe11a master #Name of the spe case (spe11a, spe11b, or spe11c) and OPM Flow version (master or release) +complete gaswater #Name of the co2 model (immiscible or complete) and co2store implementation (gaswater or gasoil [oil properties are set to water internally in OPM flow]) +corner-point #Type of grid (cartesian, tensor, or corner-point) +2.8 0.01 1.2 #Length, width, and depth [m] +280 #If cartesian, number of x cells [-]; otherwise, variable array of x-refinment +1 #If cartesian, number of y cells [-]; otherwise, variable array of y-refinment [-] (for spe11c) +20,7,1,5,6,3,8,8,12,8,10,10,6,16,6,28,28,1 #If cartesian, number of z cells [-]; if tensor, variable array of z-refinment; if corner-point, fix array of z-refinment (18 entries) +20 20 #Temperature bottom and top rig [C] +1.2 110000 1 #Datum [m], pressure at the datum [Pa], and multiplier for the permeability in the z direction [-] +1e-9 1.6e-5 #Diffusion (in liquid and gas) [m^2/s] +0 0 #Rock specific heat and density (for spe11b/c) +0 0 0 #Added pore volume on top boundary (for spe11a [if 0, free flow bc]), pore volume on lateral boundaries, and width of buffer cell [m] (for spe11b/c) +0 0 #Elevation of the parabola and back boundary [m] (for spe11c) + +"""Set the saturation functions""" +(max(0, (s_w - swi) / (1 - swi))) ** 2 #Wetting rel perm saturation function [-] +(max(0, (1 - s_w - sni) / (1 - sni))) ** 2 #Non-wetting rel perm saturation function [-] +penmax * math.erf(pen * ((s_w-swi) / (1.-swi)) ** (-(1.0 / 2)) * math.pi**0.5 / (penmax * 2)) #Capillary pressure saturation function [Pa] +(np.exp(np.flip(np.linspace(0, 5.0, npoints))) - 1) / (np.exp(5.0) - 1) #Points to evaluate the saturation functions (s_w) [-] + +"""Properties sat functions""" +"""swi [-], sni [-], pen [Pa], penmax [Pa], npoints [-]""" +SWI1 0.32 SNI1 0.1 PEN1 1500 PENMAX1 2500 NPOINTS1 1000 +SWI2 0.14 SNI2 0.1 PEN2 300 PENMAX2 2500 NPOINTS2 1000 +SWI3 0.12 SNI3 0.1 PEN3 100 PENMAX3 2500 NPOINTS3 1000 +SWI4 0.12 SNI4 0.1 PEN4 25 PENMAX4 2500 NPOINTS4 1000 +SWI5 0.12 SNI5 0.1 PEN5 10 PENMAX5 2500 NPOINTS5 1000 +SWI6 0.10 SNI6 0.1 PEN6 1 PENMAX6 2500 NPOINTS6 1000 +SWI7 0 SNI7 0 PEN7 0 PENMAX7 2500 NPOINTS7 2 + +"""Properties rock""" +"""K [mD], phi [-], disp [m]""" +PERM1 44529.9988 PORO1 0.44 DISP1 1e-2 +PERM2 506624.985 PORO2 0.43 DISP2 1e-2 +PERM3 1013249.97 PORO3 0.44 DISP3 1e-2 +PERM4 2026499.95 PORO4 0.45 DISP4 1e-2 +PERM5 4052999.88 PORO5 0.43 DISP5 1e-2 +PERM6 10132499.7 PORO6 0.46 DISP6 1e-2 +PERM7 0 PORO7 0 DISP7 0 + +"""Wells position""" +"""radius (0 to use the SOURCE keyword instead of well keywords), x, y, and z position [m] (final positions as well for spe11c)""" +0 0.9 0.005 0.3 #Well 1 +0 1.7 0.005 0.7 #Well 2 + +"""Define the injection values ([hours] for spe11a; [years] for spe11b/c)""" +"""injection time, time step size to write results, maximum solver time step, injected fluid (0 water, 1 co2) (well1), injection rate [kg/s] (well1), temperature [C] (well1), injected fluid (0 water, 1 co2) (well2), ...""" +2.5 0.5 0.5 1 1.7e-7 20 1 0 20 +2.5 0.5 0.5 1 1.7e-7 20 1 1.7e-7 20 +115 1 1 1 0 20 1 0 20 \ No newline at end of file diff --git a/benchmark/spe11a/result4.txt b/benchmark/spe11a/result4.txt new file mode 100644 index 0000000..f92bb8a --- /dev/null +++ b/benchmark/spe11a/result4.txt @@ -0,0 +1,54 @@ +"""Set the full path to the flow executable and flags""" +mpirun -np 70 flow --partition-method=2 --edge-weights-method=2 --imbalance-tol=1.1 --tolerance-mb=1e-7 --linear-solver=cprw --newton-min-iterations=1 --enable-tuning=true --enable-opm-rst-file=true --output-extra-convergence-info=steps,iterations --enable-drift-compensation=0 + +"""Set the model parameters""" +spe11a master #Name of the spe case (spe11a, spe11b, or spe11c) and OPM Flow version (master or release) +complete gaswater #Name of the co2 model (immiscible or complete) and co2store implementation (gaswater or gasoil [oil properties are set to water internally in OPM flow]) +cartesian #Type of grid (cartesian, tensor, or corner-point) +2.8 0.01 1.2 #Length, width, and depth [m] +2800 #If cartesian, number of x cells [-]; otherwise, variable array of x-refinment +1 #If cartesian, number of y cells [-]; otherwise, variable array of y-refinment [-] (for spe11c) +1200 #If cartesian, number of z cells [-]; if tensor, variable array of z-refinment; if corner-point, fix array of z-refinment (18 entries) +20 20 #Temperature bottom and top rig [C] +1.2 110000 1 #Datum [m], pressure at the datum [Pa], and multiplier for the permeability in the z direction [-] +1e-9 1.6e-5 #Diffusion (in liquid and gas) [m^2/s] +0 0 #Rock specific heat and density (for spe11b/c) +0 0 0 #Added pore volume on top boundary (for spe11a [if 0, free flow bc]), pore volume on lateral boundaries, and width of buffer cell [m] (for spe11b/c) +0 0 #Elevation of the parabola and back boundary [m] (for spe11c) + +"""Set the saturation functions""" +(max(0, (s_w - swi) / (1 - swi))) ** 2 #Wetting rel perm saturation function [-] +(max(0, (1 - s_w - sni) / (1 - sni))) ** 2 #Non-wetting rel perm saturation function [-] +penmax * math.erf(pen * ((s_w-swi) / (1.-swi)) ** (-(1.0 / 2)) * math.pi**0.5 / (penmax * 2)) #Capillary pressure saturation function [Pa] +(np.exp(np.flip(np.linspace(0, 5.0, npoints))) - 1) / (np.exp(5.0) - 1) #Points to evaluate the saturation functions (s_w) [-] + +"""Properties sat functions""" +"""swi [-], sni [-], pen [Pa], penmax [Pa], npoints [-]""" +SWI1 0.32 SNI1 0.1 PEN1 1500 PENMAX1 2500 NPOINTS1 1000 +SWI2 0.14 SNI2 0.1 PEN2 300 PENMAX2 2500 NPOINTS2 1000 +SWI3 0.12 SNI3 0.1 PEN3 100 PENMAX3 2500 NPOINTS3 1000 +SWI4 0.12 SNI4 0.1 PEN4 25 PENMAX4 2500 NPOINTS4 1000 +SWI5 0.12 SNI5 0.1 PEN5 10 PENMAX5 2500 NPOINTS5 1000 +SWI6 0.10 SNI6 0.1 PEN6 1 PENMAX6 2500 NPOINTS6 1000 +SWI7 0 SNI7 0 PEN7 0 PENMAX7 2500 NPOINTS7 2 + +"""Properties rock""" +"""K [mD], phi [-], disp [m]""" +PERM1 44529.9988 PORO1 0.44 DISP1 1e-2 +PERM2 506624.985 PORO2 0.43 DISP2 1e-2 +PERM3 1013249.97 PORO3 0.44 DISP3 1e-2 +PERM4 2026499.95 PORO4 0.45 DISP4 1e-2 +PERM5 4052999.88 PORO5 0.43 DISP5 1e-2 +PERM6 10132499.7 PORO6 0.46 DISP6 1e-2 +PERM7 0 PORO7 0 DISP7 0 + +"""Wells position""" +"""radius (0 to use the SOURCE keyword instead of well keywords), x, y, and z position [m] (final positions as well for spe11c)""" +0 0.9 0.005 0.3 #Well 1 +0 1.7 0.005 0.7 #Well 2 + +"""Define the injection values ([hours] for spe11a; [years] for spe11b/c)""" +"""injection time, time step size to write results, maximum solver time step, injected fluid (0 water, 1 co2) (well1), injection rate [kg/s] (well1), temperature [C] (well1), injected fluid (0 water, 1 co2) (well2), ...""" +2.5 0.5 .00006 1 1.7e-7 20 1 0 20 +2.5 0.5 .00006 1 1.7e-7 20 1 1.7e-7 20 +115 1 .00024 1 0 20 1 0 20 \ No newline at end of file diff --git a/benchmark/spe11b/result1.txt b/benchmark/spe11b/result1.txt new file mode 100644 index 0000000..0c373bb --- /dev/null +++ b/benchmark/spe11b/result1.txt @@ -0,0 +1,56 @@ +"""Set the full path to the flow executable and flags""" +mpirun -np 32 flow --solver-max-time-step-in-days=3650 --relaxed-max-pv-fraction=0 --partition-method=2 --edge-weights-method=2 --imbalance-tol=1.1 --tolerance-mb=1e-7 --enable-opm-rst-file=true --output-extra-convergence-info=steps,iterations --newton-min-iterations=1 --linear-solver=cpr_trueimpes --time-step-control=newtoniterationcount --newton-max-iterations=12 --solver-growth-factor=1.6 --time-step-control-growth-rate=1.1 --solver-restart-factor=0.2 --time-step-control-decay-rate=0.65 --enable-drift-compensation=0 + +"""Set the model parameters""" +spe11b master #Name of the spe case (spe11a, spe11b, or spe11c) and OPM Flow version (master or release) +complete gaswater #Name of the co2 model (immiscible or complete) and co2store implementation (gaswater or gasoil [oil properties are set to water internally in OPM flow]) +cartesian #Type of grid (cartesian, tensor, or corner-point) +8400 1 1200 #Length, width, and depth [m] +840 #If cartesian, number of x cells [-]; otherwise, variable array of x-refinment +1 #If cartesian, number of y cells [-]; otherwise, variable array of y-refinment [-] (for spe11c) +120 #If cartesian, number of z cells [-]; if tensor, variable array of z-refinment; if corner-point, fix array of z-refinment (18 entries) +70 40 #Temperature bottom and top rig [C] +300 3e7 0.1 #Datum [m], pressure at the datum [Pa], and multiplier for the permeability in the z direction [-] +1e-9 2e-8 #Diffusion (in liquid and gas) [m^2/s] +8.5e-1 2500 #Rock specific heat and density (for spe11b/c) +0 5e4 1 #Added pore volume on top boundary (for spe11a [if 0, free flow bc]), pore volume on lateral boundaries, and width of buffer cell [m] (for spe11b/c) +0 0 #Elevation of the parabola and back boundary [m] (for spe11c) + +"""Set the saturation functions""" +(max(0, (s_w - swi) / (1 - swi))) ** 1.5 #Wetting rel perm saturation function [-] +(max(0, (1 - s_w - sni) / (1 - sni))) ** 1.5 #Non-wetting rel perm saturation function [-] +penmax * math.erf(pen * ((s_w-swi) / (1.-swi)) ** (-(1.0 / 1.5)) * math.pi**0.5 / (penmax * 2)) #Capillary pressure saturation function [Pa] +(np.exp(np.flip(np.linspace(0, 5.0, npoints))) - 1) / (np.exp(5.0) - 1) #Points to evaluate the saturation functions (s_w) [-] + +"""Properties sat functions""" +"""swi [-], sni [-], pen [Pa], penmax [Pa], npoints [-]""" +SWI1 0.32 SNI1 0.1 PEN1 193531.39 PENMAX1 3e7 NPOINTS1 1000 +SWI2 0.14 SNI2 0.1 PEN2 8654.99 PENMAX2 3e7 NPOINTS2 1000 +SWI3 0.12 SNI3 0.1 PEN3 6120.00 PENMAX3 3e7 NPOINTS3 1000 +SWI4 0.12 SNI4 0.1 PEN4 3870.63 PENMAX4 3e7 NPOINTS4 1000 +SWI5 0.12 SNI5 0.1 PEN5 3060.00 PENMAX5 3e7 NPOINTS5 1000 +SWI6 0.10 SNI6 0.1 PEN6 2560.18 PENMAX6 3e7 NPOINTS6 1000 +SWI7 0 SNI7 0 PEN7 0 PENMAX7 3e7 NPOINTS7 2 + +"""Properties rock""" +"""K [mD], phi [-], disp [m], thconr [W m-1 K-1]""" +PERM1 0.10132 PORO1 0.10 DISP1 10 THCONR1 1.90 +PERM2 101.324 PORO2 0.20 DISP2 10 THCONR2 1.25 +PERM3 202.650 PORO3 0.20 DISP3 10 THCONR3 1.25 +PERM4 506.625 PORO4 0.20 DISP4 10 THCONR4 1.25 +PERM5 1013.25 PORO5 0.25 DISP5 10 THCONR5 0.92 +PERM6 2026.50 PORO6 0.35 DISP6 10 THCONR6 0.26 +PERM7 1e-5 PORO7 1e-6 DISP7 0 THCONR7 2.00 + +"""Wells radius and position""" +"""radius (0 to use the SOURCE keyword instead of well keywords), x, y, and z position [m] (final positions as well for spe11c)""" +0 2700. 0.5 300. #Well 1 +0 5100. 0.5 700. #Well 2 + +"""Define the injection values ([hours] for spe11a; [years] for spe11b/c)""" +"""injection time, time step size to write results, maximum solver time step, injected fluid (0 water, 1 co2) (well1), injection rate [kg/s] (well1), temperature [C] (well1), injected fluid (0 water, 1 co2) (well2), ...""" +999.9 999.9 10 1 0 10 1 0 10 + 0.1 0.1 0.1 1 0 10 1 0 10 + 25 5 5 1 0.035 10 1 0 10 + 25 5 5 1 0.035 10 1 0.035 10 + 950 5 5 1 0 10 1 0 10 \ No newline at end of file diff --git a/benchmark/spe11b/result2.txt b/benchmark/spe11b/result2.txt new file mode 100644 index 0000000..15a071d --- /dev/null +++ b/benchmark/spe11b/result2.txt @@ -0,0 +1,56 @@ +"""Set the full path to the flow executable and flags""" +mpirun -np 32 flow --solver-max-time-step-in-days=3650 --relaxed-max-pv-fraction=0 --partition-method=2 --edge-weights-method=2 --imbalance-tol=1.1 --tolerance-mb=1e-7 --enable-opm-rst-file=true --output-extra-convergence-info=steps,iterations --newton-min-iterations=1 --linear-solver=cpr_trueimpes --time-step-control=newtoniterationcount --newton-max-iterations=12 --solver-growth-factor=1.6 --time-step-control-growth-rate=1.1 --solver-restart-factor=0.2 --time-step-control-decay-rate=0.65 --enable-drift-compensation=0 + +"""Set the model parameters""" +spe11b master #Name of the spe case (spe11a, spe11b, or spe11c) and OPM Flow version (master or release) +complete gaswater #Name of the co2 model (immiscible or complete) and co2store implementation (gaswater or gasoil [oil properties are set to water internally in OPM flow]) +corner-point #Type of grid (cartesian, tensor, or corner-point) +8400 1 1200 #Length, width, and depth [m] +840 #If cartesian, number of x cells [-]; otherwise, variable array of x-refinment +1 #If cartesian, number of y cells [-]; otherwise, variable array of y-refinment [-] (for spe11c) +9,7,1,5,5,3,7,7,10,7,7,8,6,15,5,24,24,7 #If cartesian, number of z cells [-]; if tensor, variable array of z-refinment; if corner-point, fix array of z-refinment (18 entries) +70 40 #Temperature bottom and top rig [C] +300 3e7 0.1 #Datum [m], pressure at the datum [Pa], and multiplier for the permeability in the z direction [-] +1e-9 2e-8 #Diffusion (in liquid and gas) [m^2/s] +8.5e-1 2500 #Rock specific heat and density (for spe11b/c) +0 5e4 1 #Added pore volume on top boundary (for spe11a [if 0, free flow bc]), pore volume on lateral boundaries, and width of buffer cell [m] (for spe11b/c) +0 0 #Elevation of the parabola and back boundary [m] (for spe11c) + +"""Set the saturation functions""" +(max(0, (s_w - swi) / (1 - swi))) ** 1.5 #Wetting rel perm saturation function [-] +(max(0, (1 - s_w - sni) / (1 - sni))) ** 1.5 #Non-wetting rel perm saturation function [-] +penmax * math.erf(pen * ((s_w-swi) / (1.-swi)) ** (-(1.0 / 1.5)) * math.pi**0.5 / (penmax * 2)) #Capillary pressure saturation function [Pa] +(np.exp(np.flip(np.linspace(0, 5.0, npoints))) - 1) / (np.exp(5.0) - 1) #Points to evaluate the saturation functions (s_w) [-] + +"""Properties sat functions""" +"""swi [-], sni [-], pen [Pa], penmax [Pa], npoints [-]""" +SWI1 0.32 SNI1 0.1 PEN1 193531.39 PENMAX1 3e7 NPOINTS1 1000 +SWI2 0.14 SNI2 0.1 PEN2 8654.99 PENMAX2 3e7 NPOINTS2 1000 +SWI3 0.12 SNI3 0.1 PEN3 6120.00 PENMAX3 3e7 NPOINTS3 1000 +SWI4 0.12 SNI4 0.1 PEN4 3870.63 PENMAX4 3e7 NPOINTS4 1000 +SWI5 0.12 SNI5 0.1 PEN5 3060.00 PENMAX5 3e7 NPOINTS5 1000 +SWI6 0.10 SNI6 0.1 PEN6 2560.18 PENMAX6 3e7 NPOINTS6 1000 +SWI7 0 SNI7 0 PEN7 0 PENMAX7 3e7 NPOINTS7 2 + +"""Properties rock""" +"""K [mD], phi [-], disp [m], thconr [W m-1 K-1]""" +PERM1 0.10132 PORO1 0.10 DISP1 10 THCONR1 1.90 +PERM2 101.324 PORO2 0.20 DISP2 10 THCONR2 1.25 +PERM3 202.650 PORO3 0.20 DISP3 10 THCONR3 1.25 +PERM4 506.625 PORO4 0.20 DISP4 10 THCONR4 1.25 +PERM5 1013.25 PORO5 0.25 DISP5 10 THCONR5 0.92 +PERM6 2026.50 PORO6 0.35 DISP6 10 THCONR6 0.26 +PERM7 1e-5 PORO7 1e-6 DISP7 0 THCONR7 2.00 + +"""Wells radius and position""" +"""radius (0 to use the SOURCE keyword instead of well keywords), x, y, and z position [m] (final positions as well for spe11c)""" +0 2700. 0.5 300. #Well 1 +0 5100. 0.5 700. #Well 2 + +"""Define the injection values ([hours] for spe11a; [years] for spe11b/c)""" +"""injection time, time step size to write results, maximum solver time step, injected fluid (0 water, 1 co2) (well1), injection rate [kg/s] (well1), temperature [C] (well1), injected fluid (0 water, 1 co2) (well2), ...""" +999.9 999.9 10 1 0 10 1 0 10 + 0.1 0.1 0.1 1 0 10 1 0 10 + 25 5 5 1 0.035 10 1 0 10 + 25 5 5 1 0.035 10 1 0.035 10 + 950 5 5 1 0 10 1 0 10 \ No newline at end of file diff --git a/benchmark/spe11b/result3.txt b/benchmark/spe11b/result3.txt new file mode 100644 index 0000000..b96aeca --- /dev/null +++ b/benchmark/spe11b/result3.txt @@ -0,0 +1,58 @@ +"""Set the full path to the flow executable and flags""" +mpirun -np 64 flow --relaxed-max-pv-fraction=0 --partition-method=2 --edge-weights-method=2 --imbalance-tol=1.1 --tolerance-mb=1e-7 --enable-tuning=true --enable-opm-rst-file=true --output-extra-convergence-info=steps,iterations --newton-min-iterations=1 --linear-solver=cpr_trueimpes --time-step-control=newtoniterationcount --newton-max-iterations=13 --solver-growth-factor=1.9 --time-step-control-growth-rate=1.5 --enable-drift-compensation=0 + +"""Set the model parameters""" +spe11b master #Name of the spe case (spe11a, spe11b, or spe11c) and OPM Flow version (master or release) +complete gaswater #Name of the co2 model (immiscible or complete) and co2store implementation (gaswater or gasoil [oil properties are set to water internally in OPM flow]) +cartesian #Type of grid (cartesian, tensor, or corner-point) +8400 1 1200 #Length, width, and depth [m] +8400 #If cartesian, number of x cells [-]; otherwise, variable array of x-refinment +1 #If cartesian, number of y cells [-]; otherwise, variable array of y-refinment [-] (for spe11c) +1200 #If cartesian, number of z cells [-]; if tensor, variable array of z-refinment; if corner-point, fix array of z-refinment (18 entries) +70 40 #Temperature bottom and top rig [C] +300 3e7 0.1 #Datum [m], pressure at the datum [Pa], and multiplier for the permeability in the z direction [-] +1e-9 2e-8 #Diffusion (in liquid and gas) [m^2/s] +8.5e-1 2500 #Rock specific heat and density (for spe11b/c) +0 5e4 1 #Added pore volume on top boundary (for spe11a [if 0, free flow bc]), pore volume on lateral boundaries, and width of buffer cell [m] (for spe11b/c) +0 0 #Elevation of the parabola and back boundary [m] (for spe11c) + +"""Set the saturation functions""" +(max(0, (s_w - swi) / (1 - swi))) ** 1.5 #Wetting rel perm saturation function [-] +(max(0, (1 - s_w - sni) / (1 - sni))) ** 1.5 #Non-wetting rel perm saturation function [-] +penmax * math.erf(pen * ((s_w-swi) / (1.-swi)) ** (-(1.0 / 1.5)) * math.pi**0.5 / (penmax * 2)) #Capillary pressure saturation function [Pa] +(np.exp(np.flip(np.linspace(0, 5.0, npoints))) - 1) / (np.exp(5.0) - 1) #Points to evaluate the saturation functions (s_w) [-] + +"""Properties sat functions""" +"""swi [-], sni [-], pen [Pa], penmax [Pa], npoints [-]""" +SWI1 0.32 SNI1 0.1 PEN1 193531.39 PENMAX1 3e7 NPOINTS1 1000 +SWI2 0.14 SNI2 0.1 PEN2 8654.99 PENMAX2 3e7 NPOINTS2 1000 +SWI3 0.12 SNI3 0.1 PEN3 6120.00 PENMAX3 3e7 NPOINTS3 1000 +SWI4 0.12 SNI4 0.1 PEN4 3870.63 PENMAX4 3e7 NPOINTS4 1000 +SWI5 0.12 SNI5 0.1 PEN5 3060.00 PENMAX5 3e7 NPOINTS5 1000 +SWI6 0.10 SNI6 0.1 PEN6 2560.18 PENMAX6 3e7 NPOINTS6 1000 +SWI7 0 SNI7 0 PEN7 0 PENMAX7 3e7 NPOINTS7 2 + +"""Properties rock""" +"""K [mD], phi [-], disp [m], thconr [W m-1 K-1]""" +PERM1 0.10132 PORO1 0.10 DISP1 10 THCONR1 1.90 +PERM2 101.324 PORO2 0.20 DISP2 10 THCONR2 1.25 +PERM3 202.650 PORO3 0.20 DISP3 10 THCONR3 1.25 +PERM4 506.625 PORO4 0.20 DISP4 10 THCONR4 1.25 +PERM5 1013.25 PORO5 0.25 DISP5 10 THCONR5 0.92 +PERM6 2026.50 PORO6 0.35 DISP6 10 THCONR6 0.26 +PERM7 1e-5 PORO7 1e-6 DISP7 0 THCONR7 2.00 + +"""Wells radius and position""" +"""radius (0 to use the SOURCE keyword instead of well keywords), x, y, and z position [m] (final positions as well for spe11c)""" +0 2700. 0.5 300. #Well 1 +0 5100. 0.5 700. #Well 2 + +"""Define the injection values ([hours] for spe11a; [years] for spe11b/c)""" +"""injection time, time step size to write results, maximum solver time step, injected fluid (0 water, 1 co2) (well1), injection rate [kg/s] (well1), temperature [C] (well1), injected fluid (0 water, 1 co2) (well2), ...""" +999.9 999.9 10 1 0 10 1 0 10 + 0.1 0.1 0.1 1 0 10 1 0 10 + 25 5 0.005 1 0.035 10 1 0 10 + 25 5 0.005 1 0.035 10 1 0.035 10 + 50 5 0.1 1 0 10 1 0 10 + 400 5 0.5 1 0 10 1 0 10 + 500 5 1 1 0 10 1 0 10 \ No newline at end of file diff --git a/benchmark/spe11c/result1.txt b/benchmark/spe11c/result1.txt new file mode 100644 index 0000000..68bde3f --- /dev/null +++ b/benchmark/spe11c/result1.txt @@ -0,0 +1,58 @@ +"""Set the full path to the flow executable and flags""" +mpirun -np 64 flow --relaxed-max-pv-fraction=0 --partition-method=2 --edge-weights-method=2 --imbalance-tol=1.1 --tolerance-mb=1e-7 --enable-tuning=true --enable-opm-rst-file=true --output-extra-convergence-info=steps,iterations --newton-min-iterations=1 --linear-solver=cpr_trueimpes --time-step-control=newtoniterationcount --newton-max-iterations=13 --solver-growth-factor=1.9 --time-step-control-growth-rate=1.5 --enable-drift-compensation=0 + +"""Set the model parameters""" +spe11c master #Name of the spe case (spe11a, spe11b, or spe11c) and OPM Flow version (master or release) +complete gaswater #Name of the co2 model (immiscible or complete) and co2store implementation (gaswater or gasoil [oil properties are set to water internally in OPM flow]) +corner-point #Type of grid (cartesian, tensor, or corner-point) +8400 5000 1200 #Length, width, and depth [m] +168 #If cartesian, number of x cells [-]; otherwise, variable array of x-refinment +100 #If cartesian, number of y cells [-]; otherwise, variable array of y-refinment [-] (for spe11c) +9,7,1,5,5,3,7,7,10,7,7,8,6,15,5,24,24,7 #If cartesian, number of z cells [-]; if tensor, variable array of z-refinment; if corner-point, fix array of z-refinment (18 entries) +70 36.12 #Temperature bottom and top rig [C] +300 3e7 0.1 #Datum [m], pressure at the datum [Pa], and multiplier for the permeability in the z direction [-] +1e-9 2e-8 #Diffusion (in liquid and gas) [m^2/s] +8.5e-1 2500 #Rock specific heat and density (for spe11b/c) +0 5e4 1 #Added pore volume on top boundary (for spe11a [if 0, free flow bc]), pore volume on lateral boundaries, and width of buffer cell [m] (for spe11b/c) +150 10 #Elevation of the parabola and back [m] (for spe11c) + +"""Set the saturation functions""" +(max(0, (s_w - swi) / (1 - swi))) ** 1.5 #Wetting rel perm saturation function [-] +(max(0, (1 - s_w - sni) / (1 - sni))) ** 1.5 #Non-wetting rel perm saturation function [-] +penmax * math.erf(pen * ((s_w-swi) / (1.-swi)) ** (-(1.0 / 1.5)) * math.pi**0.5 / (penmax * 2)) #Capillary pressure saturation function [Pa] +(np.exp(np.flip(np.linspace(0, 5.0, npoints))) - 1) / (np.exp(5.0) - 1) #Points to evaluate the saturation functions (s_w) [-] + +"""Properties sat functions""" +"""swi [-], sni [-], pen [Pa], penmax [Pa], npoints [-]""" +SWI1 0.32 SNI1 0.1 PEN1 193531.39 PENMAX1 3e7 NPOINTS1 1000 +SWI2 0.14 SNI2 0.1 PEN2 8654.99 PENMAX2 3e7 NPOINTS2 1000 +SWI3 0.12 SNI3 0.1 PEN3 6120.00 PENMAX3 3e7 NPOINTS3 1000 +SWI4 0.12 SNI4 0.1 PEN4 3870.63 PENMAX4 3e7 NPOINTS4 1000 +SWI5 0.12 SNI5 0.1 PEN5 3060.00 PENMAX5 3e7 NPOINTS5 1000 +SWI6 0.10 SNI6 0.1 PEN6 2560.18 PENMAX6 3e7 NPOINTS6 1000 +SWI7 0 SNI7 0 PEN7 0 PENMAX7 3e7 NPOINTS7 2 + +"""Properties rock""" +"""K [mD], phi [-], disp [m], thconr [W m-1 K-1]""" +PERM1 0.10132 PORO1 0.10 DISP1 10 THCONR1 1.90 +PERM2 101.324 PORO2 0.20 DISP2 10 THCONR2 1.25 +PERM3 202.650 PORO3 0.20 DISP3 10 THCONR3 1.25 +PERM4 506.625 PORO4 0.20 DISP4 10 THCONR4 1.25 +PERM5 1013.25 PORO5 0.25 DISP5 10 THCONR5 0.92 +PERM6 2026.50 PORO6 0.35 DISP6 10 THCONR6 0.26 +PERM7 1e-5 PORO7 1e-6 DISP7 0 THCONR7 2.00 + +"""Wells radius and position""" +"""radius (0 to use the SOURCE keyword instead of well keywords), x, y, and z position [m] (final positions as well for spe11c)""" +0 2700. 1000. 300. 2700. 4000. 300. #Well 1 +0 5100. 1000. 700. 5100. 4000. 700. #Well 2 + +"""Define the injection values ([hours] for spe11a; [years] for spe11b/c)""" +"""injection time, time step size to write results, maximum solver time step, injected fluid (0 water, 1 co2) (well1), injection rate [kg/s] (well1), temperature [C] (well1), injected fluid (0 water, 1 co2) (well2), ...""" +999.9 999.9 10 1 0 10 1 0 10 + 0.1 0.1 0.1 1 0 10 1 0 10 + 25 5 1 1 50 10 1 0 10 + 25 5 0.3 1 50 10 1 50 10 + 50 25 0.5 1 0 10 1 0 10 + 400 50 0.5 1 0 10 1 0 10 + 500 100 1 1 0 10 1 0 10 \ No newline at end of file diff --git a/benchmark/spe11c/result2.txt b/benchmark/spe11c/result2.txt new file mode 100644 index 0000000..9cf6238 --- /dev/null +++ b/benchmark/spe11c/result2.txt @@ -0,0 +1,58 @@ +"""Set the full path to the flow executable and flags""" +mpirun -np 64 flow --solver-max-time-step-in-days=3650 --relaxed-max-pv-fraction=0 --partition-method=2 --edge-weights-method=2 --imbalance-tol=1.1 --tolerance-mb=1e-7 --enable-opm-rst-file=true --output-extra-convergence-info=steps,iterations --newton-min-iterations=1 --linear-solver=cpr_trueimpes --time-step-control=newtoniterationcount --newton-max-iterations=12 --solver-growth-factor=1.6 --time-step-control-growth-rate=1.1 --solver-restart-factor=0.2 --time-step-control-decay-rate=0.65 --enable-drift-compensation=0 + +"""Set the model parameters""" +spe11c master #Name of the spe case (spe11a, spe11b, or spe11c) and OPM Flow version (master or release) +complete gaswater #Name of the co2 model (immiscible or complete) and co2store implementation (gaswater or gasoil [oil properties are set to water internally in OPM flow]) +cartesian #Type of grid (cartesian, tensor, or corner-point) +8400 5000 1200 #Length, width, and depth [m] +168 #If cartesian, number of x cells [-]; otherwise, variable array of x-refinment +100 #If cartesian, number of y cells [-]; otherwise, variable array of y-refinment [-] (for spe11c) +120 #If cartesian, number of z cells [-]; if tensor, variable array of z-refinment; if corner-point, fix array of z-refinment (18 entries) +70 36.12 #Temperature bottom and top rig [C] +300 3e7 0.1 #Datum [m], pressure at the datum [Pa], and multiplier for the permeability in the z direction [-] +1e-9 2e-8 #Diffusion (in liquid and gas) [m^2/s] +8.5e-1 2500 #Rock specific heat and density (for spe11b/c) +0 5e4 1 #Added pore volume on top boundary (for spe11a [if 0, free flow bc]), pore volume on lateral boundaries, and width of buffer cell [m] (for spe11b/c) +150 10 #Elevation of the parabola and back [m] (for spe11c) + +"""Set the saturation functions""" +(max(0, (s_w - swi) / (1 - swi))) ** 1.5 #Wetting rel perm saturation function [-] +(max(0, (1 - s_w - sni) / (1 - sni))) ** 1.5 #Non-wetting rel perm saturation function [-] +penmax * math.erf(pen * ((s_w-swi) / (1.-swi)) ** (-(1.0 / 1.5)) * math.pi**0.5 / (penmax * 2)) #Capillary pressure saturation function [Pa] +(np.exp(np.flip(np.linspace(0, 5.0, npoints))) - 1) / (np.exp(5.0) - 1) #Points to evaluate the saturation functions (s_w) [-] + +"""Properties sat functions""" +"""swi [-], sni [-], pen [Pa], penmax [Pa], npoints [-]""" +SWI1 0.32 SNI1 0.1 PEN1 193531.39 PENMAX1 3e7 NPOINTS1 1000 +SWI2 0.14 SNI2 0.1 PEN2 8654.99 PENMAX2 3e7 NPOINTS2 1000 +SWI3 0.12 SNI3 0.1 PEN3 6120.00 PENMAX3 3e7 NPOINTS3 1000 +SWI4 0.12 SNI4 0.1 PEN4 3870.63 PENMAX4 3e7 NPOINTS4 1000 +SWI5 0.12 SNI5 0.1 PEN5 3060.00 PENMAX5 3e7 NPOINTS5 1000 +SWI6 0.10 SNI6 0.1 PEN6 2560.18 PENMAX6 3e7 NPOINTS6 1000 +SWI7 0 SNI7 0 PEN7 0 PENMAX7 3e7 NPOINTS7 2 + +"""Properties rock""" +"""K [mD], phi [-], disp [m], thconr [W m-1 K-1]""" +PERM1 0.10132 PORO1 0.10 DISP1 10 THCONR1 1.90 +PERM2 101.324 PORO2 0.20 DISP2 10 THCONR2 1.25 +PERM3 202.650 PORO3 0.20 DISP3 10 THCONR3 1.25 +PERM4 506.625 PORO4 0.20 DISP4 10 THCONR4 1.25 +PERM5 1013.25 PORO5 0.25 DISP5 10 THCONR5 0.92 +PERM6 2026.50 PORO6 0.35 DISP6 10 THCONR6 0.26 +PERM7 1e-5 PORO7 1e-6 DISP7 0 THCONR7 2.00 + +"""Wells radius and position""" +"""radius (0 to use the SOURCE keyword instead of well keywords), x, y, and z position [m] (final positions as well for spe11c)""" +0 2700. 1000. 300. 2700. 4000. 300. #Well 1 +0 5100. 1000. 700. 5100. 4000. 700. #Well 2 + +"""Define the injection values ([hours] for spe11a; [years] for spe11b/c)""" +"""injection time, time step size to write results, maximum solver time step, injected fluid (0 water, 1 co2) (well1), injection rate [kg/s] (well1), temperature [C] (well1), injected fluid (0 water, 1 co2) (well2), ...""" +999.9 999.9 10 1 0 10 1 0 10 + 0.1 0.1 0.1 1 0 10 1 0 10 + 25 5 5 1 50 10 1 0 10 + 25 5 5 1 50 10 1 50 10 + 50 25 25 1 0 10 1 0 10 + 400 50 50 1 0 10 1 0 10 + 500 100 100 1 0 10 1 0 10 \ No newline at end of file diff --git a/benchmark/spe11c/result3.txt b/benchmark/spe11c/result3.txt new file mode 100644 index 0000000..b1d724e --- /dev/null +++ b/benchmark/spe11c/result3.txt @@ -0,0 +1,56 @@ +"""Set the full path to the flow executable and flags""" +mpirun -np 1024 flow --partition-method=2 --edge-weights-method=2 --imbalance-tol=1.1 --tolerance-mb=1e-7 --linear-solver=cprw --enable-tuning=true --enable-opm-rst-file=true --output-extra-convergence-info=steps,iterations --newton-min-iterations=1 --enable-drift-compensation=0 + +"""Set the model parameters""" +spe11c master #Name of the spe case (spe11a, spe11b, or spe11c) and OPM Flow version (master or release) +complete gaswater #Name of the co2 model (immiscible or complete) and co2store implementation (gaswater or gasoil [oil properties are set to water internally in OPM flow]) +corner-point #Type of grid (cartesian, tensor, or corner-point) +8400 5000 1200 #Length, width, and depth [m] +1050 #If cartesian, number of x cells [-]; otherwise, variable array of x-refinment +118,122,125,122,118 #If cartesian, number of y cells [-]; otherwise, variable array of y-refinment [-] (for spe11c) 80,90,100,90,80 +9,7,1,5,5,3,7,7,10,7,7,8,6,15,5,24,24,7 #If cartesian, number of z cells [-]; if tensor, variable array of z-refinment; if corner-point, fix array of z-refinment (18 entries) +70 36.12 #Temperature bottom and top rig [C] +300 3e7 0.1 #Datum [m], pressure at the datum [Pa], and multiplier for the permeability in the z direction [-] +1e-9 2e-8 #Diffusion (in liquid and gas) [m^2/s] +8.5e-1 2500 #Rock specific heat and density (for spe11b/c) +0 5e4 1 #Added pore volume on top boundary (for spe11a [if 0, free flow bc]), pore volume on lateral boundaries, and width of buffer cell [m] (for spe11b/c) +150 10 #Elevation of the parabola and back [m] (for spe11c) + +"""Set the saturation functions""" +(max(0, (s_w - swi) / (1 - swi))) ** 1.5 #Wetting rel perm saturation function [-] +(max(0, (1 - s_w - sni) / (1 - sni))) ** 1.5 #Non-wetting rel perm saturation function [-] +penmax * math.erf(pen * ((s_w-swi) / (1.-swi)) ** (-(1.0 / 1.5)) * math.pi**0.5 / (penmax * 2)) #Capillary pressure saturation function [Pa] +(np.exp(np.flip(np.linspace(0, 5.0, npoints))) - 1) / (np.exp(5.0) - 1) #Points to evaluate the saturation functions (s_w) [-] + +"""Properties sat functions""" +"""swi [-], sni [-], pen [Pa], penmax [Pa], npoints [-]""" +SWI1 0.32 SNI1 0.1 PEN1 193531.39 PENMAX1 3e7 NPOINTS1 1000 +SWI2 0.14 SNI2 0.1 PEN2 8654.99 PENMAX2 3e7 NPOINTS2 1000 +SWI3 0.12 SNI3 0.1 PEN3 6120.00 PENMAX3 3e7 NPOINTS3 1000 +SWI4 0.12 SNI4 0.1 PEN4 3870.63 PENMAX4 3e7 NPOINTS4 1000 +SWI5 0.12 SNI5 0.1 PEN5 3060.00 PENMAX5 3e7 NPOINTS5 1000 +SWI6 0.10 SNI6 0.1 PEN6 2560.18 PENMAX6 3e7 NPOINTS6 1000 +SWI7 0 SNI7 0 PEN7 0 PENMAX7 3e7 NPOINTS7 2 + +"""Properties rock""" +"""K [mD], phi [-], disp [m], thconr [W m-1 K-1]""" +PERM1 0.10132 PORO1 0.10 DISP1 10 THCONR1 1.90 +PERM2 101.324 PORO2 0.20 DISP2 10 THCONR2 1.25 +PERM3 202.650 PORO3 0.20 DISP3 10 THCONR3 1.25 +PERM4 506.625 PORO4 0.20 DISP4 10 THCONR4 1.25 +PERM5 1013.25 PORO5 0.25 DISP5 10 THCONR5 0.92 +PERM6 2026.50 PORO6 0.35 DISP6 10 THCONR6 0.26 +PERM7 1e-5 PORO7 1e-6 DISP7 0 THCONR7 2.00 + +"""Wells radius and position""" +"""radius (0 to use the SOURCE keyword instead of well keywords), x, y, and z position [m] (final positions as well for spe11c)""" +0 2700. 1000. 300. 2700. 4000. 300. #Well 1 +0 5100. 1000. 700. 5100. 4000. 700. #Well 2 + +"""Define the injection values ([hours] for spe11a; [years] for spe11b/c)""" +"""injection time, time step size to write results, maximum solver time step, injected fluid (0 water, 1 co2) (well1), injection rate [kg/s] (well1), temperature [C] (well1), injected fluid (0 water, 1 co2) (well2), ...""" + 25 5 5 1 50 10 1 0 10 + 25 5 5 1 50 10 1 50 10 + 50 25 25 1 0 10 1 0 10 + 400 50 50 1 0 10 1 0 10 + 500 100 100 1 0 10 1 0 10 \ No newline at end of file diff --git a/build_opm-flow_macOS.bash b/build_opm-flow_macOS.bash deleted file mode 100755 index b2959ba..0000000 --- a/build_opm-flow_macOS.bash +++ /dev/null @@ -1,40 +0,0 @@ -# SPDX-FileCopyrightText: 2023 NORCE -# SPDX-License-Identifier: MIT - -CURRENT_DIRECTORY="$PWD" - -# Dune modules -for module in common geometry grid istl -do git clone https://gitlab.dune-project.org/core/dune-$module.git -done -for module in common geometry grid istl -do ./dune-common/bin/dunecontrol --only=dune-$module cmake -DCMAKE_DISABLE_FIND_PACKAGE_MPI=1 - ./dune-common/bin/dunecontrol --only=dune-$module make -j5 -done - -# OPM modules -for repo in common grid models simulators -do - git clone https://github.com/OPM/opm-$repo.git -done - -source vpyopmspe11/bin/activate - -mkdir build - -for repo in common grid models -do - mkdir build/opm-$repo - cd build/opm-$repo - cmake -DPYTHON_EXECUTABLE=$(which python) -DUSE_MPI=0 -DNDEBUG=1 -DOPM_ENABLE_PYTHON=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CURRENT_DIRECTORY/dune-common/build-cmake;$CURRENT_DIRECTORY/dune-grid/build-cmake;$CURRENT_DIRECTORY/dune-geometry/build-cmake;$CURRENT_DIRECTORY/dune-istl/build-cmake;$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid" $CURRENT_DIRECTORY/opm-$repo - make -j5 - cd ../.. -done - -mkdir build/opm-simulators -cd build/opm-simulators -cmake -DUSE_MPI=0 -DNDEBUG=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CURRENT_DIRECTORY/dune-common/build-cmake;$CURRENT_DIRECTORY/dune-grid/build-cmake;$CURRENT_DIRECTORY/dune-geometry/build-cmake;$CURRENT_DIRECTORY/dune-istl/build-cmake;$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid;$CURRENT_DIRECTORY/build/opm-models" $CURRENT_DIRECTORY/opm-simulators -make -j5 flow -cd ../.. - -echo "export PYTHONPATH=\$PYTHONPATH:$CURRENT_DIRECTORY/build/opm-common/build/python" >> $CURRENT_DIRECTORY/vpyopmspe11/bin/activate \ No newline at end of file diff --git a/build_opm-flow_mpi.bash b/build_opm-flow_mpi.bash deleted file mode 100644 index 9ff0bea..0000000 --- a/build_opm-flow_mpi.bash +++ /dev/null @@ -1,24 +0,0 @@ -CURRENT_DIRECTORY="$PWD" - -# OPM modules -for repo in common grid models simulators -do - git clone https://github.com/OPM/opm-$repo.git -done - -mkdir build - -for repo in common grid models -do - mkdir build/opm-$repo - cd build/opm-$repo - cmake -DUSE_MPI=1 -DNDEBUG=1 -DOPM_ENABLE_PYTHON=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid" $CURRENT_DIRECTORY/opm-$repo - make -j5 - cd ../.. -done - -mkdir build/opm-simulators -cd build/opm-simulators -cmake -DUSE_MPI=1 -DNDEBUG=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid;$CURRENT_DIRECTORY/build/opm-models" $CURRENT_DIRECTORY/opm-simulators -make -j5 flow -cd ../.. \ No newline at end of file diff --git a/docs/_images/benchmark_spe11a_performance.png b/docs/_images/benchmark_spe11a_performance.png new file mode 100644 index 0000000..2e67560 Binary files /dev/null and b/docs/_images/benchmark_spe11a_performance.png differ diff --git a/docs/_images/benchmark_spe11a_sparse_data.png b/docs/_images/benchmark_spe11a_sparse_data.png new file mode 100644 index 0000000..3ae53b0 Binary files /dev/null and b/docs/_images/benchmark_spe11a_sparse_data.png differ diff --git a/docs/_images/benchmark_spe11b_performance.png b/docs/_images/benchmark_spe11b_performance.png new file mode 100644 index 0000000..3bc95e8 Binary files /dev/null and b/docs/_images/benchmark_spe11b_performance.png differ diff --git a/docs/_images/benchmark_spe11b_sparse_data.png b/docs/_images/benchmark_spe11b_sparse_data.png new file mode 100644 index 0000000..08e8906 Binary files /dev/null and b/docs/_images/benchmark_spe11b_sparse_data.png differ diff --git a/docs/_images/benchmark_spe11c_performance.png b/docs/_images/benchmark_spe11c_performance.png new file mode 100644 index 0000000..fc04a17 Binary files /dev/null and b/docs/_images/benchmark_spe11c_performance.png differ diff --git a/docs/_images/benchmark_spe11c_sparse_data.png b/docs/_images/benchmark_spe11c_sparse_data.png new file mode 100644 index 0000000..20b6e49 Binary files /dev/null and b/docs/_images/benchmark_spe11c_sparse_data.png differ diff --git a/docs/_images/plopm.png b/docs/_images/plopm.png new file mode 100644 index 0000000..434af77 Binary files /dev/null and b/docs/_images/plopm.png differ diff --git a/docs/_sources/benchmark.rst.txt b/docs/_sources/benchmark.rst.txt new file mode 100644 index 0000000..1acdba9 --- /dev/null +++ b/docs/_sources/benchmark.rst.txt @@ -0,0 +1,30 @@ +********* +Benchmark +********* + +.. note:: + These are preliminary results and will be updated up to the final submission deadline (September 20th 2024, see `here `_). + For example, new simulations for the spe11a result3 and spe11c result3 are still running to handle the mass issue and to include the 1000 years of initialization time, respectively. + +The configuration files are located in the `benchmark `_ folder. + +====== +SPE11A +====== + +.. figure:: figs/benchmark_spe11a_performance.png +.. figure:: figs/benchmark_spe11a_sparse_data.png + +====== +SPE11B +====== + +.. figure:: figs/benchmark_spe11b_performance.png +.. figure:: figs/benchmark_spe11b_sparse_data.png + +====== +SPE11C +====== + +.. figure:: figs/benchmark_spe11c_performance.png +.. figure:: figs/benchmark_spe11c_sparse_data.png \ No newline at end of file diff --git a/docs/_sources/configuration_file.rst.txt b/docs/_sources/configuration_file.rst.txt index bf7c688..43d7d97 100644 --- a/docs/_sources/configuration_file.rst.txt +++ b/docs/_sources/configuration_file.rst.txt @@ -19,9 +19,9 @@ line as many flags as required (see the OPM Flow documentation `here `_ script + for installation of OPM Flow (binary packages) and the pyopmspe11 package in Linux. + +Source build in Linux/Windows ++++++++++++++++++++++++++++++ +If you are a Linux user (including the Windows subsystem for Linux), then you could try to build Flow (after installing the `prerequisites `_) from the master branches with mpi support by running +in the terminal the following lines (which in turn should build flow in the folder ./build/opm-simulators/bin/flow.): + +.. code-block:: console + + CURRENT_DIRECTORY="$PWD" + + for repo in common grid models simulators + do + git clone https://github.com/OPM/opm-$repo.git + done + + mkdir build + + for repo in common grid models + do + mkdir build/opm-$repo + cd build/opm-$repo + cmake -DUSE_MPI=1 -DWITH_NDEBUG=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid" $CURRENT_DIRECTORY/opm-$repo + make -j5 opm$repo + cd ../.. + done + + mkdir build/opm-simulators + cd build/opm-simulators + cmake -DUSE_MPI=1 -DWITH_NDEBUG=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid;$CURRENT_DIRECTORY/build/opm-models" $CURRENT_DIRECTORY/opm-simulators + make -j5 flow + cd ../.. + + +.. tip:: + + You can create a .sh file (e.g., build_opm_mpi.sh), copy the previous lines, and run in the terminal **source build_opm_mpi.sh** + +.. _macOS: + +Source build in macOS ++++++++++++++++++++++ +For macOS, there are no available binary packages, so OPM Flow needs to be built from source, in addition to the dune libraries and the OPM Python +package (see the `prerequisites `_, which can be installed using macports or brew). This can be achieved by the following lines: + +.. code-block:: console + + CURRENT_DIRECTORY="$PWD" + + for module in common geometry grid istl + do git clone https://gitlab.dune-project.org/core/dune-$module.git --branch v2.9.1 + done + for module in common geometry grid istl + do ./dune-common/bin/dunecontrol --only=dune-$module cmake -DCMAKE_DISABLE_FIND_PACKAGE_MPI=1 + ./dune-common/bin/dunecontrol --only=dune-$module make -j5 + done + + for repo in common grid models simulators + do + git clone https://github.com/OPM/opm-$repo.git + done + + source vpyopmspe11/bin/activate + + mkdir build + + for repo in common grid models + do + mkdir build/opm-$repo + cd build/opm-$repo + cmake -DPYTHON_EXECUTABLE=$(which python) -DWITH_NDEBUG=1 -DUSE_MPI=0 -DOPM_ENABLE_PYTHON=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CURRENT_DIRECTORY/dune-common/build-cmake;$CURRENT_DIRECTORY/dune-grid/build-cmake;$CURRENT_DIRECTORY/dune-geometry/build-cmake;$CURRENT_DIRECTORY/dune-istl/build-cmake;$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid" $CURRENT_DIRECTORY/opm-$repo + make -j5 + cd ../.. + done + + mkdir build/opm-simulators + cd build/opm-simulators + cmake -DUSE_MPI=0 -DWITH_NDEBUG=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CURRENT_DIRECTORY/dune-common/build-cmake;$CURRENT_DIRECTORY/dune-grid/build-cmake;$CURRENT_DIRECTORY/dune-geometry/build-cmake;$CURRENT_DIRECTORY/dune-istl/build-cmake;$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid;$CURRENT_DIRECTORY/build/opm-models" $CURRENT_DIRECTORY/opm-simulators + make -j5 flow + cd ../.. + + echo "export PYTHONPATH=\$PYTHONPATH:$CURRENT_DIRECTORY/build/opm-common/python" >> $CURRENT_DIRECTORY/vpyopmspe11/bin/activate + + +This builds OPM Flow as well as the OPM Python library, and it exports the required PYTHONPATH. Then after execution, deactivate and activate the Python virtual environment. + +Regarding the resdata Python package, it might not be available depending on the Python version (e.g., it is not found using Python 3.9, but it is installed using Python 3.10). +Then, it is recommended to use a Python version equal or higher than 3.10; otherwise, remove resdata from the requirements in the `pyproject.toml `_, +and when executing **pyopmspe11** always set the flag **-u opm** (resdata is the default package for reading the simulation files, see the :ref:`overview`). \ No newline at end of file diff --git a/docs/_sources/introduction.rst.txt b/docs/_sources/introduction.rst.txt index c1120ae..1b40934 100644 --- a/docs/_sources/introduction.rst.txt +++ b/docs/_sources/introduction.rst.txt @@ -4,13 +4,12 @@ Introduction .. image:: ./figs/animationspe11a.gif -This documentation describes the content of the **pyopmspe11** package. -The numerical studies are performed using the `OPM Flow simulator `_. +This documentation describes the **pyopmspe11** package hosted in `https://github.com/OPM/pyopmspe11 `_. Concept ------- Simplified and flexible framework for the three cases in the `SPE Comparative Solution Project `_ -via a :doc:`configuration file <./configuration_file>`: +via a :doc:`configuration file <./configuration_file>` using the `OPM Flow simulator `_: - Set the path to the OPM Flow simulator and simulator flags. - Set the grid type (Cartesian, tensor, or corner-point grid) and the number of cells. @@ -21,6 +20,8 @@ via a :doc:`configuration file <./configuration_file>`: - In addition, it generates .png figures for quick inspection of the results. - Also, it generates figures for comparison between runs (i.e., to assess sensitivities). +.. _overview: + Overview -------- @@ -28,24 +29,16 @@ The current implementation supports the following executable with the argument o .. code-block:: bash - pyopmspe11 -i input.txt -o output + pyopmspe11 -i configuration_file.txt where -- \-i, \-\-input: The base name of the :doc:`configuration file <./configuration_file>` ('input.txt' by default). -- \-o, \-\-output: The base name of the :doc:`output folder <./output_folder>` ('output' by default). -- \-m, \-\-mode: Run the whole framework ('all'), only create decks ('deck'), only run flow ('flow'), only write benchmark data ('data'), only create plots ('plot'), deck and run ('deck_flow'), data and plot ('data_plot'), run and data ('flow_data'), or deck, run, and data ('deck_flow_data') ('deck_flow' by default). -- \-g, \-\-generate: Write only the 'dense', 'sparse', 'performance', 'performance-spatial', 'dense_performance', 'dense_sparse', 'performance_sparse', 'dense_performance-spatial', 'dense_performance_sparse', or 'all' ('performance_sparse') by default. -- \-r, \-\-resolution: Number of x, y, and z elements to map the simulation results to the dense report data ('8,1,5' by default). -- \-t, \-\-time: If one number, time step for the spatial maps (spe11a [h]; spe11b/c [y]) ('5' by default); otherwise, times separated by commas. -- \-u, \-\-use: Using the 'opm' or 'resdata' python package ('resdata' by default). -- \-w, \-\-write: Time interval for the sparse and performance data (spe11a [h]; spe11b/c [y]) ('0.1' by default). -- \-c, \-\-compare: Generate a common plot for the current folders for 'spe11a', 'spe11b', or 'spe11c' ('' by default). - -Installation ------------- - -See the `Github page `_. - -.. tip:: - Check the `CI.yml `_ file. \ No newline at end of file +-i The base name of the :doc:`configuration file <./configuration_file>` ('input.txt' by default). +-o The base name of the :doc:`output folder <./output_folder>` ('output' by default). +-m Run the whole framework ('all'), only create decks ('deck'), only run flow ('flow'), only write benchmark data ('data'), only create plots ('plot'), deck and run ('deck_flow'), data and plot ('data_plot'), run and data ('flow_data'), deck, run, and data ('deck_flow_data'), or flow, data, and plot ('flow_data_plot') ('deck_flow' by default). +-g Write only the 'dense', 'sparse', 'performance', 'performance-spatial', 'dense_performance', 'dense_sparse', 'performance_sparse', 'dense_performance-spatial', 'dense_performance_sparse', or 'all' ('performance_sparse') by default. +-r Number of x, y, and z elements to map the simulation results to the dense report data ('8,1,5' by default). +-t If one number, time step for the spatial maps (spe11a [h]; spe11b/c [y]) ('5' by default); otherwise, times separated by commas. +-u Using the 'opm' or 'resdata' python package ('resdata' by default). +-w Time interval for the sparse and performance data (spe11a [h]; spe11b/c [y]) ('0.1' by default). +-c Generate a common plot for the current folders for 'spe11a', 'spe11b', or 'spe11c' ('' by default). diff --git a/docs/_sources/output_folder.rst.txt b/docs/_sources/output_folder.rst.txt index 3f36fd1..13876be 100644 --- a/docs/_sources/output_folder.rst.txt +++ b/docs/_sources/output_folder.rst.txt @@ -17,5 +17,5 @@ run directly the simulations calling the Flow solvers, e.g., to add tracers (see the OPM Flow documentation `here `_). .. tip:: - If you install the dev-requirements.txt, executing **pytest --cov=pyopmspe11 --cov-report term-missing tests/** runs the + If you install the dev-requirements.txt, executing **pytest \-\-cov=pyopmspe11 \-\-cov-report term-missing tests/** runs the configuration files in the tests with different argument options for **pyopmspe11**, then one can see the different outputs. \ No newline at end of file diff --git a/docs/_sources/related.rst.txt b/docs/_sources/related.rst.txt index 7a28654..c5d484a 100644 --- a/docs/_sources/related.rst.txt +++ b/docs/_sources/related.rst.txt @@ -14,6 +14,14 @@ pyopmnearwell `A framework to simulate near well dynamics using OPM Flow `_. +***** +plopm +***** + +.. image:: ./figs/plopm.png + +`Quick generation of PNG figures and VTKs from a OPM Flow type model `_. + ****** pycopm ****** diff --git a/docs/about.html b/docs/about.html index 214a5ce..6a15126 100644 --- a/docs/about.html +++ b/docs/about.html @@ -47,8 +47,10 @@ diff --git a/docs/benchmark.html b/docs/benchmark.html new file mode 100644 index 0000000..b731b9e --- /dev/null +++ b/docs/benchmark.html @@ -0,0 +1,158 @@ + + + + + + + Benchmark — pyopmspe11 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Benchmark

+
+

Note

+

These are preliminary results and will be updated up to the final submission deadline (September 20th 2024, see here). +For example, new simulations for the spe11a result3 and spe11c result3 are still running to handle the mass issue and to include the 1000 years of initialization time, respectively.

+
+

The configuration files are located in the benchmark folder.

+
+

SPE11A

+
+_images/benchmark_spe11a_performance.png +
+
+_images/benchmark_spe11a_sparse_data.png +
+
+
+

SPE11B

+
+_images/benchmark_spe11b_performance.png +
+
+_images/benchmark_spe11b_sparse_data.png +
+
+
+

SPE11C

+
+_images/benchmark_spe11c_performance.png +
+
+_images/benchmark_spe11c_sparse_data.png +
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/configuration_file.html b/docs/configuration_file.html index a7b6c25..ac4e3ea 100644 --- a/docs/configuration_file.html +++ b/docs/configuration_file.html @@ -23,7 +23,7 @@ - + @@ -48,6 +48,7 @@