only check if wells has negative potentials if check_well_operabilty=true(default)

This commit is contained in:
Tor Harald Sandve 2022-04-19 14:37:35 +02:00
parent 1486690738
commit c8bef3bcd5
2 changed files with 4 additions and 4 deletions

View File

@ -313,11 +313,11 @@ namespace Opm
well_potentials[phase] *= sign;
total_potential += well_potentials[phase];
}
if (total_potential < 0.0) {
if (total_potential < 0.0 && this->param_.check_well_operability_) {
// wells with negative potentials are not operable
this->operability_status_.has_negative_potentials = true;
const std::string msg = std::string("well ") + this->name() + std::string(": has non negative potentials is not operable");
deferred_logger.info(msg);
deferred_logger.warning("NEGATIVE_POTENTIALS_INOPERABLE", msg);
}
}

View File

@ -1929,11 +1929,11 @@ namespace Opm
well_potentials[phase] *= sign;
total_potential += well_potentials[phase];
}
if (total_potential < 0.0) {
if (total_potential < 0.0 && this->param_.check_well_operability_) {
// wells with negative potentials are not operable
this->operability_status_.has_negative_potentials = true;
const std::string msg = std::string("well ") + this->name() + std::string(": has negative potentials and is not operable");
deferred_logger.info(msg);
deferred_logger.warning("NEGATIVE_POTENTIALS_INOPERABLE", msg);
}
}