Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ opm-simulators/

# Extra folders
**/tests/configs/*/
/tests/expreccs/
/tests/expreccs_perfipnum/
/tests/expreccs_dpincrease/
examples/hello_world
developing
playground
Expand Down
Binary file removed docs/_images/pyopmnearwell.gif
Binary file not shown.
Binary file added docs/_images/pyopmnearwell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/regional_rpr3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 16 additions & 1 deletion docs/_sources/examples.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,19 @@ we can use our friend `plopm <https://github.com/cssr-tools/plopm>`_:

.. figure:: figs/reference_sgas.png

Comparison of the gas saturation on the top cells at the end of the simulations.
Comparison of the gas saturation on the top cells at the end of the simulations.

See also the `test_4_site_regional.py <https://github.com/cssr-tools/expreccs/blob/main/tests/test_4_site_regional.py>`_, where the
two-stage approach is demonstrated in a site and regional deck generated using `sandwich.toml <https://github.com/cssr-tools/expreccs/blob/main/examples/sandwich.toml>`_. In this test
the functionality to select if the bc mappings are written per fipnums, i.e., if there is an offset between the site and regional models along the z direction, then
using **-z 1** builds the interpolators per corresponding fipnums in the regional and site models. In addition, the flag **-e 0** set the interpolators to be defined by pressure increase and
not by pressure values. If you run that test, then using plopm:

.. code-block:: bash

plopm -i 'regional/REGIONAL expreccs/EXPRECCS expreccs_dpincrease/EXPRECCS_DPINCREASE expreccs_perfipnum/EXPRECCS_PERFIPNUM' -v rpr:3

.. figure:: figs/regional_rpr3.png

Comparison of the different functionality to mapp the dynamic boundary conditions. Here, rpr:3 (fipnum equal to 3) corresponds to the top part of the sandwich (three layers with the middel layer inactive)
in the regional model, while to the bottom part in the site model.
4 changes: 3 additions & 1 deletion docs/_sources/introduction.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ where
-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).
-e Set to 0 to write the pressure increase on the site bc from the regional values ('1' by default, i.e., the pressure values on the boundaries correspond to the explicit values on the regional simulations).
-z Set to 1 to project the regional pressures per fipnum zones, i.e., the pressure maps to the site bcs are written for equal fipnum numbers in the whole xy layer ('0' by default, i.e., the projections include the z location offset between regional and site models).

The valid flags for toml **configuration file** are -i, -o, -m, -c, -p, -u, -r, -t, -w, and -l.
The valid flags for paths to the regional and site folders are -i, -o, -b, -f, -a, and -w.
The valid flags for paths to the regional and site folders are -i, -o, -b, -f, -a, -w, -e, and -z.

In the **configuration file** the geological model is defined by generation
of corner-point grids (cpg), adding heterogeinities (e.g., different rock properties, faults, hysteresis), wells, and defining schedules for the
Expand Down
6 changes: 3 additions & 3 deletions docs/_sources/related.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ plopm
pyopmnearwell
*************

.. image:: ./figs/pyopmnearwell.gif
:scale: 50%
.. image:: ./figs/pyopmnearwell.png
:scale: 60%

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

*******
ad-micp
Expand Down
15 changes: 15 additions & 0 deletions docs/examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,21 @@ <h3>Layered model<a class="headerlink" href="#layered-model" title="Link to this
<p><span class="caption-text">Comparison of the gas saturation on the top cells at the end of the simulations.</span><a class="headerlink" href="#id5" title="Link to this image"></a></p>
</figcaption>
</figure>
<p>See also the <a class="reference external" href="https://github.com/cssr-tools/expreccs/blob/main/tests/test_4_site_regional.py">test_4_site_regional.py</a>, where the
two-stage approach is demonstrated in a site and regional deck generated using <a class="reference external" href="https://github.com/cssr-tools/expreccs/blob/main/examples/sandwich.toml">sandwich.toml</a>. In this test
the functionality to select if the bc mappings are written per fipnums, i.e., if there is an offset between the site and regional models along the z direction, then
using <strong>-z 1</strong> builds the interpolators per corresponding fipnums in the regional and site models. In addition, the flag <strong>-e 0</strong> set the interpolators to be defined by pressure increase and
not by pressure values. If you run that test, then using plopm:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>plopm<span class="w"> </span>-i<span class="w"> </span><span class="s1">&#39;regional/REGIONAL expreccs/EXPRECCS expreccs_dpincrease/EXPRECCS_DPINCREASE expreccs_perfipnum/EXPRECCS_PERFIPNUM&#39;</span><span class="w"> </span>-v<span class="w"> </span>rpr:3
</pre></div>
</div>
<figure class="align-default" id="id6">
<img alt="_images/regional_rpr3.png" src="_images/regional_rpr3.png" />
<figcaption>
<p><span class="caption-text">Comparison of the different functionality to mapp the dynamic boundary conditions. Here, rpr:3 (fipnum equal to 3) corresponds to the top part of the sandwich (three layers with the middel layer inactive)
in the regional model, while to the bottom part in the site model.</span><a class="headerlink" href="#id6" title="Link to this image"></a></p>
</figcaption>
</figure>
</section>
</section>

Expand Down
3 changes: 2 additions & 1 deletion docs/expreccs.utils.reg_sit_given_decks.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,14 @@

<dl class="py function">
<dt class="sig sig-object py" id="expreccs.utils.reg_sit_given_decks.check_regional_neighbours">
<span class="sig-prename descclassname"><span class="pre">expreccs.utils.reg_sit_given_decks.</span></span><span class="sig-name descname"><span class="pre">check_regional_neighbours</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">gind</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">p</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">n</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#expreccs.utils.reg_sit_given_decks.check_regional_neighbours" title="Link to this definition"></a></dt>
<span class="sig-prename descclassname"><span class="pre">expreccs.utils.reg_sit_given_decks.</span></span><span class="sig-name descname"><span class="pre">check_regional_neighbours</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">gind</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">p</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">n</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">d_z</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#expreccs.utils.reg_sit_given_decks.check_regional_neighbours" title="Link to this definition"></a></dt>
<dd><p>Add to the interpolator neighbouring regional cells</p>
<dl>
<dt>Args:</dt><dd><p>dic (dict): Global dictionary</p>
<p>gind (int): Global cell index</p>
<p>p (str): Cardinal direction</p>
<p>n (int): Side number</p>
<p>d_z (float): Thickness regional cell</p>
</dd>
<dt>Returns:</dt><dd><p>dic (dict): Modified global dictionary</p>
</dd>
Expand Down
8 changes: 7 additions & 1 deletion docs/introduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,15 @@ <h2>Concept<a class="headerlink" href="#concept" title="Link to this heading">
<dt><kbd><span class="option">-l</span></kbd></dt>
<dd><p>Set to 0 to not use LaTeX formatting (‘1’ by default).</p>
</dd>
<dt><kbd><span class="option">-e</span></kbd></dt>
<dd><p>Set to 0 to write the pressure increase on the site bc from the regional values (‘1’ by default, i.e., the pressure values on the boundaries correspond to the explicit values on the regional simulations).</p>
</dd>
<dt><kbd><span class="option">-z</span></kbd></dt>
<dd><p>Set to 1 to project the regional pressures per fipnum zones, i.e., the pressure maps to the site bcs are written for equal fipnum numbers in the whole xy layer (‘0’ by default, i.e., the projections include the z location offset between regional and site models).</p>
</dd>
</dl>
<p>The valid flags for toml <strong>configuration file</strong> are -i, -o, -m, -c, -p, -u, -r, -t, -w, and -l.
The valid flags for paths to the regional and site folders are -i, -o, -b, -f, -a, and -w.</p>
The valid flags for paths to the regional and site folders are -i, -o, -b, -f, -a, -w, -e, and -z.</p>
<p>In the <strong>configuration file</strong> the geological model is defined by generation
of corner-point grids (cpg), adding heterogeinities (e.g., different rock properties, faults, hysteresis), wells, and defining schedules for the
operations (see the <a class="reference internal" href="configuration_file.html"><span class="doc">configuration file</span></a> section).</p>
Expand Down
4 changes: 2 additions & 2 deletions docs/related.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ <h2>plopm<a class="headerlink" href="#plopm" title="Link to this heading"></a
</section>
<section id="pyopmnearwell">
<h2>pyopmnearwell<a class="headerlink" href="#pyopmnearwell" title="Link to this heading"></a></h2>
<a class="reference internal image-reference" href="_images/pyopmnearwell.gif"><img alt="_images/pyopmnearwell.gif" src="_images/pyopmnearwell.gif" style="width: 806.0px; height: 410.0px;" />
<a class="reference internal image-reference" href="_images/pyopmnearwell.png"><img alt="_images/pyopmnearwell.png" src="_images/pyopmnearwell.png" style="width: 678.6px; height: 347.4px;" />
</a>
<p><a class="reference external" href="https://github.com/cssr-tools/pyopmnearwell">A framework to simulate near well dynamics using OPM Flow</a>.</p>
<p><a class="reference external" href="https://github.com/cssr-tools/pyopmnearwell">A Python framework to simulate near well dynamics using OPM Flow</a>.</p>
</section>
<section id="ad-micp">
<h2>ad-micp<a class="headerlink" href="#ad-micp" title="Link to this heading"></a></h2>
Expand Down
2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.

17 changes: 16 additions & 1 deletion docs/text/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,19 @@ we can use our friend `plopm <https://github.com/cssr-tools/plopm>`_:

.. figure:: figs/reference_sgas.png

Comparison of the gas saturation on the top cells at the end of the simulations.
Comparison of the gas saturation on the top cells at the end of the simulations.

See also the `test_4_site_regional.py <https://github.com/cssr-tools/expreccs/blob/main/tests/test_4_site_regional.py>`_, where the
two-stage approach is demonstrated in a site and regional deck generated using `sandwich.toml <https://github.com/cssr-tools/expreccs/blob/main/examples/sandwich.toml>`_. In this test
the functionality to select if the bc mappings are written per fipnums, i.e., if there is an offset between the site and regional models along the z direction, then
using **-z 1** builds the interpolators per corresponding fipnums in the regional and site models. In addition, the flag **-e 0** set the interpolators to be defined by pressure increase and
not by pressure values. If you run that test, then using plopm:

.. code-block:: bash

plopm -i 'regional/REGIONAL expreccs/EXPRECCS expreccs_dpincrease/EXPRECCS_DPINCREASE expreccs_perfipnum/EXPRECCS_PERFIPNUM' -v rpr:3

.. figure:: figs/regional_rpr3.png

Comparison of the different functionality to mapp the dynamic boundary conditions. Here, rpr:3 (fipnum equal to 3) corresponds to the top part of the sandwich (three layers with the middel layer inactive)
in the regional model, while to the bottom part in the site model.
Binary file removed docs/text/figs/pyopmnearwell.gif
Binary file not shown.
Binary file added docs/text/figs/pyopmnearwell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/text/figs/regional_rpr3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion docs/text/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ where
-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).
-e Set to 0 to write the pressure increase on the site bc from the regional values ('1' by default, i.e., the pressure values on the boundaries correspond to the explicit values on the regional simulations).
-z Set to 1 to project the regional pressures per fipnum zones, i.e., the pressure maps to the site bcs are written for equal fipnum numbers in the whole xy layer ('0' by default, i.e., the projections include the z location offset between regional and site models).

The valid flags for toml **configuration file** are -i, -o, -m, -c, -p, -u, -r, -t, -w, and -l.
The valid flags for paths to the regional and site folders are -i, -o, -b, -f, -a, and -w.
The valid flags for paths to the regional and site folders are -i, -o, -b, -f, -a, -w, -e, and -z.

In the **configuration file** the geological model is defined by generation
of corner-point grids (cpg), adding heterogeinities (e.g., different rock properties, faults, hysteresis), wells, and defining schedules for the
Expand Down
6 changes: 3 additions & 3 deletions docs/text/related.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ plopm
pyopmnearwell
*************

.. image:: ./figs/pyopmnearwell.gif
:scale: 50%
.. image:: ./figs/pyopmnearwell.png
:scale: 60%

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

*******
ad-micp
Expand Down
53 changes: 53 additions & 0 deletions examples/base0.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Set mpirun, the full path to the flow executable, and simulator flags (except --output-dir)
flow = "mpirun -np 8 flow --enable-opm-rst-file=true --newton-min-iterations=1 --solver-max-time-step-in-days=3650"

# Set the model parameters
regional_dims = [15000,15000,9] # Regional aquifer length, width, and depth [m]
regional_x_n = [15] # Variable array of x-refinement (Regional)
regional_y_n = [15] # Variable array of y-refinement (Regional)
regional_z_n = [1] # Variable array of z-refinement (Regional)
reference_x_n = [15] # Variable array of x-refinement (Reference)
reference_y_n = [15] # Variable array of y-refinement (Reference)
reference_z_n = [1] # Variable array of z-refinement (Reference)
site_location = [5000,5000,0,10000,10000,9] # Site xi, yi, zi, xf, yf, and zf box positions [m]
fault_regional = [11000,11000,1,1,0] # Regional fault x, and y positions [m], x and y multipliers for the trans, and height of the fault jump [m]
fault_site = [[6565,7075],[7885,8450],[1,1]] # Site fault x, and y positions [m] (initial and final) and x and y multipliers for the trans
thickness = [9] # Thickness of the layers [m]
pressure = 3E2 # Pressure on the reservoir top [Bar]
temperature = [105,105] # Top and bottom temperatures [C]
rock_comp = 4.934e-5 # Rock compressibility [1/Bar]
sensor_coords = [6700,7500,4.5] # Sensor position x, y, and z to assess the error over time w.r.t the reference solution [m]
hysteresis = 0 # Add hysteresis (1/0)
salinity = 2.92 # Add salinity (value [1e-3 kg-M/kg])

# Set the boundary conditions
# Use open/closed/porv for the Regional aquifer (if porv, enter the bottom, right, top, and left values (e.g, porv 1e8 1e7 1e6 1e5))
regional_bctype = ["closed"]
# Use open/closed/porv/porvproj/flux/pres/pres2p/wells for the BC site (if porv; bottom, right, top, and left values (e.g, porv 1e4 1e3 1e2 1e1))
# For pres/flux BC's, add 'interp' to use linear interpolation in time
site_bctype = ["pres"]

# Set the saturation functions
krw = "krw * ((sw - swi) / (1.0 - sni -swi)) ** nkrw" # Wetting rel perm saturation function [-]
krn = "krn * ((1.0 - sw - sni) / (1.0 - sni - swi)) ** nkrn" # Non-wetting rel perm saturation function [-]
pcap = "pen * ((sw - swi) / (1.0 - swi)) ** (-(1.0 / npen))" # Capillary pressure saturation function [Bar]

# Properties sat functions: 1) swi [-], 2) sni [-], 3) krw [-], 4) krn [-], 5) pen [Bar], 6) nkrw [-], 7) nkrn [-],
# 8) npen [-], 9) threshold cP evaluation (entry per layer, if hysteresis, additional entries per layer)
safu = [[0.478,0,1,0.3,0,3,3,2,1e-5]]

# Properties rock: 1) Kxy [mD], 2) Kz [mD], and 3) phi [-] (entry per layer)
rock = [[1000,100,0.2]]

# Wells position: 1) x, 2) y, 3) zi, and 4) zf positions [m] (entry per well)
well_coords = [[7500,7500,0,9],[11500,11500,0,9],[11500,3500,0,9]]

# Define the injection values (entry per change in the schedule):
# 1) injection time [d], 2) time step size to write results regional [d], 3) time step size to write results site/reference [d], 4) maximum time step [d]
# 1) fluid (0 wetting, 1 non-wetting) well 0, 2) injection rates [kg/day] well 0, 3) fluid ... well n, injection, ...well n (as many as num of wells)
# if 'wells' for site_bctype, then 1) bottom, 2) right, 3) top, and 4) left values (0(prod)/1(inj), pressure [Bar]))
inj = [[[2,1,1,0.01],[1,4106776.18,1,4106776.18,1,4106776.18]],
[[178,178,178,1],[1,4106776.18,1,4106776.18,1,4106776.18]],
[[180,180,180,1],[1,0,1,0,1,4106776.18]],
[[180,180,180,1],[1,0,1,4106776.18,1,0]],
[[188,180,180,1],[1,4106776.18,1,4106776.18,1,4106776.18]]]
Loading