Difference between revisions of "Geilo"

From opm
Jump to: navigation, search
(Change properties)
(Change properties)
Line 32: Line 32:
 
== Change properties ==
 
== Change properties ==
 
Make a copy of "SPE9_CP.DATA" deck and call it "SPE9_CP_CONST.DATA".  
 
Make a copy of "SPE9_CP.DATA" deck and call it "SPE9_CP_CONST.DATA".  
Change porosity (PORO) to 0.1, permeability (PERMX and PERMY) to 400 and PERMZ to 10 times PERMX using the COPY and MULTIPLY keywords.
+
Change porosity (PORO) to 0.1, horizontal permeability (PERMX and PERMY) to 400 using the PERMX and COPY keywords,  and vertical permeability (PERMZ) to 10 times PERMX using the COPY and MULTIPLY keywords.
 
Run it and compare results with SPE9_CP using ResInsight.
 
Run it and compare results with SPE9_CP using ResInsight.
  

Revision as of 09:33, 2 August 2019


Link to manual.

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


Get the data file

From within the docker

cp -r /school/tutorials/opm-data/ /host

Or download the data file using wget https://github.com/OPM/opm-data/archive/master.zip

and 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: Within the docker container,

export PATH=$PATH:/school/DUNE/opm-simulators/build-cmake/bin
cd /host/spe9
flow SPE9_CP.DATA

Change properties

Make a copy of "SPE9_CP.DATA" deck and call it "SPE9_CP_CONST.DATA". Change porosity (PORO) to 0.1, horizontal permeability (PERMX and PERMY) to 400 using the PERMX and COPY keywords, and vertical permeability (PERMZ) to 10 times PERMX using the COPY and MULTIPLY keywords. 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.