diff --git a/opm/material/fluidmatrixinteractions/EclEpsScalingPoints.hpp b/opm/material/fluidmatrixinteractions/EclEpsScalingPoints.hpp index daa30dc1c..a256e3dbb 100644 --- a/opm/material/fluidmatrixinteractions/EclEpsScalingPoints.hpp +++ b/opm/material/fluidmatrixinteractions/EclEpsScalingPoints.hpp @@ -156,18 +156,13 @@ struct EclEpsScalingPointsInfo * I.e., the values which are used for the nested Fluid-Matrix interactions and which * are produced by them. */ - void extractUnscaled(const Opm::Deck& deck, - const Opm::EclipseState& eclState, + void extractUnscaled(const Opm::EclipseState& eclState, unsigned satRegionIdx) { // determine the value of the relative permeability below which the corresponding // saturation is considered to be critical - krCriticalEps = Opm::ParserKeywords::TOLCRIT::VALUE::defaultValue; - if (deck.hasKeyword("TOLCRIT")) { - const Opm::DeckKeyword& tolcritKeyword = deck.getKeyword("TOLCRIT"); - - krCriticalEps = tolcritKeyword.getRecord(0).getItem("VALUE").getSIDouble(0); - } + const auto& satFuncCtrls = eclState.runspec().saturationFunctionControls(); + krCriticalEps = satFuncCtrls.minimumRelpermMobilityThreshold(); const auto& tables = eclState.getTableManager(); const TableContainer& swofTables = tables.getSwofTables(); @@ -179,9 +174,9 @@ struct EclEpsScalingPointsInfo const TableContainer& sof2Tables = tables.getSof2Tables(); - bool hasWater = deck.hasKeyword("WATER"); - bool hasGas = deck.hasKeyword("GAS"); - bool hasOil = deck.hasKeyword("OIL"); + bool hasWater = eclState.runspec().phases().active(Phase::WATER); + bool hasGas = eclState.runspec().phases().active(Phase::GAS); + bool hasOil = eclState.runspec().phases().active(Phase::OIL); if (!hasWater) { Swl = 0.0; diff --git a/opm/material/fluidmatrixinteractions/EclMaterialLawManager.hpp b/opm/material/fluidmatrixinteractions/EclMaterialLawManager.hpp index a16b7ee6c..a77466d58 100644 --- a/opm/material/fluidmatrixinteractions/EclMaterialLawManager.hpp +++ b/opm/material/fluidmatrixinteractions/EclMaterialLawManager.hpp @@ -143,7 +143,7 @@ public: if (!stone1exTable.empty()) stoneEtas.resize(numSatRegions); for (unsigned satRegionIdx = 0; satRegionIdx < numSatRegions; ++satRegionIdx) { - unscaledEpsInfo_[satRegionIdx].extractUnscaled(deck, eclState, satRegionIdx); + unscaledEpsInfo_[satRegionIdx].extractUnscaled(eclState, satRegionIdx); if (!stoneEtas.empty()) stoneEtas[satRegionIdx] = stone1exTable[satRegionIdx].eta; }