diff --git a/opm/core/props/BlackoilPropertiesFromDeck.cpp b/opm/core/props/BlackoilPropertiesFromDeck.cpp index e476f015f..c28178a1c 100644 --- a/opm/core/props/BlackoilPropertiesFromDeck.cpp +++ b/opm/core/props/BlackoilPropertiesFromDeck.cpp @@ -58,8 +58,8 @@ namespace Opm // Unfortunate lack of pointer smartness here... const int sat_samples = param.getDefault("sat_tab_size", 200); std::string threephase_model = param.getDefault("threephase_model", "simple"); - if (deck.hasField("ENDSCALE") && threephase_model != "simple") { - OPM_THROW(std::runtime_error, "Sorry, end point scaling currently available for the 'simple' model only."); + if (deck.hasField("ENDSCALE") && threephase_model != "gwseg") { + OPM_THROW(std::runtime_error, "Sorry, end point scaling currently available for the 'gwseg' model only."); } if (sat_samples > 1) { if (threephase_model == "stone2") { diff --git a/opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp b/opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp index c30069934..4b7ae04d6 100644 --- a/opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp +++ b/opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp @@ -646,6 +646,13 @@ namespace Opm { if (scr.empty() && su.empty() && (sxcr.empty() || !do_3pt_) && s0.empty()) { data.doNotScale = true; + data.smin = sl_tab; + if (oil) { + data.smax = (s0_tab < 0.0) ? 1.0 - su_tab : 1.0 - su_tab - s0_tab; + } else { + data.smax = su_tab; + } + data.scr = scr_tab; } else { data.doNotScale = false; data.do_3pt = do_3pt_; diff --git a/opm/core/props/satfunc/SaturationPropsInterface.hpp b/opm/core/props/satfunc/SaturationPropsInterface.hpp index ad2a9439f..04f6730e3 100644 --- a/opm/core/props/satfunc/SaturationPropsInterface.hpp +++ b/opm/core/props/satfunc/SaturationPropsInterface.hpp @@ -73,6 +73,14 @@ namespace Opm const int* cells, double* smin, double* smax) const = 0; + + /// Update saturation state for the hysteresis tracking + /// \param[in] n Number of data points. + /// \param[in] s Array of nP saturation values. + virtual void updateSatHyst(const int n, + const int* cells, + const double* s) = 0; + };