Skip to content

Commit a5e6e9c

Browse files
authored
Merge pull request #1 from cssr-tools/development
Updating to cssr-tools
2 parents 73e9216 + b783c9d commit a5e6e9c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+594
-219
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing
22

3-
Hola hola :).
3+
Hola hola 🙂.
44
The following is a set of guidelines for contributing to expreccs.
55

66
## Ground Rules

README.md

+6-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://github.com/daavid00/expreccs/actions/workflows/CI.yml/badge.svg)](https://github.com/daavid00/expreccs/actions/workflows/CI.yml)
1+
[![Build Status](https://github.com/cssr-tools/expreccs/actions/workflows/CI.yml/badge.svg)](https://github.com/cssr-tools/expreccs/actions/workflows/CI.yml)
22
<a href="https://www.python.org/"><img src="https://img.shields.io/badge/python-3.8%20|%203.9%20|%203.10%20|%203.11-blue.svg"></a>
33
[![Code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
44
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
@@ -12,13 +12,13 @@ This repository contains scripts to set up a workflow to run site and regional r
1212

1313
## Installation
1414
You will first need to install
15-
* Flow (https://opm-project.org)
15+
* Flow (https://opm-project.org) (current master branches)
1616

1717
You can install the Python requirements in a virtual environment with the following commands:
1818

1919
```bash
2020
# Clone the repo
21-
git clone https://github.com/daavid00/expreccs.git
21+
git clone https://github.com/cssr-tools/expreccs.git
2222
# Get inside the folder
2323
cd expreccs
2424
# Create the virtual environment
@@ -33,13 +33,9 @@ pip install -e .
3333
pip install -r dev-requirements.txt
3434
```
3535

36-
To build dune and the corresponding OPM master branches from source (e.g., you are a macOS user), you can run the script
37-
`./build_dune_and_opm-flow.bash`, which in turn should build flow in the folder ./build/opm-simulators/bin/flow (for macOS users the dependecies such as boost can be installed using macports).
38-
If you are a Linux user (including the windows subsystem for Linux), then you could try to build Flow with mpi support,
39-
by running the script `./build_opm-flow_mpi.bash` instead of `./build_dune_and_opm-flow.bash`.
36+
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` (See the [_CI.yml_](https://github.com/cssr-tools/expreccs/blob/main/.github/workflows/CI.yml)), which in turn should build the executable in ./build/opm-simulators/bin/flow_gaswater_dissolution.
4037

41-
For macOS users with the latest chips (M1/M2, guessing also M3?), the ecl and opm packages are not available via pip install. Then before installation, remove ecl and opm from the requierements.txt, then proceed with the Python requirements installation, and once inside the vexpreccs Python environment, add the flag `-DPYTHON_EXECUTABLE=/Users/dmar/expreccs/vexpreccs/bin/python` (by typing `which python` in the terminal you get your path) to the cmake (lines 24 in the bash scripts), build flow by running the bash script, and finally, add to the python path the folder where you have built it, e.g., by opening in an editor the vexpreccs/bin/activate script, pasting the following line (edited with the path where you built opm with Python)
42-
`export PYTHONPATH=$PYTHONPATH:/Users/dmar/expreccs/build/opm-common/build/python` at the end of the script, and deactivating and activating the virtual environment.
38+
For macOS users with the latest chips (M1/M2, guessing also M3?), the opm Python package is not available via pip install, while resdata 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). If you face this issue, then before installation, remove resdata and opm from the `requirements.txt`, then proceed with the Python requirements installation, install the OPM Flow dependencies (using macports or brew), and once inside the vexpreccs 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).
4339

4440
## Running expreccs
4541
You can run _expreccs_ as a single command line:
@@ -50,7 +46,7 @@ Run `expreccs --help` to see all possible command line argument options. Inside
5046
flow executable and simulation parameters. See the .txt files in the examples and tests/configs folders.
5147

5248
## Getting started
53-
See the [_documentation_](https://daavid00.github.io/expreccs/introduction.html).
49+
See the [_documentation_](https://cssr-tools.github.io/expreccs/introduction.html).
5450

5551
## About expreccs
5652
The expreccs package is funded by Wintershall Dea, Equinor, Shell, and the Research Council of Norway [project number 336294].

build_dune_and_opm-flow.bash build_opm-flow_macOS.bash

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# SPDX-FileCopyrightText: 2023 NORCE
2+
# SPDX-License-Identifier: GPL-3.0
3+
14
CURRENT_DIRECTORY="$PWD"
25

36
# Dune modules
@@ -15,13 +18,15 @@ do
1518
git clone https://github.com/OPM/opm-$repo.git
1619
done
1720

21+
source vexpreccs/bin/activate
22+
1823
mkdir build
1924

2025
for repo in common grid models
2126
do
2227
mkdir build/opm-$repo
2328
cd build/opm-$repo
24-
cmake -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
29+
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
2530
make -j5
2631
cd ../..
2732
done
@@ -30,4 +35,6 @@ mkdir build/opm-simulators
3035
cd build/opm-simulators
3136
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
3237
make -j5 flow
33-
cd ../..
38+
cd ../..
39+
40+
echo "export PYTHONPATH=\$PYTHONPATH:$CURRENT_DIRECTORY/build/opm-common/build/python" >> $CURRENT_DIRECTORY/vexpreccs/bin/activate

docs/_images/pyopmcsp11.gif

-1.67 MB
Binary file not shown.

docs/_images/pyopmspe11.gif

2.09 MB
Loading

docs/_sources/configuration_file.rst.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
==================
22
Configuration file
33
==================
4-
We consider the configuration file (`input.txt <https://github.com/daavid00/expreccs/blob/main/examples/input.txt>`_) available in the
4+
We consider the configuration file (`input.txt <https://github.com/cssr-tools/expreccs/blob/main/examples/input.txt>`_) available in the
55
examples folder. The parameters are chosen to show the functionality and capabilities of the **expreccs** framework regarding generation
66
of corner-point grids (cpg), heterogeinities (e.g., different rock properties, faults), adding wells, and defining schedules for the
7-
operations. See the `example1.txt <https://github.com/daavid00/expreccs/blob/main/examples/example1.txt>`_ for a simpler configuration
7+
operations. See the `example1.txt <https://github.com/cssr-tools/expreccs/blob/main/examples/example1.txt>`_ for a simpler configuration
88
file.
99

1010
The first input parameter in the configuration file is:
@@ -183,7 +183,7 @@ Since we defined six wells (three of them inside the site model), then each row
183183
the first three defining the injection time, number of restart files in the solution for the regional, number of restart files in the solution for the site/reference, and maximum solver time step, and 2*6 additional
184184
entries to define injected fluid (0 water, 1 CO2) and the injection rates from well 0 to well 5 respectively. If in line 14 the wells
185185
option is activated, then at the end of each row we add the values from the wells (BHP control) on the boundaries in the order of bottom, right, top,
186-
and left with two values respectively (0 for producers and 1 for injectors, and the BHP in Pascals, see `example1_wells.txt <https://github.com/daavid00/expreccs/blob/main/examples/example1_wells.txt>`_).
186+
and left with two values respectively (0 for producers and 1 for injectors, and the BHP in Pascals, see `example1_wells.txt <https://github.com/cssr-tools/expreccs/blob/main/examples/example1_wells.txt>`_).
187187

188188
.. warning::
189189
Keep the linebreak between the sections in the whole configuration file and do not add linebreaks inside the sections

docs/_sources/examples.rst.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Example 1
66
---------
77

88
We consider the configuration file 'example1.txt' in the
9-
examples folder (the animation in the `Github home page <https://github.com/daavid00/expreccs>`_ was based on this configuration file).
9+
examples folder (the animation in the `Github home page <https://github.com/cssr-tools/expreccs>`_ was based on this configuration file).
1010
If the results are to be saved in a folder called 'hello_world', this is achieved by the following command:
1111

1212
.. code-block:: bash
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
expreccs.utils.backcoupling module
2+
==================================
3+
4+
.. automodule:: expreccs.utils.backcoupling
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
:private-members:

docs/_sources/expreccs.utils.rst.txt

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Submodules
77
.. toctree::
88
:maxdepth: 4
99

10+
expreccs.utils.backcoupling
1011
expreccs.utils.inputvalues
1112
expreccs.utils.mapboundaries
1213
expreccs.utils.mapproperties

docs/_sources/introduction.rst.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ operations (see the :doc:`configuration file <./configuration_file>` section).
4242
Installation
4343
------------
4444

45-
See the `Github page <https://github.com/daavid00/expreccs>`_.
45+
See the `Github page <https://github.com/cssr-tools/expreccs>`_.
4646

4747
.. tip::
48-
Check the `CI.yml <https://github.com/daavid00/expreccs/blob/main/.github/workflows/CI.yml>`_ file.
48+
Check the `CI.yml <https://github.com/cssr-tools/expreccs/blob/main/.github/workflows/CI.yml>`_ file.

docs/_sources/related.rst.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ Related
33
=======
44

55
Below are some packages following the same configuration-file-to-postprocessing-folder approach;
6-
check them out :).
6+
check them out 🙂.
77

88
**********
9-
pyopmcsp11
9+
pyopmspe11
1010
**********
1111

12-
.. image:: ./figs/pyopmcsp11.gif
12+
.. image:: ./figs/pyopmspe11.gif
1313
:scale: 50%
1414

15-
`A Python framework using OPM Flow for the CSP11 benchmark project <https://github.com/daavid00/pyopmcsp11>`_.
15+
`A Python framework using OPM Flow for the CSP SPE11 benchmark project <https://github.com/OPM/pyopmspe11>`_.
1616

1717
*************
1818
pyopmnearwell
@@ -21,7 +21,7 @@ pyopmnearwell
2121
.. image:: ./figs/pyopmnearwell.gif
2222
:scale: 50%
2323

24-
`A framework to simulate near well dynamics using OPM Flow <https://github.com/daavid00/pyopmnearwell>`_.
24+
`A framework to simulate near well dynamics using OPM Flow <https://github.com/cssr-tools/pyopmnearwell>`_.
2525

2626
*******
2727
ad-micp
@@ -39,4 +39,4 @@ pymm
3939
.. image:: ./figs/pymm.gif
4040
:scale: 15%
4141

42-
`An open-source image-based framework for CFD in microsystems <https://github.com/daavid00/pymm>`_.
42+
`An open-source image-based framework for CFD in microsystems <https://github.com/cssr-tools/pymm>`_.

docs/about.html

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<!DOCTYPE html>
2-
<html class="writer-html5" lang="en" >
2+
<html class="writer-html5" lang="en" data-content_root="./">
33
<head>
4-
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
4+
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
55

66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>About expreccs &mdash; expreccs documentation</title>
8-
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
9-
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
8+
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
9+
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
10+
11+
1012
<!--[if lt IE 9]>
1113
<script src="_static/js/html5shiv.min.js"></script>
1214
<![endif]-->

docs/api.html

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<!DOCTYPE html>
2-
<html class="writer-html5" lang="en" >
2+
<html class="writer-html5" lang="en" data-content_root="./">
33
<head>
4-
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
4+
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
55

66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>expreccs Python API &mdash; expreccs documentation</title>
8-
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
9-
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
8+
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
9+
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
10+
11+
1012
<!--[if lt IE 9]>
1113
<script src="_static/js/html5shiv.min.js"></script>
1214
<![endif]-->

docs/configuration_file.html

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<!DOCTYPE html>
2-
<html class="writer-html5" lang="en" >
2+
<html class="writer-html5" lang="en" data-content_root="./">
33
<head>
4-
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
4+
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
55

66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>Configuration file &mdash; expreccs documentation</title>
8-
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
9-
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
8+
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
9+
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
10+
11+
1012
<!--[if lt IE 9]>
1113
<script src="_static/js/html5shiv.min.js"></script>
1214
<![endif]-->
@@ -86,10 +88,10 @@
8688

8789
<section id="configuration-file">
8890
<h1>Configuration file<a class="headerlink" href="#configuration-file" title="Link to this heading"></a></h1>
89-
<p>We consider the configuration file (<a class="reference external" href="https://github.com/daavid00/expreccs/blob/main/examples/input.txt">input.txt</a>) available in the
91+
<p>We consider the configuration file (<a class="reference external" href="https://github.com/cssr-tools/expreccs/blob/main/examples/input.txt">input.txt</a>) available in the
9092
examples folder. The parameters are chosen to show the functionality and capabilities of the <strong>expreccs</strong> framework regarding generation
9193
of corner-point grids (cpg), heterogeinities (e.g., different rock properties, faults), adding wells, and defining schedules for the
92-
operations. See the <a class="reference external" href="https://github.com/daavid00/expreccs/blob/main/examples/example1.txt">example1.txt</a> for a simpler configuration
94+
operations. See the <a class="reference external" href="https://github.com/cssr-tools/expreccs/blob/main/examples/example1.txt">example1.txt</a> for a simpler configuration
9395
file.</p>
9496
<p>The first input parameter in the configuration file is:</p>
9597
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos">1</span><span class="sd">&quot;&quot;&quot;Set the full path to the flow executable and flags&quot;&quot;&quot;</span>
@@ -239,7 +241,7 @@ <h2>Well-related parameters<a class="headerlink" href="#well-related-parameters"
239241
the first three defining the injection time, number of restart files in the solution for the regional, number of restart files in the solution for the site/reference, and maximum solver time step, and 2*6 additional
240242
entries to define injected fluid (0 water, 1 CO2) and the injection rates from well 0 to well 5 respectively. If in line 14 the wells
241243
option is activated, then at the end of each row we add the values from the wells (BHP control) on the boundaries in the order of bottom, right, top,
242-
and left with two values respectively (0 for producers and 1 for injectors, and the BHP in Pascals, see <a class="reference external" href="https://github.com/daavid00/expreccs/blob/main/examples/example1_wells.txt">example1_wells.txt</a>).</p>
244+
and left with two values respectively (0 for producers and 1 for injectors, and the BHP in Pascals, see <a class="reference external" href="https://github.com/cssr-tools/expreccs/blob/main/examples/example1_wells.txt">example1_wells.txt</a>).</p>
243245
<div class="admonition warning">
244246
<p class="admonition-title">Warning</p>
245247
<p>Keep the linebreak between the sections in the whole configuration file and do not add linebreaks inside the sections

docs/examples.html

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<!DOCTYPE html>
2-
<html class="writer-html5" lang="en" >
2+
<html class="writer-html5" lang="en" data-content_root="./">
33
<head>
4-
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
4+
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
55

66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>Examples &mdash; expreccs documentation</title>
8-
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
9-
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
8+
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
9+
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
10+
11+
1012
<!--[if lt IE 9]>
1113
<script src="_static/js/html5shiv.min.js"></script>
1214
<![endif]-->
@@ -87,7 +89,7 @@ <h1>Examples<a class="headerlink" href="#examples" title="Link to this heading">
8789
<section id="example-1">
8890
<h2>Example 1<a class="headerlink" href="#example-1" title="Link to this heading"></a></h2>
8991
<p>We consider the configuration file ‘example1.txt’ in the
90-
examples folder (the animation in the <a class="reference external" href="https://github.com/daavid00/expreccs">Github home page</a> was based on this configuration file).
92+
examples folder (the animation in the <a class="reference external" href="https://github.com/cssr-tools/expreccs">Github home page</a> was based on this configuration file).
9193
If the results are to be saved in a folder called ‘hello_world’, this is achieved by the following command:</p>
9294
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>expreccs<span class="w"> </span>-i<span class="w"> </span>example1.txt<span class="w"> </span>-o<span class="w"> </span>hello_world
9395
</pre></div>

docs/expreccs.core.expreccs.html

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<!DOCTYPE html>
2-
<html class="writer-html5" lang="en" >
2+
<html class="writer-html5" lang="en" data-content_root="./">
33
<head>
4-
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
4+
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
55

66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>expreccs.core.expreccs module &mdash; expreccs documentation</title>
8-
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
9-
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
8+
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
9+
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
10+
11+
1012
<!--[if lt IE 9]>
1113
<script src="_static/js/html5shiv.min.js"></script>
1214
<![endif]-->

0 commit comments

Comments
 (0)