Skip to content

Commit

Permalink
Merge pull request #14 from daavid00/developing
Browse files Browse the repository at this point in the history
Docs update, and support for resdata in back coupling
  • Loading branch information
daavid00 authored Aug 13, 2024
2 parents 3397d57 + e5d85b3 commit 2f1af9c
Show file tree
Hide file tree
Showing 57 changed files with 1,251 additions and 747 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
sudo apt-get install libopm-simulators-bin
sudo apt-get install texlive-fonts-recommended texlive-fonts-extra dvipng cm-super
- name: Install test dependecies
- name: Install dependecies
run: |
pip install --upgrade pip setuptools wheel
pip install -r dev-requirements.txt
Expand Down
Binary file modified docs/_images/contents.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions docs/_sources/api.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ expreccs Python API
The main script for the **expreccs** executable is located in the core folder.
The expreccss folder contains mako files to generate the corresponding opm
input decks. The scripts in the utils folder process the input configuration
file, runs the reference, regional, and site simulations, and generate images (.png) to show
comparisons between the different runs.
file, runs the reference, regional, and site simulations, in addition to include
routines to project the pressures for given generic geological models. The scripts in the
visualization folder generate images (.png) to show comparisons between the different runs.

.. figure:: figs/contents.png

Expand Down
15 changes: 10 additions & 5 deletions docs/_sources/configuration_file.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ The following input lines are:
20000 8000 0 #Sensor position x, y, and z to assess the error over time w.r.t the reference solution [m]
(20-20*mt.sin((2*mt.pi*(x+y)/10000))) #The function for the reservoir surface
1 2.92 #Add hysteresis (1/0) and salinity (value [1E-3 kg-M/kg])
0 #Number of interations for back-coupling.
Here we first set the dimensions of the regional model and the grid size for the discretization,
where the origen is located in the left bottom corner. Then the site model is defined by giving the coordinates
Expand All @@ -63,6 +64,10 @@ which allows to consider different rock and saturation function properties, as w
the location of a point of interest to compare results, and the z position of the tops cells as a function of the (x,y) location. The hysteresis option activates the
Killough hysteresis model on the gas relative permeability.

.. note::
The functionality for back-coupling in line 22 is under development, see/run `back-coupling.txt <https://github.com/cssr-tools/expreccs/blob/main/tests/configs/back-coupling.txt>`_
if you are curious.

.. figure:: figs/grids.png

The site location in the regional model (upper left), the fault in the site model (upper right), the number of rock for the different properties
Expand All @@ -77,7 +82,7 @@ The following entries define the rock related parameters:

.. code-block:: python
:linenos:
:lineno-start: 23
:lineno-start: 24
"""Set the saturation functions"""
krw * ((sw - swi) / (1.0 - sni -swi)) ** nkrw #Wetting rel perm saturation function [-]
Expand All @@ -89,7 +94,7 @@ In this example we consider properties for the sands number 1 to 5 as described

.. code-block:: python
:linenos:
:lineno-start: 28
:lineno-start: 29
"""Properties sat functions"""
"""swi [-], sni [-], krw [-], krn [-], pec [Pa], nkrw [-], nkrn [-], npe [-], threshold cP evaluation"""
Expand Down Expand Up @@ -120,7 +125,7 @@ Simillarly for the rock properties:

.. code-block:: python
:linenos:
:lineno-start: 49
:lineno-start: 50
"""Properties rock"""
"""Kxy [mD], Kz [mD], phi [-]"""
Expand Down Expand Up @@ -150,7 +155,7 @@ Now we proceed to define the location of the wells:

.. code-block:: python
:linenos:
:lineno-start: 61
:lineno-start: 62
"""Wells position"""
"""x, y, zi, and zf positions [m]"""
Expand All @@ -172,7 +177,7 @@ The injection rates are given in the following entries:

.. code-block:: python
:linenos:
:lineno-start: 70
:lineno-start: 71
"""Define the injection values"""
"""injection time [d], time step size to write results regional [d], time step size to write results site/reference [d], maximum time step [d], fluid (0 wetting, 1 non-wetting) well 0, injection rates [kg/day] well 0, fluid ... well n, injection, ...well n, (if 'wells' for BC in site (Line 14); bottom, right, top, and left values (0(prod)/1(inj), pressure [Pa]))"""
Expand Down
5 changes: 3 additions & 2 deletions docs/_sources/installation.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ install the Python requirements in a virtual environment with the following comm
.. note::

For not macOS users, to install the Python opm package, execute in the terminal **pip install opm**.
Regarding the reading of from OPM Flow output files (i.e., .EGRID, .INIT, .UNRST), it is possible to use the opm python package instead of resdata (e.g., it seems the opm Python package
is faster than resdata to read large simulation files). For not macOS users, to install the Python opm package, execute in the terminal **pip install opm**.
For macOS, see :ref:`macOS`.

OPM Flow
Expand Down Expand Up @@ -133,4 +134,4 @@ This builds OPM Flow as well as the opm Python package, and it exports the requi

Regarding the resdata Python package, it might not be available depending on the Python version (e.g., it is not found using Python 3.9, but it is installed using Python 3.10).
Then, it is recommended to use a Python version equal or higher than 3.10; otherwise, remove resdata from the requirements in the `pyproject.toml <https://github.com/cssr-tools/expreccs/blob/main/pyproject.toml>`_,
and the opm Python package will be used (this is the default package for reading the simulation files, see the :ref:`overview`).
and when executing **expreccs** always set the flag **-r opm** (resdata is the default package for reading the simulation files, see the :ref:`overview`).
6 changes: 3 additions & 3 deletions docs/_sources/introduction.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The current implementation supports the following executable with the argument o

.. code-block:: bash
expreccs -i input.txt -o output -m all -c '' -p 'no' -r opm -u gaswater -t 0 -e ''
expreccs -i input.txt -o output -m all -c '' -p 'no' -r resdata -u gaswater -t 0 -e ''
where

Expand All @@ -35,10 +35,10 @@ where
- \-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 ('opm' 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).
- \-e: Name of the regional and site folders to project pressures ('' by default).

In the **configuration file** the geological model is defined by generation
of corner-point grids (cpg), adding heterogeinities (e.g., different rock properties, faults), wells, and defining schedules for the
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/doctools.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Base JavaScript utilities for all Sphinx HTML documentation.
*
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down
4 changes: 2 additions & 2 deletions docs/_static/language_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
* This script contains the language-specific data used by searchtools.js,
* namely the list of stopwords, stemmer, scorer and splitter.
*
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/

var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"];


/* Non-minified version is copied as a separate JS file, if available */
/* Non-minified version is copied as a separate JS file, is available */

/**
* Porter Stemmer
Expand Down
Loading

0 comments on commit 2f1af9c

Please sign in to comment.