changed: drop wrapper MultisegmentWellGeneric::computeBhpAtThpLimitProdWithAlq

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

View File

@ -207,25 +207,6 @@ detectOscillations(const std::vector<double>& measure_history,
stagnate = std::abs((F1 - F2) / F2) <= stagnation_rel_tol;
}
template<typename Scalar>
std::optional<double>
MultisegmentWellGeneric<Scalar>::
computeBhpAtThpLimitProdWithAlq(
const std::function<std::vector<double>(const double)>& frates,
const SummaryState& summary_state,
const double maxPerfPress,
const double rho,
DeferredLogger& deferred_logger,
double alq_value) const
{
return WellBhpThpCalculator(baseif_).computeBhpAtThpLimitProd(frates,
summary_state,
maxPerfPress,
rho,
alq_value,
deferred_logger);
}
template<typename Scalar>
bool
MultisegmentWellGeneric<Scalar>::

View File

@ -60,14 +60,6 @@ protected:
/// number of segments for this well
int numberOfSegments() const;
std::optional<double> computeBhpAtThpLimitProdWithAlq(
const std::function<std::vector<double>(const double)>& frates,
const SummaryState& summary_state,
const double maxPerfPress,
const double rho,
DeferredLogger& deferred_logger,
double alq_value) const;
/// Detect oscillation or stagnation based on the residual measure history
void detectOscillations(const std::vector<double>& measure_history,
const int it,

View File

@ -1901,15 +1901,15 @@ namespace Opm
return rates;
};
auto bhpAtLimit = this->MultisegmentWellGeneric<Scalar>::
computeBhpAtThpLimitProdWithAlq(frates,
auto bhpAtLimit = WellBhpThpCalculator(*this).
computeBhpAtThpLimitProd(frates,
summary_state,
maxPerfPress(ebos_simulator),
getRefDensity(),
deferred_logger,
alq_value);
this->maxPerfPress(ebos_simulator),
this->getRefDensity(),
alq_value,
deferred_logger);
if(bhpAtLimit)
if (bhpAtLimit)
return bhpAtLimit;
auto fratesIter = [this, &ebos_simulator, &deferred_logger](const double bhp) {
@ -1921,19 +1921,15 @@ namespace Opm
return rates;
};
return this->MultisegmentWellGeneric<Scalar>::
computeBhpAtThpLimitProdWithAlq(fratesIter,
return WellBhpThpCalculator(*this).
computeBhpAtThpLimitProd(fratesIter,
summary_state,
maxPerfPress(ebos_simulator),
getRefDensity(),
deferred_logger,
alq_value);
this->maxPerfPress(ebos_simulator),
this->getRefDensity(),
alq_value,
deferred_logger);
}
template<typename TypeTag>
std::optional<double>
MultisegmentWell<TypeTag>::