From 7c122c18d3edf56eba03b7c8155a9f1a9af82a87 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Tue, 14 Oct 2014 12:29:31 +0200 Subject: [PATCH] use the TLMIXPAR keyword directly instead of using a table class. This is because the keyword is not a table... --- examples/sim_poly2p_comp_reorder.cpp | 2 +- examples/sim_poly2p_incomp_reorder.cpp | 2 +- opm/polymer/PolymerProperties.hpp | 11 +++++------ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/examples/sim_poly2p_comp_reorder.cpp b/examples/sim_poly2p_comp_reorder.cpp index fba329e68..52cab79b0 100644 --- a/examples/sim_poly2p_comp_reorder.cpp +++ b/examples/sim_poly2p_comp_reorder.cpp @@ -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); diff --git a/examples/sim_poly2p_incomp_reorder.cpp b/examples/sim_poly2p_incomp_reorder.cpp index 5e427af2d..543970185 100644 --- a/examples/sim_poly2p_incomp_reorder.cpp +++ b/examples/sim_poly2p_incomp_reorder.cpp @@ -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); diff --git a/opm/polymer/PolymerProperties.hpp b/opm/polymer/PolymerProperties.hpp index aee061fae..9cf4d20de 100644 --- a/opm/polymer/PolymerProperties.hpp +++ b/opm/polymer/PolymerProperties.hpp @@ -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];