check the sum not individual phases for operability

This commit is contained in:
Tor Harald Sandve 2020-11-30 09:23:16 +01:00
parent 90050372ae
commit bc04fb68ef

View File

@ -2404,12 +2404,12 @@ namespace Opm
// if the BHP limit is not defaulted or the well does not have a THP limit // if the BHP limit is not defaulted or the well does not have a THP limit
// we need to check the BHP limit // we need to check the BHP limit
double temp = 0;
for (int p = 0; p < number_of_phases_; ++p) { for (int p = 0; p < number_of_phases_; ++p) {
const double temp = ipr_a_[p] - ipr_b_[p] * bhp_limit; temp += ipr_a_[p] - ipr_b_[p] * bhp_limit;
if (temp < 0.) { }
this->operability_status_.operable_under_only_bhp_limit = false; if (temp < 0.) {
break; this->operability_status_.operable_under_only_bhp_limit = false;
}
} }
// checking whether running under BHP limit will violate THP limit // checking whether running under BHP limit will violate THP limit