glue in support for property modifiers

i.e. reading the grid properties from EclipseState instead of from the
raw deck. This requires that all deck files exhibit a GRID and a
SCHEDULE section or else EclipseState will throw in the constructor.
This commit is contained in:
Andreas Lauser
2014-06-06 14:28:40 +02:00
parent c834177897
commit 0219f83563
8 changed files with 42 additions and 36 deletions

View File

@@ -1,14 +1,20 @@
-- =====================================================================
RUNSPEC
DIMENS
1 1 1
/
OIL
WATER
METRIC
DIMENS
1 1 1
/
TABDIMS
-- use the default values for TABDIMS, but the keyword must be present
-- if any tables ought to be specified...
/
-- =====================================================================
GRID
@@ -28,30 +34,9 @@ DEPTHZ
4*0
/
PERMX
1.01325E15
/
PERMY
1.01325E15
/
PERMZ
1.01325E15
/
PORO
1
/
-- =====================================================================
PROPS
TABDIMS
-- use the default values for TABDIMS, but the keyword must be present
-- if any tables ought to be specified...
/
PVTW
-- Pw Bw(Pw) Cw muw Cv
1 1 0 1000 0
@@ -71,5 +56,13 @@ DENSITY
800 1000 1
/
-- =====================================================================
SOLUTION
-- empty section
-- =====================================================================
SCHEDULE
-- empty section
-- =====================================================================
END

View File

@@ -36,6 +36,7 @@
#include <opm/core/utility/parameters/ParameterGroup.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <fstream>
@@ -47,6 +48,7 @@ struct SetupSimple {
{
Opm::ParserPtr parser(new Opm::Parser());
deck = parser->parseFile("fluid.data");
eclState.reset(new Opm::EclipseState(deck));
param.disableOutput();
param.insertParameter("init_rock" , "false" );
@@ -57,6 +59,7 @@ struct SetupSimple {
Opm::parameter::ParameterGroup param;
Opm::DeckConstPtr deck;
Opm::EclipseStateConstPtr eclState;
};
@@ -66,13 +69,14 @@ struct TestFixture : public Setup
TestFixture()
: Setup()
, grid (deck)
, props(deck, *grid.c_grid(), param,
, props(deck, eclState, *grid.c_grid(), param,
param.getDefault("init_rock", false))
{
}
using Setup::param;
using Setup::deck;
using Setup::eclState;
Opm::GridManager grid;
Opm::BlackoilPropertiesFromDeck props;