Skip to content

Commit

Permalink
Merge pull request #245 from andlaus/limit_VAPPARS
Browse files Browse the repository at this point in the history
limit the reduction due to VAPPARS to a factor of 1000
  • Loading branch information
andlaus authored Jul 31, 2017
2 parents 29fd5cb + d23f4a7 commit aabf238
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions opm/material/fluidsystems/blackoilpvt/LiveOilPvt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,9 @@ class LiveOilPvt
// keyword)
maxOilSaturation = std::min(maxOilSaturation, Scalar(1.0));
if (vapPar2_ > 0.0 && maxOilSaturation > 0.01 && oilSaturation < maxOilSaturation) {
static const Scalar sqrtEps = std::sqrt(std::numeric_limits<Scalar>::epsilon());
const Evaluation& So = Opm::max(oilSaturation, sqrtEps);
tmp *= Opm::pow(So/maxOilSaturation, vapPar2_);
static const Scalar eps = 0.001;
const Evaluation& So = Opm::max(oilSaturation, eps);
tmp *= Opm::max(1e-3, Opm::pow(So/maxOilSaturation, vapPar2_));
}

return tmp;
Expand Down
6 changes: 3 additions & 3 deletions opm/material/fluidsystems/blackoilpvt/WetGasPvt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,9 @@ class WetGasPvt
// keyword)
maxOilSaturation = std::min(maxOilSaturation, Scalar(1.0));
if (vapPar1_ > 0.0 && maxOilSaturation > 0.01 && oilSaturation < maxOilSaturation) {
static const Scalar sqrtEps = std::sqrt(std::numeric_limits<Scalar>::epsilon());
const Evaluation& So = Opm::max(oilSaturation, sqrtEps);
tmp *= Opm::pow(So/maxOilSaturation, vapPar1_);
static const Scalar eps = 0.001;
const Evaluation& So = Opm::max(oilSaturation, eps);
tmp *= Opm::max(1e-3, Opm::pow(So/maxOilSaturation, vapPar1_));
}

return tmp;
Expand Down

0 comments on commit aabf238

Please sign in to comment.