mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #5748 from steink/Only-update-targets-for-relevant-controls
Only update target of group-controlled wells during updateAndCommunicate
This commit is contained in:
commit
b4fe429b35
@ -2440,8 +2440,12 @@ namespace Opm {
|
||||
OPM_BEGIN_PARALLEL_TRY_CATCH()
|
||||
// if a well or group change control it affects all wells that are under the same group
|
||||
for (const auto& well : well_container_) {
|
||||
well->updateWellStateWithTarget(simulator_, this->groupState(),
|
||||
this->wellState(), deferred_logger);
|
||||
// We only want to update wells under group-control here
|
||||
auto& ws = this->wellState().well(well->indexOfWell());
|
||||
if (ws.production_cmode == Well::ProducerCMode::GRUP || ws.injection_cmode == Well::InjectorCMode::GRUP) {
|
||||
well->updateWellStateWithTarget(simulator_, this->groupState(),
|
||||
this->wellState(), deferred_logger);
|
||||
}
|
||||
}
|
||||
OPM_END_PARALLEL_TRY_CATCH("BlackoilWellModel::updateAndCommunicate failed: ",
|
||||
simulator_.gridView().comm())
|
||||
|
Loading…
Reference in New Issue
Block a user