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
6 changes: 3 additions & 3 deletions docs/_sources/configuration_file.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ top to the bottom on the left side of the domain and the injection is given as k
#1) injection time [d], 2) time step size to write results [d],
#3) fluid (0 wetting, 1 non-wetting), 4) injection rates [kg/day].
#If --enable-tuning=1, then 5) for TUNING values as described in the OPM manual.
inj = [[7,1e-1,1,57611.52,"1* 1e-2"],
[7,1e-1,0,57611.52,"1* 5e-2"],
[7,1e-1,1,57611.52,"1* 5e-2"]]
inj = [[7,1e-1,1,57611.52,"1* 1e-2 1e-12"],
[7,1e-1,0,57611.52,"1* 5e-2 1e-12"],
[7,1e-1,1,57611.52,"1* 5e-2 1e-12"]]

Here CO2 (non-wetting phase) is injected for seven days printing the results 70 times and limmiting the time step
to 1e-2 days, after water (wetting phase) is injected for the same period at the same mass rate but limiting the time step
Expand Down
44 changes: 39 additions & 5 deletions docs/_sources/examples.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,36 @@
Examples
********

`ResInsight <https://resinsight.org>`_ and `plopm <https://github.com/cssr-tools/plopm>`_ are used for the visualization of the results.

.. note::

You can install `plopm <https://github.com/cssr-tools/plopm>`_ by executing in the terminal:

.. code-block:: bash

pip install git+https://github.com/cssr-tools/plopm.git

There are binary packages for Linux and Windows to install Resinsight, see the `ResInsight Documentation <https://resinsight.org/releases/>`_. For macOS users, you could try to install it using `brew <https://brew.sh>`_ by executing:

.. code-block:: bash

brew tap cssr-tools/opm
brew trust cssr-tools/opm
brew install cssr-tools/opm/resinsight -y

Then, you should be able to open resinsight by typing in the terminal **resinsight**. If you have issues installing ResInsight, `ParaView <https://www.paraview.org>`_ can be also used. However, you need to add the flag **\-\-enable-vtk-output=true**
to OPM Flow.

.. tip::

For the figures in the following examples we show a screen recording from ResInsight and a PNG and GIF from plopm. To generate the results,
we add a link to a bash file that can be run from the main pyopmnearwell repository as (the results are generated in the test_outputs folder):

.. code-block:: bash

. ./tests/scripts/name_of_script.sh

Hello world
-----------
In this example we consider the configuration file `h2o.toml <https://github.com/cssr-tools/pyopmnearwell/blob/main/examples/h2o.toml>`_ available in the
Expand All @@ -21,13 +51,11 @@ To visualize the results, this can be achieved by using plopm, for example:

.. figure:: figs/pressure_1D.png

.. tip::
You can install `plopm <https://github.com/cssr-tools/plopm>`_ by executing in the terminal:
Then, both commands (pyopmnearwell and plopm) can be run by (`docs_hello_world.sh <https://github.com/cssr-tools/pyopmnearwell/blob/main/tests/scripts/docs_hello_world.sh>`_):

.. code-block:: bash

pip install git+https://github.com/cssr-tools/plopm.git
.. code-block:: bash

. ./tests/scripts/docs_hello_world.sh

CO2 cyclic injection
--------------------
Expand Down Expand Up @@ -58,6 +86,12 @@ To generate a gif using plopm, this can be achieved by executing:

Visualization of the gas saturation using plopm.

Then, both commands (pyopmnearwell and plopm) can be run by (`docs_co2_cyclic_injection.sh <https://github.com/cssr-tools/pyopmnearwell/blob/main/tests/scripts/docs_co2_cyclic_injection.sh>`_):

.. code-block:: bash

. ./tests/scripts/docs_co2_cyclic_injection.sh

CCUS (machine learning)
-----------------------
See `this folder <https://github.com/cssr-tools/pyopmnearwell/tree/main/examples/cemracs2023/ml_example_co2eor>`_ for an example of
Expand Down
6 changes: 3 additions & 3 deletions docs/configuration_file.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ <h2>Well-related parameters<a class="headerlink" href="#well-related-parameters"
<span class="linenos">48</span><span class="c1">#1) injection time [d], 2) time step size to write results [d],</span>
<span class="linenos">49</span><span class="c1">#3) fluid (0 wetting, 1 non-wetting), 4) injection rates [kg/day].</span>
<span class="linenos">50</span><span class="c1">#If --enable-tuning=1, then 5) for TUNING values as described in the OPM manual.</span>
<span class="linenos">51</span><span class="n">inj</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">7</span><span class="p">,</span><span class="mf">1e-1</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mf">57611.52</span><span class="p">,</span><span class="s2">&quot;1* 1e-2&quot;</span><span class="p">],</span>
<span class="linenos">52</span><span class="p">[</span><span class="mi">7</span><span class="p">,</span><span class="mf">1e-1</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mf">57611.52</span><span class="p">,</span><span class="s2">&quot;1* 5e-2&quot;</span><span class="p">],</span>
<span class="linenos">53</span><span class="p">[</span><span class="mi">7</span><span class="p">,</span><span class="mf">1e-1</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mf">57611.52</span><span class="p">,</span><span class="s2">&quot;1* 5e-2&quot;</span><span class="p">]]</span>
<span class="linenos">51</span><span class="n">inj</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">7</span><span class="p">,</span><span class="mf">1e-1</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mf">57611.52</span><span class="p">,</span><span class="s2">&quot;1* 1e-2 1e-12&quot;</span><span class="p">],</span>
<span class="linenos">52</span><span class="p">[</span><span class="mi">7</span><span class="p">,</span><span class="mf">1e-1</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mf">57611.52</span><span class="p">,</span><span class="s2">&quot;1* 5e-2 1e-12&quot;</span><span class="p">],</span>
<span class="linenos">53</span><span class="p">[</span><span class="mi">7</span><span class="p">,</span><span class="mf">1e-1</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mf">57611.52</span><span class="p">,</span><span class="s2">&quot;1* 5e-2 1e-12&quot;</span><span class="p">]]</span>
</pre></div>
</div>
<p>Here CO2 (non-wetting phase) is injected for seven days printing the results 70 times and limmiting the time step
Expand Down
43 changes: 34 additions & 9 deletions docs/examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,30 @@

<section id="examples">
<h1>Examples<a class="headerlink" href="#examples" title="Link to this heading"></a></h1>
<p><a class="reference external" href="https://resinsight.org">ResInsight</a> and <a class="reference external" href="https://github.com/cssr-tools/plopm">plopm</a> are used for the visualization of the results.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You can install <a class="reference external" href="https://github.com/cssr-tools/plopm">plopm</a> by executing in the terminal:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>pip<span class="w"> </span>install<span class="w"> </span>git+https://github.com/cssr-tools/plopm.git
</pre></div>
</div>
<p>There are binary packages for Linux and Windows to install Resinsight, see the <a class="reference external" href="https://resinsight.org/releases/">ResInsight Documentation</a>. For macOS users, you could try to install it using <a class="reference external" href="https://brew.sh">brew</a> by executing:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>brew<span class="w"> </span>tap<span class="w"> </span>cssr-tools/opm
brew<span class="w"> </span>trust<span class="w"> </span>cssr-tools/opm
brew<span class="w"> </span>install<span class="w"> </span>cssr-tools/opm/resinsight<span class="w"> </span>-y
</pre></div>
</div>
<p>Then, you should be able to open resinsight by typing in the terminal <strong>resinsight</strong>. If you have issues installing ResInsight, <a class="reference external" href="https://www.paraview.org">ParaView</a> can be also used. However, you need to add the flag <strong>--enable-vtk-output=true</strong>
to OPM Flow.</p>
</div>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>For the figures in the following examples we show a screen recording from ResInsight and a PNG and GIF from plopm. To generate the results,
we add a link to a bash file that can be run from the main pyopmnearwell repository as (the results are generated in the test_outputs folder):</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>.<span class="w"> </span>./tests/scripts/name_of_script.sh
</pre></div>
</div>
</div>
<section id="hello-world">
<h2>Hello world<a class="headerlink" href="#hello-world" title="Link to this heading"></a></h2>
<p>In this example we consider the configuration file <a class="reference external" href="https://github.com/cssr-tools/pyopmnearwell/blob/main/examples/h2o.toml">h2o.toml</a> available in the
Expand All @@ -103,13 +127,10 @@ <h2>Hello world<a class="headerlink" href="#hello-world" title="Link to this hea
<figure class="align-default">
<img alt="_images/pressure_1D.png" src="_images/pressure_1D.png" />
</figure>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>You can install <a class="reference external" href="https://github.com/cssr-tools/plopm">plopm</a> by executing in the terminal:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>pip<span class="w"> </span>install<span class="w"> </span>git+https://github.com/cssr-tools/plopm.git
<p>Then, both commands (pyopmnearwell and plopm) can be run by (<a class="reference external" href="https://github.com/cssr-tools/pyopmnearwell/blob/main/tests/scripts/docs_hello_world.sh">docs_hello_world.sh</a>):</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>.<span class="w"> </span>./tests/scripts/docs_hello_world.sh
</pre></div>
</div>
</div>
</section>
<section id="co2-cyclic-injection">
<h2>CO2 cyclic injection<a class="headerlink" href="#co2-cyclic-injection" title="Link to this heading"></a></h2>
Expand All @@ -121,22 +142,26 @@ <h2>CO2 cyclic injection<a class="headerlink" href="#co2-cyclic-injection" title
</pre></div>
</div>
<p>The execution time was c.a. 20 seconds and the following is an animation using <a class="reference external" href="https://resinsight.org">ResInsight</a> to visualize the gas saturation:</p>
<figure class="align-default" id="id1">
<figure class="align-default" id="id3">
<img alt="_images/saturation.gif" src="_images/saturation.gif" />
<figcaption>
<p><span class="caption-text">Visualization of the gas saturation using ResInsight.</span><a class="headerlink" href="#id1" title="Link to this image"></a></p>
<p><span class="caption-text">Visualization of the gas saturation using ResInsight.</span><a class="headerlink" href="#id3" title="Link to this image"></a></p>
</figcaption>
</figure>
<p>To generate a gif using plopm, this can be achieved by executing:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>plopm<span class="w"> </span>-i<span class="w"> </span>CO2<span class="w"> </span>-v<span class="w"> </span>sgas<span class="w"> </span>-m<span class="w"> </span>gif<span class="w"> </span>-dpi<span class="w"> </span><span class="m">1000</span><span class="w"> </span>-interval<span class="w"> </span><span class="m">50</span><span class="w"> </span>-loop<span class="w"> </span><span class="m">1</span><span class="w"> </span>-d<span class="w"> </span><span class="m">10</span>,5<span class="w"> </span>-yformat<span class="w"> </span>.0f<span class="w"> </span>-f<span class="w"> </span><span class="m">20</span><span class="w"> </span>-cnum<span class="w"> </span><span class="m">6</span><span class="w"> </span>-t<span class="w"> </span><span class="s2">&quot;Cyclic injection&quot;</span>
</pre></div>
</div>
<figure class="align-default" id="id2">
<figure class="align-default" id="id4">
<img alt="_images/co2_sgas.gif" src="_images/co2_sgas.gif" />
<figcaption>
<p><span class="caption-text">Visualization of the gas saturation using plopm.</span><a class="headerlink" href="#id2" title="Link to this image"></a></p>
<p><span class="caption-text">Visualization of the gas saturation using plopm.</span><a class="headerlink" href="#id4" title="Link to this image"></a></p>
</figcaption>
</figure>
<p>Then, both commands (pyopmnearwell and plopm) can be run by (<a class="reference external" href="https://github.com/cssr-tools/pyopmnearwell/blob/main/tests/scripts/docs_co2_cyclic_injection.sh">docs_co2_cyclic_injection.sh</a>):</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>.<span class="w"> </span>./tests/scripts/docs_co2_cyclic_injection.sh
</pre></div>
</div>
</section>
<section id="ccus-machine-learning">
<h2>CCUS (machine learning)<a class="headerlink" href="#ccus-machine-learning" title="Link to this heading"></a></h2>
Expand Down
8 changes: 6 additions & 2 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,14 @@ <h2 id="G">G</h2>
<li><a href="pyopmnearwell.utils.writefile.html#pyopmnearwell.utils.writefile.generate_pcfact">generate_pcfact() (in module pyopmnearwell.utils.writefile)</a>
</li>
<li><a href="pyopmnearwell.utils.writefile.html#pyopmnearwell.utils.writefile.generate_permfact">generate_permfact() (in module pyopmnearwell.utils.writefile)</a>
</li>
<li><a href="pyopmnearwell.utils.writefile.html#pyopmnearwell.utils.writefile.generate_permfact_pcfact">generate_permfact_pcfact() (in module pyopmnearwell.utils.writefile)</a>
</li>
<li><a href="pyopmnearwell.utils.writefile.html#pyopmnearwell.utils.writefile.generate_saturation_functions_format_1">generate_saturation_functions_format_1() (in module pyopmnearwell.utils.writefile)</a>
</li>
<li><a href="pyopmnearwell.utils.writefile.html#pyopmnearwell.utils.writefile.generate_saturation_functions_format_2">generate_saturation_functions_format_2() (in module pyopmnearwell.utils.writefile)</a>
</li>
<li><a href="pyopmnearwell.utils.writefile.html#pyopmnearwell.utils.writefile.generate_saturation_functions_gsf_wsf">generate_saturation_functions_gsf_wsf() (in module pyopmnearwell.utils.writefile)</a>
</li>
<li><a href="pyopmnearwell.utils.writefile.html#pyopmnearwell.utils.writefile.get_2dgrid">get_2dgrid() (in module pyopmnearwell.utils.writefile)</a>
</li>
Expand All @@ -268,10 +272,10 @@ <h2 id="G">G</h2>
<li><a href="pyopmnearwell.ml.scaler_layers.html#pyopmnearwell.ml.scaler_layers.MinMaxUnScalerLayer.get_config">(pyopmnearwell.ml.scaler_layers.MinMaxUnScalerLayer method)</a>
</li>
</ul></li>
<li><a href="pyopmnearwell.ml.upscale.html#pyopmnearwell.ml.upscale.BaseUpscaler.get_data_WI">get_data_WI() (pyopmnearwell.ml.upscale.BaseUpscaler method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="pyopmnearwell.ml.upscale.html#pyopmnearwell.ml.upscale.BaseUpscaler.get_data_WI">get_data_WI() (pyopmnearwell.ml.upscale.BaseUpscaler method)</a>
</li>
<li><a href="pyopmnearwell.ml.nn.html#pyopmnearwell.ml.nn.get_FCNN">get_FCNN() (in module pyopmnearwell.ml.nn)</a>
</li>
<li><a href="pyopmnearwell.ml.ensemble.html#pyopmnearwell.ml.ensemble.get_flags">get_flags() (in module pyopmnearwell.ml.ensemble)</a>
Expand Down
Binary file modified docs/objects.inv
Binary file not shown.
2 changes: 2 additions & 0 deletions docs/pyopmnearwell.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,10 @@ <h2>Subpackages<a class="headerlink" href="#subpackages" title="Link to this hea
<li class="toctree-l4"><a class="reference internal" href="pyopmnearwell.utils.writefile.html#pyopmnearwell.utils.writefile.generate_multpv"><code class="docutils literal notranslate"><span class="pre">generate_multpv()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="pyopmnearwell.utils.writefile.html#pyopmnearwell.utils.writefile.generate_pcfact"><code class="docutils literal notranslate"><span class="pre">generate_pcfact()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="pyopmnearwell.utils.writefile.html#pyopmnearwell.utils.writefile.generate_permfact"><code class="docutils literal notranslate"><span class="pre">generate_permfact()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="pyopmnearwell.utils.writefile.html#pyopmnearwell.utils.writefile.generate_permfact_pcfact"><code class="docutils literal notranslate"><span class="pre">generate_permfact_pcfact()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="pyopmnearwell.utils.writefile.html#pyopmnearwell.utils.writefile.generate_saturation_functions_format_1"><code class="docutils literal notranslate"><span class="pre">generate_saturation_functions_format_1()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="pyopmnearwell.utils.writefile.html#pyopmnearwell.utils.writefile.generate_saturation_functions_format_2"><code class="docutils literal notranslate"><span class="pre">generate_saturation_functions_format_2()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="pyopmnearwell.utils.writefile.html#pyopmnearwell.utils.writefile.generate_saturation_functions_gsf_wsf"><code class="docutils literal notranslate"><span class="pre">generate_saturation_functions_gsf_wsf()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="pyopmnearwell.utils.writefile.html#pyopmnearwell.utils.writefile.get_2dgrid"><code class="docutils literal notranslate"><span class="pre">get_2dgrid()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="pyopmnearwell.utils.writefile.html#pyopmnearwell.utils.writefile.get_spaces"><code class="docutils literal notranslate"><span class="pre">get_spaces()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="pyopmnearwell.utils.writefile.html#pyopmnearwell.utils.writefile.handle_core"><code class="docutils literal notranslate"><span class="pre">handle_core()</span></code></a></li>
Expand Down
Loading