Reservoir coupling: Apply master group targets on slave Schedule#6983
Merged
totto82 merged 2 commits intoOPM:masterfrom Apr 16, 2026
Merged
Reservoir coupling: Apply master group targets on slave Schedule#6983totto82 merged 2 commits intoOPM:masterfrom
totto82 merged 2 commits intoOPM:masterfrom
Conversation
Contributor
Author
|
Putting this in draft mode until #6979 has been merged |
After receiving constraints from the master, the slave updates its Schedule with synthetic GCONPROD/GCONINJE entries so the existing constraint enforcement mechanisms recognize the groups and apply the master's targets. Without this, slave groups without deck-level GCONPROD/GCONINJE would be skipped by isProductionGroup()/isInjectionGroup() gates in checkGroupHigherConstraints, getWellGroupTargetProducer, etc. Requires the companion opm-common PR that adds Schedule::updateSlaveGroupProductionTarget() and Schedule::updateSlaveGroupInjectionTarget().
f34b82f to
55ef6e9
Compare
Replace updateSlaveGroupTargetsInSchedule() (which created synthetic GCONPROD/GCONINJE) with markSlaveGroupsInSchedule() which sets lightweight boolean flags on slave groups. The flags make isProductionGroup()/isInjectionGroup() return true so the existing constraint enforcement gates pass. The actual target values are still provided by the master via hasMasterProductionTarget()/hasMasterInjectionTarget(). Requires the companion opm-common commit that adds the flag mechanism to Group and Schedule.
52541ec to
50cae0d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #6979. Depends on companion OPM/opm-common#5109
updateSlaveGroupTargetsInSchedule()toReservoirCouplingSlaveReportStepandReservoirCouplingSlave: after receiving constraints from the master, updates the slave's Schedule with synthetic GCONPROD/GCONINJE entries for both production and injection targetsBlackoilWellModel::beginTimeStep()on the first substep of each sync timestep, after receiving master constraints and updating control modesBackground
In reservoir coupling, slave groups may not have
GCONPRODorGCONINJEin the slave deck, rather the master provides targets at runtime. The existing constraint enforcement code hasisProductionGroup()/isInjectionGroup()gates at multiple locations that skip groups without deck-level group controls:checkGroupHigherConstraints(BlackoilWellModelGeneric.cpp)getWellGroupTargetProducer/getWellGroupTargetInjector(GroupStateHelper.cpp)updateGroupIndividualControl(BlackoilWellModelConstraints.cpp)Without synthetic group properties, slave wells run at their individual WCONPROD/WCONINJE limits unconstrained by the master's group target.
Companion PR
Schedule::updateSlaveGroupProductionTarget()andSchedule::updateSlaveGroupInjectionTarget()