mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
updating the thp of the wells during the network update iteration
This commit is contained in:
parent
bb7ed4d78e
commit
ee77fa122c
@ -988,13 +988,17 @@ updateNetworkPressures(const int reportStepIdx)
|
|||||||
// set the dynamic THP constraint of the well accordingly.
|
// set the dynamic THP constraint of the well accordingly.
|
||||||
const double new_limit = it->second;
|
const double new_limit = it->second;
|
||||||
well->setDynamicThpLimit(new_limit);
|
well->setDynamicThpLimit(new_limit);
|
||||||
const SingleWellState& ws = this->wellState()[well->indexOfWell()];
|
SingleWellState& ws = this->wellState()[well->indexOfWell()];
|
||||||
const bool thp_is_limit = ws.production_cmode == Well::ProducerCMode::THP;
|
const bool thp_is_limit = ws.production_cmode == Well::ProducerCMode::THP;
|
||||||
const bool will_switch_to_thp = ws.thp < new_limit;
|
const bool will_switch_to_thp = ws.thp < new_limit;
|
||||||
if (thp_is_limit || will_switch_to_thp) {
|
if (thp_is_limit || will_switch_to_thp) {
|
||||||
active_limit_change = true;
|
active_limit_change = true;
|
||||||
network_imbalance = std::max(network_imbalance, std::fabs(new_limit - ws.thp));
|
network_imbalance = std::max(network_imbalance, std::fabs(new_limit - ws.thp));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (thp_is_limit) {
|
||||||
|
ws.thp = well->getTHPConstraint(summaryState_);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user