Merge pull request #70 from andlaus/use_TLMIXPAR_keyword

use the TLMIXPAR keyword directly
This commit is contained in:
Atgeirr Flø Rasmussen 2014-10-14 14:10:03 +02:00
commit 7d2b18d758
3 changed files with 7 additions and 8 deletions

View File

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

View File

@ -119,7 +119,7 @@ try
initStateFromDeck(*grid->c_grid(), *props, deck, gravity[2], state);
}
// Init polymer properties.
poly_props.readFromDeck(eclipseState);
poly_props.readFromDeck(deck, eclipseState);
} else {
// Grid init.
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,
@ -117,18 +117,17 @@ namespace Opm
shear_vrf_vals_ = shear_vrf_vals;
}
void readFromDeck(Opm::EclipseStateConstPtr eclipseState)
void readFromDeck(Opm::DeckConstPtr deck, Opm::EclipseStateConstPtr eclipseState)
{
// We assume NTMISC=1
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...
assert(plymaxTable.numRows() == 1);
assert(tlmixparTable.numRows() == 1);
c_max_ = plymaxTable.getPolymerConcentrationColumn()[0];
mix_param_ = tlmixparTable.getViscosityParameterColumn()[0];
mix_param_ = tlmixparRecord->getItem("TL_VISCOSITY_PARAMETER")->getSIDouble(0);
// We assume NTSFUN=1
const auto& plyrockTable = eclipseState->getPlyrockTables()[0];