use a named constant for the value of saturation that determines the presence of free gas

This commit is contained in:
Andreas Lauser 2018-01-09 15:33:56 +01:00
parent 7c2c0052b2
commit 49289c272d

View File

@ -1204,7 +1204,7 @@ private:
typedef typename std::decay<decltype(fs) >::type FluidState; typedef typename std::decay<decltype(fs) >::type FluidState;
if (!dRsDtOnlyFreeGas_ || fs.saturation(gasPhaseIdx) > 1e-5) if (!dRsDtOnlyFreeGas_ || fs.saturation(gasPhaseIdx) > freeGasMinSaturation_)
lastRs_[compressedDofIdx] = lastRs_[compressedDofIdx] =
Opm::BlackOil::template getRs_<FluidSystem, Opm::BlackOil::template getRs_<FluidSystem,
Scalar, Scalar,
@ -1835,6 +1835,7 @@ private:
std::vector<Scalar> lastRv_; std::vector<Scalar> lastRv_;
Scalar maxDRvDt_; Scalar maxDRvDt_;
Scalar maxDRv_; Scalar maxDRv_;
constexpr static Scalar freeGasMinSaturation_ = 1e-7;
bool vapparsActive_; // if no, DRSDT and/or DRVDT *might* be active bool vapparsActive_; // if no, DRSDT and/or DRVDT *might* be active
std::vector<Scalar> maxOilSaturation_; std::vector<Scalar> maxOilSaturation_;