Ignore limits to rs and rv changes.

As implemented with a relative limit, even with 1e9 default limit it
would still be impossible to get away from a zero value. It is
possible that the limits may return later, implemented in a less
buggy way, however for now they do not seem necessary.
This commit is contained in:
Atgeirr Flø Rasmussen 2017-08-10 11:25:47 +02:00
parent 1e0facec4a
commit 9cf6832140

View File

@ -888,20 +888,24 @@ namespace Opm {
double& rs = state_.reservoir_state.gasoilratio()[cell];
const double rs_old = rs;
if (hcstate == HydroCarbonState::OilOnly) {
const double max_allowed_change = std::fabs(rs_old) * Base::drMaxRel();
// const double max_allowed_change = std::fabs(rs_old) * Base::drMaxRel();
const double drs = dx[1];
const double factor = std::min(1.0, max_allowed_change / std::fabs(drs));
rs += factor*drs;
// const double factor = std::min(1.0, max_allowed_change / std::fabs(drs));
// rs += factor*drs;
rs += drs;
rs = std::max(rs, 0.0);
}
// Update rv.
double& rv = state_.reservoir_state.rv()[cell];
const double rv_old = rv;
if (hcstate == HydroCarbonState::GasOnly) {
const double max_allowed_change = std::fabs(rv_old) * Base::drMaxRel();
// const double max_allowed_change = std::fabs(rv_old) * Base::drMaxRel();
const double drv = dx[1];
const double factor = std::min(1.0, max_allowed_change / std::fabs(drv));
rv += factor*drv;
// const double factor = std::min(1.0, max_allowed_change / std::fabs(drv));
// rv += factor*drv;
rv += drv;
rv = std::max(rv, 0.0);
}
const double epsilon = std::sqrt(std::numeric_limits<double>::epsilon());