changed: drop wrapper StandardWellGeneric::computeBhpAtThpLimitProdWithAlq

This commit is contained in:
Arne Morten Kvarving 2022-10-19 12:04:02 +02:00
parent f214ccc138
commit db05f1d73f
3 changed files with 13 additions and 34 deletions

View File

@ -150,23 +150,6 @@ computeConnectionPressureDelta()
baseif_.parallelWellInfo().partialSumPerfValues(beg, end);
}
template<class Scalar>
std::optional<double>
StandardWellGeneric<Scalar>::
computeBhpAtThpLimitProdWithAlq(const std::function<std::vector<double>(const double)>& frates,
const SummaryState& summary_state,
DeferredLogger& deferred_logger,
double maxPerfPress,
double alq_value) const
{
return WellBhpThpCalculator(baseif_).computeBhpAtThpLimitProd(frates,
summary_state,
maxPerfPress,
this->getRho(),
alq_value,
deferred_logger);
}
template<class Scalar>
unsigned int
StandardWellGeneric<Scalar>::

View File

@ -81,12 +81,6 @@ protected:
void computeConnectionPressureDelta();
std::optional<double> computeBhpAtThpLimitProdWithAlq(const std::function<std::vector<double>(const double)>& frates,
const SummaryState& summary_state,
DeferredLogger& deferred_logger,
double maxPerfPress,
double alq_value) const;
// Base interface reference
const WellInterfaceGeneric& baseif_;

View File

@ -2602,13 +2602,14 @@ namespace Opm
double pressure_cell = this->getPerfCellPressure(fs).value();
max_pressure = std::max(max_pressure, pressure_cell);
}
auto bhpAtLimit = this->StandardWellGeneric<Scalar>::computeBhpAtThpLimitProdWithAlq(frates,
summary_state,
deferred_logger,
max_pressure,
alq_value);
auto bhpAtLimit = WellBhpThpCalculator(*this).computeBhpAtThpLimitProd(frates,
summary_state,
max_pressure,
this->getRho(),
alq_value,
deferred_logger);
auto v = frates(*bhpAtLimit);
if(bhpAtLimit && std::all_of(v.cbegin(), v.cend(), [](double i){ return i <= 0; }))
if (bhpAtLimit && std::all_of(v.cbegin(), v.cend(), [](double i){ return i <= 0; }))
return bhpAtLimit;
auto fratesIter = [this, &ebos_simulator, &deferred_logger](const double bhp) {
@ -2621,11 +2622,12 @@ namespace Opm
return rates;
};
bhpAtLimit = this->StandardWellGeneric<Scalar>::computeBhpAtThpLimitProdWithAlq(fratesIter,
summary_state,
deferred_logger,
max_pressure,
alq_value);
bhpAtLimit = WellBhpThpCalculator(*this).computeBhpAtThpLimitProd(fratesIter,
summary_state,
max_pressure,
this->getRho(),
alq_value,
deferred_logger);
v = frates(*bhpAtLimit);
if(bhpAtLimit && std::all_of(v.cbegin(), v.cend(), [](double i){ return i <= 0; }))
return bhpAtLimit;