Geilo

From opm
Revision as of 08:55, 2 August 2019 by Atgeirr (talk | contribs) (Download the data file (if you don't have it already))
Jump to: navigation, search


Link to manual.

[https://opm-project.org/wp-content/uploads/2019/06/OPM_Flow_Documentation_2019-04_Rev-0.pdf ]

Download the data file (if you don't have it already)

wget https://github.com/OPM/opm-data/archive/master.zip

Make the data accessible from both host and docker. If you downloaded within docker, copy the spe9 directory to /host:

cp -R opm-data/spe9 /host

If you downloaded on your host, copy the spe9 directory to the directory which is mapped to /host.

Run Base case

Run SPE9_CP and look at the results in ResInsight.

How to do it:

cd /host
mkdir spe9
cd spe9

Change properties

Make a copy of SPE9_CP deck and call it SPE9_CP_CONST. Change Porosity = 0.1 and PERMX=PERMY=400 and PERMZ=10*PERMX using COPY and MULTIPLY. Run it and compare results with SPE9_CP using ResInsight.

Implement a new functional relationship between PERM and PORO

For normal opm/flow simulations the permeability is loaded from the input file with the PERMX keyword. In this small exercise you will instead load two parameters and then use a functional relationship between porosity and permeability:

permx = PERM_MAX * poro^POWER

The porosity field is loaded from the input file, in addition you should load the PERM_MAX and POWER parameters from the input file. To solve this task you must first make changes in opm-common to tell the parser about the new keyword, and then subsequently make changes to opm-simulators to actually use the new keyword.

Add a new keyword in the opm-common repository

All the keywords recognized by the parser in opm-common are described as json files, based on these files C++ code is generated in the build process. All the keywords are in directory rooted at src/opm/parser/eclipse/share/keywords, in addition the keywords must be listed in the src/opm/parser/eclipse/share/keywords/keyword_list.cmake. For an example of similar keyword look at P/PINCH

Use the new keyword in opm-simulators

In the file opm-simulators/opm/ebos/ecltransmissibility.hh there is a function extractPermeability_() which fetches the permeability from the opm-common input layer. Modify this function to use the new PERMFUN keyword and calculate the permeability instead of using the permeability entered in the input file.

Hint: to get access to the PERM_MAX and POWER values from the input file you must used the Deck datastructure:

const auto& deck = vanguard_.deck();
const auto& permfun_kw = deck.getKeyword("PERMFUN");
double perm_max = permfun_kw.getRecord(0).getItem("PERM_MAX").getSIDouble(0);
double power = permfun_kw.getRecord(0).getItem("POWER").getSIDouble(0);

Run it using flow

Compile opm-common and flow Make a copy of SPE9_CP deck and call it SPE9_CP_FUN Add your brand you keyword PERMFUN to the GRID section and run it using Flow. Try different values of PERM_MAX and POWER

Change wells

Rename SPE9_CP to SPE9_CP_INJ Add water injector INJE2 in x=1, y=1 and layer 11-15, using WELSPECS and COMPDAT. Use same drainage radius and reference depth as INJE1 Start injecting after 100 day of simulation using WCONINJE with BHP control equal to 6000 PSI. Run it and compare results with SPE9_CP using ResInsight.

Compare linear solvers

Run SPE9_CP with bicgstab (default), amg and gmres using command line options and compare simulation time and number of linear iterations.