Skip to content

Commit

Permalink
Time interpolation for generic decks
Browse files Browse the repository at this point in the history
  • Loading branch information
daavid00 committed Jan 13, 2025
1 parent 2d6493c commit 8df3646
Show file tree
Hide file tree
Showing 37 changed files with 342 additions and 113 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ tests/configs/back
tests/configs/compare
tests/configs/output
tests/configs/rotate
tests/configs/rotate_2d
examples/output
developing
playground
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ See the [_installation_](https://cssr-tools.github.io/exprecss/installation.html
## Running expreccs
You can run _expreccs_ as a single command line:
```
expreccs -i name_of_input_file
expreccs -i name(s)_of_input_file(s)
```
Run `expreccs --help` to see all possible command line argument options. Inside the `configuration_file.txt` file you provide the path to the
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.
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.

## Getting started
See the [_examples_](https://cssr-tools.github.io/expreccs/examples.html) in the [_documentation_](https://cssr-tools.github.io/expreccs/introduction.html).
Expand All @@ -66,6 +66,6 @@ The following is a list of manuscripts in which _expreccs_ is used:
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.

## About expreccs
The _expreccs_ package is funded by Wintershall Dea, Equinor, Shell, and the Research Council of Norway [project number 336294].
The _expreccs_ package is funded by Harbour Energy, Equinor, Shell, and the Research Council of Norway [project number 336294].
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.
Contributions are more than welcome using the fork and pull request approach. For new features, please request them raising an issue.
2 changes: 1 addition & 1 deletion docs/_sources/examples.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ the pressures are projected.

.. code-block:: bash
expreccs -e name_of_folder_for_the_regional_model,name_of_folder_for_the_site_model
expreccs -i 'path_to_the_regional_model path_to_the_site_model'
In the current implementation, the name of the decks need to match the name of the given folder (e.g., regional/REGIONAL.DATA).
For example, to run the test, this can be achieved by executing:
Expand Down
7 changes: 4 additions & 3 deletions docs/_sources/introduction.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,21 @@ The current implementation supports the following executable with the argument o

.. code-block:: bash
expreccs -i name_of_input_file
expreccs -i name(s)_of_input_file(s)
where

-i The base name of the :doc:`configuration file <./configuration_file>` ('input.txt' by default).
-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).
-o The base name of the :doc:`output folder <./output_folder>` ('output' by default).
-m Run the whole framework ('all'), only the reference ('reference'), only the site ('site'), or only regional and site models ('noreference') ('all' by default).
-c Generate metric plots for the current outputed folders ('compare') ('' by default).
-p Create nice figures in the postprocessing folder ('no' by default).
-r Using the 'opm' or 'resdata' python package ('resdata' by default).
-u Using 'gasoil' or 'gaswater' co2store implementation ('gaswater' by default).
-t Grades to rotate the site geological model ('0' by default).
-e Name of the regional and site folders to project pressures ('' by default).
-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).
-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).
-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).
-w Set to 1 to print warnings ('0' by default).
-l Set to 0 to not use LaTeX formatting ('1' by default).

Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/output_folder.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ executing **expreccs**, this corresponds to the `test_generic_deck.py <https://g

.. code-block:: bash
expreccs -o expreccs -e regional,site_closed
expreccs -o expreccs -i 'regional/REGIONAL site_closed/SITE_CLOSED'
.. figure:: figs/generic.png

Expand Down
2 changes: 1 addition & 1 deletion docs/examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ <h3>Layered model<a class="headerlink" href="#layered-model" title="Link to this
for an example where <strong>expreccs</strong> is used in two given models (regional and site, in this case they are created using
the <strong>expreccs</strong> package, but in general can be any given geological models), generating a new input deck where
the pressures are projected.</p>
<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
<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>
</pre></div>
</div>
<p>In the current implementation, the name of the decks need to match the name of the given folder (e.g., regional/REGIONAL.DATA).
Expand Down
3 changes: 2 additions & 1 deletion docs/expreccs.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,13 @@ <h2>Subpackages<a class="headerlink" href="#subpackages" title="Link to this hea
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
</ul>
</li>
Expand Down
3 changes: 2 additions & 1 deletion docs/expreccs.utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,13 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
</ul>
</li>
Expand Down
17 changes: 15 additions & 2 deletions docs/expreccs.utils.reg_sit_given_decks.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="expreccs.utils.reg_sit_given_decks.dynamic_mapping">
<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>
<dt class="sig sig-object py" id="expreccs.utils.reg_sit_given_decks.dynamic_interpolator">
<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>
<dd><p>Project the pressures from the regional to the site over time</p>
<dl class="simple">
<dt>Args:</dt><dd><p>dic (dict): Global dictionary</p>
Expand Down Expand Up @@ -194,6 +194,19 @@
<dt class="sig sig-object py" id="expreccs.utils.reg_sit_given_decks.project_pressures">
<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>
<dd><p>Project the pressures at restart number i</p>
<dl>
<dt>Args:</dt><dd><p>dic (dict): Global dictionary</p>
<p>i (int): Index of report step in the site</p>
</dd>
<dt>Returns:</dt><dd><p>dic (dict): Modified global dictionary</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="expreccs.utils.reg_sit_given_decks.temporal_interpolation">
<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>
<dd><p>Function to interpolate BC pressure values in time</p>
<dl class="simple">
<dt>Args:</dt><dd><p>dic (dict): Global dictionary</p>
</dd>
Expand Down
6 changes: 4 additions & 2 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ <h2 id="D">D</h2>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<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>
<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>
</li>
</ul></td>
</tr></table>
Expand Down Expand Up @@ -476,10 +476,12 @@ <h2 id="S">S</h2>
<h2 id="T">T</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="expreccs.utils.mapboundaries.html#expreccs.utils.mapboundaries.temporal_interpolation_flux">temporal_interpolation_flux() (in module expreccs.utils.mapboundaries)</a>
<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>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="expreccs.utils.mapboundaries.html#expreccs.utils.mapboundaries.temporal_interpolation_flux">temporal_interpolation_flux() (in module expreccs.utils.mapboundaries)</a>
</li>
<li><a href="expreccs.utils.mapboundaries.html#expreccs.utils.mapboundaries.temporal_interpolation_pressure">temporal_interpolation_pressure() (in module expreccs.utils.mapboundaries)</a>
</li>
</ul></td>
Expand Down
13 changes: 8 additions & 5 deletions docs/introduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ <h2>Concept<a class="headerlink" href="#concept" title="Link to this heading">
<section id="overview">
<span id="id1"></span><h2>Overview<a class="headerlink" href="#overview" title="Link to this heading"></a></h2>
<p>The current implementation supports the following executable with the argument options:</p>
<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
<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>
</pre></div>
</div>
<p>where</p>
<dl class="option-list">
<dt><kbd><span class="option">-i</span></kbd></dt>
<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>
<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>
</dd>
<dt><kbd><span class="option">-o</span></kbd></dt>
<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>
Expand All @@ -134,12 +134,15 @@ <h2>Concept<a class="headerlink" href="#concept" title="Link to this heading">
<dt><kbd><span class="option">-t</span></kbd></dt>
<dd><p>Grades to rotate the site geological model (‘0’ by default).</p>
</dd>
<dt><kbd><span class="option">-e</span></kbd></dt>
<dd><p>Name of the regional and site folders to project pressures (’’ by default).</p>
</dd>
<dt><kbd><span class="option">-b</span></kbd></dt>
<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>
</dd>
<dt><kbd><span class="option">-f</span></kbd></dt>
<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>
</dd>
<dt><kbd><span class="option">-a</span></kbd></dt>
<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>
</dd>
<dt><kbd><span class="option">-w</span></kbd></dt>
<dd><p>Set to 1 to print warnings (‘0’ by default).</p>
</dd>
Expand Down
Binary file modified docs/objects.inv
Binary file not shown.
Loading

0 comments on commit 8df3646

Please sign in to comment.