diff --git a/opm/autodiff/BlackoilModelEbos.hpp b/opm/autodiff/BlackoilModelEbos.hpp index 83e80cdc6..d4e191200 100644 --- a/opm/autodiff/BlackoilModelEbos.hpp +++ b/opm/autodiff/BlackoilModelEbos.hpp @@ -706,6 +706,7 @@ namespace Opm { if (has_solvent_) { double& ss = priVars[Indices::solventSaturationIdx]; ss -= satScaleFactor * dss; + ss = std::min(std::max(ss, 0.0),1.0); } if (has_polymer_) { double& c = priVars[Indices::polymerConcentrationIdx];