Skip to content

Commit 4e00ca2

Browse files
authored
Merge pull request #19 from daavid00/developing
Time interpolation for generic decks
2 parents 2d6493c + 2432928 commit 4e00ca2

37 files changed

+344
-115
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ tests/configs/back
148148
tests/configs/compare
149149
tests/configs/output
150150
tests/configs/rotate
151+
tests/configs/rotate_2d
151152
examples/output
152153
developing
153154
playground

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ 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 name_of_input_file
49+
expreccs -i name(s)_of_input_file(s)
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
52-
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.
52+
flow executable and simulation parameters. To write dynamic boundary conditions from a given regional model to a site model, this can be achieved by giving the path to the models (i.e., without a configuration file). See the [_examples_](https://github.com/cssr-tools/expreccs/tree/main/examples) and [_tests_](https://github.com/cssr-tools/expreccs/tree/main/tests/configs) folders.
5353

5454
## Getting started
5555
See the [_examples_](https://cssr-tools.github.io/expreccs/examples.html) in the [_documentation_](https://cssr-tools.github.io/expreccs/introduction.html).
@@ -66,6 +66,6 @@ The following is a list of manuscripts in which _expreccs_ is used:
6666
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
69-
The _expreccs_ package is funded by Wintershall Dea, Equinor, Shell, and the Research Council of Norway [project number 336294].
69+
The _expreccs_ package is funded by Harbour Energy, Equinor, Shell, and the Research Council of Norway [project number 336294].
7070
This is work in progress. [_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.
7171
Contributions are more than welcome using the fork and pull request approach. For new features, please request them raising an issue.

docs/_sources/examples.rst.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ the pressures are projected.
131131

132132
.. code-block:: bash
133133
134-
expreccs -e name_of_folder_for_the_regional_model,name_of_folder_for_the_site_model
134+
expreccs -i 'path_to_the_regional_model path_to_the_site_model'
135135
136136
In the current implementation, the name of the decks need to match the name of the given folder (e.g., regional/REGIONAL.DATA).
137137
For example, to run the test, this can be achieved by executing:

docs/_sources/introduction.rst.txt

+4-3
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,21 @@ The current implementation supports the following executable with the argument o
2828

2929
.. code-block:: bash
3030
31-
expreccs -i name_of_input_file
31+
expreccs -i name(s)_of_input_file(s)
3232
3333
where
3434

35-
-i The base name of the :doc:`configuration file <./configuration_file>` ('input.txt' by default).
35+
-i The base name of the :doc:`configuration file <./configuration_file>`; or paths (space between them and quotation marks) to the regional and site models ('input.txt' by default).
3636
-o The base name of the :doc:`output folder <./output_folder>` ('output' by default).
3737
-m Run the whole framework ('all'), only the reference ('reference'), only the site ('site'), or only regional and site models ('noreference') ('all' by default).
3838
-c Generate metric plots for the current outputed folders ('compare') ('' by default).
3939
-p Create nice figures in the postprocessing folder ('no' by default).
4040
-r Using the 'opm' or 'resdata' python package ('resdata' by default).
4141
-u Using 'gasoil' or 'gaswater' co2store implementation ('gaswater' by default).
4242
-t Grades to rotate the site geological model ('0' by default).
43-
-e Name of the regional and site folders to project pressures ('' by default).
4443
-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).
44+
-f Frequency to evaluate the boundary pressures on the site between report steps in the site. Write an array, e.g., '2,7,3', to set the frequency in each site report step ('1' by default).
45+
-a Exponential 'a' coefficient for the telescopic time-discretization for the given frequency '-f'. Write an array, e.g., '2.2,0,3.1', to set the coefficient in each site report step ('3.2' by default, use 0 for an equidistance partition).
4546
-w Set to 1 to print warnings ('0' by default).
4647
-l Set to 0 to not use LaTeX formatting ('1' by default).
4748

docs/_sources/output_folder.rst.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ executing **expreccs**, this corresponds to the `test_generic_deck.py <https://g
3030

3131
.. code-block:: bash
3232
33-
expreccs -o expreccs -e regional,site_closed
33+
expreccs -o expreccs -i 'regional/REGIONAL site_closed/SITE_CLOSED'
3434
3535
.. figure:: figs/generic.png
3636

docs/examples.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ <h3>Layered model<a class="headerlink" href="#layered-model" title="Link to this
200200
for an example where <strong>expreccs</strong> is used in two given models (regional and site, in this case they are created using
201201
the <strong>expreccs</strong> package, but in general can be any given geological models), generating a new input deck where
202202
the pressures are projected.</p>
203-
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>expreccs<span class="w"> </span>-e<span class="w"> </span>name_of_folder_for_the_regional_model,name_of_folder_for_the_site_model
203+
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>expreccs<span class="w"> </span>-i<span class="w"> </span><span class="s1">&#39;path_to_the_regional_model path_to_the_site_model&#39;</span>
204204
</pre></div>
205205
</div>
206206
<p>In the current implementation, the name of the decks need to match the name of the given folder (e.g., regional/REGIONAL.DATA).

docs/expreccs.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,13 @@ <h2>Subpackages<a class="headerlink" href="#subpackages" title="Link to this hea
141141
<li class="toctree-l4"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.check_intersection"><code class="docutils literal notranslate"><span class="pre">check_intersection()</span></code></a></li>
142142
<li class="toctree-l4"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.check_regional_neighbours"><code class="docutils literal notranslate"><span class="pre">check_regional_neighbours()</span></code></a></li>
143143
<li class="toctree-l4"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.create_deck"><code class="docutils literal notranslate"><span class="pre">create_deck()</span></code></a></li>
144-
<li class="toctree-l4"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.dynamic_mapping"><code class="docutils literal notranslate"><span class="pre">dynamic_mapping()</span></code></a></li>
144+
<li class="toctree-l4"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.dynamic_interpolator"><code class="docutils literal notranslate"><span class="pre">dynamic_interpolator()</span></code></a></li>
145145
<li class="toctree-l4"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.extract_site_borders"><code class="docutils literal notranslate"><span class="pre">extract_site_borders()</span></code></a></li>
146146
<li class="toctree-l4"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.find_ij_orientation"><code class="docutils literal notranslate"><span class="pre">find_ij_orientation()</span></code></a></li>
147147
<li class="toctree-l4"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.find_regional_cells"><code class="docutils literal notranslate"><span class="pre">find_regional_cells()</span></code></a></li>
148148
<li class="toctree-l4"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.handle_grid_coord"><code class="docutils literal notranslate"><span class="pre">handle_grid_coord()</span></code></a></li>
149149
<li class="toctree-l4"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.project_pressures"><code class="docutils literal notranslate"><span class="pre">project_pressures()</span></code></a></li>
150+
<li class="toctree-l4"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.temporal_interpolation"><code class="docutils literal notranslate"><span class="pre">temporal_interpolation()</span></code></a></li>
150151
<li class="toctree-l4"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.write_files"><code class="docutils literal notranslate"><span class="pre">write_files()</span></code></a></li>
151152
</ul>
152153
</li>

docs/expreccs.utils.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,13 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
127127
<li class="toctree-l2"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.check_intersection"><code class="docutils literal notranslate"><span class="pre">check_intersection()</span></code></a></li>
128128
<li class="toctree-l2"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.check_regional_neighbours"><code class="docutils literal notranslate"><span class="pre">check_regional_neighbours()</span></code></a></li>
129129
<li class="toctree-l2"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.create_deck"><code class="docutils literal notranslate"><span class="pre">create_deck()</span></code></a></li>
130-
<li class="toctree-l2"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.dynamic_mapping"><code class="docutils literal notranslate"><span class="pre">dynamic_mapping()</span></code></a></li>
130+
<li class="toctree-l2"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.dynamic_interpolator"><code class="docutils literal notranslate"><span class="pre">dynamic_interpolator()</span></code></a></li>
131131
<li class="toctree-l2"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.extract_site_borders"><code class="docutils literal notranslate"><span class="pre">extract_site_borders()</span></code></a></li>
132132
<li class="toctree-l2"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.find_ij_orientation"><code class="docutils literal notranslate"><span class="pre">find_ij_orientation()</span></code></a></li>
133133
<li class="toctree-l2"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.find_regional_cells"><code class="docutils literal notranslate"><span class="pre">find_regional_cells()</span></code></a></li>
134134
<li class="toctree-l2"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.handle_grid_coord"><code class="docutils literal notranslate"><span class="pre">handle_grid_coord()</span></code></a></li>
135135
<li class="toctree-l2"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.project_pressures"><code class="docutils literal notranslate"><span class="pre">project_pressures()</span></code></a></li>
136+
<li class="toctree-l2"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.temporal_interpolation"><code class="docutils literal notranslate"><span class="pre">temporal_interpolation()</span></code></a></li>
136137
<li class="toctree-l2"><a class="reference internal" href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.write_files"><code class="docutils literal notranslate"><span class="pre">write_files()</span></code></a></li>
137138
</ul>
138139
</li>

docs/expreccs.utils.reg_sit_given_decks.html

+15-2
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@
131131
</dd></dl>
132132

133133
<dl class="py function">
134-
<dt class="sig sig-object py" id="expreccs.utils.reg_sit_given_decks.dynamic_mapping">
135-
<span class="sig-prename descclassname"><span class="pre">expreccs.utils.reg_sit_given_decks.</span></span><span class="sig-name descname"><span class="pre">dynamic_mapping</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dic</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#expreccs.utils.reg_sit_given_decks.dynamic_mapping" title="Link to this definition"></a></dt>
134+
<dt class="sig sig-object py" id="expreccs.utils.reg_sit_given_decks.dynamic_interpolator">
135+
<span class="sig-prename descclassname"><span class="pre">expreccs.utils.reg_sit_given_decks.</span></span><span class="sig-name descname"><span class="pre">dynamic_interpolator</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dic</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#expreccs.utils.reg_sit_given_decks.dynamic_interpolator" title="Link to this definition"></a></dt>
136136
<dd><p>Project the pressures from the regional to the site over time</p>
137137
<dl class="simple">
138138
<dt>Args:</dt><dd><p>dic (dict): Global dictionary</p>
@@ -194,6 +194,19 @@
194194
<dt class="sig sig-object py" id="expreccs.utils.reg_sit_given_decks.project_pressures">
195195
<span class="sig-prename descclassname"><span class="pre">expreccs.utils.reg_sit_given_decks.</span></span><span class="sig-name descname"><span class="pre">project_pressures</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dic</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">i</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#expreccs.utils.reg_sit_given_decks.project_pressures" title="Link to this definition"></a></dt>
196196
<dd><p>Project the pressures at restart number i</p>
197+
<dl>
198+
<dt>Args:</dt><dd><p>dic (dict): Global dictionary</p>
199+
<p>i (int): Index of report step in the site</p>
200+
</dd>
201+
<dt>Returns:</dt><dd><p>dic (dict): Modified global dictionary</p>
202+
</dd>
203+
</dl>
204+
</dd></dl>
205+
206+
<dl class="py function">
207+
<dt class="sig sig-object py" id="expreccs.utils.reg_sit_given_decks.temporal_interpolation">
208+
<span class="sig-prename descclassname"><span class="pre">expreccs.utils.reg_sit_given_decks.</span></span><span class="sig-name descname"><span class="pre">temporal_interpolation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dic</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#expreccs.utils.reg_sit_given_decks.temporal_interpolation" title="Link to this definition"></a></dt>
209+
<dd><p>Function to interpolate BC pressure values in time</p>
197210
<dl class="simple">
198211
<dt>Args:</dt><dd><p>dic (dict): Global dictionary</p>
199212
</dd>

docs/genindex.html

+4-2
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ <h2 id="D">D</h2>
142142
</li>
143143
</ul></td>
144144
<td style="width: 33%; vertical-align: top;"><ul>
145-
<li><a href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.dynamic_mapping">dynamic_mapping() (in module expreccs.utils.reg_sit_given_decks)</a>
145+
<li><a href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.dynamic_interpolator">dynamic_interpolator() (in module expreccs.utils.reg_sit_given_decks)</a>
146146
</li>
147147
</ul></td>
148148
</tr></table>
@@ -476,10 +476,12 @@ <h2 id="S">S</h2>
476476
<h2 id="T">T</h2>
477477
<table style="width: 100%" class="indextable genindextable"><tr>
478478
<td style="width: 33%; vertical-align: top;"><ul>
479-
<li><a href="expreccs.utils.mapboundaries.html#expreccs.utils.mapboundaries.temporal_interpolation_flux">temporal_interpolation_flux() (in module expreccs.utils.mapboundaries)</a>
479+
<li><a href="expreccs.utils.reg_sit_given_decks.html#expreccs.utils.reg_sit_given_decks.temporal_interpolation">temporal_interpolation() (in module expreccs.utils.reg_sit_given_decks)</a>
480480
</li>
481481
</ul></td>
482482
<td style="width: 33%; vertical-align: top;"><ul>
483+
<li><a href="expreccs.utils.mapboundaries.html#expreccs.utils.mapboundaries.temporal_interpolation_flux">temporal_interpolation_flux() (in module expreccs.utils.mapboundaries)</a>
484+
</li>
483485
<li><a href="expreccs.utils.mapboundaries.html#expreccs.utils.mapboundaries.temporal_interpolation_pressure">temporal_interpolation_pressure() (in module expreccs.utils.mapboundaries)</a>
484486
</li>
485487
</ul></td>

docs/introduction.html

+8-5
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ <h2>Concept<a class="headerlink" href="#concept" title="Link to this heading">
105105
<section id="overview">
106106
<span id="id1"></span><h2>Overview<a class="headerlink" href="#overview" title="Link to this heading"></a></h2>
107107
<p>The current implementation supports the following executable with the argument options:</p>
108-
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>expreccs<span class="w"> </span>-i<span class="w"> </span>name_of_input_file
108+
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>expreccs<span class="w"> </span>-i<span class="w"> </span>name<span class="o">(</span>s<span class="o">)</span>_of_input_file<span class="o">(</span>s<span class="o">)</span>
109109
</pre></div>
110110
</div>
111111
<p>where</p>
112112
<dl class="option-list">
113113
<dt><kbd><span class="option">-i</span></kbd></dt>
114-
<dd><p>The base name of the <a class="reference internal" href="configuration_file.html"><span class="doc">configuration file</span></a> (‘input.txt’ by default).</p>
114+
<dd><p>The base name of the <a class="reference internal" href="configuration_file.html"><span class="doc">configuration file</span></a>; or paths (space between them and quotation marks) to the regional and site models (‘input.txt’ by default).</p>
115115
</dd>
116116
<dt><kbd><span class="option">-o</span></kbd></dt>
117117
<dd><p>The base name of the <a class="reference internal" href="output_folder.html"><span class="doc">output folder</span></a> (‘output’ by default).</p>
@@ -134,12 +134,15 @@ <h2>Concept<a class="headerlink" href="#concept" title="Link to this heading">
134134
<dt><kbd><span class="option">-t</span></kbd></dt>
135135
<dd><p>Grades to rotate the site geological model (‘0’ by default).</p>
136136
</dd>
137-
<dt><kbd><span class="option">-e</span></kbd></dt>
138-
<dd><p>Name of the regional and site folders to project pressures (’’ by default).</p>
139-
</dd>
140137
<dt><kbd><span class="option">-b</span></kbd></dt>
141138
<dd><p>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).</p>
142139
</dd>
140+
<dt><kbd><span class="option">-f</span></kbd></dt>
141+
<dd><p>Frequency to evaluate the boundary pressures on the site between report steps in the site. Write an array, e.g., ‘2,7,3’, to set the frequency in each site report step (‘1’ by default).</p>
142+
</dd>
143+
<dt><kbd><span class="option">-a</span></kbd></dt>
144+
<dd><p>Exponential ‘a’ coefficient for the telescopic time-discretization for the given frequency ‘-f’. Write an array, e.g., ‘2.2,0,3.1’, to set the coefficient in each site report step (‘3.2’ by default, use 0 for an equidistance partition).</p>
145+
</dd>
143146
<dt><kbd><span class="option">-w</span></kbd></dt>
144147
<dd><p>Set to 1 to print warnings (‘0’ by default).</p>
145148
</dd>

docs/objects.inv

9 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)