Skip to content

NODEPROP: leave injectors of an auto-choke group alone - #5577

Open
hakonhagland wants to merge 1 commit into
OPM:masterfrom
hakonhagland:nodeprop_autochoke_injector
Open

hakonhagland wants to merge 1 commit into
OPM:masterfrom
hakonhagland:nodeprop_autochoke_injector

Conversation

@hakonhagland

@hakonhagland hakonhagland commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

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 through Well::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.
  • New unit test AUTOCHOKE_GROUP_WITH_INJECTOR in tests/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 its RATE control, with its BHP limit, and available for group control.

Reproducer

The deck NETWORK_MODEL5_STDW_AUTOCHK.DATA of opm-tests, with the water injector G-3H moved into the automatic-choke group: change its group in WELSPECS from G1 to B1. 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 GRUP for 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

  • NetworkTests passes; the new test fails without the fix.
  • ctest of opm-common: all tests pass. ctest of opm-simulators, built against this branch and the companion PR: no failures beyond those that master shows with the same test data.

🤖 Generated with Claude Code

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>
@hakonhagland hakonhagland added the manual:irrelevant This PR is a minor fix and should not appear in the manual label Nov 18, 2026
@hakonhagland
hakonhagland requested a balanced review from Copilot November 18, 2026 07:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

@hakonhagland

Copy link
Copy Markdown
Contributor Author

jenkins build this please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual:irrelevant This PR is a minor fix and should not appear in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants