Merge remote-tracking branch 'opm/master' into bo_polymer

This commit is contained in:
Liu Ming 2014-10-16 10:00:37 +08:00
commit ddfb030b57
3 changed files with 7 additions and 8 deletions

View File

@ -120,7 +120,7 @@ try
} }
initBlackoilSurfvol(*grid->c_grid(), *props, state); initBlackoilSurfvol(*grid->c_grid(), *props, state);
// Init polymer properties. // Init polymer properties.
poly_props.readFromDeck(eclipseState); poly_props.readFromDeck(deck, eclipseState);
} else { } else {
// Grid init. // Grid init.
const int nx = param.getDefault("nx", 100); const int nx = param.getDefault("nx", 100);

View File

@ -119,7 +119,7 @@ try
initStateFromDeck(*grid->c_grid(), *props, deck, gravity[2], state); initStateFromDeck(*grid->c_grid(), *props, deck, gravity[2], state);
} }
// Init polymer properties. // Init polymer properties.
poly_props.readFromDeck(eclipseState); poly_props.readFromDeck(deck, eclipseState);
} else { } else {
// Grid init. // Grid init.
const int nx = param.getDefault("nx", 100); const int nx = param.getDefault("nx", 100);

View File

@ -82,9 +82,9 @@ namespace Opm
{ {
} }
PolymerProperties(Opm::EclipseStateConstPtr eclipseState) PolymerProperties(Opm::DeckConstPtr deck, Opm::EclipseStateConstPtr eclipseState)
{ {
readFromDeck(eclipseState); readFromDeck(deck, eclipseState);
} }
void set(double c_max, void set(double c_max,
@ -117,18 +117,17 @@ namespace Opm
shear_vrf_vals_ = shear_vrf_vals; shear_vrf_vals_ = shear_vrf_vals;
} }
void readFromDeck(Opm::EclipseStateConstPtr eclipseState) void readFromDeck(Opm::DeckConstPtr deck, Opm::EclipseStateConstPtr eclipseState)
{ {
// We assume NTMISC=1 // We assume NTMISC=1
const auto& plymaxTable = eclipseState->getPlymaxTables()[0]; const auto& plymaxTable = eclipseState->getPlymaxTables()[0];
const auto& tlmixparTable = eclipseState->getTlmixparTables()[0]; const auto tlmixparRecord = deck->getKeyword("TLMIXPAR")->getRecord(0);
// We also assume that each table has exactly one row... // We also assume that each table has exactly one row...
assert(plymaxTable.numRows() == 1); assert(plymaxTable.numRows() == 1);
assert(tlmixparTable.numRows() == 1);
c_max_ = plymaxTable.getPolymerConcentrationColumn()[0]; c_max_ = plymaxTable.getPolymerConcentrationColumn()[0];
mix_param_ = tlmixparTable.getViscosityParameterColumn()[0]; mix_param_ = tlmixparRecord->getItem("TL_VISCOSITY_PARAMETER")->getSIDouble(0);
// We assume NTSFUN=1 // We assume NTSFUN=1
const auto& plyrockTable = eclipseState->getPlyrockTables()[0]; const auto& plyrockTable = eclipseState->getPlyrockTables()[0];