Glue in support for the grid property modifier keywords

this basically means using Opm::EclipseState instead of the raw deck
for these keywords.

with this, property modifiers like ADD, MULT, COPY and friends are
supported for at least the PERM* keywords. If additional keywords are
required these can be added relatively easily as well.

no ctest regressions have been observed with this patch on my machine.
This commit is contained in:
Andreas Lauser 2014-06-06 14:07:14 +02:00
parent dcd79e787e
commit 9731539f6a
4 changed files with 94 additions and 8 deletions

View File

@ -86,10 +86,11 @@ try
const std::string deck_filename = param.get<std::string>("deck_filename");
Opm::ParserPtr parser(new Opm::Parser() );
Opm::DeckConstPtr deck = parser->parseFile(deck_filename);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck));
const double grav = param.getDefault("gravity", unit::gravity);
GridManager gm(deck);
const UnstructuredGrid& grid = *gm.c_grid();
BlackoilPropertiesFromDeck props(deck, grid, param);
BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param);
warnIfUnusedParams(param);
// Initialisation.

View File

@ -1,7 +1,18 @@
-- Most of the following sections are not actually needed by the test,
-- but it is required by the Eclipse reference manual that they are
-- present. Also, the higher level opm-parser classes
-- (i.e. Opm::EclipseState et al.) assume that they are present.
-------------------------------------
RUNSPEC
WATER
OIL
GAS
DIMENS
3 3 3 /
TABDIMS
1 1 40 20 1 20 /
@ -9,6 +20,27 @@ EQLDIMS
-- NTEQUL
1 /
-------------------------------------
GRID
-- Opm::EclipseState assumes that _some_ grid gets defined, so let's
-- specify a fake one...
DXV
1 2 3 /
DYV
4 5 6 /
DZV
7 8 9 /
DEPTHZ
16*123.456 /
-------------------------------------
PROPS
PVDO
100 1.0 1.0
200 0.9 1.0
@ -37,6 +69,13 @@ DENSITY
700 1000 1
/
-------------------------------------
SOLUTION
EQUIL
50 150 50 0.25 20 0.35 1* 1* 0
/
-------------------------------------
SCHEDULE
-- empty section

View File

@ -1,7 +1,18 @@
-- Most of the following sections are not actually needed by the test,
-- but it is required by the Eclipse reference manual that they are
-- present. Also, the higher level opm-parser classes
-- (i.e. Opm::EclipseState et al.) assume that they are present.
-------------------------------------
RUNSPEC
WATER
OIL
GAS
DIMENS
3 3 3 /
TABDIMS
1 1 40 20 1 20 /
@ -9,6 +20,27 @@ EQLDIMS
-- NTEQUL
1 /
-------------------------------------
GRID
-- Opm::EclipseState assumes that _some_ grid gets defined, so let's
-- specify a fake one...
DXV
1 2 3 /
DYV
4 5 6 /
DZV
7 8 9 /
DEPTHZ
16*123.456 /
-------------------------------------
PROPS
PVDO
100 1.0 1.0
200 0.5 1.0
@ -37,6 +69,13 @@ DENSITY
700 1000 10
/
-------------------------------------
SOLUTION
EQUIL
5 150 5 0 2 0 1* 1* 0
/
-------------------------------------
SCHEDULE
-- empty section

View File

@ -336,7 +336,8 @@ BOOST_AUTO_TEST_CASE (DeckAllDead)
grid(create_grid_cart3d(1, 1, 10), destroy_grid);
Opm::ParserPtr parser(new Opm::Parser() );
Opm::DeckConstPtr deck = parser->parseFile("deadfluids.DATA");
Opm::BlackoilPropertiesFromDeck props(deck, *grid, false);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck));
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, *grid, false);
Opm::Equil::DeckDependent::InitialStateComputer comp(props, deck, *grid, 10.0);
const auto& pressures = comp.press();
BOOST_REQUIRE(pressures.size() == 3);
@ -362,7 +363,8 @@ BOOST_AUTO_TEST_CASE (CapillaryInversion)
const UnstructuredGrid& grid = *(gm.c_grid());
Opm::ParserPtr parser(new Opm::Parser() );
Opm::DeckConstPtr deck = parser->parseFile("capillary.DATA");
Opm::BlackoilPropertiesFromDeck props(deck, grid, false);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck));
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
// Test the capillary inversion for oil-water.
const int cell = 0;
@ -414,7 +416,8 @@ BOOST_AUTO_TEST_CASE (DeckWithCapillary)
const UnstructuredGrid& grid = *(gm.c_grid());
Opm::ParserPtr parser(new Opm::Parser() );
Opm::DeckConstPtr deck = parser->parseFile("capillary.DATA");
Opm::BlackoilPropertiesFromDeck props(deck, grid, false);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck));
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
Opm::Equil::DeckDependent::InitialStateComputer comp(props, deck, grid, 10.0);
const auto& pressures = comp.press();
@ -453,7 +456,8 @@ BOOST_AUTO_TEST_CASE (DeckWithCapillaryOverlap)
const UnstructuredGrid& grid = *(gm.c_grid());
Opm::ParserPtr parser(new Opm::Parser() );
Opm::DeckConstPtr deck = parser->parseFile("capillary_overlap.DATA");
Opm::BlackoilPropertiesFromDeck props(deck, grid, false);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck));
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
Opm::Equil::DeckDependent::InitialStateComputer comp(props, deck, grid, 9.80665);
const auto& pressures = comp.press();
@ -514,7 +518,8 @@ BOOST_AUTO_TEST_CASE (DeckWithLiveOil)
const UnstructuredGrid& grid = *(gm.c_grid());
Opm::ParserPtr parser(new Opm::Parser() );
Opm::DeckConstPtr deck = parser->parseFile("equil_liveoil.DATA");
Opm::BlackoilPropertiesFromDeck props(deck, grid, false);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck));
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
Opm::Equil::DeckDependent::InitialStateComputer comp(props, deck, grid, 9.80665);
const auto& pressures = comp.press();
@ -592,7 +597,8 @@ BOOST_AUTO_TEST_CASE (DeckWithLiveGas)
const UnstructuredGrid& grid = *(gm.c_grid());
Opm::ParserPtr parser(new Opm::Parser() );
Opm::DeckConstPtr deck = parser->parseFile("equil_livegas.DATA");
Opm::BlackoilPropertiesFromDeck props(deck, grid, false);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck));
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
Opm::Equil::DeckDependent::InitialStateComputer comp(props, deck, grid, 9.80665);
const auto& pressures = comp.press();
@ -673,7 +679,8 @@ BOOST_AUTO_TEST_CASE (DeckWithRSVDAndRVVD)
const UnstructuredGrid& grid = *(gm.c_grid());
Opm::ParserPtr parser(new Opm::Parser() );
Opm::DeckConstPtr deck = parser->parseFile("equil_rsvd_and_rvvd.DATA");
Opm::BlackoilPropertiesFromDeck props(deck, grid, false);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck));
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
Opm::Equil::DeckDependent::InitialStateComputer comp(props, deck, grid, 9.80665);
const auto& pressures = comp.press();