mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
set ws.thp = thp_limit for wells under THP control
This commit is contained in:
@@ -572,6 +572,12 @@ updateThp(WellState& well_state,
|
|||||||
ws.thp = 0;
|
ws.thp = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
bool thp_controled = baseif_.isInjector() ? ws.injection_cmode == Well::InjectorCMode::THP:
|
||||||
|
ws.production_cmode == Well::ProducerCMode::THP;
|
||||||
|
if (thp_controled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// the well is under other control types, we calculate the thp based on bhp and rates
|
// the well is under other control types, we calculate the thp based on bhp and rates
|
||||||
std::vector<double> rates(3, 0.0);
|
std::vector<double> rates(3, 0.0);
|
||||||
|
|||||||
@@ -813,6 +813,7 @@ namespace Opm
|
|||||||
auto rates = ws.surface_rates;
|
auto rates = ws.surface_rates;
|
||||||
double bhp = this->calculateBhpFromThp(well_state, rates, well, summaryState, this->getRefDensity(), deferred_logger);
|
double bhp = this->calculateBhpFromThp(well_state, rates, well, summaryState, this->getRefDensity(), deferred_logger);
|
||||||
ws.bhp = bhp;
|
ws.bhp = bhp;
|
||||||
|
ws.thp = this->getTHPConstraint(summaryState);
|
||||||
|
|
||||||
// if the total rates are negative or zero
|
// if the total rates are negative or zero
|
||||||
// we try to provide a better intial well rate
|
// we try to provide a better intial well rate
|
||||||
@@ -1037,6 +1038,7 @@ namespace Opm
|
|||||||
this->adaptRatesForVFP(rates);
|
this->adaptRatesForVFP(rates);
|
||||||
double bhp = this->calculateBhpFromThp(well_state, rates, well, summaryState, this->getRefDensity(), deferred_logger);
|
double bhp = this->calculateBhpFromThp(well_state, rates, well, summaryState, this->getRefDensity(), deferred_logger);
|
||||||
ws.bhp = bhp;
|
ws.bhp = bhp;
|
||||||
|
ws.thp = this->getTHPConstraint(summaryState);
|
||||||
|
|
||||||
// if the total rates are negative or zero
|
// if the total rates are negative or zero
|
||||||
// we try to provide a better intial well rate
|
// we try to provide a better intial well rate
|
||||||
|
|||||||
Reference in New Issue
Block a user