Repository navigation
NODEPROP: leave injectors of an auto-choke group alone - #5577
Open
hakonhagland wants to merge 1 commit into
Open
hakonhagland wants to merge 1 commit into
hakonhagland wants to merge 1 commit into
Conversation
When NODEPROP makes a well group an automatic choke, the handler puts every well of the group on THP control and takes it out of group control. It did so through Well::updateProduction(), which turns an injector into a producer and drops its injection BHP limit. An injector that was given its controls before NODEPROP was therefore simulated as a producer on THP control, typically ending in "Nonexistent VFP table 0 referenced". The choke regulates the production of the group, so skip injectors in that loop. Add a unit test with a producer and an injector in an auto-choke group. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Human review is needed to identify the opm-simulators companion referenced only as #XXXX and confirm coordinated integration against the failing reproducer.
No open issues 🎉
What changed in this PR
This PR fixes NODEPROP handling so automatic-choke settings apply only to producers, preserving existing injector controls within the same well group.
Changes:
- Skip injectors when applying THP control and disabling group control for automatic-choke groups.
- Add a regression test covering a mixed producer/injector group, checking that producer behavior remains unchanged and injector controls are preserved.
| File | Description |
|---|---|
tests/parser/NetworkTests.cpp |
Adds regression coverage for injector preservation in an automatic-choke group. |
opm/input/eclipse/Schedule/Network/NetworkKeywordHandlers.cpp |
Excludes injectors from automatic-choke production-control updates. |
Review effort: Balanced
Contributor
Author
|
jenkins build this please |
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.
When NODEPROP makes a well group an automatic choke,
handleNODEPROP()puts every well of the group on THP control and takes it out of group control. It does this throughWell::updateProduction(), which also turns an injector into a producer and drops its injection BHP limit. An injector that has its controls before NODEPROP is therefore simulated as a producer on THP control, and the run typically stops in the first time step with "Nonexistent VFP table 0 referenced".The choke regulates the production of the group, so an injector in the group should keep its controls. Nothing in the description of NODEPROP forbids an injector in such a group.
Skip injectors in the NODEPROP loop (commit 1)
handleNODEPROP(): skip wells that are injectors when applying the automatic-choke settings. Producers are treated as before.AUTOCHOKE_GROUP_WITH_INJECTORintests/parser/NetworkTests.cpp: a producer and a water injector in an automatic-choke group, both given their controls before NODEPROP. It checks that the producer is on THP control and not available for group control, and that the injector is still an injector on itsRATEcontrol, with its BHP limit, and available for group control.Reproducer
The deck
NETWORK_MODEL5_STDW_AUTOCHK.DATAof opm-tests, with the water injector G-3H moved into the automatic-choke group: change its group in WELSPECS fromG1toB1. Its WCONINJE comes before NODEPROP, so on master G-3H becomes a producer, and the run stops in time step 0 with "Nonexistent VFP table 0 referenced".With this PR, G-3H stays an injector. The simulator then needs the companion PR OPM/opm-simulators#7702, which skips injectors in the THP solve of the automatic choke; without it, the run stops with "Trying to get production data from an injector" instead. With both, the deck behaves as the unchanged deck. (The unchanged deck itself stops in time step 3 on master, for an unrelated reason that OPM/opm-simulators#7549 addresses.)
Not covered: an injector whose controls come after NODEPROP
If NODEPROP comes before the well's first WCONINJE, the well has no controls yet and counts as a producer, so NODEPROP still takes it out of group control. A later WCONINJE with control mode
GRUPfor it is then rejected with "Tried to set invalid control: GRUP" (here). At NODEPROP such a well cannot be told from a producer that gets its controls later, which must stay out of group control. The remedy in the deck is a WGRUPCON record for the well after NODEPROP, which makes it available for group control again. This PR leaves that case as it is.Testing
NetworkTestspasses; the new test fails without the fix.🤖 Generated with Claude Code