rename computeBhpFromThpPotential to computeBhpFromThpIterations in std wells

This commit is contained in:
Tor Harald Sandve
2021-09-13 14:07:21 +02:00
parent c8a59946e3
commit 43a858ef25
2 changed files with 10 additions and 10 deletions

View File

@@ -327,7 +327,7 @@ namespace Opm
double& perf_vap_oil_rate,
DeferredLogger& deferred_logger) const;
void computeWellRatesWithBhpPotential(const Simulator& ebosSimulator,
void computeWellRatesWithBhpIterations(const Simulator& ebosSimulator,
const double& bhp,
std::vector<double>& well_flux,
DeferredLogger& deferred_logger) const;

View File

@@ -1674,10 +1674,10 @@ namespace Opm
template<typename TypeTag>
void
StandardWell<TypeTag>::
computeWellRatesWithBhpPotential(const Simulator& ebosSimulator,
const double& bhp,
std::vector<double>& well_flux,
DeferredLogger& deferred_logger) const
computeWellRatesWithBhpIterations(const Simulator& ebosSimulator,
const double& bhp,
std::vector<double>& well_flux,
DeferredLogger& deferred_logger) const
{
// iterate to get a more accurate well density
@@ -1739,13 +1739,13 @@ namespace Opm
auto bhp_at_thp_limit = computeBhpAtThpLimitInj(ebos_simulator, summary_state, deferred_logger);
if (bhp_at_thp_limit) {
const double bhp = std::min(*bhp_at_thp_limit, controls.bhp_limit);
computeWellRatesWithBhpPotential(ebos_simulator, bhp, potentials, deferred_logger);
computeWellRatesWithBhpIterations(ebos_simulator, bhp, potentials, deferred_logger);
} else {
deferred_logger.warning("FAILURE_GETTING_CONVERGED_POTENTIAL",
"Failed in getting converged thp based potential calculation for well "
+ name() + ". Instead the bhp based value is used");
const double bhp = controls.bhp_limit;
computeWellRatesWithBhpPotential(ebos_simulator, bhp, potentials, deferred_logger);
computeWellRatesWithBhpIterations(ebos_simulator, bhp, potentials, deferred_logger);
}
} else {
computeWellRatesWithThpAlqProd(
@@ -1772,7 +1772,7 @@ namespace Opm
if (bhp_at_thp_limit) {
const auto& controls = this->well_ecl_.productionControls(summary_state);
bhp = std::max(*bhp_at_thp_limit, controls.bhp_limit);
computeWellRatesWithBhpPotential(ebos_simulator, bhp, potentials, deferred_logger);
computeWellRatesWithBhpIterations(ebos_simulator, bhp, potentials, deferred_logger);
}
else {
deferred_logger.warning("FAILURE_GETTING_CONVERGED_POTENTIAL",
@@ -1780,7 +1780,7 @@ namespace Opm
+ name() + ". Instead the bhp based value is used");
const auto& controls = this->well_ecl_.productionControls(summary_state);
bhp = controls.bhp_limit;
computeWellRatesWithBhpPotential(ebos_simulator, bhp, potentials, deferred_logger);
computeWellRatesWithBhpIterations(ebos_simulator, bhp, potentials, deferred_logger);
}
return bhp;
}
@@ -1891,7 +1891,7 @@ namespace Opm
// get the bhp value based on the bhp constraints
const double bhp = this->mostStrictBhpFromBhpLimits(summaryState);
assert(std::abs(bhp) != std::numeric_limits<double>::max());
computeWellRatesWithBhpPotential(ebosSimulator, bhp, well_potentials, deferred_logger);
computeWellRatesWithBhpIterations(ebosSimulator, bhp, well_potentials, deferred_logger);
} else {
// the well has a THP related constraint
well_potentials = computeWellPotentialWithTHP(ebosSimulator, deferred_logger, well_state);