diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 540d4c8..504138d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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 diff --git a/docs/_images/contents.png b/docs/_images/contents.png index 0e94dba..9793d85 100644 Binary files a/docs/_images/contents.png and b/docs/_images/contents.png differ diff --git a/docs/_sources/api.rst.txt b/docs/_sources/api.rst.txt index 3aaeda4..dda1858 100644 --- a/docs/_sources/api.rst.txt +++ b/docs/_sources/api.rst.txt @@ -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 diff --git a/docs/_sources/configuration_file.rst.txt b/docs/_sources/configuration_file.rst.txt index 4ed1953..1e58e83 100644 --- a/docs/_sources/configuration_file.rst.txt +++ b/docs/_sources/configuration_file.rst.txt @@ -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 @@ -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 `_ + 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 @@ -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 [-] @@ -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""" @@ -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 [-]""" @@ -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]""" @@ -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]))""" diff --git a/docs/_sources/installation.rst.txt b/docs/_sources/installation.rst.txt index 269b075..26be166 100644 --- a/docs/_sources/installation.rst.txt +++ b/docs/_sources/installation.rst.txt @@ -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 @@ -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 `_, -and the opm Python package will be used (this is the default package for reading the simulation files, see the :ref:`overview`). \ No newline at end of file +and when executing **expreccs** always set the flag **-r opm** (resdata is the default package for reading the simulation files, see the :ref:`overview`). \ No newline at end of file diff --git a/docs/_sources/introduction.rst.txt b/docs/_sources/introduction.rst.txt index e4dfa7f..1c000e7 100644 --- a/docs/_sources/introduction.rst.txt +++ b/docs/_sources/introduction.rst.txt @@ -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 @@ -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 diff --git a/docs/_static/basic.css b/docs/_static/basic.css index f316efc..30fee9d 100644 --- a/docs/_static/basic.css +++ b/docs/_static/basic.css @@ -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. * */ diff --git a/docs/_static/doctools.js b/docs/_static/doctools.js index 4d67807..d06a71d 100644 --- a/docs/_static/doctools.js +++ b/docs/_static/doctools.js @@ -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. * */ diff --git a/docs/_static/language_data.js b/docs/_static/language_data.js index 367b8ed..250f566 100644 --- a/docs/_static/language_data.js +++ b/docs/_static/language_data.js @@ -5,7 +5,7 @@ * 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. * */ @@ -13,7 +13,7 @@ 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 diff --git a/docs/_static/searchtools.js b/docs/_static/searchtools.js index b08d58c..7918c3f 100644 --- a/docs/_static/searchtools.js +++ b/docs/_static/searchtools.js @@ -4,7 +4,7 @@ * * Sphinx JavaScript utilities for the full-text search. * - * :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. * */ @@ -99,7 +99,7 @@ const _displayItem = (item, searchTerms, highlightTerms) => { .then((data) => { if (data) listItem.appendChild( - Search.makeSearchSummary(data, searchTerms, anchor) + Search.makeSearchSummary(data, searchTerms) ); // highlight search terms in the summary if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js @@ -116,8 +116,8 @@ const _finishSearch = (resultCount) => { ); else Search.status.innerText = _( - "Search finished, found ${resultCount} page(s) matching the search query." - ).replace('${resultCount}', resultCount); + `Search finished, found ${resultCount} page(s) matching the search query.` + ); }; const _displayNextItem = ( results, @@ -137,22 +137,6 @@ const _displayNextItem = ( // search finished, update title and status message else _finishSearch(resultCount); }; -// Helper function used by query() to order search results. -// Each input is an array of [docname, title, anchor, descr, score, filename]. -// Order the results by score (in opposite order of appearance, since the -// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically. -const _orderResultsByScoreThenName = (a, b) => { - const leftScore = a[4]; - const rightScore = b[4]; - if (leftScore === rightScore) { - // same score: sort alphabetically - const leftTitle = a[1].toLowerCase(); - const rightTitle = b[1].toLowerCase(); - if (leftTitle === rightTitle) return 0; - return leftTitle > rightTitle ? -1 : 1; // inverted is intentional - } - return leftScore > rightScore ? 1 : -1; -}; /** * Default splitQuery function. Can be overridden in ``sphinx.search`` with a @@ -176,26 +160,13 @@ const Search = { _queued_query: null, _pulse_status: -1, - htmlToText: (htmlString, anchor) => { + htmlToText: (htmlString) => { const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); - for (const removalQuery of [".headerlink", "script", "style"]) { - htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() }); - } - if (anchor) { - const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`); - if (anchorContent) return anchorContent.textContent; - - console.warn( - `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.` - ); - } - - // if anchor not specified or not found, fall back to main content + htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() }); const docContent = htmlElement.querySelector('[role="main"]'); - if (docContent) return docContent.textContent; - + if (docContent !== undefined) return docContent.textContent; console.warn( - "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template." + "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template." ); return ""; }, @@ -268,7 +239,16 @@ const Search = { else Search.deferQuery(query); }, - _parseQuery: (query) => { + /** + * execute search (requires search index to be loaded) + */ + query: (query) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + // stem the search terms and add them to the correct list const stemmer = new Stemmer(); const searchTerms = new Set(); @@ -304,38 +284,21 @@ const Search = { // console.info("required: ", [...searchTerms]); // console.info("excluded: ", [...excludedTerms]); - return [query, searchTerms, excludedTerms, highlightTerms, objectTerms]; - }, - - /** - * execute search (requires search index to be loaded) - */ - _performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => { - const filenames = Search._index.filenames; - const docNames = Search._index.docnames; - const titles = Search._index.titles; - const allTitles = Search._index.alltitles; - const indexEntries = Search._index.indexentries; - - // Collect multiple result groups to be sorted separately and then ordered. - // Each is an array of [docname, title, anchor, descr, score, filename]. - const normalResults = []; - const nonMainIndexResults = []; - + // array of [docname, title, anchor, descr, score, filename] + let results = []; _removeChildren(document.getElementById("search-progress")); - const queryLower = query.toLowerCase().trim(); + const queryLower = query.toLowerCase(); for (const [title, foundTitles] of Object.entries(allTitles)) { - if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) { + if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) { for (const [file, id] of foundTitles) { - const score = Math.round(Scorer.title * queryLower.length / title.length); - const boost = titles[file] === title ? 1 : 0; // add a boost for document titles - normalResults.push([ + let score = Math.round(100 * queryLower.length / title.length) + results.push([ docNames[file], titles[file] !== title ? `${titles[file]} > ${title}` : title, id !== null ? "#" + id : "", null, - score + boost, + score, filenames[file], ]); } @@ -345,47 +308,46 @@ const Search = { // search for explicit entries in index directives for (const [entry, foundEntries] of Object.entries(indexEntries)) { if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { - for (const [file, id, isMain] of foundEntries) { - const score = Math.round(100 * queryLower.length / entry.length); - const result = [ + for (const [file, id] of foundEntries) { + let score = Math.round(100 * queryLower.length / entry.length) + results.push([ docNames[file], titles[file], id ? "#" + id : "", null, score, filenames[file], - ]; - if (isMain) { - normalResults.push(result); - } else { - nonMainIndexResults.push(result); - } + ]); } } } // lookup as object objectTerms.forEach((term) => - normalResults.push(...Search.performObjectSearch(term, objectTerms)) + results.push(...Search.performObjectSearch(term, objectTerms)) ); // lookup as search terms in fulltext - normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + results.push(...Search.performTermsSearch(searchTerms, excludedTerms)); // let the scorer override scores with a custom scoring function - if (Scorer.score) { - normalResults.forEach((item) => (item[4] = Scorer.score(item))); - nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item))); - } - - // Sort each group of results by score and then alphabetically by name. - normalResults.sort(_orderResultsByScoreThenName); - nonMainIndexResults.sort(_orderResultsByScoreThenName); - - // Combine the result groups in (reverse) order. - // Non-main index entries are typically arbitrary cross-references, - // so display them after other results. - let results = [...nonMainIndexResults, ...normalResults]; + if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item))); + + // now sort the results by score (in opposite order of appearance, since the + // display function below uses pop() to retrieve items) and then + // alphabetically + results.sort((a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; + }); // remove duplicate search results // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept @@ -399,12 +361,7 @@ const Search = { return acc; }, []); - return results.reverse(); - }, - - query: (query) => { - const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query); - const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms); + results = results.reverse(); // for debugging //Search.lastresults = results.slice(); // a copy @@ -509,18 +466,14 @@ const Search = { // add support for partial matches if (word.length > 2) { const escapedWord = _escapeRegExp(word); - if (!terms.hasOwnProperty(word)) { - Object.keys(terms).forEach((term) => { - if (term.match(escapedWord)) - arr.push({ files: terms[term], score: Scorer.partialTerm }); - }); - } - if (!titleTerms.hasOwnProperty(word)) { - Object.keys(titleTerms).forEach((term) => { - if (term.match(escapedWord)) - arr.push({ files: titleTerms[term], score: Scorer.partialTitle }); - }); - } + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord) && !terms[word]) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord) && !titleTerms[word]) + arr.push({ files: titleTerms[word], score: Scorer.partialTitle }); + }); } // no match but word was a required one @@ -543,8 +496,9 @@ const Search = { // create the mapping files.forEach((file) => { - if (!fileMap.has(file)) fileMap.set(file, [word]); - else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word); + if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1) + fileMap.get(file).push(word); + else fileMap.set(file, [word]); }); }); @@ -595,8 +549,8 @@ const Search = { * search summary for a given text. keywords is a list * of stemmed words. */ - makeSearchSummary: (htmlText, keywords, anchor) => { - const text = Search.htmlToText(htmlText, anchor); + makeSearchSummary: (htmlText, keywords) => { + const text = Search.htmlToText(htmlText); if (text === "") return null; const textLower = text.toLowerCase(); diff --git a/docs/about.html b/docs/about.html index ceeb3f1..c8a0bf9 100644 --- a/docs/about.html +++ b/docs/about.html @@ -16,7 +16,7 @@ - + diff --git a/docs/api.html b/docs/api.html index d707193..e56ef48 100644 --- a/docs/api.html +++ b/docs/api.html @@ -16,7 +16,7 @@ - + @@ -92,8 +92,9 @@

expreccs Python API _images/contents.png
diff --git a/docs/configuration_file.html b/docs/configuration_file.html index befe22f..ed96ba6 100644 --- a/docs/configuration_file.html +++ b/docs/configuration_file.html @@ -16,7 +16,7 @@ - + @@ -128,6 +128,7 @@

Reservoir-related parameters1920000 8000 0 #Sensor position x, y, and z to assess the error over time w.r.t the reference solution [m] 20(20-20*mt.sin((2*mt.pi*(x+y)/10000))) #The function for the reservoir surface 211 2.92 #Add hysteresis (1/0) and salinity (value [1E-3 kg-M/kg]) +220 #Number of interations for back-coupling.

Here we first set the dimensions of the regional model and the grid size for the discretization, @@ -140,6 +141,11 @@

Reservoir-related parameters +

Note

+

The functionality for back-coupling in line 22 is under development, see/run back-coupling.txt +if you are curious.

+
_images/grids.png
@@ -152,34 +158,34 @@

Reservoir-related parameters

Rock-related parameters

The following entries define the rock related parameters:

-
23"""Set the saturation functions"""
-24krw * ((sw - swi) / (1.0 - sni -swi)) ** nkrw             #Wetting rel perm saturation function [-]
-25krn * ((1.0 - sw - sni) / (1.0 - sni - swi)) ** nkrn      #Non-wetting rel perm saturation function [-]
-26pec * ((sw - swi) / (1.0 - swi)) ** (-(1.0 / npe))        #Capillary pressure saturation function [Pa]
+
24"""Set the saturation functions"""
+25krw * ((sw - swi) / (1.0 - sni -swi)) ** nkrw             #Wetting rel perm saturation function [-]
+26krn * ((1.0 - sw - sni) / (1.0 - sni - swi)) ** nkrn      #Non-wetting rel perm saturation function [-]
+27pec * ((sw - swi) / (1.0 - swi)) ** (-(1.0 / npe))        #Capillary pressure saturation function [Pa]
 

In this example we consider properties for the sands number 1 to 5 as described in the 11th SPE CSP:

-
28"""Properties sat functions"""
-29"""swi [-], sni [-], krw [-], krn [-], pec [Pa], nkrw [-], nkrn [-], npe [-], threshold cP evaluation"""
-30SWI5 0.12 SNI5 0.10 KRW5 1. KRN5 1. PRE4 3060.00 NKRW1 2 NKRN1 2 NPE1 2 THRE1 1e-4
-31SWI4 0.12 SNI4 0.10 KRW4 1. KRN4 1. PRE4 3870.63 NKRW1 2 NKRN1 2 NPE1 2 THRE1 1e-4
-32SWI5 0.12 SNI5 0.10 KRW5 1. KRN5 1. PRE5 3060.00 NKRW1 2 NKRN1 2 NPE1 2 THRE1 1e-4
-33SWI4 0.12 SNI4 0.10 KRW4 1. KRN4 1. PRE4 3870.63 NKRW1 2 NKRN1 2 NPE1 2 THRE1 1e-4
-34SWI1 0.32 SNI1 0.10 KRW1 1. KRN1 1. PRE1 193531. NKRW1 2 NKRN1 2 NPE1 2 THRE1 1e-4
-35SWI2 0.14 SNI2 0.10 KRW2 1. KRN2 1. PRE2 8654.99 NKRW1 2 NKRN1 2 NPE1 2 THRE1 1e-4
-36SWI3 0.12 SNI3 0.10 KRW3 1. KRN3 1. PRE3 6120.00 NKRW1 2 NKRN1 2 NPE1 2 THRE1 1e-4
-37SWI2 0.14 SNI2 0.10 KRW2 1. KRN2 1. PRE2 8654.99 NKRW1 2 NKRN1 2 NPE1 2 THRE1 1e-4
-38SWI3 0.12 SNI3 0.10 KRW3 1. KRN3 1. PRE3 6120.00 NKRW1 2 NKRN1 2 NPE1 2 THRE1 1e-4
-39SWI5 0.12 SNI5 0.30 KRW5 1. KRN5 1. PRE4 3060.00 NKRW1 2 NKRN1 4 NPE1 2 THRE1 1e-4
-40SWI4 0.12 SNI4 0.30 KRW4 1. KRN4 1. PRE4 3870.63 NKRW1 2 NKRN1 4 NPE1 2 THRE1 1e-4
-41SWI5 0.12 SNI5 0.30 KRW5 1. KRN5 1. PRE5 3060.00 NKRW1 2 NKRN1 4 NPE1 2 THRE1 1e-4
-42SWI4 0.12 SNI4 0.30 KRW4 1. KRN4 1. PRE4 3870.63 NKRW1 2 NKRN1 4 NPE1 2 THRE1 1e-4
-43SWI1 0.32 SNI1 0.30 KRW1 1. KRN1 1. PRE1 193531. NKRW1 2 NKRN1 4 NPE1 2 THRE1 1e-4
-44SWI2 0.14 SNI2 0.30 KRW2 1. KRN2 1. PRE2 8654.99 NKRW1 2 NKRN1 4 NPE1 2 THRE1 1e-4
-45SWI3 0.12 SNI3 0.30 KRW3 1. KRN3 1. PRE3 6120.00 NKRW1 2 NKRN1 4 NPE1 2 THRE1 1e-4
-46SWI2 0.14 SNI2 0.30 KRW2 1. KRN2 1. PRE2 8654.99 NKRW1 2 NKRN1 4 NPE1 2 THRE1 1e-4
-47SWI3 0.12 SNI3 0.30 KRW3 1. KRN3 1. PRE3 6120.00 NKRW1 2 NKRN1 4 NPE1 2 THRE1 1e-4
+
29"""Properties sat functions"""
+30"""swi [-], sni [-], krw [-], krn [-], pec [Pa], nkrw [-], nkrn [-], npe [-], threshold cP evaluation"""
+31SWI5 0.12 SNI5 0.10 KRW5 1. KRN5 1. PRE4 3060.00 NKRW1 2 NKRN1 2 NPE1 2 THRE1 1e-4
+32SWI4 0.12 SNI4 0.10 KRW4 1. KRN4 1. PRE4 3870.63 NKRW1 2 NKRN1 2 NPE1 2 THRE1 1e-4
+33SWI5 0.12 SNI5 0.10 KRW5 1. KRN5 1. PRE5 3060.00 NKRW1 2 NKRN1 2 NPE1 2 THRE1 1e-4
+34SWI4 0.12 SNI4 0.10 KRW4 1. KRN4 1. PRE4 3870.63 NKRW1 2 NKRN1 2 NPE1 2 THRE1 1e-4
+35SWI1 0.32 SNI1 0.10 KRW1 1. KRN1 1. PRE1 193531. NKRW1 2 NKRN1 2 NPE1 2 THRE1 1e-4
+36SWI2 0.14 SNI2 0.10 KRW2 1. KRN2 1. PRE2 8654.99 NKRW1 2 NKRN1 2 NPE1 2 THRE1 1e-4
+37SWI3 0.12 SNI3 0.10 KRW3 1. KRN3 1. PRE3 6120.00 NKRW1 2 NKRN1 2 NPE1 2 THRE1 1e-4
+38SWI2 0.14 SNI2 0.10 KRW2 1. KRN2 1. PRE2 8654.99 NKRW1 2 NKRN1 2 NPE1 2 THRE1 1e-4
+39SWI3 0.12 SNI3 0.10 KRW3 1. KRN3 1. PRE3 6120.00 NKRW1 2 NKRN1 2 NPE1 2 THRE1 1e-4
+40SWI5 0.12 SNI5 0.30 KRW5 1. KRN5 1. PRE4 3060.00 NKRW1 2 NKRN1 4 NPE1 2 THRE1 1e-4
+41SWI4 0.12 SNI4 0.30 KRW4 1. KRN4 1. PRE4 3870.63 NKRW1 2 NKRN1 4 NPE1 2 THRE1 1e-4
+42SWI5 0.12 SNI5 0.30 KRW5 1. KRN5 1. PRE5 3060.00 NKRW1 2 NKRN1 4 NPE1 2 THRE1 1e-4
+43SWI4 0.12 SNI4 0.30 KRW4 1. KRN4 1. PRE4 3870.63 NKRW1 2 NKRN1 4 NPE1 2 THRE1 1e-4
+44SWI1 0.32 SNI1 0.30 KRW1 1. KRN1 1. PRE1 193531. NKRW1 2 NKRN1 4 NPE1 2 THRE1 1e-4
+45SWI2 0.14 SNI2 0.30 KRW2 1. KRN2 1. PRE2 8654.99 NKRW1 2 NKRN1 4 NPE1 2 THRE1 1e-4
+46SWI3 0.12 SNI3 0.30 KRW3 1. KRN3 1. PRE3 6120.00 NKRW1 2 NKRN1 4 NPE1 2 THRE1 1e-4
+47SWI2 0.14 SNI2 0.30 KRW2 1. KRN2 1. PRE2 8654.99 NKRW1 2 NKRN1 4 NPE1 2 THRE1 1e-4
+48SWI3 0.12 SNI3 0.30 KRW3 1. KRN3 1. PRE3 6120.00 NKRW1 2 NKRN1 4 NPE1 2 THRE1 1e-4
 
@@ -188,17 +194,17 @@

Rock-related parameters

Simillarly for the rock properties:

-
49"""Properties rock"""
-50"""Kxy [mD], Kz [mD], phi [-]"""
-51PERMXY5 1013.25 PERMZ5 101.325 PORO5 0.25
-52PERMXY4 506.625 PERMZ4 50.6625 PORO4 0.20
-53PERMXY5 1013.25 PERMZ5 101.325 PORO5 0.25
-54PERMXY4 506.625 PERMZ4 50.6625 PORO4 0.20
-55PERMXY1 0.10132 PERMZ1 .010132 PORO1 0.10
-56PERMXY2 101.324 PERMZ2 10.1324 PORO2 0.20
-57PERMXY3 202.650 PERMZ3 20.2650 PORO3 0.20
-58PERMXY2 101.324 PERMZ2 10.1324 PORO2 0.20
-59PERMXY3 202.650 PERMZ3 20.2650 PORO3 0.20
+
50"""Properties rock"""
+51"""Kxy [mD], Kz [mD], phi [-]"""
+52PERMXY5 1013.25 PERMZ5 101.325 PORO5 0.25
+53PERMXY4 506.625 PERMZ4 50.6625 PORO4 0.20
+54PERMXY5 1013.25 PERMZ5 101.325 PORO5 0.25
+55PERMXY4 506.625 PERMZ4 50.6625 PORO4 0.20
+56PERMXY1 0.10132 PERMZ1 .010132 PORO1 0.10
+57PERMXY2 101.324 PERMZ2 10.1324 PORO2 0.20
+58PERMXY3 202.650 PERMZ3 20.2650 PORO3 0.20
+59PERMXY2 101.324 PERMZ2 10.1324 PORO2 0.20
+60PERMXY3 202.650 PERMZ3 20.2650 PORO3 0.20
 

As seen from the previous values, the finnest rock corresponds to No. 1 and it gets coarser @@ -213,14 +219,14 @@

Rock-related parameters

Well-related parameters

Now we proceed to define the location of the wells:

-
61"""Wells position"""
-62"""x, y, zi, and zf positions [m]"""
-6321180 7068  0 81 #Well 0
-6424200 7800 15 65 #Well 1
-6521718 7122 45 81 #Well 2
-6614518 11377 0 50 #Well 3
-6731679 8883  0 30 #Well 4
-6828477 2732  0 81 #Well 5
+
62"""Wells position"""
+63"""x, y, zi, and zf positions [m]"""
+6421180 7068  0 81 #Well 0
+6524200 7800 15 65 #Well 1
+6621718 7122 45 81 #Well 2
+6714518 11377 0 50 #Well 3
+6831679 8883  0 30 #Well 4
+6928477 2732  0 81 #Well 5
 

The implementation allows to add as many wells as desired in the site and regional model.

@@ -232,10 +238,10 @@

Well-related parameters

The injection rates are given in the following entries:

-
70"""Define the injection values"""
-71"""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]))"""
-72365. 73. 73. 73. 1 3e5 1 3e5 1 3e5 1 5e6 1 5e6 0 1e7
-73365. 73. 73. 73. 1 3e5 1 3e5 1 3e5 1 5e6 1   0 0 1e7
+
71"""Define the injection values"""
+72"""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]))"""
+73365. 73. 73. 73. 1 3e5 1 3e5 1 3e5 1 5e6 1 5e6 0 1e7
+74365. 73. 73. 73. 1 3e5 1 3e5 1 3e5 1 5e6 1   0 0 1e7
 

Since we defined six wells (three of them inside the site model), then each row of the schedule has 16 entries, corresponding to diff --git a/docs/examples.html b/docs/examples.html index bc2eea1..20ae3ad 100644 --- a/docs/examples.html +++ b/docs/examples.html @@ -16,7 +16,7 @@ - + diff --git a/docs/expreccs.core.expreccs.html b/docs/expreccs.core.expreccs.html index 2db6408..c4ef948 100644 --- a/docs/expreccs.core.expreccs.html +++ b/docs/expreccs.core.expreccs.html @@ -16,7 +16,7 @@ - + @@ -86,11 +86,11 @@

expreccs.core.expreccs module

-

Main script

+

Main script for expreccs

expreccs.core.expreccs.expreccs()
-

Main function

+

Main function for the expreccs executable

diff --git a/docs/expreccs.core.html b/docs/expreccs.core.html index 66a8deb..548f28b 100644 --- a/docs/expreccs.core.html +++ b/docs/expreccs.core.html @@ -16,7 +16,7 @@ - + diff --git a/docs/expreccs.html b/docs/expreccs.html index 3ac680b..c38efa1 100644 --- a/docs/expreccs.html +++ b/docs/expreccs.html @@ -16,7 +16,7 @@ - + @@ -202,6 +202,7 @@

Subpackagesreading_opm()
  • reading_resdata()
  • resdata_arrays()
  • +
  • resdata_load_data()
  • diff --git a/docs/expreccs.utils.backcoupling.html b/docs/expreccs.utils.backcoupling.html index 153d227..60f5dc3 100644 --- a/docs/expreccs.utils.backcoupling.html +++ b/docs/expreccs.utils.backcoupling.html @@ -16,7 +16,7 @@ - + @@ -97,9 +97,9 @@ and added to the regional model. This is done iterativly for number of iterations given in the input

    -
    Args:

    dic (dict): Global dictionary with required parameters

    +
    Args:

    dic (dict): Global dictionary

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -111,11 +111,11 @@ difference in fluxes MULT[-X, X, -Y , Y] = Flux_site / Flux_regional and added to the regional model

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters -iteration: Current iteration number

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    iteration (int): Current iteration number

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -125,9 +125,9 @@ expreccs.utils.backcoupling.init_multipliers(dic)

    Function initialize input for regional multipliers

    -
    Args:

    dic (dict): Global dictionary with required parameters

    +
    Args:

    dic (dict): Global dictionary

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -136,10 +136,11 @@
    expreccs.utils.backcoupling.write_folder_iter(dic, fil)

    Write folders for the _{iteration} models

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    fil (str): Name of the geological model

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    None

    diff --git a/docs/expreccs.utils.html b/docs/expreccs.utils.html index 80d53c3..ec0d613 100644 --- a/docs/expreccs.utils.html +++ b/docs/expreccs.utils.html @@ -16,7 +16,7 @@ - + diff --git a/docs/expreccs.utils.inputvalues.html b/docs/expreccs.utils.inputvalues.html index 865e3e5..78b5a83 100644 --- a/docs/expreccs.utils.inputvalues.html +++ b/docs/expreccs.utils.inputvalues.html @@ -16,7 +16,7 @@ - + @@ -91,11 +91,11 @@
    expreccs.utils.inputvalues.process_input(dic, in_file)

    Function to process the input file

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters -in_file (str): Name of the input text file

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    in_file (str): Name of the input text file

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -104,12 +104,12 @@
    expreccs.utils.inputvalues.readthefirstpart(lol, dic)

    Function to process the lines in the configuration file.

    -
    -
    Args:

    lol (list): List of lines read from the input file -dic (dict): Global dictionary with required parameters

    +
    +
    Args:

    lol (list): List of lines read from the input file

    +

    dic (dict): Global dictionary

    -
    Returns:

    dic (dict): Global dictionary with new added parameters -inc (int): Number of line in the input file before the first injection value

    +
    Returns:

    dic (dict): Modified global dictionary

    +

    inc (int): Number of line in the input file before the first injection value

    @@ -118,12 +118,12 @@
    expreccs.utils.inputvalues.readthesecondpart(lol, dic, index)

    Function to process the remaining lines in the configuration file

    -
    -
    Args:

    lol (list): List of lines read from the input file -dic (dict): Global dictionary with required parameters -inc (int): Number of line in the input file

    +
    +
    Args:

    lol (list): List of lines read from the input file

    +

    dic (dict): Global dictionary

    +

    index (int): Number of line in the input file

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    diff --git a/docs/expreccs.utils.mapboundaries.html b/docs/expreccs.utils.mapboundaries.html index 58085d0..a428b21 100644 --- a/docs/expreccs.utils.mapboundaries.html +++ b/docs/expreccs.utils.mapboundaries.html @@ -16,7 +16,7 @@ - + @@ -92,21 +92,21 @@ expreccs.utils.mapboundaries.aquaflux_opm(dic, iteration='')

    Function to read the fluxes and pressures from the regional

    -
    Args:

    dic (dict): Global dictionary with required parameters

    +
    Args:

    dic (dict): Global dictionary

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    -expreccs.utils.mapboundaries.aquaflux_resdata(dic)
    +expreccs.utils.mapboundaries.aquaflux_resdata(dic, iteration='')

    Function to read the fluxes and pressures from the regional

    -
    Args:

    dic (dict): Global dictionary with required parameters

    +
    Args:

    dic (dict): Global dictionary

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -115,17 +115,23 @@
    expreccs.utils.mapboundaries.handle_pressure_correction(dic)

    Correct for the REG pres to the SITE on the z dir if refinement

    +
    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    expreccs.utils.mapboundaries.handle_stencil_2p(dic, i)

    Function to project the cell pressures to the cell faces

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters -i (int): Counter for the time in the schedule

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    i (int): Counter for the time in the schedule

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -134,11 +140,11 @@
    expreccs.utils.mapboundaries.handle_stencil_opm(dic, i)

    Function to project the cell pressures to the cell faces

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters -i (int): Counter for the time in the schedule

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    i (int): Counter for the time in the schedule

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -147,11 +153,11 @@
    expreccs.utils.mapboundaries.handle_stencil_resdata(dic, i)

    Function to project the cell pressures to the cell faces

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters -i (int): Counter for the time in the schedule

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    i (int): Counter for the time in the schedule

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -161,9 +167,9 @@ expreccs.utils.mapboundaries.porv_projections(dic)

    Function to project the pore volumes from the regional to the site.

    -
    Args:

    dic (dict): Global dictionary with required parameters

    +
    Args:

    dic (dict): Global dictionary

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -173,9 +179,9 @@ expreccs.utils.mapboundaries.porv_regional_segmentation(dic)

    Function to locate the different sides for the pv projections

    -
    Args:

    dic (dict): Global dictionary with required parameters

    +
    Args:

    dic (dict): Global dictionary

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -184,12 +190,24 @@
    expreccs.utils.mapboundaries.temporal_interpolation_flux(dic)

    Function to interpolate the BC fluxes values in time

    +
    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    expreccs.utils.mapboundaries.temporal_interpolation_pressure(dic)

    Function to interpolate the BC pressure values in time

    +
    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    diff --git a/docs/expreccs.utils.mapproperties.html b/docs/expreccs.utils.mapproperties.html index c2a3e92..77d10f1 100644 --- a/docs/expreccs.utils.mapproperties.html +++ b/docs/expreccs.utils.mapproperties.html @@ -16,7 +16,7 @@ - + @@ -86,15 +86,15 @@

    expreccs.utils.mapproperties module

    -

    Utiliy function for finding the well i,j, and k ids.

    +

    Utiliy function for mapping quantities in the different sites.

    expreccs.utils.mapproperties.mapping_properties(dic)

    Function to handle the reservoir location settings.

    -
    Args:

    dic (dict): Global dictionary with required parameters

    +
    Args:

    dic (dict): Global dictionary

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -104,9 +104,9 @@ expreccs.utils.mapproperties.positions_reference(dic)

    Function to locate well, fault, and site positions in the reference reservoir.

    -
    Args:

    dic (dict): Global dictionary with required parameters

    +
    Args:

    dic (dict): Global dictionary

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -116,9 +116,9 @@ expreccs.utils.mapproperties.positions_regional(dic)

    Function to locate well, site, and fault positions

    -
    Args:

    dic (dict): Global dictionary with required parameters

    +
    Args:

    dic (dict): Global dictionary

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -127,6 +127,12 @@
    expreccs.utils.mapproperties.positions_rotation(dic)

    Find the locations after the rotation

    +
    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    @@ -134,9 +140,9 @@ expreccs.utils.mapproperties.positions_site(dic)

    Function to locate well and fault positions in the site reservoir.

    -
    Args:

    dic (dict): Global dictionary with required parameters

    +
    Args:

    dic (dict): Global dictionary

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -144,7 +150,13 @@
    expreccs.utils.mapproperties.rotate_grid(dic)
    -

    Rotate the grid site if requiered

    +

    Rotate the grid site if requiered.

    +
    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    diff --git a/docs/expreccs.utils.reg_sit_given_decks.html b/docs/expreccs.utils.reg_sit_given_decks.html index c26988a..4fca394 100644 --- a/docs/expreccs.utils.reg_sit_given_decks.html +++ b/docs/expreccs.utils.reg_sit_given_decks.html @@ -16,7 +16,7 @@ - + @@ -92,60 +92,126 @@
    expreccs.utils.reg_sit_given_decks.check_intersection(dic, ind, gind, i, n)

    Check if there are nnc in the regional/site overlapping

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    ind (int): Index for the closest cell

    +

    gind (int): Global cell index in the regional model

    +

    i (int): Position of the x, y, or z coords

    +

    n (int): Position for the cardinal direction

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    expreccs.utils.reg_sit_given_decks.check_regional_neighbours(dic, gind, p)

    Add to the interpolator neighbouring regional cells

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    gind (int): Global cell index

    +

    p (str): Cardinal direction

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    expreccs.utils.reg_sit_given_decks.create_deck(dic)

    Create a deck from given reg and site decks with projected pressures

    +
    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    expreccs.utils.reg_sit_given_decks.dynamic_mapping(dic)

    Project the pressures from the regional to the site over time

    +
    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    expreccs.utils.reg_sit_given_decks.extract_site_borders(dic)

    Get the index/coord from the site border

    +
    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    expreccs.utils.reg_sit_given_decks.find_ij_orientation(dic)

    Find if the counting is left/right handed

    +
    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    expreccs.utils.reg_sit_given_decks.find_regional_cells(dic)

    Find the cells to build the interpolator

    +
    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    expreccs.utils.reg_sit_given_decks.handle_grid_coord(dic)

    Process the regional and site grid coordinates

    +
    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    expreccs.utils.reg_sit_given_decks.project_pressures(dic, i)

    Project the pressures at restart number i

    +
    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    expreccs.utils.reg_sit_given_decks.write_files(dic)
    -

    Write the files

    +

    Write the files with the projected pressures

    +
    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    diff --git a/docs/expreccs.utils.runs.html b/docs/expreccs.utils.runs.html index a20a767..6b0e9ec 100644 --- a/docs/expreccs.utils.runs.html +++ b/docs/expreccs.utils.runs.html @@ -16,7 +16,7 @@ - + @@ -90,9 +90,12 @@
    expreccs.utils.runs.plotting(dic, time)
    -

    Function to run the plotting.py file

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters

    +

    Generate the figures

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    time (float): Execution time to be printed at the end.

    +
    +
    Returns:

    None

    @@ -100,15 +103,24 @@
    expreccs.utils.runs.run_models(dic)
    -

    Run the reference, regional, and site

    +

    Run the reference, regional, and site geological models

    +
    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    expreccs.utils.runs.simulations(dic, name)
    -

    Function to Run Flow

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters

    +

    Run OPM Flow

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    name (str): Name of the input deck

    +
    +
    Returns:

    None

    diff --git a/docs/expreccs.utils.writefile.html b/docs/expreccs.utils.writefile.html index 1d8ac7e..ac50afd 100644 --- a/docs/expreccs.utils.writefile.html +++ b/docs/expreccs.utils.writefile.html @@ -16,7 +16,7 @@ - + @@ -90,10 +90,12 @@
    expreccs.utils.writefile.set_gridmako(dic, f_xy)
    -

    Method to set the mainfold function

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters -f_xy: The function for the reservoir surface

    +

    Set the mainfold function in the grid for the reservoir z profile

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    f_xy: The function for the reservoir surface

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -102,9 +104,11 @@
    expreccs.utils.writefile.write_files(dic, reservoir)

    Function to write opm-related reference files by running mako templates

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters -reservoir (str): Name of the geological model

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    reservoir (str): Name of the geological model

    +
    +
    Returns:

    None

    @@ -114,7 +118,9 @@ expreccs.utils.writefile.write_folders(dic)

    Function to make the output folders

    -
    Args:

    dic (dict): Global dictionary with required parameters

    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    None

    @@ -122,9 +128,11 @@
    expreccs.utils.writefile.write_properties(dic)
    -

    Function to write some numpy files used in the plotting routine

    +

    Write some numpy files used in the plotting routine

    -
    Args:

    dic (dict): Global dictionary with required parameters

    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    diff --git a/docs/expreccs.visualization.html b/docs/expreccs.visualization.html index 9d77a7a..815d51a 100644 --- a/docs/expreccs.visualization.html +++ b/docs/expreccs.visualization.html @@ -16,7 +16,7 @@ - + @@ -120,6 +120,7 @@

    Submodulesreading_opm()
  • reading_resdata()
  • resdata_arrays()
  • +
  • resdata_load_data()
  • diff --git a/docs/expreccs.visualization.maps2d.html b/docs/expreccs.visualization.maps2d.html index e92b749..f2c0abd 100644 --- a/docs/expreccs.visualization.maps2d.html +++ b/docs/expreccs.visualization.maps2d.html @@ -16,7 +16,7 @@ - + @@ -91,9 +91,11 @@
    expreccs.visualization.maps2d.final_time_maps(dic)
    -

    Function to plot the 2D maps for the different reservoirs and quantities

    +

    Plot the 2D maps for the different reservoirs and quantities

    -
    Args:

    dic (dict): Global dictionary with required parameters

    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    None

    @@ -101,12 +103,12 @@
    expreccs.visualization.maps2d.final_time_maps_difference(dic)
    -

    Function to plot the difference between the reference and site simulations +

    Plot the difference between the reference and site simulations in the last time step

    -
    Args:

    dic (dict): Global dictionary with required parameters

    +
    Args:

    dic (dict): Global dictionary

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    None

    @@ -114,9 +116,11 @@
    expreccs.visualization.maps2d.geological_maps(dic)
    -

    Function to plot the 2D maps for the reservoir model

    +

    Plot the 2D maps for the reservoir model

    -
    Args:

    dic (dict): Global dictionary with required parameters

    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    None

    @@ -124,7 +128,14 @@
    expreccs.visualization.maps2d.manage_name(dic, res)
    -

    Figure out the folder name (needs to be fixed)

    +

    Figure out the folder names

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    res (str): Complete name of the simulated model

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    diff --git a/docs/expreccs.visualization.plotting.html b/docs/expreccs.visualization.plotting.html index 49592b1..8552fa5 100644 --- a/docs/expreccs.visualization.plotting.html +++ b/docs/expreccs.visualization.plotting.html @@ -16,7 +16,7 @@ - + @@ -91,13 +91,15 @@
    expreccs.visualization.plotting.handle_labels_difference(dic, res, j, nqua, nfol)
    -

    Function to handle the labeling for improve visualization.

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters -res (str): Name of the reservoir -j (int): Indice for the reservoir

    +

    Manage the labeling to improve the visualization.

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    res (str): Name of the reservoir

    +

    j (int): Indice for the reservoir

    +

    nqua (int): Current number of quantity

    +

    nfol (int): Current number of folder

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -105,15 +107,15 @@
    expreccs.visualization.plotting.handle_labels_distance(dic, nfol, res, fol, j)
    -

    Function to handle the labeling for better visualization.

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters -nfol (int): Indice for the color -res (str): Name of the reservoir -fol (str): Name of the output folder -j (int): Indice for the reservoir

    +

    Manage the labeling for better visualization.

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    nfol (int): Indice for the color

    +

    res (str): Name of the reservoir

    +

    fol (str): Name of the output folder

    +

    j (int): Indice for the reservoir

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -121,21 +123,31 @@
    expreccs.visualization.plotting.handle_site_summary(dic, i, quantity)
    -

    Routine for the summary qunatities at the site location

    +

    Routine for the summary quantities at the site location

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    i (int): Index of the quantity

    +

    quantity (str): Name of the quantity

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    expreccs.visualization.plotting.main()
    -

    Postprocessing

    +

    Generate figures

    expreccs.visualization.plotting.over_time_distance(dic)
    -

    Function to plot the distance from the closest saturation cell to the site border

    +

    Plot the distance from the closest saturation cell to the site border

    -
    Args:

    dic (dict): Global dictionary with required parameters

    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -143,9 +155,13 @@
    expreccs.visualization.plotting.over_time_max_difference(dic, nqua, quantity)
    -

    Function to plot the the max difference between pressure/saturation.

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters

    +

    Plot the max difference between pressure/saturation.

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    nqua (int): Index of the quantity

    +

    quantity (str): Name of the quantity

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -153,9 +169,13 @@
    expreccs.visualization.plotting.over_time_sensor(dic, nqua, quantity)
    -

    Function to plot the the quantities on the sensor.

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters

    +

    Plot the quantities on the sensor.

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    nqua (int): Index of the quantity

    +

    quantity (str): Name of the quantity

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -163,9 +183,11 @@
    expreccs.visualization.plotting.plot_results(dic)
    -

    Function to plot the 2D maps/1D projections for the different quantities

    +

    Plot the 2D maps/1D projections for the different quantities

    -
    Args:

    dic (dict): Global dictionary with required parameters

    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    None

    @@ -174,17 +196,23 @@
    expreccs.visualization.plotting.plotting_settings(dic)

    Set the color/line styles and labels

    +
    +
    Args:

    dic (dict): Global dictionary

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    expreccs.visualization.plotting.positions_opm(dic, fol, res, nrst)
    -

    Function to extract the point coordinates using opm

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters -fol (str): Name of the output folder -res (str): Name of the reservoir -nrst (int): Indice for the schedule

    +

    Extract the point coordinates using opm

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    fol (str): Name of the output folder

    +

    res (str): Name of the reservoir

    +

    nrst (int): Indice for the schedule

    Returns:

    points (list): x,y,z coordinates

    @@ -194,12 +222,12 @@
    expreccs.visualization.plotting.positions_resdata(dic, fol, res, nrst)
    -

    Function to extract the point coordinates using resdata

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters -fol (str): Name of the output folder -res (str): Name of the reservoir -nrst (int): Indice for the schedule

    +

    Extract the point coordinates using resdata

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    fol (str): Name of the output folder

    +

    res (str): Name of the reservoir

    +

    nrst (int): Indice for the schedule

    Returns:

    points (list): x,y,z coordinates

    @@ -209,11 +237,13 @@
    expreccs.visualization.plotting.summary_plot(dic, i, quantity)
    -

    Function to plot the summary qunatities

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters -i (int): Index of the quantity -quantity (str): Name of the quantity

    +

    Plot the summary quantities

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    i (int): Index of the quantity

    +

    quantity (str): Name of the quantity

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -221,9 +251,14 @@
    expreccs.visualization.plotting.summary_site(dic, nfol, ndeck, opmn)
    -

    Function to plot summary quantities

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters

    +

    Plot summary quantities

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    nfol (int): Current number of folder

    +

    ndeck (int): Current number of deck

    +

    opmn (str): Summary name to plot

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -231,9 +266,15 @@
    expreccs.visualization.plotting.wells_site(dic, nquan, nfol, ndeck, nwell)
    -

    Function to plot the injection rates and BHP

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters

    +

    Plot the injection rates and BHP

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    nquan (int): Current number of quantity

    +

    nfol (int): Current number of folder

    +

    ndeck (int): Current number of deck

    +

    nwell (int): Current number of well

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    diff --git a/docs/expreccs.visualization.reading.html b/docs/expreccs.visualization.reading.html index 788be64..ea3d4b5 100644 --- a/docs/expreccs.visualization.reading.html +++ b/docs/expreccs.visualization.reading.html @@ -16,7 +16,7 @@ - + @@ -90,13 +90,15 @@ Script to read OPM Flow output files

    -expreccs.visualization.reading.handle_smsp_time(dic, fol, res)
    -

    Function to chandle the times in the summary files

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters -str (study): Name of the folder containing the results

    +expreccs.visualization.reading.handle_smsp_time(dic, fol, res, name) +

    Handle the times in the summary files

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    fol (str): Name of the output folder

    +

    res (str): Complete name of the simulated model

    +

    name (str): Name of the type of simulated model (e.g., site)

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    @@ -104,43 +106,85 @@
    expreccs.visualization.reading.manage_names(dic, res)
    -

    Figure out the folder names (needs to be fixed)

    +

    Figure out the folder names

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    res (str): Complete name of the simulated model

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    expreccs.visualization.reading.opm_arrays(dic, fol, res, loadnpy)
    -

    From simulaion data to arrays

    +

    From simulation data to arrays

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    fol (str): Name of the output folder

    +

    res (str): Complete name of the simulated model

    +

    loadnpy (bool): True for plotting, False for back-coupling

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    expreccs.visualization.reading.reading_opm(dic, loadnpy=True)
    -

    Function to read the deck quantities using opm

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters

    +

    Read the deck quantities using opm

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    loadnpy (bool): True for plotting, False for back-coupling

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    -expreccs.visualization.reading.reading_resdata(dic)
    -

    Function to read the deck quantities using resdata

    -
    -
    Args:

    dic (dict): Global dictionary with required parameters

    +expreccs.visualization.reading.reading_resdata(dic, loadnpy=True) +

    Read the deck quantities using resdata

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    loadnpy (bool): True for plotting, False for back-coupling

    -
    Returns:

    dic (dict): Global dictionary with new added parameters

    +
    Returns:

    dic (dict): Modified global dictionary

    -expreccs.visualization.reading.resdata_arrays(dic, fol, res)
    -

    From simulaion data to arrays

    +expreccs.visualization.reading.resdata_arrays(dic, fol, res, loadnpy) +

    From simulation data to arrays

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    fol (str): Name of the output folder

    +

    res (str): Complete name of the simulated model

    +

    loadnpy (bool): True for plotting, False for back-coupling

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    +
    + +
    +
    +expreccs.visualization.reading.resdata_load_data(dic, fol, res, name)
    +

    Read the data needed for the plotting

    +
    +
    Args:

    dic (dict): Global dictionary

    +

    fol (str): Name of the output folder

    +

    res (str): Complete name of the simulated model

    +

    name (str): Name of the type of simulated model (e.g., site)

    +
    +
    Returns:

    dic (dict): Modified global dictionary

    +
    +
    diff --git a/docs/genindex.html b/docs/genindex.html index b2fdb51..12d3631 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -15,7 +15,7 @@ - + @@ -439,11 +439,13 @@

    R

  • readthefirstpart() (in module expreccs.utils.inputvalues)
  • - - +

    @@ -210,7 +211,7 @@

    Source build in Linux/Windowspyproject.toml, -and the opm Python package will be used (this is the default package for reading the simulation files, see the Overview).

    +and when executing expreccs always set the flag -r opm (resdata is the default package for reading the simulation files, see the Overview).

    diff --git a/docs/introduction.html b/docs/introduction.html index 4f95674..869ea5c 100644 --- a/docs/introduction.html +++ b/docs/introduction.html @@ -16,7 +16,7 @@ - + @@ -104,7 +104,7 @@

    Concept

    Overview

    The current implementation supports the following executable with the argument options:

    -
    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

    @@ -114,10 +114,10 @@

    Concept
  • -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 diff --git a/docs/modules.html b/docs/modules.html index 08b87ee..0d6ab81 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -16,7 +16,7 @@ - + diff --git a/docs/objects.inv b/docs/objects.inv index 2d18a0a..32ebff9 100644 Binary files a/docs/objects.inv and b/docs/objects.inv differ diff --git a/docs/output_folder.html b/docs/output_folder.html index b68b81c..f12da7c 100644 --- a/docs/output_folder.html +++ b/docs/output_folder.html @@ -16,7 +16,7 @@ - + diff --git a/docs/py-modindex.html b/docs/py-modindex.html index d0d4b0a..b351f10 100644 --- a/docs/py-modindex.html +++ b/docs/py-modindex.html @@ -15,7 +15,7 @@ - + diff --git a/docs/related.html b/docs/related.html index e93f67b..f5e452a 100644 --- a/docs/related.html +++ b/docs/related.html @@ -16,7 +16,7 @@ - + diff --git a/docs/search.html b/docs/search.html index 14b82e3..c556e13 100644 --- a/docs/search.html +++ b/docs/search.html @@ -16,7 +16,7 @@ - + diff --git a/docs/searchindex.js b/docs/searchindex.js index 6455fab..80860d1 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({"alltitles": {"About expreccs": [[0, null]], "Concept": [[21, "concept"]], "Configuration file": [[2, null]], "Example 1": [[3, "example-1"]], "Example 2": [[3, "example-2"]], "Examples": [[3, null]], "Generic (under development)": [[3, "generic-under-development"]], "Indices and tables": [[19, "indices-and-tables"]], "Installation": [[20, null]], "Introduction": [[21, null]], "Module contents": [[4, "module-expreccs"], [5, "module-expreccs.core"], [7, "module-expreccs.utils"], [15, "module-expreccs.visualization"]], "OPM Flow": [[20, "opm-flow"]], "Output folder": [[23, null]], "Overview": [[21, "overview"]], "Python package": [[20, "python-package"]], "Related": [[24, null]], "Reservoir-related parameters": [[2, "reservoir-related-parameters"]], "Rock-related parameters": [[2, "rock-related-parameters"]], "Simulation results": [[2, "simulation-results"]], "Source build in Linux/Windows": [[20, "source-build-in-linux-windows"]], "Source build in macOS": [[20, "source-build-in-macos"]], "Submodules": [[5, "submodules"], [7, "submodules"], [15, "submodules"]], "Subpackages": [[4, "subpackages"]], "Welcome to expreccs\u2019s documentation!": [[19, null]], "Well-related parameters": [[2, "well-related-parameters"]], "ad-micp": [[24, "ad-micp"]], "expreccs": [[1, "expreccs"], [22, null]], "expreccs Python API": [[1, null]], "expreccs package": [[4, null]], "expreccs.core package": [[5, null]], "expreccs.core.expreccs module": [[6, null]], "expreccs.utils package": [[7, null]], "expreccs.utils.backcoupling module": [[8, null]], "expreccs.utils.inputvalues module": [[9, null]], "expreccs.utils.mapboundaries module": [[10, null]], "expreccs.utils.mapproperties module": [[11, null]], "expreccs.utils.reg_sit_given_decks module": [[12, null]], "expreccs.utils.runs module": [[13, null]], "expreccs.utils.writefile module": [[14, null]], "expreccs.visualization package": [[15, null]], "expreccs.visualization.maps2d module": [[16, null]], "expreccs.visualization.plotting module": [[17, null]], "expreccs.visualization.reading module": [[18, null]], "plopm": [[24, "plopm"]], "pycopm": [[24, "pycopm"]], "pymm": [[24, "pymm"]], "pyopmnearwell": [[24, "pyopmnearwell"]], "pyopmspe11": [[24, "pyopmspe11"]]}, "docnames": ["about", "api", "configuration_file", "examples", "expreccs", "expreccs.core", "expreccs.core.expreccs", "expreccs.utils", "expreccs.utils.backcoupling", "expreccs.utils.inputvalues", "expreccs.utils.mapboundaries", "expreccs.utils.mapproperties", "expreccs.utils.reg_sit_given_decks", "expreccs.utils.runs", "expreccs.utils.writefile", "expreccs.visualization", "expreccs.visualization.maps2d", "expreccs.visualization.plotting", "expreccs.visualization.reading", "index", "installation", "introduction", "modules", "output_folder", "related"], "envversion": {"sphinx": 62, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["about.rst", "api.rst", "configuration_file.rst", "examples.rst", "expreccs.rst", "expreccs.core.rst", "expreccs.core.expreccs.rst", "expreccs.utils.rst", "expreccs.utils.backcoupling.rst", "expreccs.utils.inputvalues.rst", "expreccs.utils.mapboundaries.rst", "expreccs.utils.mapproperties.rst", "expreccs.utils.reg_sit_given_decks.rst", "expreccs.utils.runs.rst", "expreccs.utils.writefile.rst", "expreccs.visualization.rst", "expreccs.visualization.maps2d.rst", "expreccs.visualization.plotting.rst", "expreccs.visualization.reading.rst", "index.rst", "installation.rst", "introduction.rst", "modules.rst", "output_folder.rst", "related.rst"], "indexentries": {"aquaflux_opm() (in module expreccs.utils.mapboundaries)": [[10, "expreccs.utils.mapboundaries.aquaflux_opm", false]], "aquaflux_resdata() (in module expreccs.utils.mapboundaries)": [[10, "expreccs.utils.mapboundaries.aquaflux_resdata", false]], "backcoupling() (in module expreccs.utils.backcoupling)": [[8, "expreccs.utils.backcoupling.backcoupling", false]], "check_intersection() (in module expreccs.utils.reg_sit_given_decks)": [[12, "expreccs.utils.reg_sit_given_decks.check_intersection", false]], "check_regional_neighbours() (in module expreccs.utils.reg_sit_given_decks)": [[12, "expreccs.utils.reg_sit_given_decks.check_regional_neighbours", false]], "compute_multipliers() (in module expreccs.utils.backcoupling)": [[8, "expreccs.utils.backcoupling.compute_multipliers", false]], "create_deck() (in module expreccs.utils.reg_sit_given_decks)": [[12, "expreccs.utils.reg_sit_given_decks.create_deck", false]], "dynamic_mapping() (in module expreccs.utils.reg_sit_given_decks)": [[12, "expreccs.utils.reg_sit_given_decks.dynamic_mapping", false]], "expreccs": [[4, "module-expreccs", false]], "expreccs() (in module expreccs.core.expreccs)": [[6, "expreccs.core.expreccs.expreccs", false]], "expreccs.core": [[5, "module-expreccs.core", false]], "expreccs.core.expreccs": [[6, "module-expreccs.core.expreccs", false]], "expreccs.utils": [[7, "module-expreccs.utils", false]], "expreccs.utils.backcoupling": [[8, "module-expreccs.utils.backcoupling", false]], "expreccs.utils.inputvalues": [[9, "module-expreccs.utils.inputvalues", false]], "expreccs.utils.mapboundaries": [[10, "module-expreccs.utils.mapboundaries", false]], "expreccs.utils.mapproperties": [[11, "module-expreccs.utils.mapproperties", false]], "expreccs.utils.reg_sit_given_decks": [[12, "module-expreccs.utils.reg_sit_given_decks", false]], "expreccs.utils.runs": [[13, "module-expreccs.utils.runs", false]], "expreccs.utils.writefile": [[14, "module-expreccs.utils.writefile", false]], "expreccs.visualization": [[15, "module-expreccs.visualization", false]], "expreccs.visualization.maps2d": [[16, "module-expreccs.visualization.maps2d", false]], "expreccs.visualization.plotting": [[17, "module-expreccs.visualization.plotting", false]], "expreccs.visualization.reading": [[18, "module-expreccs.visualization.reading", false]], "extract_site_borders() (in module expreccs.utils.reg_sit_given_decks)": [[12, "expreccs.utils.reg_sit_given_decks.extract_site_borders", false]], "final_time_maps() (in module expreccs.visualization.maps2d)": [[16, "expreccs.visualization.maps2d.final_time_maps", false]], "final_time_maps_difference() (in module expreccs.visualization.maps2d)": [[16, "expreccs.visualization.maps2d.final_time_maps_difference", false]], "find_ij_orientation() (in module expreccs.utils.reg_sit_given_decks)": [[12, "expreccs.utils.reg_sit_given_decks.find_ij_orientation", false]], "find_regional_cells() (in module expreccs.utils.reg_sit_given_decks)": [[12, "expreccs.utils.reg_sit_given_decks.find_regional_cells", false]], "geological_maps() (in module expreccs.visualization.maps2d)": [[16, "expreccs.visualization.maps2d.geological_maps", false]], "handle_grid_coord() (in module expreccs.utils.reg_sit_given_decks)": [[12, "expreccs.utils.reg_sit_given_decks.handle_grid_coord", false]], "handle_labels_difference() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.handle_labels_difference", false]], "handle_labels_distance() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.handle_labels_distance", false]], "handle_pressure_correction() (in module expreccs.utils.mapboundaries)": [[10, "expreccs.utils.mapboundaries.handle_pressure_correction", false]], "handle_site_summary() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.handle_site_summary", false]], "handle_smsp_time() (in module expreccs.visualization.reading)": [[18, "expreccs.visualization.reading.handle_smsp_time", false]], "handle_stencil_2p() (in module expreccs.utils.mapboundaries)": [[10, "expreccs.utils.mapboundaries.handle_stencil_2p", false]], "handle_stencil_opm() (in module expreccs.utils.mapboundaries)": [[10, "expreccs.utils.mapboundaries.handle_stencil_opm", false]], "handle_stencil_resdata() (in module expreccs.utils.mapboundaries)": [[10, "expreccs.utils.mapboundaries.handle_stencil_resdata", false]], "init_multipliers() (in module expreccs.utils.backcoupling)": [[8, "expreccs.utils.backcoupling.init_multipliers", false]], "load_parser() (in module expreccs.core.expreccs)": [[6, "expreccs.core.expreccs.load_parser", false]], "main() (in module expreccs.core.expreccs)": [[6, "expreccs.core.expreccs.main", false]], "main() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.main", false]], "manage_name() (in module expreccs.visualization.maps2d)": [[16, "expreccs.visualization.maps2d.manage_name", false]], "manage_names() (in module expreccs.visualization.reading)": [[18, "expreccs.visualization.reading.manage_names", false]], "mapping_properties() (in module expreccs.utils.mapproperties)": [[11, "expreccs.utils.mapproperties.mapping_properties", false]], "module": [[4, "module-expreccs", false], [5, "module-expreccs.core", false], [6, "module-expreccs.core.expreccs", false], [7, "module-expreccs.utils", false], [8, "module-expreccs.utils.backcoupling", false], [9, "module-expreccs.utils.inputvalues", false], [10, "module-expreccs.utils.mapboundaries", false], [11, "module-expreccs.utils.mapproperties", false], [12, "module-expreccs.utils.reg_sit_given_decks", false], [13, "module-expreccs.utils.runs", false], [14, "module-expreccs.utils.writefile", false], [15, "module-expreccs.visualization", false], [16, "module-expreccs.visualization.maps2d", false], [17, "module-expreccs.visualization.plotting", false], [18, "module-expreccs.visualization.reading", false]], "opm_arrays() (in module expreccs.visualization.reading)": [[18, "expreccs.visualization.reading.opm_arrays", false]], "over_time_distance() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.over_time_distance", false]], "over_time_max_difference() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.over_time_max_difference", false]], "over_time_sensor() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.over_time_sensor", false]], "plot_results() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.plot_results", false]], "plotting() (in module expreccs.utils.runs)": [[13, "expreccs.utils.runs.plotting", false]], "plotting_settings() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.plotting_settings", false]], "porv_projections() (in module expreccs.utils.mapboundaries)": [[10, "expreccs.utils.mapboundaries.porv_projections", false]], "porv_regional_segmentation() (in module expreccs.utils.mapboundaries)": [[10, "expreccs.utils.mapboundaries.porv_regional_segmentation", false]], "positions_opm() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.positions_opm", false]], "positions_reference() (in module expreccs.utils.mapproperties)": [[11, "expreccs.utils.mapproperties.positions_reference", false]], "positions_regional() (in module expreccs.utils.mapproperties)": [[11, "expreccs.utils.mapproperties.positions_regional", false]], "positions_resdata() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.positions_resdata", false]], "positions_rotation() (in module expreccs.utils.mapproperties)": [[11, "expreccs.utils.mapproperties.positions_rotation", false]], "positions_site() (in module expreccs.utils.mapproperties)": [[11, "expreccs.utils.mapproperties.positions_site", false]], "process_input() (in module expreccs.utils.inputvalues)": [[9, "expreccs.utils.inputvalues.process_input", false]], "project_pressures() (in module expreccs.utils.reg_sit_given_decks)": [[12, "expreccs.utils.reg_sit_given_decks.project_pressures", false]], "reading_opm() (in module expreccs.visualization.reading)": [[18, "expreccs.visualization.reading.reading_opm", false]], "reading_resdata() (in module expreccs.visualization.reading)": [[18, "expreccs.visualization.reading.reading_resdata", false]], "readthefirstpart() (in module expreccs.utils.inputvalues)": [[9, "expreccs.utils.inputvalues.readthefirstpart", false]], "readthesecondpart() (in module expreccs.utils.inputvalues)": [[9, "expreccs.utils.inputvalues.readthesecondpart", false]], "resdata_arrays() (in module expreccs.visualization.reading)": [[18, "expreccs.visualization.reading.resdata_arrays", false]], "rotate_grid() (in module expreccs.utils.mapproperties)": [[11, "expreccs.utils.mapproperties.rotate_grid", false]], "run_models() (in module expreccs.utils.runs)": [[13, "expreccs.utils.runs.run_models", false]], "set_gridmako() (in module expreccs.utils.writefile)": [[14, "expreccs.utils.writefile.set_gridmako", false]], "simulations() (in module expreccs.utils.runs)": [[13, "expreccs.utils.runs.simulations", false]], "summary_plot() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.summary_plot", false]], "summary_site() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.summary_site", false]], "temporal_interpolation_flux() (in module expreccs.utils.mapboundaries)": [[10, "expreccs.utils.mapboundaries.temporal_interpolation_flux", false]], "temporal_interpolation_pressure() (in module expreccs.utils.mapboundaries)": [[10, "expreccs.utils.mapboundaries.temporal_interpolation_pressure", false]], "wells_site() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.wells_site", false]], "write_files() (in module expreccs.utils.reg_sit_given_decks)": [[12, "expreccs.utils.reg_sit_given_decks.write_files", false]], "write_files() (in module expreccs.utils.writefile)": [[14, "expreccs.utils.writefile.write_files", false]], "write_folder_iter() (in module expreccs.utils.backcoupling)": [[8, "expreccs.utils.backcoupling.write_folder_iter", false]], "write_folders() (in module expreccs.utils.writefile)": [[14, "expreccs.utils.writefile.write_folders", false]], "write_properties() (in module expreccs.utils.writefile)": [[14, "expreccs.utils.writefile.write_properties", false]]}, "objects": {"": [[4, 0, 0, "-", "expreccs"]], "expreccs": [[5, 0, 0, "-", "core"], [7, 0, 0, "-", "utils"], [15, 0, 0, "-", "visualization"]], "expreccs.core": [[6, 0, 0, "-", "expreccs"]], "expreccs.core.expreccs": [[6, 1, 1, "", "expreccs"], [6, 1, 1, "", "load_parser"], [6, 1, 1, "", "main"]], "expreccs.utils": [[8, 0, 0, "-", "backcoupling"], [9, 0, 0, "-", "inputvalues"], [10, 0, 0, "-", "mapboundaries"], [11, 0, 0, "-", "mapproperties"], [12, 0, 0, "-", "reg_sit_given_decks"], [13, 0, 0, "-", "runs"], [14, 0, 0, "-", "writefile"]], "expreccs.utils.backcoupling": [[8, 1, 1, "", "backcoupling"], [8, 1, 1, "", "compute_multipliers"], [8, 1, 1, "", "init_multipliers"], [8, 1, 1, "", "write_folder_iter"]], "expreccs.utils.inputvalues": [[9, 1, 1, "", "process_input"], [9, 1, 1, "", "readthefirstpart"], [9, 1, 1, "", "readthesecondpart"]], "expreccs.utils.mapboundaries": [[10, 1, 1, "", "aquaflux_opm"], [10, 1, 1, "", "aquaflux_resdata"], [10, 1, 1, "", "handle_pressure_correction"], [10, 1, 1, "", "handle_stencil_2p"], [10, 1, 1, "", "handle_stencil_opm"], [10, 1, 1, "", "handle_stencil_resdata"], [10, 1, 1, "", "porv_projections"], [10, 1, 1, "", "porv_regional_segmentation"], [10, 1, 1, "", "temporal_interpolation_flux"], [10, 1, 1, "", "temporal_interpolation_pressure"]], "expreccs.utils.mapproperties": [[11, 1, 1, "", "mapping_properties"], [11, 1, 1, "", "positions_reference"], [11, 1, 1, "", "positions_regional"], [11, 1, 1, "", "positions_rotation"], [11, 1, 1, "", "positions_site"], [11, 1, 1, "", "rotate_grid"]], "expreccs.utils.reg_sit_given_decks": [[12, 1, 1, "", "check_intersection"], [12, 1, 1, "", "check_regional_neighbours"], [12, 1, 1, "", "create_deck"], [12, 1, 1, "", "dynamic_mapping"], [12, 1, 1, "", "extract_site_borders"], [12, 1, 1, "", "find_ij_orientation"], [12, 1, 1, "", "find_regional_cells"], [12, 1, 1, "", "handle_grid_coord"], [12, 1, 1, "", "project_pressures"], [12, 1, 1, "", "write_files"]], "expreccs.utils.runs": [[13, 1, 1, "", "plotting"], [13, 1, 1, "", "run_models"], [13, 1, 1, "", "simulations"]], "expreccs.utils.writefile": [[14, 1, 1, "", "set_gridmako"], [14, 1, 1, "", "write_files"], [14, 1, 1, "", "write_folders"], [14, 1, 1, "", "write_properties"]], "expreccs.visualization": [[16, 0, 0, "-", "maps2d"], [17, 0, 0, "-", "plotting"], [18, 0, 0, "-", "reading"]], "expreccs.visualization.maps2d": [[16, 1, 1, "", "final_time_maps"], [16, 1, 1, "", "final_time_maps_difference"], [16, 1, 1, "", "geological_maps"], [16, 1, 1, "", "manage_name"]], "expreccs.visualization.plotting": [[17, 1, 1, "", "handle_labels_difference"], [17, 1, 1, "", "handle_labels_distance"], [17, 1, 1, "", "handle_site_summary"], [17, 1, 1, "", "main"], [17, 1, 1, "", "over_time_distance"], [17, 1, 1, "", "over_time_max_difference"], [17, 1, 1, "", "over_time_sensor"], [17, 1, 1, "", "plot_results"], [17, 1, 1, "", "plotting_settings"], [17, 1, 1, "", "positions_opm"], [17, 1, 1, "", "positions_resdata"], [17, 1, 1, "", "summary_plot"], [17, 1, 1, "", "summary_site"], [17, 1, 1, "", "wells_site"]], "expreccs.visualization.reading": [[18, 1, 1, "", "handle_smsp_time"], [18, 1, 1, "", "manage_names"], [18, 1, 1, "", "opm_arrays"], [18, 1, 1, "", "reading_opm"], [18, 1, 1, "", "reading_resdata"], [18, 1, 1, "", "resdata_arrays"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"]}, "objtypes": {"0": "py:module", "1": "py:function"}, "terms": {"": 2, "0": [2, 20, 21], "00": 2, "01": 2, "010132": 2, "04": 20, "1": [2, 19, 20], "10": [2, 20], "10000": 2, "101": 2, "1013": 2, "10132": 2, "11000": 2, "11377": 2, "11423e": 2, "11th": 2, "12": 2, "13": 2, "1324": 2, "14": [2, 3], "14518": 2, "15": 2, "15000": 2, "16": 2, "18000": 2, "193531": 2, "1d": 17, "1e": 2, "1e1": 2, "1e2": 2, "1e3": 2, "1e4": 2, "1e5": 2, "1e6": 2, "1e7": 2, "1e8": 2, "2": [2, 19], "20": 2, "20000": 2, "202": 2, "2024": 20, "21": 2, "21180": 2, "21583": 2, "21718": 2, "22": 2, "24081": 2, "24200": 2, "25": 2, "2650": 2, "27000": 2, "2732": 2, "28477": 2, "2d": [16, 17, 24], "2e7": 2, "3": [2, 20], "30": 2, "3060": 2, "31679": 2, "32": 2, "324": 2, "325": 2, "336294": 0, "34": 3, "365": 2, "3870": 2, "39": 2, "3e5": 2, "4": 2, "417": 3, "42": 3, "45": 2, "45000": 2, "47": 2, "5": 2, "50": 2, "500": 3, "5000": 2, "506": 2, "51": 2, "5710": 2, "5e6": 2, "6": 2, "60": 2, "6120": 2, "625": 2, "63": 2, "65": 2, "650": 2, "6625": 2, "7068": 2, "7122": 2, "73": 2, "7800": 2, "8000": 2, "81": 2, "8233": 2, "8654": 2, "8883": 2, "9": [2, 20], "92": 2, "99": 2, "A": [8, 24], "As": 2, "For": 20, "If": [2, 3, 20], "In": [2, 21, 23], "No": 2, "ON": 20, "On": 2, "The": [0, 1, 2, 3, 14, 21, 23], "Then": [2, 3, 20, 23], "To": 20, "_": 8, "about": 19, "achiev": [3, 20], "activ": [2, 20], "ad": [2, 8, 9, 10, 11, 16, 17, 18, 19, 21], "add": [2, 3, 12, 23], "addit": [2, 20, 23], "after": [11, 20, 23], "all": 21, "allow": 2, "along": 2, "also": [2, 3, 20], "an": [3, 20, 24], "ani": [3, 24], "anim": 3, "api": 19, "approach": [0, 2, 21, 24], "aquaflux_opm": [4, 7, 10], "aquaflux_resdata": [4, 7, 10], "aquif": 2, "ar": [0, 2, 3, 8, 12, 20, 21, 23, 24], "arg": [8, 9, 10, 11, 13, 14, 16, 17, 18], "argument": [2, 6, 21], "arrai": [2, 18], "assess": 2, "avail": [2, 20], "back": 8, "backcoupl": [4, 7], "base": [3, 8, 21, 24], "bc": [2, 3, 10], "befor": 9, "below": [3, 24], "benchmark": 24, "better": 17, "between": [1, 2, 16, 17], "bhp": [2, 3, 17], "bin": [2, 20], "binari": 20, "border": [12, 17], "bottom": [2, 3], "boundari": [2, 3, 10, 21], "box": 2, "branch": 20, "brew": 20, "build": [2, 12, 19], "build_opm_mpi": 20, "built": 20, "c": [2, 21], "calcit": 24, "call": [3, 23], "can": [2, 3, 20, 23], "capabl": 2, "capillari": 2, "case": 3, "cd": 20, "cell": [2, 3, 10, 12, 17], "cfd": 24, "chandl": 18, "chang": [2, 3], "charact": 2, "check": [12, 24], "check_intersect": [4, 7, 12], "check_regional_neighbour": [4, 7, 12], "chosen": 2, "ci": 20, "clone": 20, "close": 2, "closest": [2, 17], "cmake": 20, "co2": [2, 3, 24], "co2stor": 21, "coarsen": 24, "coarser": 2, "code": 20, "color": 17, "com": 20, "command": [2, 3, 20], "common": 20, "compar": [2, 21, 23], "comparison": [1, 3], "compens": 8, "complex": 3, "compress": 2, "comput": 8, "compute_multipli": [4, 7, 8], "concept": 19, "condit": [2, 21], "configur": [1, 3, 9, 19, 21, 24], "connect": 21, "consid": [2, 3], "contain": [1, 18], "content": [1, 19, 21, 22], "continu": 2, "contribut": [0, 20], "control": 2, "coord": 12, "coordin": [2, 12, 17], "copi": 20, "copmput": 2, "core": [1, 4, 20, 22], "corner": [2, 21], "correct": 10, "correspond": [1, 2, 21], "could": [20, 23], "council": 0, "count": 12, "counter": 10, "coupl": 8, "cp": 2, "cpg": [2, 21], "cprw": 2, "cpu": 2, "creat": [3, 12, 20, 21], "create_deck": [4, 7, 12], "csp": [2, 24], "cssr": 20, "current": [2, 8, 20, 21], "current_directori": 20, "curv": 2, "d": 2, "dai": [2, 3], "data": 18, "dcmake_build_typ": 20, "dcmake_disable_find_package_mpi": 20, "dcmake_prefix_path": 20, "dea": 0, "deactiv": 20, "deck": [1, 3, 12, 18], "default": [20, 21], "defin": [2, 21], "depend": 20, "depth": 2, "describ": [2, 21], "desir": 2, "detail": 0, "dev": 20, "develop": 19, "dic": [8, 9, 10, 11, 12, 13, 14, 16, 17, 18], "dict": [8, 9, 10, 11, 13, 14, 16, 17, 18], "dictionari": [8, 9, 10, 11, 13, 14, 16, 17, 18], "differ": [1, 2, 8, 10, 16, 17, 21, 23], "dimens": 2, "dir": 10, "direct": [2, 3], "directli": 23, "discret": 2, "distanc": [3, 17], "dmar": 2, "do": [2, 3, 20], "document": [2, 21, 23], "done": [8, 20], "dopm_enable_python": 20, "dpython_execut": 20, "dune": 20, "dunecontrol": 20, "duse_mpi": 20, "dwith_ndebug": 20, "dynam": 24, "dynamic_map": [4, 7, 12], "e": [2, 3, 20, 21, 23], "each": 2, "eas": 2, "echo": 20, "enabl": 2, "end": 2, "enter": 2, "entri": 2, "environ": 20, "equal": 20, "equinor": 0, "error": 2, "evalu": 2, "exampl": [2, 19], "example1": [2, 3], "example1_porvproj": 3, "example1_pr": 3, "example1_wel": [2, 3], "example2": 3, "execut": [1, 2, 20, 21, 23], "exist": 20, "expon": 2, "export": 20, "exprecc": [2, 3, 20, 21, 23], "expreccss": 1, "extend": 2, "extract": 17, "extract_site_bord": [4, 7, 12], "f_xy": 14, "face": 10, "far": 2, "fault": [2, 11, 21], "figur": [3, 16, 18, 21, 24], "fil": 8, "file": [1, 3, 9, 12, 13, 14, 18, 19, 20, 21, 23, 24], "final": [2, 3], "final_time_map": [4, 15, 16], "final_time_maps_differ": [4, 15, 16], "find": [11, 12], "find_ij_orient": [4, 7, 12], "find_regional_cel": [4, 7, 12], "finnest": 2, "first": [2, 9], "fix": [16, 18], "flag": 2, "flexibl": [21, 24], "flow": [2, 13, 14, 18, 19, 21, 23, 24], "fluid": 2, "flux": [2, 3, 8, 10, 21], "flux_region": 8, "flux_sit": 8, "fol": [17, 18], "folder": [1, 2, 3, 8, 14, 16, 17, 18, 19, 20, 21, 24], "follow": [2, 3, 20, 21, 23, 24], "fork": 0, "found": 20, "framework": [2, 21, 24], "free": 2, "from": [2, 3, 8, 9, 10, 12, 17, 18, 20, 21, 24], "full": 2, "function": [2, 6, 8, 9, 10, 11, 13, 14, 16, 17, 18], "fund": 0, "further": 2, "g": [2, 20, 21, 23], "ga": 2, "gasoil": 21, "gaswat": 21, "gener": [1, 2, 19, 21, 23, 24], "geolog": [3, 14, 21, 24], "geological_map": [4, 15, 16], "geometri": 20, "get": [2, 12, 20], "gind": 12, "git": 20, "github": [3, 20], "gitlab": 20, "give": 2, "given": [2, 3, 8, 12, 24], "global": [8, 9, 10, 11, 13, 14, 16, 17, 18], "grade": 21, "grid": [2, 3, 11, 12, 20, 21], "ha": 2, "hand": 12, "handl": [11, 17], "handle_grid_coord": [4, 7, 12], "handle_labels_differ": [4, 15, 17], "handle_labels_dist": [4, 15, 17], "handle_pressure_correct": [4, 7, 10], "handle_site_summari": [4, 15, 17], "handle_smsp_tim": [4, 15, 18], "handle_stencil_2p": [4, 7, 10], "handle_stencil_opm": [4, 7, 10], "handle_stencil_resdata": [4, 7, 10], "have": 2, "height": 2, "hello_world": 3, "here": [0, 2, 23], "heterogein": [2, 21], "higher": 20, "home": 3, "http": 20, "hysteresi": 2, "i": [0, 1, 2, 3, 8, 10, 11, 12, 17, 20, 21], "id": 11, "identifi": 21, "imag": [1, 24], "imbibit": 2, "impact": 2, "implement": [2, 21], "improv": [17, 21], "in_fil": 9, "inc": 9, "includ": 20, "ind": 12, "index": [9, 12, 17, 19], "indic": 17, "induc": 24, "init_multipli": [4, 7, 8], "initi": [2, 8], "inj": 2, "inject": [2, 9, 17], "injector": [2, 3], "input": [1, 2, 3, 8, 9, 21], "inputvalu": [4, 7], "insid": [2, 3, 20], "instal": [2, 19], "instead": 2, "int": [9, 10, 17], "interest": [2, 20], "interp": 2, "interpol": [2, 10, 12], "introduct": [3, 19], "istl": 20, "iter": [8, 10], "iterativli": 8, "j": [11, 17], "j5": 20, "jump": 2, "k": 11, "keep": 2, "kept": 2, "kg": 2, "killough": 2, "krn": 2, "krn1": 2, "krn2": 2, "krn3": 2, "krn4": 2, "krn5": 2, "krw": 2, "krw1": 2, "krw2": 2, "krw3": 2, "krw4": 2, "krw5": 2, "kxy": 2, "kz": 2, "label": 17, "last": [3, 16], "layer": 2, "leakag": 24, "least": 2, "left": [2, 12], "length": 2, "librari": 20, "line": [2, 3, 9, 17, 20], "linear": 2, "linebreak": 2, "link": 0, "lint": 20, "linux": 19, "list": [9, 17], "load_pars": [4, 5, 6], "loadnpi": 18, "locat": [1, 2, 3, 10, 11, 17], "lol": 9, "lower": 2, "m": [2, 3, 20, 21], "maco": 19, "macport": 20, "main": [1, 4, 5, 6, 15, 17], "mainfold": 14, "make": [14, 20], "mako": [1, 14], "manage_nam": [4, 15, 16, 18], "mani": 2, "map": [10, 16, 17], "mapboundari": [4, 7], "mapping_properti": [4, 7, 11], "mapproperti": [4, 7], "maps2d": [4, 15], "master": 20, "max": 17, "maximum": 2, "md": 2, "method": 14, "metric": 21, "micp": 19, "microbi": 24, "microsystem": 24, "middl": [2, 3], "might": 20, "minimum": 3, "mkdir": 20, "model": [2, 3, 8, 14, 16, 20, 21, 24], "modifi": [20, 23], "modul": [1, 19, 20, 22, 24], "more": [0, 3], "mpi": [2, 20], "mpirun": 2, "mt": 2, "mult": 8, "multipli": [2, 8], "n": [2, 12], "name": [2, 9, 13, 14, 16, 17, 18, 21], "name_of_folder_for_the_regional_model": 3, "name_of_folder_for_the_site_model": 3, "ndeck": 17, "necessari": 14, "need": [16, 18, 20], "neighbour": 12, "new": [3, 8, 9, 10, 11, 16, 17, 18], "nfol": 17, "nice": 21, "nkrn": 2, "nkrn1": 2, "nkrw": 2, "nkrw1": 2, "nnc": 12, "non": 2, "norefer": 21, "norwai": 0, "now": 2, "np": 2, "npe": 2, "npe1": 2, "nqua": 17, "nquan": 17, "nrst": 17, "number": [0, 2, 8, 9, 12], "numer": 21, "numpi": 14, "nwell": 17, "o": [3, 21], "observ": 2, "one": [2, 23], "onli": [3, 20, 21], "open": 24, "oper": [2, 21], "opm": [1, 2, 14, 17, 18, 19, 21, 23, 24], "opm_arrai": [4, 15, 18], "opmn": 17, "option": [2, 6, 21], "order": 2, "org": 20, "origen": 2, "otherwis": 20, "out": [16, 18, 24], "output": [14, 17, 18, 19, 21], "over": [2, 12], "over_time_dist": [4, 15, 17], "over_time_max_differ": [4, 15, 17], "over_time_sensor": [4, 15, 17], "overlap": 12, "overview": [19, 20], "p": [3, 12, 21], "pa": 2, "packag": [0, 1, 3, 19, 21, 22, 24], "page": [3, 19], "parallel": 2, "paramet": [8, 9, 10, 11, 13, 14, 16, 17, 18, 19], "pascal": 2, "path": 2, "pec": 2, "perform": 21, "perm": 2, "permabc": 2, "permeabl": 2, "permxy1": 2, "permxy2": 2, "permxy3": 2, "permxy4": 2, "permxy5": 2, "permz1": 2, "permz2": 2, "permz3": 2, "permz4": 2, "permz5": 2, "phi": 2, "pi": 2, "pip": 20, "plopm": 19, "plot": [4, 7, 13, 14, 15, 16, 21, 23], "plot_result": [4, 15, 17], "plotting_set": [4, 15, 17], "plume": 3, "png": [1, 3, 24], "point": [2, 17, 21], "pore": [2, 3, 10], "poro1": 2, "poro2": 2, "poro3": 2, "poro4": 2, "poro5": 2, "porv": 2, "porv_project": [4, 7, 10], "porv_regional_segment": [4, 7, 10], "porvproj": [2, 3], "posit": [2, 11], "positions_opm": [4, 15, 17], "positions_refer": [4, 7, 11], "positions_region": [4, 7, 11], "positions_resdata": [4, 15, 17], "positions_rot": [4, 7, 11], "positions_sit": [4, 7, 11], "possibl": 2, "postprocess": [3, 17, 21, 23, 24], "pre": [2, 3, 10], "pre1": 2, "pre2": 2, "pre3": 2, "pre4": 2, "pre5": 2, "precipit": 24, "preprocess": 23, "prerequisit": 20, "pres2p": 2, "press": 2, "pressur": [2, 3, 10, 12, 17, 21], "presur": 2, "previou": [2, 20], "proce": 2, "process": [1, 9, 12], "process_input": [4, 7, 9], "prod": 2, "produc": [2, 3], "progress": 0, "project": [0, 2, 3, 10, 12, 17, 20, 21, 24], "project_pressur": [4, 7, 12], "properti": [2, 21], "pull": 0, "pv": 10, "pwd": 20, "py": [3, 13], "pycopm": 19, "pymm": 19, "pyopmnearwel": 19, "pyopmspe11": 19, "pyproject": 20, "python": [19, 21, 24], "python3": 20, "pythonpath": 20, "quantiti": [16, 17, 18], "quick": 24, "qunat": 17, "r": [2, 20, 21], "rate": [2, 17], "re": [16, 17, 18], "read": [2, 4, 9, 10, 15, 20], "reading_opm": [4, 15, 18], "reading_resdata": [4, 15, 18], "readthefirstpart": [4, 7, 9], "readthesecondpart": [4, 7, 9], "recommend": 20, "refer": [1, 2, 3, 11, 13, 14, 16, 17, 21, 23], "refin": [2, 10], "reg": [10, 12], "reg_sit_given_deck": [4, 7], "regard": [2, 20], "reginon": 2, "region": [1, 2, 3, 8, 10, 12, 13, 17, 21], "rel": 2, "relat": [14, 19, 23], "releas": 20, "remain": 9, "remedi": 24, "remov": 20, "repo": 20, "repositori": 20, "request": 0, "requier": 11, "requir": [2, 8, 9, 10, 11, 13, 14, 16, 17, 18, 20], "requiri": 9, "resdata": [17, 18, 20, 21], "resdata_arrai": [4, 15, 18], "research": 0, "reservoir": [3, 11, 14, 16, 17, 19], "residu": 2, "resinsight": [2, 3, 23], "respect": 2, "restart": [2, 12], "result": [3, 18, 19, 23], "return": [8, 9, 10, 11, 16, 17, 18], "right": [2, 12], "rock": [19, 21], "rotat": [11, 21], "rotate_grid": [4, 7, 11], "routin": [14, 17], "row": 2, "rst": 2, "run": [1, 2, 3, 4, 7, 14, 20, 21, 23], "run_model": [4, 7, 13], "salin": 2, "same": [2, 3, 24], "sand": 2, "sat": 2, "satur": [2, 17], "save": [3, 23], "schedul": [2, 10, 17, 21], "screenshot": [2, 23], "script": [1, 6, 10, 12, 16, 17, 18, 20], "search": 19, "section": [2, 3, 21], "see": [2, 3, 20, 21, 23], "seen": 2, "select": 23, "sensor": [2, 3, 17], "set": [2, 3, 9, 11, 14, 17, 21], "set_gridmako": [4, 7, 14], "setuptool": 20, "sh": 20, "share": 2, "shell": 0, "should": 20, "show": [1, 2, 23], "side": 10, "similarli": 2, "simillarli": 2, "simpler": 2, "simplifi": [21, 24], "simul": [1, 3, 4, 7, 13, 16, 19, 20, 21, 23, 24], "simulaion": 18, "sin": 2, "sinc": 2, "site": [1, 2, 3, 8, 10, 11, 12, 13, 16, 17, 21, 23], "six": 2, "size": 2, "slide": 24, "sm3": 3, "sni": 2, "sni1": 2, "sni2": 2, "sni3": 2, "sni4": 2, "sni5": 2, "so": [2, 20], "solut": 2, "solver": [2, 23], "some": [3, 14, 23, 24], "sourc": [19, 24], "spe": 2, "spe11": 24, "stage": 21, "step": [2, 16], "str": [9, 14, 17, 18], "studi": [13, 18, 24], "style": 17, "submodul": [1, 4, 22], "subpackag": [1, 19, 22], "subsystem": 20, "summari": [17, 18], "summary_plot": [4, 15, 17], "summary_sit": [4, 15, 17], "support": [2, 20, 21], "surfac": [2, 14, 16, 17], "sw": 2, "swi": 2, "swi1": 2, "swi2": 2, "swi3": 2, "swi4": 2, "swi5": 2, "t": [2, 21], "temperatur": 2, "templat": 14, "temporal_interpolation_flux": [4, 7, 10], "temporal_interpolation_pressur": [4, 7, 10], "termin": 20, "test": [20, 21], "test_main": 3, "text": 9, "than": [0, 20], "thei": [2, 3], "them": [2, 24], "thi": [0, 2, 3, 8, 20, 21], "thickn": 2, "thre1": 2, "three": 2, "threshold": 2, "time": [2, 10, 12, 13, 16, 18], "timestep": 21, "toml": 20, "tool": 20, "top": [2, 3, 16, 17], "toward": 2, "tracer": 23, "tran": 2, "true": [2, 18], "try": 20, "tune": 2, "turn": 20, "two": [2, 3, 21], "txt": [2, 3, 20, 21], "u": 21, "under": 19, "until": 2, "updat": 8, "upgrad": 20, "upper": 2, "us": [0, 2, 3, 8, 14, 17, 18, 20, 21, 23, 24], "user": [2, 20], "util": [1, 4, 22], "utilii": [8, 9, 10, 11, 12, 13, 14], "v2": 20, "valu": [2, 9, 10], "variabl": [2, 14], "venv": 20, "version": 20, "vexprecc": 20, "virtual": 20, "visual": [1, 2, 3, 4, 22, 23], "volum": [2, 3, 10], "w": 2, "wa": 3, "water": [2, 3], "we": [2, 3], "welcom": 0, "well": [3, 11, 19, 20, 21, 24], "wells_sit": [4, 15, 17], "wet": 2, "wheel": 20, "where": [2, 3, 21], "which": [2, 20], "whole": [2, 21], "width": 2, "window": 19, "wintershal": 0, "work": 0, "write": [2, 8, 12, 14], "write_fil": [4, 7, 12, 14], "write_fold": [4, 7, 14], "write_folder_it": [4, 7, 8], "write_properti": [4, 7, 14], "writefil": [4, 7], "x": [2, 3, 8, 17], "xf": 2, "xi": 2, "y": [2, 8, 17], "ye": 3, "yf": 2, "yi": 2, "yml": 20, "you": [2, 20], "your": 2, "z": [2, 10, 17], "zag": 2, "zf": 2, "zi": 2, "zig": 2}, "titles": ["About expreccs", "expreccs Python API", "Configuration file", "Examples", "expreccs package", "expreccs.core package", "expreccs.core.expreccs module", "expreccs.utils package", "expreccs.utils.backcoupling module", "expreccs.utils.inputvalues module", "expreccs.utils.mapboundaries module", "expreccs.utils.mapproperties module", "expreccs.utils.reg_sit_given_decks module", "expreccs.utils.runs module", "expreccs.utils.writefile module", "expreccs.visualization package", "expreccs.visualization.maps2d module", "expreccs.visualization.plotting module", "expreccs.visualization.reading module", "Welcome to expreccs\u2019s documentation!", "Installation", "Introduction", "expreccs", "Output folder", "Related"], "titleterms": {"": 19, "1": 3, "2": 3, "about": 0, "ad": 24, "api": 1, "backcoupl": 8, "build": 20, "concept": 21, "configur": 2, "content": [4, 5, 7, 15], "core": [5, 6], "develop": 3, "document": 19, "exampl": 3, "exprecc": [0, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 22], "file": 2, "flow": 20, "folder": 23, "gener": 3, "indic": 19, "inputvalu": 9, "instal": 20, "introduct": 21, "linux": 20, "maco": 20, "mapboundari": 10, "mapproperti": 11, "maps2d": 16, "micp": 24, "modul": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "opm": 20, "output": 23, "overview": 21, "packag": [4, 5, 7, 15, 20], "paramet": 2, "plopm": 24, "plot": 17, "pycopm": 24, "pymm": 24, "pyopmnearwel": 24, "pyopmspe11": 24, "python": [1, 20], "read": 18, "reg_sit_given_deck": 12, "relat": [2, 24], "reservoir": 2, "result": 2, "rock": 2, "run": 13, "simul": 2, "sourc": 20, "submodul": [5, 7, 15], "subpackag": 4, "tabl": 19, "under": 3, "util": [7, 8, 9, 10, 11, 12, 13, 14], "visual": [15, 16, 17, 18], "welcom": 19, "well": 2, "window": 20, "writefil": 14}}) \ No newline at end of file +Search.setIndex({"docnames": ["about", "api", "configuration_file", "examples", "expreccs", "expreccs.core", "expreccs.core.expreccs", "expreccs.utils", "expreccs.utils.backcoupling", "expreccs.utils.inputvalues", "expreccs.utils.mapboundaries", "expreccs.utils.mapproperties", "expreccs.utils.reg_sit_given_decks", "expreccs.utils.runs", "expreccs.utils.writefile", "expreccs.visualization", "expreccs.visualization.maps2d", "expreccs.visualization.plotting", "expreccs.visualization.reading", "index", "installation", "introduction", "modules", "output_folder", "related"], "filenames": ["about.rst", "api.rst", "configuration_file.rst", "examples.rst", "expreccs.rst", "expreccs.core.rst", "expreccs.core.expreccs.rst", "expreccs.utils.rst", "expreccs.utils.backcoupling.rst", "expreccs.utils.inputvalues.rst", "expreccs.utils.mapboundaries.rst", "expreccs.utils.mapproperties.rst", "expreccs.utils.reg_sit_given_decks.rst", "expreccs.utils.runs.rst", "expreccs.utils.writefile.rst", "expreccs.visualization.rst", "expreccs.visualization.maps2d.rst", "expreccs.visualization.plotting.rst", "expreccs.visualization.reading.rst", "index.rst", "installation.rst", "introduction.rst", "modules.rst", "output_folder.rst", "related.rst"], "titles": ["About expreccs", "expreccs Python API", "Configuration file", "Examples", "expreccs package", "expreccs.core package", "expreccs.core.expreccs module", "expreccs.utils package", "expreccs.utils.backcoupling module", "expreccs.utils.inputvalues module", "expreccs.utils.mapboundaries module", "expreccs.utils.mapproperties module", "expreccs.utils.reg_sit_given_decks module", "expreccs.utils.runs module", "expreccs.utils.writefile module", "expreccs.visualization package", "expreccs.visualization.maps2d module", "expreccs.visualization.plotting module", "expreccs.visualization.reading module", "Welcome to expreccs\u2019s documentation!", "Installation", "Introduction", "expreccs", "Output folder", "Related"], "terms": {"The": [0, 1, 2, 3, 14, 21, 23], "packag": [0, 1, 3, 19, 21, 22, 24], "i": [0, 1, 2, 3, 8, 10, 12, 17, 20, 21], "fund": 0, "wintershal": 0, "dea": 0, "equinor": 0, "shell": 0, "research": 0, "council": 0, "norwai": 0, "project": [0, 1, 2, 3, 10, 12, 17, 20, 21, 24], "number": [0, 2, 8, 9, 12, 17], "336294": 0, "thi": [0, 2, 3, 8, 20, 21], "work": 0, "progress": 0, "here": [0, 2, 23], "link": 0, "detail": 0, "contribut": [0, 20], "ar": [0, 2, 3, 8, 12, 20, 21, 23, 24], "more": [0, 3], "than": [0, 20], "welcom": 0, "us": [0, 2, 3, 8, 14, 17, 18, 20, 21, 23, 24], "fork": 0, "pull": 0, "request": 0, "approach": [0, 2, 21, 24], "main": [1, 4, 5, 6, 15, 17], "script": [1, 6, 10, 12, 16, 17, 18, 20], "execut": [1, 2, 6, 13, 20, 21, 23], "locat": [1, 2, 3, 10, 11, 17], "core": [1, 4, 20, 22], "folder": [1, 2, 3, 8, 14, 16, 17, 18, 19, 20, 21, 24], "expreccss": 1, "contain": 1, "mako": [1, 14], "file": [1, 3, 9, 12, 14, 18, 19, 20, 21, 23, 24], "gener": [1, 2, 13, 17, 19, 21, 23, 24], "correspond": [1, 2, 21], "opm": [1, 2, 13, 14, 17, 18, 19, 21, 23, 24], "input": [1, 2, 3, 8, 9, 13, 21], "deck": [1, 3, 12, 13, 17, 18], "util": [1, 4, 22], "process": [1, 9, 12], "configur": [1, 3, 9, 19, 21, 24], "run": [1, 2, 3, 4, 7, 14, 20, 21, 23], "refer": [1, 2, 3, 11, 13, 14, 16, 17, 21, 23], "region": [1, 2, 3, 8, 10, 12, 13, 17, 21], "site": [1, 2, 3, 8, 10, 11, 12, 13, 16, 17, 18, 21, 23], "simul": [1, 3, 4, 7, 13, 16, 18, 19, 20, 21, 23, 24], "addit": [1, 2, 20, 23], "includ": [1, 20], "routin": [1, 14, 17], "pressur": [1, 2, 3, 10, 12, 17, 21], "given": [1, 2, 3, 8, 12, 24], "geolog": [1, 3, 8, 13, 14, 21, 24], "model": [1, 2, 3, 8, 12, 13, 14, 16, 18, 20, 21, 24], "visual": [1, 2, 3, 4, 22, 23], "imag": [1, 24], "png": [1, 3, 24], "show": [1, 2, 23], "comparison": [1, 3], "between": [1, 2, 16, 17], "differ": [1, 2, 8, 10, 11, 16, 17, 21, 23], "subpackag": [1, 19, 22], "submodul": [1, 4, 22], "modul": [1, 19, 20, 22, 24], "content": [1, 19, 21, 22], "we": [2, 3], "consid": [2, 3], "txt": [2, 3, 20, 21], "avail": [2, 20], "exampl": [2, 19], "chosen": 2, "function": [2, 6, 8, 9, 10, 11, 13, 14], "capabl": 2, "exprecc": [2, 3, 20, 21, 23], "framework": [2, 21, 24], "regard": [2, 20], "corner": [2, 21], "point": [2, 17, 21], "grid": [2, 3, 11, 12, 14, 20, 21], "cpg": [2, 21], "heterogein": [2, 21], "e": [2, 3, 18, 20, 21, 23], "g": [2, 18, 20, 21, 23], "properti": [2, 21], "fault": [2, 11, 21], "ad": [2, 8, 19, 21], "defin": [2, 21], "schedul": [2, 10, 17, 21], "oper": [2, 21], "see": [2, 3, 20, 21, 23], "example1": [2, 3], "simpler": 2, "first": [2, 9], "set": [2, 3, 9, 11, 14, 17, 20, 21], "full": 2, "path": 2, "flow": [2, 13, 14, 18, 19, 21, 23, 24], "flag": [2, 20], "enabl": 2, "rst": 2, "true": [2, 18], "linear": 2, "solver": [2, 23], "cprw": 2, "tune": 2, "If": [2, 3, 20], "your": 2, "write": [2, 8, 12, 14], "user": [2, 20], "dmar": 2, "build": [2, 12, 19], "bin": [2, 20], "also": [2, 3, 20], "add": [2, 3, 12, 23], "same": [2, 3, 24], "line": [2, 3, 9, 17, 20], "mani": 2, "requir": [2, 20], "document": [2, 21, 23], "you": [2, 20], "have": 2, "instal": [2, 19], "mpi": [2, 20], "support": [2, 20, 21], "can": [2, 3, 20, 23], "parallel": 2, "mpirun": 2, "np": 2, "n": [2, 12], "where": [2, 3, 21], "cpu": 2, "follow": [2, 3, 20, 21, 23, 24], "45000": 2, "15000": 2, "81": 2, "reginon": 2, "aquif": 2, "length": 2, "width": 2, "depth": 2, "m": [2, 3, 20, 21], "3": [2, 20], "5": 2, "variabl": [2, 14], "arrai": [2, 18], "x": [2, 3, 8, 12, 17], "refin": [2, 10], "y": [2, 8, 12, 17], "1": [2, 19, 20], "z": [2, 10, 12, 14, 17], "15": 2, "25": 2, "6": 2, "18000": 2, "5000": 2, "27000": 2, "10000": 2, "xi": 2, "yi": 2, "xf": 2, "yf": 2, "box": 2, "posit": [2, 11, 12], "free": 2, "close": 2, "porv": 2, "enter": 2, "bottom": [2, 3], "right": [2, 12], "top": [2, 3, 16, 17], "left": [2, 12], "valu": [2, 9, 10], "1e8": 2, "1e7": 2, "1e6": 2, "1e5": 2, "porvproj": [2, 3], "flux": [2, 3, 8, 10, 21], "pre": [2, 3, 10], "pres2p": 2, "bc": [2, 3, 10], "1e4": 2, "1e3": 2, "1e2": 2, "1e1": 2, "interp": 2, "interpol": [2, 10, 12], "time": [2, 10, 12, 13, 16, 18], "11000": 2, "0": [2, 20, 21], "01": 2, "10": [2, 20], "22": 2, "multipli": [2, 8], "tran": 2, "height": 2, "jump": 2, "21583": 2, "5710": 2, "24081": 2, "8233": 2, "initi": [2, 8], "final": [2, 3], "9": [2, 20], "thickn": 2, "layer": 2, "2e7": 2, "60": 2, "50": 2, "11423e": 2, "pa": 2, "temperatur": 2, "c": [2, 21], "compress": 2, "20000": 2, "8000": 2, "sensor": [2, 3, 17], "assess": 2, "error": 2, "over": [2, 12], "w": 2, "r": [2, 20, 21], "t": [2, 21], "solut": 2, "20": 2, "mt": 2, "sin": 2, "2": [2, 19], "pi": 2, "surfac": [2, 14, 16, 17], "92": 2, "hysteresi": 2, "salin": 2, "1e": 2, "kg": 2, "inter": 2, "back": [2, 8, 18], "coupl": [2, 8, 18], "dimens": 2, "size": 2, "discret": 2, "origen": 2, "Then": [2, 3, 20, 23], "give": 2, "coordin": [2, 12, 17], "On": 2, "13": 2, "14": [2, 3], "press": 2, "from": [2, 3, 8, 9, 10, 12, 17, 18, 20, 21, 24], "copmput": 2, "pore": [2, 3, 10], "volum": [2, 3, 10], "4": 2, "injector": [2, 3], "produc": [2, 3], "middl": [2, 3], "boundari": [2, 3, 10, 21], "along": 2, "direct": [2, 3, 12], "similarli": 2, "possibl": [2, 20], "which": [2, 20], "extend": 2, "continu": 2, "zig": 2, "zag": 2, "until": 2, "allow": 2, "satur": [2, 17], "condit": [2, 21], "interest": [2, 20], "compar": [2, 21, 23], "cell": [2, 3, 10, 12, 17], "option": [2, 6, 21], "activ": [2, 20], "killough": 2, "ga": 2, "rel": 2, "permeabl": 2, "under": [2, 19], "develop": [2, 19], "curiou": 2, "upper": 2, "lower": 2, "observ": 2, "closest": [2, 12, 17], "kept": 2, "coarser": 2, "entri": 2, "krw": 2, "sw": 2, "swi": 2, "sni": 2, "nkrw": 2, "wet": 2, "perm": 2, "krn": 2, "nkrn": 2, "non": 2, "pec": 2, "npe": 2, "capillari": 2, "In": [2, 21, 23], "sand": 2, "describ": [2, 21], "11th": 2, "spe": 2, "csp": [2, 24], "sat": 2, "threshold": 2, "cp": 2, "evalu": 2, "swi5": 2, "12": 2, "sni5": 2, "krw5": 2, "krn5": 2, "pre4": 2, "3060": 2, "00": 2, "nkrw1": 2, "nkrn1": 2, "npe1": 2, "thre1": 2, "swi4": 2, "sni4": 2, "krw4": 2, "krn4": 2, "3870": 2, "63": 2, "pre5": 2, "swi1": 2, "32": 2, "sni1": 2, "krw1": 2, "krn1": 2, "pre1": 2, "193531": 2, "swi2": 2, "sni2": 2, "krw2": 2, "krn2": 2, "pre2": 2, "8654": 2, "99": 2, "swi3": 2, "sni3": 2, "krw3": 2, "krn3": 2, "pre3": 2, "6120": 2, "30": 2, "sinc": 2, "21": 2, "imbibit": 2, "curv": 2, "39": 2, "47": 2, "residu": 2, "chang": [2, 3], "expon": 2, "simillarli": 2, "kxy": 2, "md": 2, "kz": 2, "phi": 2, "permxy5": 2, "1013": 2, "permz5": 2, "101": 2, "325": 2, "poro5": 2, "permxy4": 2, "506": 2, "625": 2, "permz4": 2, "6625": 2, "poro4": 2, "permxy1": 2, "10132": 2, "permz1": 2, "010132": 2, "poro1": 2, "permxy2": 2, "324": 2, "permz2": 2, "1324": 2, "poro2": 2, "permxy3": 2, "202": 2, "650": 2, "permz3": 2, "2650": 2, "poro3": 2, "As": 2, "seen": 2, "previou": [2, 20], "finnest": 2, "No": 2, "get": [2, 12, 20], "toward": 2, "name": [2, 8, 9, 13, 14, 16, 17, 18, 21], "thei": [2, 3], "eas": 2, "permabc": 2, "51": 2, "ha": 2, "impact": 2, "so": [2, 20], "far": 2, "least": 2, "one": [2, 23], "charact": 2, "read": [2, 4, 9, 10, 15, 20], "now": 2, "proce": 2, "zi": 2, "zf": 2, "21180": 2, "7068": 2, "24200": 2, "7800": 2, "65": 2, "21718": 2, "7122": 2, "45": 2, "14518": 2, "11377": 2, "31679": 2, "8883": 2, "28477": 2, "2732": 2, "implement": [2, 21], "desir": 2, "share": 2, "inject": [2, 9, 17], "rate": [2, 17], "d": 2, "step": [2, 16], "maximum": 2, "fluid": 2, "dai": [2, 3], "prod": 2, "inj": 2, "365": 2, "73": 2, "3e5": 2, "5e6": 2, "six": 2, "three": 2, "them": [2, 24], "insid": [2, 3, 20], "each": 2, "row": 2, "16": 2, "restart": [2, 12], "water": [2, 3], "co2": [2, 3, 24], "respect": 2, "end": [2, 13], "bhp": [2, 3, 17], "control": 2, "order": 2, "two": [2, 3, 21], "pascal": 2, "example1_wel": [2, 3], "keep": 2, "linebreak": 2, "section": [2, 3, 21], "whole": [2, 21], "do": [2, 3, 20], "current": [2, 8, 17, 20, 21], "": 2, "command": [2, 3, 20], "screenshot": [2, 23], "resinsight": [2, 3, 23], "presur": 2, "instead": [2, 20], "further": 2, "argument": [2, 6, 21], "anim": 3, "github": [3, 20], "home": 3, "page": [3, 19], "wa": 3, "base": [3, 8, 21, 24], "result": [3, 19, 23], "save": [3, 23], "call": [3, 23], "hello_world": 3, "achiev": [3, 20], "o": [3, 21], "onli": [3, 20, 21], "example1_pr": 3, "reservoir": [3, 11, 14, 16, 17, 19], "figur": [3, 13, 16, 17, 18, 21, 24], "example1_porvproj": 3, "case": 3, "p": [3, 12, 21], "ye": 3, "below": [3, 24], "some": [3, 14, 23, 24], "postprocess": [3, 21, 23, 24], "sm3": 3, "well": [3, 11, 17, 19, 20, 21, 24], "minimum": 3, "distanc": [3, 17], "plume": 3, "example2": 3, "complex": 3, "417": 3, "500": 3, "introduct": [3, 19], "last": [3, 16], "34": 3, "42": 3, "test_main": 3, "py": 3, "an": [3, 20, 24], "creat": [3, 12, 20, 21], "ani": [3, 24], "new": 3, "name_of_folder_for_the_regional_model": 3, "name_of_folder_for_the_site_model": 3, "load_pars": [4, 5, 6], "backcoupl": [4, 7], "compute_multipli": [4, 7, 8], "init_multipli": [4, 7, 8], "write_folder_it": [4, 7, 8], "inputvalu": [4, 7], "process_input": [4, 7, 9], "readthefirstpart": [4, 7, 9], "readthesecondpart": [4, 7, 9], "mapboundari": [4, 7], "aquaflux_opm": [4, 7, 10], "aquaflux_resdata": [4, 7, 10], "handle_pressure_correct": [4, 7, 10], "handle_stencil_2p": [4, 7, 10], "handle_stencil_opm": [4, 7, 10], "handle_stencil_resdata": [4, 7, 10], "porv_project": [4, 7, 10], "porv_regional_segment": [4, 7, 10], "temporal_interpolation_flux": [4, 7, 10], "temporal_interpolation_pressur": [4, 7, 10], "mapproperti": [4, 7], "mapping_properti": [4, 7, 11], "positions_refer": [4, 7, 11], "positions_region": [4, 7, 11], "positions_rot": [4, 7, 11], "positions_sit": [4, 7, 11], "rotate_grid": [4, 7, 11], "reg_sit_given_deck": [4, 7], "check_intersect": [4, 7, 12], "check_regional_neighbour": [4, 7, 12], "create_deck": [4, 7, 12], "dynamic_map": [4, 7, 12], "extract_site_bord": [4, 7, 12], "find_ij_orient": [4, 7, 12], "find_regional_cel": [4, 7, 12], "handle_grid_coord": [4, 7, 12], "project_pressur": [4, 7, 12], "write_fil": [4, 7, 12, 14], "plot": [4, 7, 13, 14, 15, 16, 18, 21, 23], "run_model": [4, 7, 13], "writefil": [4, 7], "set_gridmako": [4, 7, 14], "write_fold": [4, 7, 14], "write_properti": [4, 7, 14], "maps2d": [4, 15], "final_time_map": [4, 15, 16], "final_time_maps_differ": [4, 15, 16], "geological_map": [4, 15, 16], "manage_nam": [4, 15, 16, 18], "handle_labels_differ": [4, 15, 17], "handle_labels_dist": [4, 15, 17], "handle_site_summari": [4, 15, 17], "over_time_dist": [4, 15, 17], "over_time_max_differ": [4, 15, 17], "over_time_sensor": [4, 15, 17], "plot_result": [4, 15, 17], "plotting_set": [4, 15, 17], "positions_opm": [4, 15, 17], "positions_resdata": [4, 15, 17], "summary_plot": [4, 15, 17], "summary_sit": [4, 15, 17], "wells_sit": [4, 15, 17], "handle_smsp_tim": [4, 15, 18], "opm_arrai": [4, 15, 18], "reading_opm": [4, 15, 18], "reading_resdata": [4, 15, 18], "resdata_arrai": [4, 15, 18], "resdata_load_data": [4, 15, 18], "utilii": [8, 9, 10, 11, 12, 13, 14], "dic": [8, 9, 10, 11, 12, 13, 14, 16, 17, 18], "updat": 8, "A": [8, 24], "compens": 8, "comput": 8, "mult": 8, "flux_sit": 8, "flux_region": 8, "done": [8, 20], "iterativli": 8, "iter": [8, 10], "arg": [8, 9, 10, 11, 12, 13, 14, 16, 17, 18], "dict": [8, 9, 10, 11, 12, 13, 14, 16, 17, 18], "global": [8, 9, 10, 11, 12, 13, 14, 16, 17, 18], "dictionari": [8, 9, 10, 11, 12, 13, 14, 16, 17, 18], "return": [8, 9, 10, 11, 12, 13, 14, 16, 17, 18], "modifi": [8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 20, 23], "int": [8, 9, 10, 12, 17], "fil": 8, "_": 8, "str": [8, 9, 12, 13, 14, 16, 17, 18], "none": [8, 13, 14, 16, 17], "requiri": 9, "in_fil": 9, "text": 9, "lol": 9, "list": [9, 17], "inc": 9, "befor": 9, "index": [9, 12, 17, 19], "remain": 9, "map": [10, 11, 16, 17], "correct": 10, "reg": [10, 12], "dir": 10, "face": 10, "counter": 10, "side": 10, "pv": 10, "quantiti": [11, 16, 17, 18], "handl": [11, 18], "find": [11, 12], "after": [11, 20, 23], "rotat": [11, 21], "requier": 11, "ind": 12, "gind": 12, "check": [12, 24], "nnc": 12, "overlap": 12, "coord": 12, "cardin": 12, "neighbour": 12, "border": [12, 17], "count": 12, "hand": 12, "studi": [13, 24], "float": 13, "print": 13, "necessari": 14, "f_xy": 14, "mainfold": 14, "profil": 14, "relat": [14, 19, 23], "templat": 14, "make": [14, 20], "output": [14, 17, 18, 19, 20, 21], "numpi": 14, "2d": [16, 17, 24], "re": [16, 17, 18], "out": [16, 18, 24], "complet": [16, 18], "j": 17, "nqua": 17, "nfol": 17, "manag": 17, "label": 17, "improv": [17, 21], "indic": 17, "fol": [17, 18], "better": 17, "color": 17, "summari": [17, 18], "max": 17, "1d": 17, "style": 17, "nrst": 17, "extract": 17, "resdata": [17, 18, 20, 21], "ndeck": 17, "opmn": 17, "nquan": 17, "nwell": 17, "type": 18, "loadnpi": 18, "data": 18, "bool": 18, "fals": 18, "need": [18, 20], "concept": 19, "overview": [19, 20], "python": [19, 21, 24], "sourc": [19, 24], "linux": 19, "window": 19, "maco": 19, "paramet": 19, "rock": [19, 21], "api": 19, "pyopmspe11": 19, "pyopmnearwel": 19, "pycopm": 19, "plopm": 19, "micp": 19, "pymm": 19, "about": 19, "search": 19, "To": 20, "exist": 20, "environ": 20, "pip": 20, "git": 20, "http": 20, "com": 20, "cssr": 20, "tool": 20, "code": 20, "clone": 20, "repositori": 20, "virtual": 20, "repo": 20, "cd": 20, "python3": 20, "venv": 20, "vexprecc": 20, "upgrad": 20, "setuptool": 20, "wheel": 20, "For": 20, "test": [20, 21], "lint": 20, "dev": 20, "egrid": 20, "init": 20, "unrst": 20, "seem": 20, "faster": 20, "larg": 20, "termin": 20, "org": 20, "releas": 20, "2024": 20, "04": 20, "master": 20, "branch": 20, "ci": 20, "yml": 20, "binari": 20, "subsystem": 20, "could": [20, 23], "try": 20, "prerequisit": 20, "turn": 20, "should": 20, "current_directori": 20, "pwd": 20, "common": 20, "mkdir": 20, "cmake": 20, "duse_mpi": 20, "dwith_ndebug": 20, "dcmake_build_typ": 20, "dcmake_prefix_path": 20, "j5": 20, "sh": 20, "build_opm_mpi": 20, "copi": 20, "built": 20, "dune": 20, "librari": 20, "macport": 20, "brew": 20, "geometri": 20, "istl": 20, "gitlab": 20, "v2": 20, "dunecontrol": 20, "dcmake_disable_find_package_mpi": 20, "dpython_execut": 20, "dopm_enable_python": 20, "ON": 20, "echo": 20, "export": 20, "pythonpath": 20, "deactiv": 20, "might": 20, "depend": 20, "version": 20, "found": 20, "recommend": 20, "equal": 20, "higher": 20, "otherwis": 20, "remov": 20, "pyproject": 20, "toml": 20, "when": 20, "alwai": 20, "default": [20, 21], "numer": 21, "perform": 21, "simplifi": [21, 24], "flexibl": [21, 24], "stage": 21, "all": 21, "timestep": 21, "identifi": 21, "connect": 21, "u": 21, "gaswat": 21, "norefer": 21, "metric": 21, "nice": 21, "gasoil": 21, "co2stor": 21, "grade": 21, "select": 23, "preprocess": 23, "directli": 23, "tracer": 23, "spe11": 24, "benchmark": 24, "dynam": 24, "coarsen": 24, "quick": 24, "slide": 24, "leakag": 24, "remedi": 24, "microbi": 24, "induc": 24, "calcit": 24, "precipit": 24, "open": 24, "cfd": 24, "microsystem": 24}, "objects": {"": [[4, 0, 0, "-", "expreccs"]], "expreccs": [[5, 0, 0, "-", "core"], [7, 0, 0, "-", "utils"], [15, 0, 0, "-", "visualization"]], "expreccs.core": [[6, 0, 0, "-", "expreccs"]], "expreccs.core.expreccs": [[6, 1, 1, "", "expreccs"], [6, 1, 1, "", "load_parser"], [6, 1, 1, "", "main"]], "expreccs.utils": [[8, 0, 0, "-", "backcoupling"], [9, 0, 0, "-", "inputvalues"], [10, 0, 0, "-", "mapboundaries"], [11, 0, 0, "-", "mapproperties"], [12, 0, 0, "-", "reg_sit_given_decks"], [13, 0, 0, "-", "runs"], [14, 0, 0, "-", "writefile"]], "expreccs.utils.backcoupling": [[8, 1, 1, "", "backcoupling"], [8, 1, 1, "", "compute_multipliers"], [8, 1, 1, "", "init_multipliers"], [8, 1, 1, "", "write_folder_iter"]], "expreccs.utils.inputvalues": [[9, 1, 1, "", "process_input"], [9, 1, 1, "", "readthefirstpart"], [9, 1, 1, "", "readthesecondpart"]], "expreccs.utils.mapboundaries": [[10, 1, 1, "", "aquaflux_opm"], [10, 1, 1, "", "aquaflux_resdata"], [10, 1, 1, "", "handle_pressure_correction"], [10, 1, 1, "", "handle_stencil_2p"], [10, 1, 1, "", "handle_stencil_opm"], [10, 1, 1, "", "handle_stencil_resdata"], [10, 1, 1, "", "porv_projections"], [10, 1, 1, "", "porv_regional_segmentation"], [10, 1, 1, "", "temporal_interpolation_flux"], [10, 1, 1, "", "temporal_interpolation_pressure"]], "expreccs.utils.mapproperties": [[11, 1, 1, "", "mapping_properties"], [11, 1, 1, "", "positions_reference"], [11, 1, 1, "", "positions_regional"], [11, 1, 1, "", "positions_rotation"], [11, 1, 1, "", "positions_site"], [11, 1, 1, "", "rotate_grid"]], "expreccs.utils.reg_sit_given_decks": [[12, 1, 1, "", "check_intersection"], [12, 1, 1, "", "check_regional_neighbours"], [12, 1, 1, "", "create_deck"], [12, 1, 1, "", "dynamic_mapping"], [12, 1, 1, "", "extract_site_borders"], [12, 1, 1, "", "find_ij_orientation"], [12, 1, 1, "", "find_regional_cells"], [12, 1, 1, "", "handle_grid_coord"], [12, 1, 1, "", "project_pressures"], [12, 1, 1, "", "write_files"]], "expreccs.utils.runs": [[13, 1, 1, "", "plotting"], [13, 1, 1, "", "run_models"], [13, 1, 1, "", "simulations"]], "expreccs.utils.writefile": [[14, 1, 1, "", "set_gridmako"], [14, 1, 1, "", "write_files"], [14, 1, 1, "", "write_folders"], [14, 1, 1, "", "write_properties"]], "expreccs.visualization": [[16, 0, 0, "-", "maps2d"], [17, 0, 0, "-", "plotting"], [18, 0, 0, "-", "reading"]], "expreccs.visualization.maps2d": [[16, 1, 1, "", "final_time_maps"], [16, 1, 1, "", "final_time_maps_difference"], [16, 1, 1, "", "geological_maps"], [16, 1, 1, "", "manage_name"]], "expreccs.visualization.plotting": [[17, 1, 1, "", "handle_labels_difference"], [17, 1, 1, "", "handle_labels_distance"], [17, 1, 1, "", "handle_site_summary"], [17, 1, 1, "", "main"], [17, 1, 1, "", "over_time_distance"], [17, 1, 1, "", "over_time_max_difference"], [17, 1, 1, "", "over_time_sensor"], [17, 1, 1, "", "plot_results"], [17, 1, 1, "", "plotting_settings"], [17, 1, 1, "", "positions_opm"], [17, 1, 1, "", "positions_resdata"], [17, 1, 1, "", "summary_plot"], [17, 1, 1, "", "summary_site"], [17, 1, 1, "", "wells_site"]], "expreccs.visualization.reading": [[18, 1, 1, "", "handle_smsp_time"], [18, 1, 1, "", "manage_names"], [18, 1, 1, "", "opm_arrays"], [18, 1, 1, "", "reading_opm"], [18, 1, 1, "", "reading_resdata"], [18, 1, 1, "", "resdata_arrays"], [18, 1, 1, "", "resdata_load_data"]]}, "objtypes": {"0": "py:module", "1": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"]}, "titleterms": {"about": 0, "exprecc": [0, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 22], "python": [1, 20], "api": 1, "configur": 2, "file": 2, "reservoir": 2, "relat": [2, 24], "paramet": 2, "rock": 2, "well": 2, "simul": 2, "result": 2, "exampl": 3, "1": 3, "2": 3, "gener": 3, "under": 3, "develop": 3, "packag": [4, 5, 7, 15, 20], "subpackag": 4, "modul": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "content": [4, 5, 7, 15], "core": [5, 6], "submodul": [5, 7, 15], "util": [7, 8, 9, 10, 11, 12, 13, 14], "backcoupl": 8, "inputvalu": 9, "mapboundari": 10, "mapproperti": 11, "reg_sit_given_deck": 12, "run": 13, "writefil": 14, "visual": [15, 16, 17, 18], "maps2d": 16, "plot": 17, "read": 18, "welcom": 19, "": 19, "document": 19, "indic": 19, "tabl": 19, "instal": 20, "opm": 20, "flow": 20, "sourc": 20, "build": 20, "linux": 20, "window": 20, "maco": 20, "introduct": 21, "concept": 21, "overview": 21, "output": 23, "folder": 23, "pyopmspe11": 24, "pyopmnearwel": 24, "pycopm": 24, "plopm": 24, "ad": 24, "micp": 24, "pymm": 24}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 60}, "alltitles": {"About expreccs": [[0, "about-expreccs"]], "expreccs Python API": [[1, "expreccs-python-api"]], "expreccs": [[1, "expreccs"], [22, "expreccs"]], "Configuration file": [[2, "configuration-file"]], "Reservoir-related parameters": [[2, "reservoir-related-parameters"]], "Rock-related parameters": [[2, "rock-related-parameters"]], "Well-related parameters": [[2, "well-related-parameters"]], "Simulation results": [[2, "simulation-results"]], "Examples": [[3, "examples"]], "Example 1": [[3, "example-1"]], "Example 2": [[3, "example-2"]], "Generic (under development)": [[3, "generic-under-development"]], "expreccs package": [[4, "expreccs-package"]], "Subpackages": [[4, "subpackages"]], "Module contents": [[4, "module-expreccs"], [5, "module-expreccs.core"], [7, "module-expreccs.utils"], [15, "module-expreccs.visualization"]], "expreccs.core package": [[5, "expreccs-core-package"]], "Submodules": [[5, "submodules"], [7, "submodules"], [15, "submodules"]], "expreccs.core.expreccs module": [[6, "module-expreccs.core.expreccs"]], "expreccs.utils package": [[7, "expreccs-utils-package"]], "expreccs.utils.backcoupling module": [[8, "module-expreccs.utils.backcoupling"]], "expreccs.utils.inputvalues module": [[9, "module-expreccs.utils.inputvalues"]], "expreccs.utils.mapboundaries module": [[10, "module-expreccs.utils.mapboundaries"]], "expreccs.utils.mapproperties module": [[11, "module-expreccs.utils.mapproperties"]], "expreccs.utils.reg_sit_given_decks module": [[12, "module-expreccs.utils.reg_sit_given_decks"]], "expreccs.utils.runs module": [[13, "module-expreccs.utils.runs"]], "expreccs.utils.writefile module": [[14, "module-expreccs.utils.writefile"]], "expreccs.visualization package": [[15, "expreccs-visualization-package"]], "expreccs.visualization.maps2d module": [[16, "module-expreccs.visualization.maps2d"]], "expreccs.visualization.plotting module": [[17, "module-expreccs.visualization.plotting"]], "expreccs.visualization.reading module": [[18, "module-expreccs.visualization.reading"]], "Welcome to expreccs\u2019s documentation!": [[19, "welcome-to-expreccs-s-documentation"]], "Indices and tables": [[19, "indices-and-tables"]], "Installation": [[20, "installation"]], "Python package": [[20, "python-package"]], "OPM Flow": [[20, "opm-flow"]], "Source build in Linux/Windows": [[20, "source-build-in-linux-windows"]], "Source build in macOS": [[20, "source-build-in-macos"]], "Introduction": [[21, "introduction"]], "Concept": [[21, "concept"]], "Overview": [[21, "overview"]], "Output folder": [[23, "output-folder"]], "Related": [[24, "related"]], "pyopmspe11": [[24, "pyopmspe11"]], "pyopmnearwell": [[24, "pyopmnearwell"]], "pycopm": [[24, "pycopm"]], "plopm": [[24, "plopm"]], "ad-micp": [[24, "ad-micp"]], "pymm": [[24, "pymm"]]}, "indexentries": {"expreccs": [[4, "module-expreccs"]], "module": [[4, "module-expreccs"], [5, "module-expreccs.core"], [6, "module-expreccs.core.expreccs"], [7, "module-expreccs.utils"], [8, "module-expreccs.utils.backcoupling"], [9, "module-expreccs.utils.inputvalues"], [10, "module-expreccs.utils.mapboundaries"], [11, "module-expreccs.utils.mapproperties"], [12, "module-expreccs.utils.reg_sit_given_decks"], [13, "module-expreccs.utils.runs"], [14, "module-expreccs.utils.writefile"], [15, "module-expreccs.visualization"], [16, "module-expreccs.visualization.maps2d"], [17, "module-expreccs.visualization.plotting"], [18, "module-expreccs.visualization.reading"]], "expreccs.core": [[5, "module-expreccs.core"]], "expreccs() (in module expreccs.core.expreccs)": [[6, "expreccs.core.expreccs.expreccs"]], "expreccs.core.expreccs": [[6, "module-expreccs.core.expreccs"]], "load_parser() (in module expreccs.core.expreccs)": [[6, "expreccs.core.expreccs.load_parser"]], "main() (in module expreccs.core.expreccs)": [[6, "expreccs.core.expreccs.main"]], "expreccs.utils": [[7, "module-expreccs.utils"]], "backcoupling() (in module expreccs.utils.backcoupling)": [[8, "expreccs.utils.backcoupling.backcoupling"]], "compute_multipliers() (in module expreccs.utils.backcoupling)": [[8, "expreccs.utils.backcoupling.compute_multipliers"]], "expreccs.utils.backcoupling": [[8, "module-expreccs.utils.backcoupling"]], "init_multipliers() (in module expreccs.utils.backcoupling)": [[8, "expreccs.utils.backcoupling.init_multipliers"]], "write_folder_iter() (in module expreccs.utils.backcoupling)": [[8, "expreccs.utils.backcoupling.write_folder_iter"]], "expreccs.utils.inputvalues": [[9, "module-expreccs.utils.inputvalues"]], "process_input() (in module expreccs.utils.inputvalues)": [[9, "expreccs.utils.inputvalues.process_input"]], "readthefirstpart() (in module expreccs.utils.inputvalues)": [[9, "expreccs.utils.inputvalues.readthefirstpart"]], "readthesecondpart() (in module expreccs.utils.inputvalues)": [[9, "expreccs.utils.inputvalues.readthesecondpart"]], "aquaflux_opm() (in module expreccs.utils.mapboundaries)": [[10, "expreccs.utils.mapboundaries.aquaflux_opm"]], "aquaflux_resdata() (in module expreccs.utils.mapboundaries)": [[10, "expreccs.utils.mapboundaries.aquaflux_resdata"]], "expreccs.utils.mapboundaries": [[10, "module-expreccs.utils.mapboundaries"]], "handle_pressure_correction() (in module expreccs.utils.mapboundaries)": [[10, "expreccs.utils.mapboundaries.handle_pressure_correction"]], "handle_stencil_2p() (in module expreccs.utils.mapboundaries)": [[10, "expreccs.utils.mapboundaries.handle_stencil_2p"]], "handle_stencil_opm() (in module expreccs.utils.mapboundaries)": [[10, "expreccs.utils.mapboundaries.handle_stencil_opm"]], "handle_stencil_resdata() (in module expreccs.utils.mapboundaries)": [[10, "expreccs.utils.mapboundaries.handle_stencil_resdata"]], "porv_projections() (in module expreccs.utils.mapboundaries)": [[10, "expreccs.utils.mapboundaries.porv_projections"]], "porv_regional_segmentation() (in module expreccs.utils.mapboundaries)": [[10, "expreccs.utils.mapboundaries.porv_regional_segmentation"]], "temporal_interpolation_flux() (in module expreccs.utils.mapboundaries)": [[10, "expreccs.utils.mapboundaries.temporal_interpolation_flux"]], "temporal_interpolation_pressure() (in module expreccs.utils.mapboundaries)": [[10, "expreccs.utils.mapboundaries.temporal_interpolation_pressure"]], "expreccs.utils.mapproperties": [[11, "module-expreccs.utils.mapproperties"]], "mapping_properties() (in module expreccs.utils.mapproperties)": [[11, "expreccs.utils.mapproperties.mapping_properties"]], "positions_reference() (in module expreccs.utils.mapproperties)": [[11, "expreccs.utils.mapproperties.positions_reference"]], "positions_regional() (in module expreccs.utils.mapproperties)": [[11, "expreccs.utils.mapproperties.positions_regional"]], "positions_rotation() (in module expreccs.utils.mapproperties)": [[11, "expreccs.utils.mapproperties.positions_rotation"]], "positions_site() (in module expreccs.utils.mapproperties)": [[11, "expreccs.utils.mapproperties.positions_site"]], "rotate_grid() (in module expreccs.utils.mapproperties)": [[11, "expreccs.utils.mapproperties.rotate_grid"]], "check_intersection() (in module expreccs.utils.reg_sit_given_decks)": [[12, "expreccs.utils.reg_sit_given_decks.check_intersection"]], "check_regional_neighbours() (in module expreccs.utils.reg_sit_given_decks)": [[12, "expreccs.utils.reg_sit_given_decks.check_regional_neighbours"]], "create_deck() (in module expreccs.utils.reg_sit_given_decks)": [[12, "expreccs.utils.reg_sit_given_decks.create_deck"]], "dynamic_mapping() (in module expreccs.utils.reg_sit_given_decks)": [[12, "expreccs.utils.reg_sit_given_decks.dynamic_mapping"]], "expreccs.utils.reg_sit_given_decks": [[12, "module-expreccs.utils.reg_sit_given_decks"]], "extract_site_borders() (in module expreccs.utils.reg_sit_given_decks)": [[12, "expreccs.utils.reg_sit_given_decks.extract_site_borders"]], "find_ij_orientation() (in module expreccs.utils.reg_sit_given_decks)": [[12, "expreccs.utils.reg_sit_given_decks.find_ij_orientation"]], "find_regional_cells() (in module expreccs.utils.reg_sit_given_decks)": [[12, "expreccs.utils.reg_sit_given_decks.find_regional_cells"]], "handle_grid_coord() (in module expreccs.utils.reg_sit_given_decks)": [[12, "expreccs.utils.reg_sit_given_decks.handle_grid_coord"]], "project_pressures() (in module expreccs.utils.reg_sit_given_decks)": [[12, "expreccs.utils.reg_sit_given_decks.project_pressures"]], "write_files() (in module expreccs.utils.reg_sit_given_decks)": [[12, "expreccs.utils.reg_sit_given_decks.write_files"]], "expreccs.utils.runs": [[13, "module-expreccs.utils.runs"]], "plotting() (in module expreccs.utils.runs)": [[13, "expreccs.utils.runs.plotting"]], "run_models() (in module expreccs.utils.runs)": [[13, "expreccs.utils.runs.run_models"]], "simulations() (in module expreccs.utils.runs)": [[13, "expreccs.utils.runs.simulations"]], "expreccs.utils.writefile": [[14, "module-expreccs.utils.writefile"]], "set_gridmako() (in module expreccs.utils.writefile)": [[14, "expreccs.utils.writefile.set_gridmako"]], "write_files() (in module expreccs.utils.writefile)": [[14, "expreccs.utils.writefile.write_files"]], "write_folders() (in module expreccs.utils.writefile)": [[14, "expreccs.utils.writefile.write_folders"]], "write_properties() (in module expreccs.utils.writefile)": [[14, "expreccs.utils.writefile.write_properties"]], "expreccs.visualization": [[15, "module-expreccs.visualization"]], "expreccs.visualization.maps2d": [[16, "module-expreccs.visualization.maps2d"]], "final_time_maps() (in module expreccs.visualization.maps2d)": [[16, "expreccs.visualization.maps2d.final_time_maps"]], "final_time_maps_difference() (in module expreccs.visualization.maps2d)": [[16, "expreccs.visualization.maps2d.final_time_maps_difference"]], "geological_maps() (in module expreccs.visualization.maps2d)": [[16, "expreccs.visualization.maps2d.geological_maps"]], "manage_name() (in module expreccs.visualization.maps2d)": [[16, "expreccs.visualization.maps2d.manage_name"]], "expreccs.visualization.plotting": [[17, "module-expreccs.visualization.plotting"]], "handle_labels_difference() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.handle_labels_difference"]], "handle_labels_distance() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.handle_labels_distance"]], "handle_site_summary() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.handle_site_summary"]], "main() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.main"]], "over_time_distance() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.over_time_distance"]], "over_time_max_difference() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.over_time_max_difference"]], "over_time_sensor() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.over_time_sensor"]], "plot_results() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.plot_results"]], "plotting_settings() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.plotting_settings"]], "positions_opm() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.positions_opm"]], "positions_resdata() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.positions_resdata"]], "summary_plot() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.summary_plot"]], "summary_site() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.summary_site"]], "wells_site() (in module expreccs.visualization.plotting)": [[17, "expreccs.visualization.plotting.wells_site"]], "expreccs.visualization.reading": [[18, "module-expreccs.visualization.reading"]], "handle_smsp_time() (in module expreccs.visualization.reading)": [[18, "expreccs.visualization.reading.handle_smsp_time"]], "manage_names() (in module expreccs.visualization.reading)": [[18, "expreccs.visualization.reading.manage_names"]], "opm_arrays() (in module expreccs.visualization.reading)": [[18, "expreccs.visualization.reading.opm_arrays"]], "reading_opm() (in module expreccs.visualization.reading)": [[18, "expreccs.visualization.reading.reading_opm"]], "reading_resdata() (in module expreccs.visualization.reading)": [[18, "expreccs.visualization.reading.reading_resdata"]], "resdata_arrays() (in module expreccs.visualization.reading)": [[18, "expreccs.visualization.reading.resdata_arrays"]], "resdata_load_data() (in module expreccs.visualization.reading)": [[18, "expreccs.visualization.reading.resdata_load_data"]]}}) \ No newline at end of file diff --git a/docs/text/api.rst b/docs/text/api.rst index 3aaeda4..dda1858 100644 --- a/docs/text/api.rst +++ b/docs/text/api.rst @@ -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 diff --git a/docs/text/configuration_file.rst b/docs/text/configuration_file.rst index 4ed1953..1e58e83 100644 --- a/docs/text/configuration_file.rst +++ b/docs/text/configuration_file.rst @@ -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 @@ -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 `_ + 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 @@ -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 [-] @@ -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""" @@ -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 [-]""" @@ -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]""" @@ -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]))""" diff --git a/docs/text/figs/contents.png b/docs/text/figs/contents.png index 0e94dba..9793d85 100644 Binary files a/docs/text/figs/contents.png and b/docs/text/figs/contents.png differ diff --git a/docs/text/installation.rst b/docs/text/installation.rst index 269b075..26be166 100644 --- a/docs/text/installation.rst +++ b/docs/text/installation.rst @@ -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 @@ -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 `_, -and the opm Python package will be used (this is the default package for reading the simulation files, see the :ref:`overview`). \ No newline at end of file +and when executing **expreccs** always set the flag **-r opm** (resdata is the default package for reading the simulation files, see the :ref:`overview`). \ No newline at end of file diff --git a/docs/text/introduction.rst b/docs/text/introduction.rst index e4dfa7f..1c000e7 100644 --- a/docs/text/introduction.rst +++ b/docs/text/introduction.rst @@ -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 @@ -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 diff --git a/src/expreccs/core/expreccs.py b/src/expreccs/core/expreccs.py index e2fff24..d975c2f 100644 --- a/src/expreccs/core/expreccs.py +++ b/src/expreccs/core/expreccs.py @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: 2023 NORCE # SPDX-License-Identifier: GPL-3.0 -"""Main script""" +"""Main script for expreccs""" import os import time import argparse @@ -18,7 +18,7 @@ def expreccs(): - """Main function""" + """Main function for the expreccs executable""" start_time = time.monotonic() cmdargs = load_parser() file = cmdargs["input"] # Name of the input file @@ -47,18 +47,18 @@ def expreccs(): return # Process the input file (open expreccs.utils.inputvalues to see the abbreviations meaning) - dic = process_input(dic, file) + process_input(dic, file) # Make the output folders write_folders(dic) # Get the location of wells and faults in the reservoirs - dic = mapping_properties(dic) + mapping_properties(dic) write_properties(dic) init_multipliers(dic) # Run the models - dic = run_models(dic) + run_models(dic) if dic["mode"] in ["all"]: backcoupling(dic) @@ -115,8 +115,8 @@ def load_parser(): parser.add_argument( "-r", "--reading", - default="opm", - help="Using the 'opm' or 'resdata' python package ('opm' by default).", + default="resdata", + help="Using the 'opm' or 'resdata' python package ('resdata' by default).", ) parser.add_argument( "-t", diff --git a/src/expreccs/utils/backcoupling.py b/src/expreccs/utils/backcoupling.py index 90929ec..2812f81 100644 --- a/src/expreccs/utils/backcoupling.py +++ b/src/expreccs/utils/backcoupling.py @@ -35,10 +35,10 @@ def backcoupling(dic): iterativly for number of iterations given in the input Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary """ for iteration in range(1, dic["iterations"]): @@ -53,15 +53,15 @@ def backcoupling(dic): if dic["site_bctype"] in ["flux", "pres", "pres2p"]: if dic["reading"] == "resdata": - dic = aquaflux_resdata(dic) + aquaflux_resdata(dic, f"_{iteration}") else: - dic = aquaflux_opm(dic, f"_{iteration}") + aquaflux_opm(dic, f"_{iteration}") if dic["site_bctype"] == "flux": - dic = temporal_interpolation_flux(dic) + temporal_interpolation_flux(dic) else: - dic = temporal_interpolation_pressure(dic) + temporal_interpolation_pressure(dic) elif dic["site_bctype"] == "porvproj": - dic = porv_projections(dic) + porv_projections(dic) write_folder_iter(dic, f"site_{dic['site_bctype']}_{iteration}") write_files(dic, f"site_{dic['site_bctype']}_{iteration}") @@ -73,10 +73,11 @@ def write_folder_iter(dic, fil): Write folders for the _{iteration} models Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary\n + fil (str): Name of the geological model Returns: - dic (dict): Global dictionary with new added parameters + None """ if not os.path.exists(f"{dic['exe']}/{dic['fol']}/preprocessing/{fil}"): @@ -90,10 +91,10 @@ def init_multipliers(dic): Function initialize input for regional multipliers Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary """ numcells = ( @@ -113,11 +114,11 @@ def compute_multipliers(dic, iteration): # pylint: disable=R1702,R0912,R0914,R0 and added to the regional model Args: - dic (dict): Global dictionary with required parameters - iteration: Current iteration number + dic (dict): Global dictionary\n + iteration (int): Current iteration number Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary """ dic["folders"] = [dic["fol"]] @@ -132,9 +133,9 @@ def compute_multipliers(dic, iteration): # pylint: disable=R1702,R0912,R0914,R0 ] if dic["reading"] == "resdata": - dic = reading_resdata(dic) + reading_resdata(dic, False) else: - dic = reading_opm(dic, False) + reading_opm(dic, False) # Check for refinement numx = (int)(dic["site_noCells"][0]) diff --git a/src/expreccs/utils/inputvalues.py b/src/expreccs/utils/inputvalues.py index e32a90d..aa2419c 100644 --- a/src/expreccs/utils/inputvalues.py +++ b/src/expreccs/utils/inputvalues.py @@ -15,17 +15,18 @@ def process_input(dic, in_file): Function to process the input file Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary\n in_file (str): Name of the input text file Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary + """ lol = [] with open(in_file, "r", encoding="utf8") as file: for row in csv.reader(file, delimiter="#"): lol.append(row) - dic = readthefirstpart(lol, dic) + readthefirstpart(lol, dic) if dic["co2store"] == "gasoil": dic["liq"] = "OIL" dic["lin"] = "OIL" @@ -34,7 +35,6 @@ def process_input(dic, in_file): dic["liq"] = "WAT" dic["lin"] = "WATER" dic["l"] = "W" - return dic def readthefirstpart(lol, dic): # pylint: disable=R0915 @@ -42,12 +42,13 @@ def readthefirstpart(lol, dic): # pylint: disable=R0915 Function to process the lines in the configuration file. Args: - lol (list): List of lines read from the input file - dic (dict): Global dictionary with required parameters + lol (list): List of lines read from the input file\n + dic (dict): Global dictionary Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary\n inc (int): Number of line in the input file before the first injection value + """ dic["flow"] = str(lol[1])[2:-2] # Path to the flow executable dic["regional_dims"] = [float((lol[4][0].strip()).split()[j]) for j in range(3)] @@ -116,8 +117,7 @@ def readthefirstpart(lol, dic): # pylint: disable=R0915 dic["salinity"] = float((lol[20][0].strip()).split()[1]) dic["iterations"] = int((lol[21][0].strip()).split()[0]) index = 24 # Increase this if more rows are added to the model parameters part - dic = readthesecondpart(lol, dic, index) - return dic + readthesecondpart(lol, dic, index) def readthesecondpart(lol, dic, index): @@ -125,12 +125,13 @@ def readthesecondpart(lol, dic, index): Function to process the remaining lines in the configuration file Args: - lol (list): List of lines read from the input file - dic (dict): Global dictionary with required parameters - inc (int): Number of line in the input file + lol (list): List of lines read from the input file\n + dic (dict): Global dictionary\n + index (int): Number of line in the input file Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary + """ dic["krwf"] = str(lol[index][0]) # Wetting rel perm saturation function [-] dic["krnf"] = str(lol[index + 1][0]) # Non-wetting rel perm saturation function [-] @@ -201,4 +202,3 @@ def readthesecondpart(lol, dic, index): ] ) dic["inj"] = column - return dic diff --git a/src/expreccs/utils/mapboundaries.py b/src/expreccs/utils/mapboundaries.py index d836980..1a18b84 100644 --- a/src/expreccs/utils/mapboundaries.py +++ b/src/expreccs/utils/mapboundaries.py @@ -1,5 +1,6 @@ # SPDX-FileCopyrightText: 2023 NORCE # SPDX-License-Identifier: GPL-3.0 +# pylint: disable=C0302 """ Utiliy script for mapping to the site boundaries @@ -29,10 +30,10 @@ def porv_regional_segmentation(dic): Function to locate the different sides for the pv projections Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary """ dic["regional_fipnum"] = [] @@ -112,7 +113,6 @@ def porv_regional_segmentation(dic): dic["regional_fipnum"].append(8) else: dic["regional_fipnum"].append(9) - return dic def porv_projections(dic): @@ -120,10 +120,10 @@ def porv_projections(dic): Function to project the pore volumes from the regional to the site. Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary """ case = f"{dic['exe']}/{dic['fol']}/output/regional/REGIONAL" @@ -155,21 +155,20 @@ def porv_projections(dic): + 0.5 * porv[fipnum == 8].sum() + 0.5 * porv[fipnum == 9].sum() ) - return dic -def aquaflux_resdata(dic): +def aquaflux_resdata(dic, iteration=""): """ Function to read the fluxes and pressures from the regional Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary """ - case = f"{dic['exe']}/{dic['fol']}/output/regional/REGIONAL" + case = f"{dic['exe']}/{dic['fol']}/output/regional{iteration}/REGIONAL{iteration}" rst = case + ".UNRST" grid = case + ".EGRID" dic["rst"], dic["grid"] = ResdataFile(rst), Grid(grid) @@ -217,6 +216,7 @@ def aquaflux_resdata(dic): f"FLO{dic['liq']}I+", f"FLO{dic['liq']}J+", "PRESSURE", + "WAT_DEN", "R_AQUFLUX_bottom", "R_AQUFLUX_top", "R_AQUFLUX_right", @@ -225,10 +225,23 @@ def aquaflux_resdata(dic): "R_PRESSURE_top", "R_PRESSURE_right", "R_PRESSURE_left", + "R_WAT_DEN_bottom", + "R_WAT_DEN_top", + "R_WAT_DEN_right", + "R_WAT_DEN_left", + "S_PRESSURE_bottom", + "S_PRESSURE_top", + "S_PRESSURE_right", + "S_PRESSURE_left", ]: dic[keyword] = [[] for _ in range(dic["rst"].num_report_steps())] for i in range(dic["rst"].num_report_steps()): - for keyword in [f"FLO{dic['liq']}I+", f"FLO{dic['liq']}J+", "PRESSURE"]: + for keyword in [ + f"FLO{dic['liq']}I+", + f"FLO{dic['liq']}J+", + "PRESSURE", + "WAT_DEN", + ]: dic[keyword][i].append(np.array(dic["rst"].iget_kw(keyword)[i])) if dic["site_bctype"] == "flux": n_xy = dic["regional_noCells"][0] * dic["regional_noCells"][1] @@ -277,10 +290,11 @@ def aquaflux_resdata(dic): ] ) elif dic["site_bctype"] == "pres": - dic = handle_stencil_resdata(dic, i) + handle_stencil_resdata(dic, i) elif dic["site_bctype"] == "pres2p": - dic = handle_stencil_2p(dic, i) - return dic + handle_stencil_2p(dic, i) + if dic["site_bctype"] == "pres" or dic["site_bctype"] == "pres2p": + handle_pressure_correction(dic) def aquaflux_opm(dic, iteration=""): @@ -288,10 +302,10 @@ def aquaflux_opm(dic, iteration=""): Function to read the fluxes and pressures from the regional Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary """ case = f"{dic['exe']}/{dic['fol']}/output/regional{iteration}/REGIONAL{iteration}" @@ -451,16 +465,24 @@ def aquaflux_opm(dic, iteration=""): ] ) elif dic["site_bctype"] == "pres": - dic = handle_stencil_opm(dic, i) + handle_stencil_opm(dic, i) elif dic["site_bctype"] == "pres2p": - dic = handle_stencil_2p(dic, i) + handle_stencil_2p(dic, i) if dic["site_bctype"] == "pres" or dic["site_bctype"] == "pres2p": - dic = handle_pressure_correction(dic) - return dic + handle_pressure_correction(dic) def handle_pressure_correction(dic): - """Correct for the REG pres to the SITE on the z dir if refinement""" + """ + Correct for the REG pres to the SITE on the z dir if refinement + + Args: + dic (dict): Global dictionary + + Returns: + dic (dict): Modified global dictionary + + """ for i in range(len(dic["schedule_r"])): for k, z_p in enumerate(dic["site_zmz_mid"]): for j in range(dic["site_noCells"][0]): @@ -495,7 +517,6 @@ def handle_pressure_correction(dic): ] + corr ) - return dic def handle_stencil_resdata(dic, i): @@ -503,11 +524,11 @@ def handle_stencil_resdata(dic, i): Function to project the cell pressures to the cell faces Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary\n i (int): Counter for the time in the schedule Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary """ dic["ncellsh"] = mt.floor(len(dic["cells_bottom"]) / dic["regional_noCells"][2]) @@ -519,132 +540,138 @@ def handle_stencil_resdata(dic, i): dic["site_location"][1], dic["site_location"][4], dic["site_noCells"][1] + 1 ) dic["yc"] = 0.5 * (dic["yc"][1:] + dic["yc"][:-1]) - for ndir, name in enumerate(["bottom", "top"]): - temp = np.array([]) - for k in range(dic["regional_noCells"][2]): - x_a = [ - dic["grid"].get_xyz( - active_index=dic[f"cells_{name}"][k * dic["ncellsh"]] - 1 + j - )[0] - for j in range( - len( - dic[f"cells_{name}"][ - k * dic["ncellsh"] : (k + 1) * dic["ncellsh"] - ] + for quan in ["PRESSURE", "WAT_DEN"]: + for ndir, name in enumerate(["bottom", "top"]): + temp = np.array([]) + for k in range(dic["regional_noCells"][2]): + x_a = [ + dic["grid"].get_xyz( + active_index=dic[f"cells_{name}"][k * dic["ncellsh"]] - 1 + j + )[0] + for j in range( + len( + dic[f"cells_{name}"][ + k * dic["ncellsh"] : (k + 1) * dic["ncellsh"] + ] + ) + + 2 ) - + 2 - ) - ] - y_a = [ - dic["grid"].get_xyz( - active_index=dic[f"cells_{name}"][k * dic["ncellsh"]] - )[1], - dic["grid"].get_xyz( - active_index=dic[f"cells_{name}"][k * dic["ncellsh"]] - + dic["regional_noCells"][0] - )[1], - ] - z_0 = [ - dic["PRESSURE"][i][0][dic[f"cells_{name}"][k * dic["ncellsh"]] - 1 + j] - for j in range( - len( - dic[f"cells_{name}"][ - k * dic["ncellsh"] : (k + 1) * dic["ncellsh"] - ] + ] + y_a = [ + dic["grid"].get_xyz( + active_index=dic[f"cells_{name}"][k * dic["ncellsh"]] + )[1], + dic["grid"].get_xyz( + active_index=dic[f"cells_{name}"][k * dic["ncellsh"]] + + dic["regional_noCells"][0] + )[1], + ] + z_0 = [ + dic[f"{quan}"][i][0][ + dic[f"cells_{name}"][k * dic["ncellsh"]] - 1 + j + ] + for j in range( + len( + dic[f"cells_{name}"][ + k * dic["ncellsh"] : (k + 1) * dic["ncellsh"] + ] + ) + + 2 ) - + 2 - ) - ] - z_1 = [ - dic["PRESSURE"][i][0][ - dic[f"cells_{name}"][k * dic["ncellsh"]] - - 1 - + j - + dic["regional_noCells"][0] ] - for j in range( - len( - dic[f"cells_{name}"][ - k * dic["ncellsh"] : (k + 1) * dic["ncellsh"] - ] + z_1 = [ + dic[f"{quan}"][i][0][ + dic[f"cells_{name}"][k * dic["ncellsh"]] + - 1 + + j + + dic["regional_noCells"][0] + ] + for j in range( + len( + dic[f"cells_{name}"][ + k * dic["ncellsh"] : (k + 1) * dic["ncellsh"] + ] + ) + + 2 ) - + 2 + ] + z_a = np.stack( + [np.array(z_0).flatten(), np.array(z_1).flatten()], axis=-1 ) - ] - z_a = np.stack([np.array(z_0).flatten(), np.array(z_1).flatten()], axis=-1) - interp = RegularGridInterpolator( - (x_a, y_a), z_a, bounds_error=False, fill_value=None - ) - x_p, y_p = np.meshgrid( - dic["xc"], dic["site_location"][1 + 3 * ndir], indexing="ij" - ) - temp = np.hstack((temp, interp((x_p, y_p)).flatten())) - dic[f"R_PRESSURE_{name}"][i].append(temp) - dic["ncellsh"] = mt.floor(len(dic["cells_left"]) / dic["regional_noCells"][2]) - for ndir, name in enumerate(["left", "right"]): - temp = np.array([]) - for k in range(dic["regional_noCells"][2]): - x_a = [ - dic["grid"].get_xyz( - active_index=dic[f"cells_{name}"][k * dic["ncellsh"]] - + dic["regional_noCells"][0] * (-1 + j) - )[1] - for j in range( - len( - dic[f"cells_{name}"][ - k * dic["ncellsh"] : (k + 1) * dic["ncellsh"] - ] - ) - + 2 + interp = RegularGridInterpolator( + (x_a, y_a), z_a, bounds_error=False, fill_value=None ) - ] - y_a = [ - dic["grid"].get_xyz( - active_index=dic[f"cells_{name}"][k * dic["ncellsh"]] - )[0], - dic["grid"].get_xyz( - active_index=dic[f"cells_{name}"][k * dic["ncellsh"]] + 1 - )[0], - ] - z_0 = [ - dic["PRESSURE"][i][0][ - dic[f"cells_{name}"][k * dic["ncellsh"]] - + dic["regional_noCells"][0] * (-1 + j) + x_p, y_p = np.meshgrid( + dic["xc"], dic["site_location"][1 + 3 * ndir], indexing="ij" + ) + temp = np.hstack((temp, interp((x_p, y_p)).flatten())) + dic[f"R_{quan}_{name}"][i].append(temp) + dic["ncellsh"] = mt.floor(len(dic["cells_left"]) / dic["regional_noCells"][2]) + for ndir, name in enumerate(["left", "right"]): + temp = np.array([]) + for k in range(dic["regional_noCells"][2]): + x_a = [ + dic["grid"].get_xyz( + active_index=dic[f"cells_{name}"][k * dic["ncellsh"]] + + dic["regional_noCells"][0] * (-1 + j) + )[1] + for j in range( + len( + dic[f"cells_{name}"][ + k * dic["ncellsh"] : (k + 1) * dic["ncellsh"] + ] + ) + + 2 + ) ] - for j in range( - len( - dic[f"cells_{name}"][ - k * dic["ncellsh"] : (k + 1) * dic["ncellsh"] - ] + y_a = [ + dic["grid"].get_xyz( + active_index=dic[f"cells_{name}"][k * dic["ncellsh"]] + )[0], + dic["grid"].get_xyz( + active_index=dic[f"cells_{name}"][k * dic["ncellsh"]] + 1 + )[0], + ] + z_0 = [ + dic[f"{quan}"][i][0][ + dic[f"cells_{name}"][k * dic["ncellsh"]] + + dic["regional_noCells"][0] * (-1 + j) + ] + for j in range( + len( + dic[f"cells_{name}"][ + k * dic["ncellsh"] : (k + 1) * dic["ncellsh"] + ] + ) + + 2 ) - + 2 - ) - ] - z_1 = [ - dic["PRESSURE"][i][0][ - dic[f"cells_{name}"][k * dic["ncellsh"]] - + 1 - + dic["regional_noCells"][0] * (-1 + j) ] - for j in range( - len( - dic[f"cells_{name}"][ - k * dic["ncellsh"] : (k + 1) * dic["ncellsh"] - ] + z_1 = [ + dic[f"{quan}"][i][0][ + dic[f"cells_{name}"][k * dic["ncellsh"]] + + 1 + + dic["regional_noCells"][0] * (-1 + j) + ] + for j in range( + len( + dic[f"cells_{name}"][ + k * dic["ncellsh"] : (k + 1) * dic["ncellsh"] + ] + ) + + 2 ) - + 2 + ] + z_a = np.stack( + [np.array(z_0).flatten(), np.array(z_1).flatten()], axis=-1 ) - ] - z_a = np.stack([np.array(z_0).flatten(), np.array(z_1).flatten()], axis=-1) - interp = RegularGridInterpolator( - (x_a, y_a), z_a, bounds_error=False, fill_value=None - ) - x_p, y_p = np.meshgrid( - dic["yc"], dic["site_location"][3 * ndir], indexing="ij" - ) - temp = np.hstack((temp, interp((x_p, y_p)).flatten())) - dic[f"R_PRESSURE_{name}"][i].append(temp) - return dic + interp = RegularGridInterpolator( + (x_a, y_a), z_a, bounds_error=False, fill_value=None + ) + x_p, y_p = np.meshgrid( + dic["yc"], dic["site_location"][3 * ndir], indexing="ij" + ) + temp = np.hstack((temp, interp((x_p, y_p)).flatten())) + dic[f"R_{quan}_{name}"][i].append(temp) def handle_stencil_opm(dic, i): @@ -652,11 +679,11 @@ def handle_stencil_opm(dic, i): Function to project the cell pressures to the cell faces Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary\n i (int): Counter for the time in the schedule Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary """ dic["ncellsh"] = mt.floor(len(dic["cells_bottom"]) / dic["regional_noCells"][2]) @@ -858,13 +885,20 @@ def handle_stencil_opm(dic, i): ) temp = np.hstack((temp, interp((x_p, y_p)).flatten())) dic[f"R_{quan}_{name}"][i].append(temp) - return dic def temporal_interpolation_pressure(dic): """ Function to interpolate the BC pressure values in time + + Args: + dic (dict): Global dictionary + + Returns: + dic (dict): Modified global dictionary + """ + keywords = [ "PRESSURE_bottom", "PRESSURE_top", @@ -890,12 +924,18 @@ def temporal_interpolation_pressure(dic): dic[f"{keyword}"][j][0][i] = dic[f"S_{keyword}"][ np.searchsorted(dic["schedule_r"], time) ][i] - return dic def temporal_interpolation_flux(dic): """ Function to interpolate the BC fluxes values in time + + Args: + dic (dict): Global dictionary + + Returns: + dic (dict): Modified global dictionary + """ keywords = [ "AQUFLUX_bottom", @@ -925,7 +965,6 @@ def temporal_interpolation_flux(dic): dic[f"{keyword}"][j][0][i] = dic[f"R_{keyword}"][ np.searchsorted(dic["schedule_r"], time) ][0][i] - return dic def handle_stencil_2p(dic, i): @@ -933,11 +972,11 @@ def handle_stencil_2p(dic, i): Function to project the cell pressures to the cell faces Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary\n i (int): Counter for the time in the schedule Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary """ for quan in ["PRESSURE", "WAT_DEN"]: @@ -967,4 +1006,3 @@ def handle_stencil_2p(dic, i): for j in dic["cells_right"] ] ) - return dic diff --git a/src/expreccs/utils/mapproperties.py b/src/expreccs/utils/mapproperties.py index 895c86c..68ca0d0 100644 --- a/src/expreccs/utils/mapproperties.py +++ b/src/expreccs/utils/mapproperties.py @@ -2,7 +2,7 @@ # SPDX-License-Identifier: GPL-3.0 """ -Utiliy function for finding the well i,j, and k ids. +Utiliy function for mapping quantities in the different sites. """ import numpy as np @@ -14,10 +14,10 @@ def mapping_properties(dic): Function to handle the reservoir location settings. Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary """ dic["site_dims"] = [ @@ -77,18 +77,26 @@ def mapping_properties(dic): dic[f"{res}_zmaps"][i] = pd.Series( abs(dic["regional_zmz_mid"] - dic["site_zmz_mid"][i]) ).argmin() - dic = positions_reference(dic) - dic = positions_regional(dic) - dic = rotate_grid(dic) + positions_reference(dic) + positions_regional(dic) + rotate_grid(dic) if dic["rotate"] > 0: - dic = positions_rotation(dic) + positions_rotation(dic) else: - dic = positions_site(dic) - return dic + positions_site(dic) def rotate_grid(dic): - """Rotate the grid site if requiered""" + """ + Rotate the grid site if requiered. + + Args: + dic (dict): Global dictionary + + Returns: + dic (dict): Modified global dictionary + + """ dic["site_xc"], dic["site_yc"] = [], [] for j in range(dic["site_noCells"][1] + 1): for i in range(dic["site_noCells"][0] + 1): @@ -116,7 +124,6 @@ def rotate_grid(dic): f"{dic['exe']}/{dic['fol']}/output/site_{dic['site_bctype']}/d2y", dic["site_yc"], ) - return dic def positions_regional(dic): @@ -124,10 +131,10 @@ def positions_regional(dic): Function to locate well, site, and fault positions Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary """ dic["regional_fipnum"] = [] @@ -204,11 +211,19 @@ def positions_regional(dic): f"{dic['exe']}/{dic['fol']}/output/regional/sensorijk", dic["regional_sensor"], ) - return dic def positions_rotation(dic): - """Find the locations after the rotation""" + """ + Find the locations after the rotation + + Args: + dic (dict): Global dictionary + + Returns: + dic (dict): Modified global dictionary + + """ dic["site_fipnum"] = [1] * ( dic["site_noCells"][0] * dic["site_noCells"][1] * dic["site_noCells"][2] ) @@ -265,7 +280,6 @@ def positions_rotation(dic): f"{dic['exe']}/{dic['fol']}/output/site_{dic['site_bctype']}/sensorijk", dic["site_sensor"], ) - return dic def positions_site(dic): @@ -273,10 +287,10 @@ def positions_site(dic): Function to locate well and fault positions in the site reservoir. Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary """ dic["site_fipnum"] = [1] * ( @@ -327,7 +341,6 @@ def positions_site(dic): f"{dic['exe']}/{dic['fol']}/output/site_{dic['site_bctype']}/sensorijk", dic["site_sensor"], ) - return dic def positions_reference(dic): @@ -335,10 +348,10 @@ def positions_reference(dic): Function to locate well, fault, and site positions in the reference reservoir. Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary """ dic["reference_fipnum"] = [] @@ -400,4 +413,3 @@ def positions_reference(dic): f"{dic['exe']}/{dic['fol']}/output/reference/sensorijk", dic["reference_sensor"], ) - return dic diff --git a/src/expreccs/utils/reg_sit_given_decks.py b/src/expreccs/utils/reg_sit_given_decks.py index 0802607..487cf74 100644 --- a/src/expreccs/utils/reg_sit_given_decks.py +++ b/src/expreccs/utils/reg_sit_given_decks.py @@ -17,7 +17,16 @@ def create_deck(dic): - """Create a deck from given reg and site decks with projected pressures""" + """ + Create a deck from given reg and site decks with projected pressures + + Args: + dic (dict): Global dictionary + + Returns: + dic (dict): Modified global dictionary + + """ if not os.path.exists(f"{dic['exe']}/{dic['fol']}"): os.system(f"mkdir {dic['exe']}/{dic['fol']}") if not os.path.exists(f"{dic['exe']}/{dic['fol']}/bc"): @@ -56,7 +65,16 @@ def create_deck(dic): def handle_grid_coord(dic): - """Process the regional and site grid coordinates""" + """ + Process the regional and site grid coordinates + + Args: + dic (dict): Global dictionary + + Returns: + dic (dict): Modified global dictionary + + """ dic["sbox"] = dic["sgrid"].get_bounding_box_2d() dic["sbox"] += (dic["sbox"][0],) c_x, c_y, c_z = [], [], [] @@ -106,7 +124,18 @@ def handle_grid_coord(dic): def check_regional_neighbours(dic, gind, p): - """Add to the interpolator neighbouring regional cells""" + """ + Add to the interpolator neighbouring regional cells + + Args: + dic (dict): Global dictionary\n + gind (int): Global cell index\n + p (str): Cardinal direction + + Returns: + dic (dict): Modified global dictionary + + """ if dic["rgrid"].nz > 1: noise = -1e-4 * np.random.rand() else: @@ -204,7 +233,20 @@ def check_regional_neighbours(dic, gind, p): def check_intersection(dic, ind, gind, i, n): - """Check if there are nnc in the regional/site overlapping""" + """ + Check if there are nnc in the regional/site overlapping + + Args: + dic (dict): Global dictionary\n + ind (int): Index for the closest cell\n + gind (int): Global cell index in the regional model\n + i (int): Position of the x, y, or z coords\n + n (int): Position for the cardinal direction + + Returns: + dic (dict): Modified global dictionary + + """ shift = [dic["rgrid"].nx, 1, dic["rgrid"].nx, 1][n] x_l, y_l, x_p, y_p = 0, 0, 0, 0 l_p = [0, 0] @@ -237,7 +279,16 @@ def check_intersection(dic, ind, gind, i, n): def find_regional_cells(dic): - """Find the cells to build the interpolator""" + """ + Find the cells to build the interpolator + + Args: + dic (dict): Global dictionary + + Returns: + dic (dict): Modified global dictionary + + """ handle_grid_coord(dic) count = -1 for n, p in enumerate( @@ -308,7 +359,16 @@ def find_regional_cells(dic): def dynamic_mapping(dic): - """Project the pressures from the regional to the site over time""" + """ + Project the pressures from the regional to the site over time + + Args: + dic (dict): Global dictionary + + Returns: + dic (dict): Modified global dictionary + + """ dic["rp"] = ["" for _ in range(dic["rrst"].num_report_steps())] for p in ["n", "w", "s", "e"]: dic[f"rp{p}"] = [[] for _ in range(dic["rrst"].num_report_steps())] @@ -317,7 +377,16 @@ def dynamic_mapping(dic): def project_pressures(dic, i): - """Project the pressures at restart number i""" + """ + Project the pressures at restart number i + + Args: + dic (dict): Global dictionary + + Returns: + dic (dict): Modified global dictionary + + """ count, c_c = 0, 0 for p in ["n", "w", "s", "e"]: z_p = np.array(dic["rrst"].iget_kw("PRESSURE")[i])[dic[f"ri{p}"]] @@ -358,7 +427,16 @@ def project_pressures(dic, i): def write_files(dic): - """Write the files""" + """ + Write the files with the projected pressures + + Args: + dic (dict): Global dictionary + + Returns: + dic (dict): Modified global dictionary + + """ dic["files"] = [ f for f in os.listdir(f"{dic['exe']}/{dic['sit']}") if f.endswith(".INC") ] @@ -421,7 +499,16 @@ def write_files(dic): def find_ij_orientation(dic): - """Find if the counting is left/right handed""" + """ + Find if the counting is left/right handed + + Args: + dic (dict): Global dictionary + + Returns: + dic (dict): Modified global dictionary + + """ y1 = dic["sgrid"].get_xyz(ijk=(0, 0, 0))[1] y2 = dic["sgrid"].get_xyz(ijk=(0, 1, 0))[1] x1 = dic["sgrid"].get_xyz(ijk=(0, 0, 0))[1] @@ -437,7 +524,16 @@ def find_ij_orientation(dic): def extract_site_borders(dic): - """Get the index/coord from the site border""" + """ + Get the index/coord from the site border + + Args: + dic (dict): Global dictionary + + Returns: + dic (dict): Modified global dictionary + + """ for k in range(dic["sgrid"].nz): j = 0 for i in range(dic["sgrid"].nx): diff --git a/src/expreccs/utils/runs.py b/src/expreccs/utils/runs.py index 08f8ac8..1ffbc9f 100644 --- a/src/expreccs/utils/runs.py +++ b/src/expreccs/utils/runs.py @@ -19,31 +19,39 @@ def simulations(dic, name): """ - Function to Run Flow + Run OPM Flow Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary\n + name (str): Name of the input deck + + Returns: + None """ os.system( f"{dic['flow']} --output-dir={dic['exe']}/{dic['fol']}/output/{name} " - f"{dic['exe']}/{dic['fol']}/preprocessing/{name}/{name.upper()}.DATA & wait\n" + f"{dic['exe']}/{dic['fol']}/preprocessing/{name}/{name.upper()}.DATA & wait\n" ) def plotting(dic, time): """ - Function to run the plotting.py file + Generate the figures Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary\n + time (float): Execution time to be printed at the end. + + Returns: + None """ dic["folders"] = [dic["fol"]] dic["time"] = time os.chdir(f"{dic['exe']}/{dic['fol']}/postprocessing") plot_exe = [ - "python", + "python3", f"{dic['pat']}/visualization/plotting.py", f"-t {time}", f"-f {dic['fol']}", @@ -55,27 +63,35 @@ def plotting(dic, time): def run_models(dic): - """Run the reference, regional, and site""" - dic = set_gridmako(dic, dic["z_xy"]) + """ + Run the reference, regional, and site geological models + + Args: + dic (dict): Global dictionary + + Returns: + dic (dict): Modified global dictionary + + """ + set_gridmako(dic, dic["z_xy"]) if dic["mode"] in ["all", "reference"]: write_files(dic, "reference") simulations(dic, "reference") if dic["mode"] in ["all", "regional", "noreference"]: - dic = porv_regional_segmentation(dic) + porv_regional_segmentation(dic) write_files(dic, "regional") simulations(dic, "regional") if dic["mode"] in ["all", "site", "noreference"]: if dic["site_bctype"] in ["flux", "pres", "pres2p"]: if dic["reading"] == "resdata": - dic = aquaflux_resdata(dic) + aquaflux_resdata(dic) else: - dic = aquaflux_opm(dic) + aquaflux_opm(dic) if dic["site_bctype"] in ["pres", "pres2p"]: - dic = temporal_interpolation_pressure(dic) + temporal_interpolation_pressure(dic) else: - dic = temporal_interpolation_flux(dic) + temporal_interpolation_flux(dic) elif dic["site_bctype"] == "porvproj": - dic = porv_projections(dic) + porv_projections(dic) write_files(dic, f"site_{dic['site_bctype']}") simulations(dic, f"site_{dic['site_bctype']}") - return dic diff --git a/src/expreccs/utils/writefile.py b/src/expreccs/utils/writefile.py index f828726..0243d6e 100644 --- a/src/expreccs/utils/writefile.py +++ b/src/expreccs/utils/writefile.py @@ -17,9 +17,12 @@ def write_files(dic, reservoir): Function to write opm-related reference files by running mako templates Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary\n reservoir (str): Name of the geological model + Returns: + None + """ name = "site" if "site" in reservoir else reservoir name = "regional" if "regional" in name else name @@ -138,10 +141,13 @@ def write_files(dic, reservoir): def write_properties(dic): """ - Function to write some numpy files used in the plotting routine + Write some numpy files used in the plotting routine Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary + + Returns: + dic (dict): Modified global dictionary """ dic["schedule_r"] = [0] @@ -175,12 +181,15 @@ def write_properties(dic): def set_gridmako(dic, f_xy): """ - Method to set the mainfold function + Set the mainfold function in the grid for the reservoir z profile Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary\n f_xy: The function for the reservoir surface + Returns: + dic (dict): Modified global dictionary + """ lol = [] with open(f"{dic['pat']}/templates/common/grid.mako", "r", encoding="utf8") as file: @@ -192,7 +201,6 @@ def set_gridmako(dic, f_xy): else: lol.append(row[0]) dic["gridtemplate"] = Template(text="\n".join(lol)) - return dic def write_folders(dic): @@ -200,7 +208,10 @@ def write_folders(dic): Function to make the output folders Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary + + Returns: + None """ if not os.path.exists(f"{dic['exe']}/{dic['fol']}"): diff --git a/src/expreccs/visualization/maps2d.py b/src/expreccs/visualization/maps2d.py index b430af9..f600caa 100644 --- a/src/expreccs/visualization/maps2d.py +++ b/src/expreccs/visualization/maps2d.py @@ -12,16 +12,19 @@ def final_time_maps(dic): """ - Function to plot the 2D maps for the different reservoirs and quantities + Plot the 2D maps for the different reservoirs and quantities Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary + + Returns: + None """ for nfol, fol in enumerate(dic["folders"]): for res in dic[f"{fol}_decks"]: # es = "regional" - dic = manage_name(dic, res) + manage_name(dic, res) for j, quantity in enumerate(dic["quantity"][:2]): # j = 2 # quantity = "FLOWATI+" @@ -153,19 +156,19 @@ def final_time_maps(dic): def final_time_maps_difference(dic): """ - Function to plot the difference between the reference and site simulations + Plot the difference between the reference and site simulations in the last time step Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary Returns: - dic (dict): Global dictionary with new added parameters + None """ for fol in dic["folders"]: for res in dic[f"{fol}_sites"]: - dic = manage_name(dic, res) + manage_name(dic, res) for j, quantity in enumerate(dic["quantity"]): dic[f"{fol}/{res}_difference_{quantity}"] = ( dic[f"{fol}/reference_{quantity}_array"][-1][ @@ -279,15 +282,18 @@ def final_time_maps_difference(dic): def geological_maps(dic): """ - Function to plot the 2D maps for the reservoir model + Plot the 2D maps for the reservoir model Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary + + Returns: + None """ for nfol, fol in enumerate(dic["folders"]): for res in dic[f"{fol}_decks"]: - dic = manage_name(dic, res) + manage_name(dic, res) dic[f"{fol}/{res}_fipn_plot"] = np.zeros( [ len(dic[f"{fol}/{dic['name']}_ymy"]) - 1, @@ -335,11 +341,20 @@ def geological_maps(dic): def manage_name(dic, res): - """Figure out the folder name (needs to be fixed)""" + """ + Figure out the folder names + + Args: + dic (dict): Global dictionary\n + res (str): Complete name of the simulated model + + Returns: + dic (dict): Modified global dictionary + + """ if "regional" in res: dic["name"] = "regional" elif "site" in res: dic["name"] = "site" else: dic["name"] = res - return dic diff --git a/src/expreccs/visualization/plotting.py b/src/expreccs/visualization/plotting.py index af283c4..e2b4555 100644 --- a/src/expreccs/visualization/plotting.py +++ b/src/expreccs/visualization/plotting.py @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: 2023 NORCE # SPDX-License-Identifier: GPL-3.0 -# pylint: disable=R0914 +# pylint: disable=R0914,C0302 """" Script to plot the top surface for the reference, regional, and site reservoirs. @@ -45,7 +45,7 @@ def main(): - """Postprocessing""" + """Generate figures""" parser = argparse.ArgumentParser(description="Main script to plot the results") parser.add_argument( "-t", @@ -89,10 +89,13 @@ def main(): def plot_results(dic): """ - Function to plot the 2D maps/1D projections for the different quantities + Plot the 2D maps/1D projections for the different quantities Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary + + Returns: + None """ dic["rhog_ref"] = 1.86843 # CO2 reference density @@ -111,11 +114,11 @@ def plot_results(dic): dic["where"] = f"{dic['exe']}/{dic['folders'][0]}/postprocessing" dic["id"] = dic["folders"][0] + "_" dic["lfolders"] = [name.replace("_", " ") for name in dic["folders"]] - dic = plotting_settings(dic) + plotting_settings(dic) if dic["reading"] == "resdata": - dic = reading_resdata(dic) + reading_resdata(dic) else: - dic = reading_opm(dic) + reading_opm(dic) if dic["plot"] in ["reference", "regional", "site"]: plt.rcParams.update({"axes.grid": False}) final_time_maps(dic) @@ -152,7 +155,16 @@ def plot_results(dic): def plotting_settings(dic): - """Set the color/line styles and labels""" + """ + Set the color/line styles and labels + + Args: + dic (dict): Global dictionary + + Returns: + dic (dict): Modified global dictionary + + """ dic["colors"] = [ "#1f77b4", "#ff7f0e", @@ -271,15 +283,21 @@ def plotting_settings(dic): "CO$_2$ in-place (liquid phase) [kt]", "CO$_2$ in-place (gas phase) [kt]", ] - return dic def wells_site(dic, nquan, nfol, ndeck, nwell): """ - Function to plot the injection rates and BHP + Plot the injection rates and BHP Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary\n + nquan (int): Current number of quantity\n + nfol (int): Current number of folder\n + ndeck (int): Current number of deck\n + nwell (int): Current number of well + + Returns: + dic (dict): Modified global dictionary """ fol = dic["folders"][nfol] @@ -310,7 +328,7 @@ def wells_site(dic, nquan, nfol, ndeck, nwell): # lw=2, # ) # if ndeck == 0 and nfol == 1 or nwell > 0: - # return dic + # return # if ndeck == 0: # dic["axis"].step( # dic[f"{fol}/{res}_smsp_dates"], @@ -329,7 +347,7 @@ def wells_site(dic, nquan, nfol, ndeck, nwell): # lw=3, # ) # if ndeck > 0: - # return dic + # return # dic["axis"].step( # dic[f"{fol}/{res}_smsp_dates"], # yvalues, @@ -339,7 +357,7 @@ def wells_site(dic, nquan, nfol, ndeck, nwell): # lw=3, # ) if ndeck != 1 or nfol > 0: # or nwell > 0: - return dic + return dic["axis"].step( dic[f"{fol}/{res}_smsp_dates"], yvalues, @@ -348,15 +366,20 @@ def wells_site(dic, nquan, nfol, ndeck, nwell): linestyle=dic["linestyle"][-1 + nwell], lw=3, ) - return dic def summary_site(dic, nfol, ndeck, opmn): """ - Function to plot summary quantities + Plot summary quantities Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary\n + nfol (int): Current number of folder\n + ndeck (int): Current number of deck\n + opmn (str): Summary name to plot + + Returns: + dic (dict): Modified global dictionary """ # if dic["compare"]: @@ -382,7 +405,7 @@ def summary_site(dic, nfol, ndeck, opmn): poro = dic[f"{fol}/{res}_poro"][dic[f"{fol}/{res}_sensor"]] yvalues = [val / (poro * dx * dz) for val in yvalues] if ndeck == 0 and nfol > 0: - return dic + return if ndeck == 0: dic["axis"].step( dic[f"{fol}/{res}_smsp_dates"], @@ -399,23 +422,33 @@ def summary_site(dic, nfol, ndeck, opmn): color=dic["colors"][-ndeck - 1], linestyle=dic["linestyle"][-nfol - 2], ) - return dic def handle_site_summary(dic, i, quantity): - """Routine for the summary qunatities at the site location""" + """ + Routine for the summary quantities at the site location + + Args: + dic (dict): Global dictionary\n + i (int): Index of the quantity\n + quantity (str): Name of the quantity + + Returns: + dic (dict): Modified global dictionary + + """ for nfol, fol in enumerate(dic["folders"]): for ndeck, res in enumerate(dic[f"{fol}_decks"]): if res == "regional": continue if quantity in ["PR", "GIP", "GIPL", "GIPG"]: - dic = summary_site(dic, nfol, ndeck, f"R{quantity}:1") + summary_site(dic, nfol, ndeck, f"R{quantity}:1") dic["axis"].set_title( "SITE " + f"{'' if dic['compare'] else '('+dic['lfolders'][nfol]+')'}" ) elif quantity in ["BPR", "BGIP", "BGIPL", "BGIPG", "BFLOWI", "BFLOWJ"]: - dic = summary_site( + summary_site( dic, nfol, ndeck, @@ -429,23 +462,25 @@ def handle_site_summary(dic, i, quantity): ) else: for nwell in range(dic[f"{fol}/{res}_nowells_site"]): - dic = wells_site(dic, i, nfol, ndeck, nwell) + wells_site(dic, i, nfol, ndeck, nwell) dic["axis"].set_title( "SITE " + f"{'' if dic['compare'] else '('+dic['lfolders'][nfol]+')'}" ) - return dic def summary_plot(dic, i, quantity): """ - Function to plot the summary qunatities + Plot the summary quantities Args: - dic (dict): Global dictionary with required parameters - i (int): Index of the quantity + dic (dict): Global dictionary\n + i (int): Index of the quantity\n quantity (str): Name of the quantity + Returns: + dic (dict): Modified global dictionary + """ units = [ "W$_{BHP}$ [bar]", @@ -463,7 +498,7 @@ def summary_plot(dic, i, quantity): "Mass flux in the j+ direction [t m$^{-2}$ day$^{-1}$]", ] dic["fig"], dic["axis"] = plt.subplots() - dic = handle_site_summary(dic, i, quantity) + handle_site_summary(dic, i, quantity) dic["axis"].set_ylabel(units[i]) dic["axis"].set_xlabel("Time") handles, labels = plt.gca().get_legend_handles_labels() @@ -481,13 +516,13 @@ def summary_plot(dic, i, quantity): if "site" in res: continue if quantity in ["PR", "GIP", "GIPL", "GIPG"]: - dic = summary_site(dic, nfol, ndeck, f"F{quantity}") + summary_site(dic, nfol, ndeck, f"F{quantity}") dic["axis"].set_title( "REGION " + f"{'' if dic['compare'] else '('+dic['lfolders'][nfol]+')'}" ) elif quantity in ["BPR", "BGIP", "BGIPL", "BGIPG", "BFLOWI", "BFLOWJ"]: - dic = summary_site( + summary_site( dic, nfol, ndeck, @@ -501,7 +536,7 @@ def summary_plot(dic, i, quantity): ) else: for nwell in range(dic[f"{fol}/{res}_nowells"]): - dic = wells_site(dic, i, nfol, ndeck, nwell) + wells_site(dic, i, nfol, ndeck, nwell) dic["axis"].set_title( "REGION " + f"{'' if dic['compare'] else '('+dic['lfolders'][nfol]+')'}" @@ -521,10 +556,13 @@ def summary_plot(dic, i, quantity): def over_time_distance(dic): """ - Function to plot the distance from the closest saturation cell to the site border + Plot the distance from the closest saturation cell to the site border Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary + + Returns: + dic (dict): Modified global dictionary """ dic["fig"], dic["axis"], dic["nmarker"] = [], [], 0 @@ -575,7 +613,7 @@ def over_time_distance(dic): (dic[f"{fol}/site_boxf"][0] - dic[f"{fol}/site_boxi"][0]) / (2.0 * 1000.0) ) - dic = handle_labels_distance(dic, nfol, res, fol, j) + handle_labels_distance(dic, nfol, res, fol, j) dic["axis"][-1].set_title( "Minimum " @@ -598,12 +636,12 @@ def over_time_distance(dic): def positions_opm(dic, fol, res, nrst): """ - Function to extract the point coordinates using opm + Extract the point coordinates using opm Args: - dic (dict): Global dictionary with required parameters - fol (str): Name of the output folder - res (str): Name of the reservoir + dic (dict): Global dictionary\n + fol (str): Name of the output folder\n + res (str): Name of the reservoir\n nrst (int): Indice for the schedule Returns: @@ -711,12 +749,12 @@ def positions_opm(dic, fol, res, nrst): def positions_resdata(dic, fol, res, nrst): """ - Function to extract the point coordinates using resdata + Extract the point coordinates using resdata Args: - dic (dict): Global dictionary with required parameters - fol (str): Name of the output folder - res (str): Name of the reservoir + dic (dict): Global dictionary\n + fol (str): Name of the output folder\n + res (str): Name of the reservoir\n nrst (int): Indice for the schedule Returns: @@ -746,17 +784,17 @@ def positions_resdata(dic, fol, res, nrst): def handle_labels_distance(dic, nfol, res, fol, j): """ - Function to handle the labeling for better visualization. + Manage the labeling for better visualization. Args: - dic (dict): Global dictionary with required parameters - nfol (int): Indice for the color - res (str): Name of the reservoir - fol (str): Name of the output folder + dic (dict): Global dictionary\n + nfol (int): Indice for the color\n + res (str): Name of the reservoir\n + fol (str): Name of the output folder\n j (int): Indice for the reservoir Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary """ if dic["compare"]: @@ -793,15 +831,19 @@ def handle_labels_distance(dic, nfol, res, fol, j): linestyle=dic["linestyle"][-nfol - 2], label=label, ) - return dic def over_time_max_difference(dic, nqua, quantity): """ - Function to plot the the max difference between pressure/saturation. + Plot the max difference between pressure/saturation. Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary\n + nqua (int): Index of the quantity\n + quantity (str): Name of the quantity + + Returns: + dic (dict): Modified global dictionary """ fig, axis = plt.subplots() @@ -847,7 +889,7 @@ def over_time_max_difference(dic, nqua, quantity): ] ) ) - dic = handle_labels_difference(dic, res, j, nqua, nfol) + handle_labels_difference(dic, res, j, nqua, nfol) dic["axis"][nqua].set_title( r"$\max|$REF-SITE|, $\max$(REF)=" + f"{np.array(dic[f'reference_maximum_{quantity}']).max():.2E}" @@ -865,10 +907,15 @@ def over_time_max_difference(dic, nqua, quantity): def over_time_sensor(dic, nqua, quantity): """ - Function to plot the the quantities on the sensor. + Plot the quantities on the sensor. Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary\n + nqua (int): Index of the quantity\n + quantity (str): Name of the quantity + + Returns: + dic (dict): Modified global dictionary """ fig, axis = plt.subplots() @@ -936,15 +983,17 @@ def over_time_sensor(dic, nqua, quantity): def handle_labels_difference(dic, res, j, nqua, nfol): """ - Function to handle the labeling for improve visualization. + Manage the labeling to improve the visualization. Args: - dic (dict): Global dictionary with required parameters - res (str): Name of the reservoir - j (int): Indice for the reservoir + dic (dict): Global dictionary\n + res (str): Name of the reservoir\n + j (int): Indice for the reservoir\n + nqua (int): Current number of quantity\n + nfol (int): Current number of folder Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary """ quantity = dic["quantity"][nqua] @@ -976,7 +1025,6 @@ def handle_labels_difference(dic, res, j, nqua, nfol): linestyle=dic["linestyle"][-j - 2], label=label, ) - return dic if __name__ == "__main__": diff --git a/src/expreccs/visualization/reading.py b/src/expreccs/visualization/reading.py index 3f504d1..437a0f1 100644 --- a/src/expreccs/visualization/reading.py +++ b/src/expreccs/visualization/reading.py @@ -30,15 +30,16 @@ KG_TO_KT = 1e-6 -def reading_resdata(dic): +def reading_resdata(dic, loadnpy=True): """ - Function to read the deck quantities using resdata + Read the deck quantities using resdata Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary\n + loadnpy (bool): True for plotting, False for back-coupling Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary """ for fol in dic["folders"]: @@ -59,29 +60,22 @@ def reading_resdata(dic): else: dic[f"{fol}_decks"] = ["reference", "regional"] + dic[f"{fol}_sites"] for res in dic[f"{fol}_decks"]: + if res[-3].isdigit(): + name = res[:-4] + if res[-2].isdigit(): + name = res[:-3] + if res[-1].isdigit(): + name = res[:-2] + else: + name = res case = dic["exe"] + "/" + fol + f"/output/{res}/{res.upper()}" - dic[f"{fol}/{res}_nowells"] = np.load( - dic["exe"] + "/" + fol + f"/output/{res}/nowells.npy" - ) - dic[f"{fol}/{res}_sensor"] = int( - np.load(dic["exe"] + "/" + fol + f"/output/{res}/sensor.npy") - ) - dic[f"{fol}/{res}_sensor_location"] = np.load( - dic["exe"] + "/" + fol + f"/output/{res}/sensor_location.npy" - ) - dic[f"{fol}/{res}_nowells_site"] = np.load( - dic["exe"] + "/" + fol + f"/output/{res}/nowells_site.npy" - ) - dic[f"{fol}/{res}_sensorijk"] = np.load( - dic["exe"] + "/" + fol + f"/output/{res}/sensorijk.npy" - ) dic[f"{fol}/{res}_rst"] = ResdataFile(case + ".UNRST") dic[f"{fol}/{res}_ini"] = ResdataFile(case + ".INIT") dic[f"{fol}/{res}_grid"] = Grid(case + ".EGRID") dic[f"{fol}/{res}_smsp"] = Summary(case + ".SMSPEC") dic[f"{fol}/{res}_num_rst"] = dic[f"{fol}/{res}_rst"].num_report_steps() - dic[f"{fol}/{res}_dates"] = dic[f"{fol}/{res}_rst"].dates - dic[f"{fol}/{res}_smsp_dates"] = dic[f"{fol}/{res}_smsp"].dates + if loadnpy: + resdata_load_data(dic, fol, res, name) dic[f"{fol}/{res}_phiv"] = dic[f"{fol}/{res}_ini"].iget_kw("PORV")[0] dic[f"{fol}/{res}_poro"] = dic[f"{fol}/{res}_ini"].iget_kw("PORO")[0] dic[f"{fol}/{res}_fipn"] = np.array( @@ -90,7 +84,6 @@ def reading_resdata(dic): dic[f"{fol}/{res}_dx"] = np.array(dic[f"{fol}/{res}_ini"].iget_kw("DX")[0]) dic[f"{fol}/{res}_dy"] = np.array(dic[f"{fol}/{res}_ini"].iget_kw("DY")[0]) dic[f"{fol}/{res}_dz"] = np.array(dic[f"{fol}/{res}_ini"].iget_kw("DZ")[0]) - dic = handle_smsp_time(dic, fol, res) if dic[f"{fol}/{res}_rst"].has_kw("SWAT"): dic[f"{fol}/{res}liq"] = "WAT" dic[f"{fol}/{res}l"] = "W" @@ -102,12 +95,68 @@ def reading_resdata(dic): dic[f"{fol}/{res}_indicator_array"] = [] for quantity in dic["quantity"]: dic[f"{fol}/{res}_{quantity}_array"] = [] - dic = resdata_arrays(dic, fol, res) - return dic + resdata_arrays(dic, fol, res, loadnpy) + + +def resdata_load_data(dic, fol, res, name): + """ + Read the data needed for the plotting + + Args: + dic (dict): Global dictionary\n + fol (str): Name of the output folder\n + res (str): Complete name of the simulated model\n + name (str): Name of the type of simulated model (e.g., site) + + Returns: + dic (dict): Modified global dictionary + """ + dic[f"{fol}/{res}_rst_seconds"] = np.load( + dic["exe"] + "/" + fol + f"/output/{name}/schedule.npy" + ) + dic[f"{fol}/{res}_nowells"] = np.load( + dic["exe"] + "/" + fol + f"/output/{name}/nowells.npy" + ) + dic[f"{fol}/{res}_sensor"] = int( + np.load(dic["exe"] + "/" + fol + f"/output/{name}/sensor.npy") + ) + dic[f"{fol}/{res}_sensor_location"] = np.load( + dic["exe"] + "/" + fol + f"/output/{name}/sensor_location.npy" + ) + dic[f"{fol}/{res}_nowells_site"] = np.load( + dic["exe"] + "/" + fol + f"/output/{name}/nowells_site.npy" + ) + dic[f"{fol}/{res}_sensorijk"] = np.load( + dic["exe"] + "/" + fol + f"/output/{name}/sensorijk.npy" + ) + dic[f"{fol}/{res}_dates"] = dic[f"{fol}/{res}_rst"].dates + dic[f"{fol}/{res}_smsp_dates"] = dic[f"{fol}/{res}_smsp"].dates + ini = dic[f"{fol}/{res}_smsp"].start_date + day_0 = datetime.datetime( + year=ini.year, month=ini.month, day=ini.day, hour=0, minute=0, second=0 + ) + dic[f"{fol}/{res}_dates"] = [ + day_0 + datetime.timedelta(seconds=seconds) + for seconds in dic[f"{fol}/{res}_rst_seconds"] + ] + handle_smsp_time(dic, fol, res, name) + + +def resdata_arrays(dic, fol, res, loadnpy): + """ + From simulation data to arrays + + Args: + dic (dict): Global dictionary\n + fol (str): Name of the output folder\n + res (str): Complete name of the simulated model\n + loadnpy (bool): True for plotting, False for back-coupling -def resdata_arrays(dic, fol, res): - """From simulaion data to arrays""" + Returns: + dic (dict): Modified global dictionary + + """ phiva = np.array([porv for porv in dic[f"{fol}/{res}_phiv"] if porv > 0]) for i in range(dic[f"{fol}/{res}_num_rst"]): sgas = np.array(dic[f"{fol}/{res}_rst"]["SGAS"][i]) @@ -183,39 +232,44 @@ def resdata_arrays(dic, fol, res): dic[f"{fol}/{res}_{quantity}_array"].append( 0.0 * np.array(dic[f"{fol}/{res}_rst"]["SGAS"][0]) ) - name = "site" if "site" in res else res - dic[f"{fol}/{name}_boxi"] = dic[f"{fol}/{res}_grid"].getNodePos(0, 0, 0) - dic[f"{fol}/{name}_boxf"] = dic[f"{fol}/{res}_grid"].getNodePos( + manage_names(dic, res) + dic[f"{fol}/{dic['namel']}_boxi"] = dic[f"{fol}/{res}_grid"].getNodePos(0, 0, 0) + dic[f"{fol}/{dic['namel']}_boxf"] = dic[f"{fol}/{res}_grid"].getNodePos( dic[f"{fol}/{res}_grid"].getNX(), dic[f"{fol}/{res}_grid"].getNY(), dic[f"{fol}/{res}_grid"].getNZ(), ) - dic[f"{fol}/{name}_xmx"] = np.load( - dic["exe"] + "/" + fol + f"/output/{res}/{name}_xmx.npy" - ) - dic[f"{fol}/{name}_ymy"] = np.load( - dic["exe"] + "/" + fol + f"/output/{res}/{name}_ymy.npy" - ) - dic[f"{fol}/{res}_xcor"], dic[f"{fol}/{res}_ycor"] = np.meshgrid( - dic[f"{fol}/{name}_xmx"], dic[f"{fol}/{name}_ymy"][::-1] - ) - return dic + if loadnpy: + dic[f"{fol}/{dic['namel']}_xmx"] = np.load( + dic["exe"] + "/" + fol + f"/output/{dic['namef']}/{dic['namel']}_xmx.npy" + ) + dic[f"{fol}/{dic['namel']}_ymy"] = np.load( + dic["exe"] + "/" + fol + f"/output/{dic['namef']}/{dic['namel']}_ymy.npy" + ) + ( + dic[f"{fol}/{dic['namel']}_xcor"], + dic[f"{fol}/{dic['namel']}_ycor"], + ) = np.meshgrid( + dic[f"{fol}/{dic['namel']}_xmx"], dic[f"{fol}/{dic['namel']}_ymy"][::-1] + ) -def handle_smsp_time(dic, fol, res): +def handle_smsp_time(dic, fol, res, name): """ - Function to chandle the times in the summary files + Handle the times in the summary files Args: - dic (dict): Global dictionary with required parameters - str (study): Name of the folder containing the results + dic (dict): Global dictionary\n + fol (str): Name of the output folder\n + res (str): Complete name of the simulated model\n + name (str): Name of the type of simulated model (e.g., site) Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary """ dic[f"{fol}/{res}_rst_seconds"] = np.load( - dic["exe"] + "/" + fol + f"/output/{res}/schedule.npy" + dic["exe"] + "/" + fol + f"/output/{name}/schedule.npy" ) dic[f"{fol}/{res}_smsp_report_step"] = dic[f"{fol}/{res}_smsp"][ "WBHP:INJ0" @@ -246,18 +300,18 @@ def handle_smsp_time(dic, fol, res): dic[f"{fol}/{res}_smsp_seconds"] = np.insert( dic[f"{fol}/{res}_smsp_seconds"], 0, 0.0 ) - return dic def reading_opm(dic, loadnpy=True): # pylint: disable=R0915, R0912 """ - Function to read the deck quantities using opm + Read the deck quantities using opm Args: - dic (dict): Global dictionary with required parameters + dic (dict): Global dictionary\n + loadnpy (bool): True for plotting, False for back-coupling Returns: - dic (dict): Global dictionary with new added parameters + dic (dict): Modified global dictionary """ for fol in dic["folders"]: @@ -351,12 +405,23 @@ def reading_opm(dic, loadnpy=True): # pylint: disable=R0915, R0912 for quantity in dic["quantity"]: dic[f"{fol}/{res}_{quantity}_array"] = [] dic[f"{fol}/{res}_indicator_array"] = [] - dic = opm_arrays(dic, fol, res, loadnpy) - return dic + opm_arrays(dic, fol, res, loadnpy) def opm_arrays(dic, fol, res, loadnpy): - """From simulaion data to arrays""" + """ + From simulation data to arrays + + Args: + dic (dict): Global dictionary\n + fol (str): Name of the output folder\n + res (str): Complete name of the simulated model\n + loadnpy (bool): True for plotting, False for back-coupling + + Returns: + dic (dict): Modified global dictionary + + """ phiva = np.array([porv for porv in dic[f"{fol}/{res}_phiv"] if porv > 0]) for i in range(dic[f"{fol}/{res}_num_rst"]): sgas = np.array(dic[f"{fol}/{res}_rst"]["SGAS", i]) @@ -433,7 +498,7 @@ def opm_arrays(dic, fol, res, loadnpy): 0.0 * np.array(dic[f"{fol}/{res}_rst"]["SGAS", 0]) ) - dic = manage_names(dic, res) + manage_names(dic, res) dic[f"{fol}/{dic['namel']}_boxi"] = [ dic[f"{fol}/{res}_grid"].xyz_from_ijk(0, 0, 0)[i][0] for i in range(3) ] @@ -452,16 +517,26 @@ def opm_arrays(dic, fol, res, loadnpy): dic[f"{fol}/{dic['namel']}_ymy"] = np.load( dic["exe"] + "/" + fol + f"/output/{dic['namef']}/{dic['namel']}_ymy.npy" ) - dic[f"{fol}/{dic['namel']}_xcor"], dic[f"{fol}/{dic['namel']}_ycor"] = ( - np.meshgrid( - dic[f"{fol}/{dic['namel']}_xmx"], dic[f"{fol}/{dic['namel']}_ymy"][::-1] - ) + ( + dic[f"{fol}/{dic['namel']}_xcor"], + dic[f"{fol}/{dic['namel']}_ycor"], + ) = np.meshgrid( + dic[f"{fol}/{dic['namel']}_xmx"], dic[f"{fol}/{dic['namel']}_ymy"][::-1] ) - return dic def manage_names(dic, res): - """Figure out the folder names (needs to be fixed)""" + """ + Figure out the folder names + + Args: + dic (dict): Global dictionary\n + res (str): Complete name of the simulated model + + Returns: + dic (dict): Modified global dictionary + + """ if res[-3].isdigit(): dic["namef"] = res[:-4] if res[-2].isdigit(): @@ -471,4 +546,3 @@ def manage_names(dic, res): else: dic["namef"] = res dic["namel"] = "site" if "site" in res else dic["namef"] - return dic diff --git a/tests/test_main.py b/tests/test_main.py index 1dfe8d1..208ee03 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -14,7 +14,7 @@ def test(): os.chdir(f"{cwd}/tests/configs") os.system("expreccs -i interp.txt -m site") os.chdir(f"{cwd}/tests/configs") - os.system("expreccs -i flux.txt -m site -p all") + os.system("expreccs -i flux.txt -m site -p all -r opm") assert os.path.exists( "./output/postprocessing/output_difference_site_wells_pressure.png" ) @@ -27,11 +27,11 @@ def test(): os.chdir(f"{cwd}/tests/configs") os.system("expreccs -c compare") assert os.path.exists("./compare/compareoutput_distance_from_border.png") - os.system("expreccs -i back-coupling.txt -o back -p yes -r opm") + os.system("expreccs -i back-coupling.txt -o back -p yes") assert os.path.exists( "./back/postprocessing/back_difference_site_pres_watfluxi-.png" ) - os.system("expreccs -i rotate.txt -o rotate -m all -t 30 -r resdata -p site") + os.system("expreccs -i rotate.txt -o rotate -m all -t 30 -r opm -p site") assert os.path.exists("./rotate/postprocessing/rotate_site_closed_pressure.png") os.system("scp -r ./rotate/preprocessing/regional/. ./rotate/output/regional") os.system("scp -r ./rotate/preprocessing/site_closed/. ./rotate/output/site_closed")