Skip to content

Commit 2d6493c

Browse files
authored
Merge pull request #18 from daavid00/developing
Improving the generic functionality
2 parents a8d941d + 83d4314 commit 2d6493c

Some content is hidden

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

61 files changed

+527
-250
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ See the [_installation_](https://cssr-tools.github.io/exprecss/installation.html
4646
## Running expreccs
4747
You can run _expreccs_ as a single command line:
4848
```
49-
expreccs -i configuration_file.txt
49+
expreccs -i name_of_input_file
5050
```
5151
Run `expreccs --help` to see all possible command line argument options. Inside the `configuration_file.txt` file you provide the path to the
5252
flow executable and simulation parameters. See the .txt files in the [_examples_](https://github.com/cssr-tools/expreccs/tree/main/examples) and [_tests_](https://github.com/cssr-tools/expreccs/tree/main/tests/configs) folders.
@@ -57,13 +57,13 @@ See the [_examples_](https://cssr-tools.github.io/expreccs/examples.html) in the
5757
## Citing
5858
If you would like to cite this repository:
5959

60-
* Landa-Marbán, D. 2024. expreccs: A Python framework using OPM Flow to simulate regional and site reservoirs for CO2 storage. V2024.04. https://doi.org/10.5281/zenodo.12100600.
60+
* Landa-Marbán, D. 2024. expreccs: A Python framework using OPM Flow to simulate regional and site reservoirs for CO2 storage. https://doi.org/10.5281/zenodo.12100600.
6161

6262
## Publications
6363
The following is a list of manuscripts in which _expreccs_ is used:
6464

6565
1. Tveit, S., Gasda, S.E., Landa-Marbán, D., Sandve, T.H., submitted. A hierarchical approach for modeling regional pressure interference in multi-site CO2 operations. http://dx.doi.org/10.2139/ssrn.5005237.
66-
1. Gasda, S.E., et al., submitted. Quantifying the impact of regional-scale pressure interference on commercial CO2 storage targets for multiple licenses.
66+
1. Gasda, S.E., et al., 2024. Quantifying the impact of regional-scale pressure interference on commercial CO2 storage targets for multiple licenses. http://dx.doi.org/10.2139/ssrn.5053633.
6767

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

docs/_images/generic.png

243 KB
Loading

docs/_images/reference_sgas.png

252 KB
Loading

docs/_sources/about.rst.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ About expreccs
55
.. image:: ./figs/about.png
66
:scale: 50%
77

8-
The **expreccs** package is funded by
9-
Wintershall Dea, Equinor, Shell, and the Research Council of Norway [project number 336294].
8+
The **expreccs** tool is funded by
9+
Harbour Energy, Equinor, Shell, and the Research Council of Norway [project number 336294].
1010

1111
This is work in progress.
1212
`Here <https://www.norceresearch.no/en/projects/expansion-of-resources-for-co2-storage-on-the-horda-platform-expreccs>`_ is the link to the project details.

docs/_sources/configuration_file.rst.txt

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
==================
22
Configuration file
33
==================
4+
.. Note::
5+
The configuration files allow to set the integrated studies (generation of regional and site models,
6+
in addition to set the different boundary projection approaches). To use **expreccs** in any given two OPM Flow geological models
7+
to dynamically project pressures, this can be achieve without a configuration file, but setting
8+
the parameters via command lines (see the :ref:`overview` or run `pycopm -h` for the definition
9+
of the argument options, as well as the example in :ref:`generic`).
10+
411
We consider the configuration file (`input.txt <https://github.com/cssr-tools/expreccs/blob/main/examples/input.txt>`_) available in the
512
examples folder. The parameters are chosen to show the functionality and capabilities of the **expreccs** framework regarding generation
613
of corner-point grids (cpg), heterogeinities (e.g., different rock properties, faults), adding wells, and defining schedules for the
@@ -13,7 +20,7 @@ The first input parameter in the configuration file is:
1320
:linenos:
1421
1522
"""Set the full path to the flow executable and flags"""
16-
flow --enable-opm-rst-file=true --linear-solver=cprw --enable-tuning=true
23+
flow --enable-opm-rst-file=true --enable-tuning=true
1724
1825
If **flow** is not in your path, then write the full path to the executable
1926
(e.g., /Users/dmar/expreccs/build/opm-simulators/bin/flow). We also add in the same

docs/_sources/examples.rst.txt

+53-21
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22
Examples
33
********
44

5-
Example 1
6-
---------
5+
=======================
6+
Via configuration files
7+
=======================
8+
9+
Hello world
10+
-----------
711

812
We consider the configuration file `example1.txt <https://github.com/cssr-tools/expreccs/blob/main/examples/example1.txt>`_ in the
913
examples folder (the animation in the `GitHub home page <https://github.com/cssr-tools/expreccs>`_ was based on this configuration file).
@@ -57,8 +61,8 @@ Below are some of the figures generated inside the postprocessing folder:
5761
hello_world_distance_from_border.png respectively
5862

5963

60-
Example 2
61-
---------
64+
Layered model
65+
-------------
6266

6367
The configuration file example2.txt set a more complex geological model with more grid cells (1 417 500). This was used
6468
to generate the animation (using ResInsight) in the :doc:`introduction section <./introduction>` by running
@@ -67,17 +71,12 @@ to generate the animation (using ResInsight) in the :doc:`introduction section <
6771
6872
expreccs -i example2.txt -m reference
6973
70-
Generic (under development)
71-
---------------------------
72-
73-
See/run the `test_generic_deck.py <https://github.com/cssr-tools/expreccs/blob/main/tests/test_generic_deck.py>`_
74-
for an example where **expreccs** is used in two given models (regional and site, in this case they are created using
75-
the **expreccs** package, but in general can be any given geological models), generating a new input deck where
76-
the pressures are projected.
77-
78-
.. code-block:: bash
74+
.. tip::
7975

80-
expreccs -e name_of_folder_for_the_regional_model,name_of_folder_for_the_site_model
76+
This example shows how **expreccs** can be used to generate the requiered input files to run OPM Flow for heterogenous
77+
layered models at different grid sizes, which can be used for further studies such as optimization. Regarding the configuration
78+
files in `examples/newcases <https://github.com/cssr-tools/expreccs/tree/main/examples/newcases>`_, these are explained in
79+
`this manuscript <https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5005237>`_.
8180

8281
.. _back_coupling:
8382

@@ -97,13 +96,10 @@ This is one of the generated figures in the back-coupling/postprocessing folder
9796
.. image:: ./figs/back-coupling_summary_BPR_regional_reference.png
9897

9998
The figures in the postprocessing includes the results for the first two iterations and the last one (in this case 9 since the number of
100-
iteration is set to 10 in line 22 of the `configuration_file <https://github.com/cssr-tools/expreccs/blob/main/examples/example1_back.txt>`_). To visualize/compare results
101-
between any of the iterations, we can use our friend `plopm <https://github.com/cssr-tools/plopm>`_.
99+
iteration is set to 10 in line 22 of the `configuration_file <https://github.com/cssr-tools/expreccs/blob/main/examples/example1_back.txt>`_).
102100

103-
.. tip::
104-
You can install `plopm <https://github.com/cssr-tools/plopm>`_ by executing in the terminal: **pip install git+https://github.com/cssr-tools/plopm.git**.
105-
106-
For example, to show the difference in the spatial maps for pressure between iteration 4 and 7 at the third restart, this is achieved by executing:
101+
For example, to show the difference in the spatial maps for pressure between iteration 4 and 7 at the third restart, this can be achieved using
102+
`plopm <https://github.com/cssr-tools/plopm>`_ by executing:
107103

108104
.. code-block:: bash
109105
@@ -117,4 +113,40 @@ and to show the comparison for the summary vector FPR for iterations 1, 5, 7, an
117113
118114
plopm -i 'back-coupling/output/regional_1/regional_1 back-coupling/output/regional_5/regional_5 back-coupling/output/regional_7/regional_7 back-coupling/output/regional_9/regional_9' -v fpr -d 5,5 -f 10
119115
120-
.. image:: ./figs/fpr_plopm.png
116+
.. image:: ./figs/fpr_plopm.png
117+
118+
.. tip::
119+
You can install `plopm <https://github.com/cssr-tools/plopm>`_ by executing in the terminal: **pip install git+https://github.com/cssr-tools/plopm.git**.
120+
121+
.. _generic:
122+
123+
==================
124+
Via OPM Flow decks
125+
==================
126+
127+
See/run the `test_generic_deck.py <https://github.com/cssr-tools/expreccs/blob/main/tests/test_generic_deck.py>`_
128+
for an example where **expreccs** is used in two given models (regional and site, in this case they are created using
129+
the **expreccs** package, but in general can be any given geological models), generating a new input deck where
130+
the pressures are projected.
131+
132+
.. code-block:: bash
133+
134+
expreccs -e name_of_folder_for_the_regional_model,name_of_folder_for_the_site_model
135+
136+
In the current implementation, the name of the decks need to match the name of the given folder (e.g., regional/REGIONAL.DATA).
137+
For example, to run the test, this can be achieved by executing:
138+
139+
.. code-block:: bash
140+
141+
pytest --cov=expreccs --cov-report term-missing tests/test_generic_deck.py
142+
143+
To visualize/compare results between the model with static (input) and dynamic (generated by expreccs) boundary conditions,
144+
we can use our friend `plopm <https://github.com/cssr-tools/plopm>`_:
145+
146+
.. code-block:: bash
147+
148+
plopm -i 'tests/configs/rotate/output/site_closed/SITE_CLOSED tests/configs/rotate/output/expreccs/EXPRECCS tests/configs/rotate/output/reference/REFERENCE' -v sgas -s ',,1 ,,1 ,,1' -subfigs 1,3 -suptitle 0 -cbsfax 0.2,0.95,0.6,0.02 -d 24,8 -cformat .1f -f 20 -xunits km -yunits km -xformat .0f -yformat .0f -x '[0,15000]' -y '[0,15000]' -delax 1
149+
150+
.. figure:: figs/reference_sgas.png
151+
152+
Comparison of the gas saturation on the top cells at the end of the simulations.

docs/_sources/introduction.rst.txt

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ where
4141
-u Using 'gasoil' or 'gaswater' co2store implementation ('gaswater' by default).
4242
-t Grades to rotate the site geological model ('0' by default).
4343
-e Name of the regional and site folders to project pressures ('' by default).
44+
-b Set the number of entries to skip the bc projections on the site, where 'j=0,i=nx,j=ny,i=0', e.g., '0,2,0,0' would skip all cells with i=nx and i=nx-1; this becomes handly for models where all cells in a given site are inactive along a side ('0,0,0,0' by default).
4445
-w Set to 1 to print warnings ('0' by default).
4546
-l Set to 0 to not use LaTeX formatting ('1' by default).
4647

docs/_sources/output_folder.rst.txt

+26-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
=============
1+
*************
22
Output folder
3-
=============
3+
*************
4+
5+
=======================
6+
Via configuration files
7+
=======================
48

59
The following screenshot shows the generated files in the selected output folder after
610
executing **expreccs**.
@@ -15,4 +19,23 @@ Then after running **expreccs**, one could modify the generated OPM related file
1519
the preprocessing folder and run directly the simulations calling the Flow solvers, e.g., to add tracers
1620
(see the OPM Flow documentation `here <https://opm-project.org/?page_id=955>`_).
1721
In addition, some plots comparing the site simulations to the reference
18-
and the site are generated in the postprocessing folder.
22+
and the site are generated in the postprocessing folder.
23+
24+
==================
25+
Via OPM Flow decks
26+
==================
27+
28+
The following screenshot shows the generated files in the selected output folder after
29+
executing **expreccs**, this corresponds to the `test_generic_deck.py <https://github.com/cssr-tools/expreccs/blob/main/tests/test_generic_deck.py>`_:
30+
31+
.. code-block:: bash
32+
33+
expreccs -o expreccs -e regional,site_closed
34+
35+
.. figure:: figs/generic.png
36+
37+
Generated files after executing **expreccs**.
38+
39+
The dynamic boundary conditions are saved in the expreccs/bc folder, and the definition of the boundary connections in
40+
expreccs/BCCON.INC. In addition, OPERNUM is used to label de boundary cells in the site, and also to label the overlapping cells and
41+
cells to use for the pressure interpolator in the regional model (regional/OPERNUM_EXPRECCS.INC).

docs/_static/js/versions.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
const themeFlyoutDisplay = "hidden";
2-
const themeVersionSelector = "True";
3-
const themeLanguageSelector = "True";
2+
const themeVersionSelector = true;
3+
const themeLanguageSelector = true;
44

55
if (themeFlyoutDisplay === "attached") {
66
function renderLanguages(config) {
77
if (!config.projects.translations.length) {
88
return "";
99
}
1010

11+
// Insert the current language to the options on the selector
12+
let languages = config.projects.translations.concat(config.projects.current);
13+
languages = languages.sort((a, b) => a.language.name.localeCompare(b.language.name));
14+
1115
const languagesHTML = `
1216
<dl>
1317
<dt>Languages</dt>
14-
${config.projects.translations
18+
${languages
1519
.map(
1620
(translation) => `
1721
<dd ${translation.slug == config.projects.current.slug ? 'class="rtd-current-item"' : ""}>

docs/_static/pygments.css

+18-18
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
66
.highlight .hll { background-color: #ffffcc }
77
.highlight { background: #f8f8f8; }
88
.highlight .c { color: #3D7B7B; font-style: italic } /* Comment */
9-
.highlight .err { border: 1px solid #FF0000 } /* Error */
9+
.highlight .err { border: 1px solid #F00 } /* Error */
1010
.highlight .k { color: #008000; font-weight: bold } /* Keyword */
11-
.highlight .o { color: #666666 } /* Operator */
11+
.highlight .o { color: #666 } /* Operator */
1212
.highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
1313
.highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
1414
.highlight .cp { color: #9C6500 } /* Comment.Preproc */
@@ -25,34 +25,34 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
2525
.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
2626
.highlight .gs { font-weight: bold } /* Generic.Strong */
2727
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
28-
.highlight .gt { color: #0044DD } /* Generic.Traceback */
28+
.highlight .gt { color: #04D } /* Generic.Traceback */
2929
.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
3030
.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
3131
.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
3232
.highlight .kp { color: #008000 } /* Keyword.Pseudo */
3333
.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
3434
.highlight .kt { color: #B00040 } /* Keyword.Type */
35-
.highlight .m { color: #666666 } /* Literal.Number */
35+
.highlight .m { color: #666 } /* Literal.Number */
3636
.highlight .s { color: #BA2121 } /* Literal.String */
3737
.highlight .na { color: #687822 } /* Name.Attribute */
3838
.highlight .nb { color: #008000 } /* Name.Builtin */
39-
.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
40-
.highlight .no { color: #880000 } /* Name.Constant */
41-
.highlight .nd { color: #AA22FF } /* Name.Decorator */
39+
.highlight .nc { color: #00F; font-weight: bold } /* Name.Class */
40+
.highlight .no { color: #800 } /* Name.Constant */
41+
.highlight .nd { color: #A2F } /* Name.Decorator */
4242
.highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */
4343
.highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
44-
.highlight .nf { color: #0000FF } /* Name.Function */
44+
.highlight .nf { color: #00F } /* Name.Function */
4545
.highlight .nl { color: #767600 } /* Name.Label */
46-
.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
46+
.highlight .nn { color: #00F; font-weight: bold } /* Name.Namespace */
4747
.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
4848
.highlight .nv { color: #19177C } /* Name.Variable */
49-
.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
50-
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
51-
.highlight .mb { color: #666666 } /* Literal.Number.Bin */
52-
.highlight .mf { color: #666666 } /* Literal.Number.Float */
53-
.highlight .mh { color: #666666 } /* Literal.Number.Hex */
54-
.highlight .mi { color: #666666 } /* Literal.Number.Integer */
55-
.highlight .mo { color: #666666 } /* Literal.Number.Oct */
49+
.highlight .ow { color: #A2F; font-weight: bold } /* Operator.Word */
50+
.highlight .w { color: #BBB } /* Text.Whitespace */
51+
.highlight .mb { color: #666 } /* Literal.Number.Bin */
52+
.highlight .mf { color: #666 } /* Literal.Number.Float */
53+
.highlight .mh { color: #666 } /* Literal.Number.Hex */
54+
.highlight .mi { color: #666 } /* Literal.Number.Integer */
55+
.highlight .mo { color: #666 } /* Literal.Number.Oct */
5656
.highlight .sa { color: #BA2121 } /* Literal.String.Affix */
5757
.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
5858
.highlight .sc { color: #BA2121 } /* Literal.String.Char */
@@ -67,9 +67,9 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
6767
.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
6868
.highlight .ss { color: #19177C } /* Literal.String.Symbol */
6969
.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
70-
.highlight .fm { color: #0000FF } /* Name.Function.Magic */
70+
.highlight .fm { color: #00F } /* Name.Function.Magic */
7171
.highlight .vc { color: #19177C } /* Name.Variable.Class */
7272
.highlight .vg { color: #19177C } /* Name.Variable.Global */
7373
.highlight .vi { color: #19177C } /* Name.Variable.Instance */
7474
.highlight .vm { color: #19177C } /* Name.Variable.Magic */
75-
.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
75+
.highlight .il { color: #666 } /* Literal.Number.Integer.Long */

docs/about.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
99
<title>About expreccs &mdash; expreccs documentation</title>
10-
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
10+
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=b86133f3" />
1111
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />
1212

1313

@@ -83,8 +83,8 @@
8383
<h1>About expreccs<a class="headerlink" href="#about-expreccs" title="Link to this heading"></a></h1>
8484
<a class="reference internal image-reference" href="_images/about.png"><img alt="_images/about.png" src="_images/about.png" style="width: 369.0px; height: 308.5px;" />
8585
</a>
86-
<p>The <strong>expreccs</strong> package is funded by
87-
Wintershall Dea, Equinor, Shell, and the Research Council of Norway [project number 336294].</p>
86+
<p>The <strong>expreccs</strong> tool is funded by
87+
Harbour Energy, Equinor, Shell, and the Research Council of Norway [project number 336294].</p>
8888
<p>This is work in progress.
8989
<a class="reference external" href="https://www.norceresearch.no/en/projects/expansion-of-resources-for-co2-storage-on-the-horda-platform-expreccs">Here</a> is the link to the project details.</p>
9090
<p>Contributions are more than welcome using the fork and pull request approach.</p>
@@ -101,7 +101,7 @@ <h1>About expreccs<a class="headerlink" href="#about-expreccs" title="Link to th
101101
<hr/>
102102

103103
<div role="contentinfo">
104-
<p>&#169; Copyright 2023, NORCE Norwegian Research Centre AS.</p>
104+
<p>&#169; Copyright 2025, NORCE Norwegian Research Centre AS.</p>
105105
</div>
106106

107107
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a

docs/api.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
99
<title>expreccs Python API &mdash; expreccs documentation</title>
10-
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
10+
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=b86133f3" />
1111
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />
1212

1313

@@ -142,7 +142,7 @@ <h2>expreccs<a class="headerlink" href="#expreccs" title="Link to this heading">
142142
<hr/>
143143

144144
<div role="contentinfo">
145-
<p>&#169; Copyright 2023, NORCE Norwegian Research Centre AS.</p>
145+
<p>&#169; Copyright 2025, NORCE Norwegian Research Centre AS.</p>
146146
</div>
147147

148148
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a

0 commit comments

Comments
 (0)