Only check well operability for wells under THP and BHP limits

This commit is contained in:
Tor Harald Sandve 2020-12-08 09:51:26 +01:00
parent 8ca9cc241a
commit 5fb73c9714
2 changed files with 13 additions and 14 deletions

View File

@ -2574,11 +2574,10 @@ namespace Opm
deferred_logger.debug(msg);
}
} else {
// Shutting wells that can not find bhp value from thp may results in
// too early shutting of the well during startup of new wells.
// Lets try to keep them open.
//this->operability_status_.can_obtain_bhp_with_thp_limit = false;
//this->operability_status_.obey_bhp_limit_with_thp_limit = false;
// Shutting wells that can not find bhp value from thp
// when under THP control
this->operability_status_.can_obtain_bhp_with_thp_limit = false;
this->operability_status_.obey_bhp_limit_with_thp_limit = false;
if (!this->wellIsStopped()) {
const double thp_limit = this->getTHPConstraint(summaryState);
deferred_logger.debug(" could not find bhp value at thp limit "

View File

@ -1536,15 +1536,15 @@ namespace Opm
{
this->operability_status_.reset();
updateIPR(ebos_simulator, deferred_logger);
// checking the BHP limit related
checkOperabilityUnderBHPLimitProducer(well_state, ebos_simulator, deferred_logger);
const auto& summaryState = ebos_simulator.vanguard().summaryState();
// checking whether the well can operate under the THP constraints.
if (this->wellHasTHPConstraints(summaryState)) {
const Well::ProducerCMode& current_control = well_state.currentProductionControls()[this->index_of_well_];
// Operability checking is not free
// Only check wells under BHP and THP control
if(current_control == Well::ProducerCMode::BHP || current_control == Well::ProducerCMode::THP) {
updateIPR(ebos_simulator, deferred_logger);
checkOperabilityUnderBHPLimitProducer(well_state, ebos_simulator, deferred_logger);
}
// we do some extra checking for wells under THP control.
if (current_control == Well::ProducerCMode::THP) {
checkOperabilityUnderTHPLimitProducer(ebos_simulator, well_state, deferred_logger);
}
}