changed: move calculateThpFromBhp to WellBhpThpCalculator

This commit is contained in:
Arne Morten Kvarving
2022-10-19 09:55:14 +02:00
parent f7f4352b68
commit 4fcb1e9d37
10 changed files with 78 additions and 100 deletions

View File

@@ -1269,7 +1269,11 @@ namespace Opm
std::vector<double> well_rates_bhp_limit;
computeWellRatesWithBhp(ebos_simulator, bhp_limit, well_rates_bhp_limit, deferred_logger);
const double thp = this->calculateThpFromBhp(well_rates_bhp_limit, bhp_limit, getRefDensity(), deferred_logger);
const double thp = WellBhpThpCalculator(*this).calculateThpFromBhp(well_rates_bhp_limit,
bhp_limit,
this->getRefDensity(),
this->wellEcl().alq_value(),
deferred_logger);
const double thp_limit = this->getTHPConstraint(summaryState);
if ( (this->isProducer() && thp < thp_limit) || (this->isInjector() && thp > thp_limit) ) {
this->operability_status_.obey_thp_limit_under_bhp_limit = false;