do not iterate when computing well potentials

This commit is contained in:
Tor Harald Sandve
2021-12-02 13:48:22 +00:00
parent 3d02e29da1
commit fac3ca3507

View File

@@ -1760,13 +1760,13 @@ namespace Opm
auto bhp_at_thp_limit = computeBhpAtThpLimitInj(ebos_simulator, summary_state, deferred_logger); auto bhp_at_thp_limit = computeBhpAtThpLimitInj(ebos_simulator, summary_state, deferred_logger);
if (bhp_at_thp_limit) { if (bhp_at_thp_limit) {
const double bhp = std::min(*bhp_at_thp_limit, controls.bhp_limit); const double bhp = std::min(*bhp_at_thp_limit, controls.bhp_limit);
computeWellRatesWithBhpIterations(ebos_simulator, bhp, potentials, deferred_logger); computeWellRatesWithBhp(ebos_simulator, bhp, potentials, deferred_logger);
} else { } else {
deferred_logger.warning("FAILURE_GETTING_CONVERGED_POTENTIAL", deferred_logger.warning("FAILURE_GETTING_CONVERGED_POTENTIAL",
"Failed in getting converged thp based potential calculation for well " "Failed in getting converged thp based potential calculation for well "
+ name() + ". Instead the bhp based value is used"); + name() + ". Instead the bhp based value is used");
const double bhp = controls.bhp_limit; const double bhp = controls.bhp_limit;
computeWellRatesWithBhpIterations(ebos_simulator, bhp, potentials, deferred_logger); computeWellRatesWithBhp(ebos_simulator, bhp, potentials, deferred_logger);
} }
} else { } else {
computeWellRatesWithThpAlqProd( computeWellRatesWithThpAlqProd(
@@ -1793,7 +1793,7 @@ namespace Opm
if (bhp_at_thp_limit) { if (bhp_at_thp_limit) {
const auto& controls = this->well_ecl_.productionControls(summary_state); const auto& controls = this->well_ecl_.productionControls(summary_state);
bhp = std::max(*bhp_at_thp_limit, controls.bhp_limit); bhp = std::max(*bhp_at_thp_limit, controls.bhp_limit);
computeWellRatesWithBhpIterations(ebos_simulator, bhp, potentials, deferred_logger); computeWellRatesWithBhp(ebos_simulator, bhp, potentials, deferred_logger);
} }
else { else {
deferred_logger.warning("FAILURE_GETTING_CONVERGED_POTENTIAL", deferred_logger.warning("FAILURE_GETTING_CONVERGED_POTENTIAL",
@@ -1801,7 +1801,7 @@ namespace Opm
+ name() + ". Instead the bhp based value is used"); + name() + ". Instead the bhp based value is used");
const auto& controls = this->well_ecl_.productionControls(summary_state); const auto& controls = this->well_ecl_.productionControls(summary_state);
bhp = controls.bhp_limit; bhp = controls.bhp_limit;
computeWellRatesWithBhpIterations(ebos_simulator, bhp, potentials, deferred_logger); computeWellRatesWithBhp(ebos_simulator, bhp, potentials, deferred_logger);
} }
return bhp; return bhp;
} }