Skip to content

Skip injectors in the auto-choke group THP solve - #7702

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

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

Conversation

@hakonhagland

Copy link
Copy Markdown
Contributor

The group THP of an automatic choke is found in computeWellGroupThp() by solving the wells of the group at trial THP values and comparing their summed rate with the group target. The loop over the wells in the lambda mismatch did not test the well type, so an injector in the group was asked for its production controls, and the time step ended with "Trying to get production data from an injector". The loop goes over the wells of one MPI rank, so in a parallel run only the ranks that own such an injector throw.

Skip injectors in the THP solve (commit 1)

  • In the lambda mismatch, skip wells that are injectors. The loop that applies the resulting THP already skips them. The choke regulates the production of the group, so an injector takes no part in the rate that is matched against the target.

Reproducer

The deck NETWORK_MODEL5_STDW_AUTOCHK.DATA of opm-tests, with three changes: the water injector G-3H moved into the automatic-choke group (its group in WELSPECS from G1 to B1), the WCONINJE keyword moved after NODEPROP, and G-3H on RATE control instead of GRUP. On master the run stops in time step 0 with the exception above. With this PR it runs on to time step 3 and stops there as the unchanged deck does on master, for an unrelated reason (cmode: NONE for group B1).

No deck test is added: no automatic-choke deck of opm-tests runs to its end on master today, so there is no regression test to extend.

Related PRs

Testing

  • ctest of opm-simulators, built against this branch and the companion opm-common PR: no failures beyond those that master shows with the same test data.

🤖 Generated with Claude Code

The group THP of an automatic choke is found by solving the wells of
the group at trial THP values and comparing their summed rate with
the group target.  The loop over the wells did not test the well
type, so an injector in the group was asked for its production
controls, and the time step ended with

    Trying to get production data from an injector

The loop goes over the wells of one MPI rank, so in a parallel run
only the ranks that own such an injector threw.

Skip injectors in that loop, as the loop that applies the resulting
THP already does.

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

Copy link
Copy Markdown
Contributor Author

jenkins build this please

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.

🟢 Approval recommended

No active review issues are reported for the change excluding injectors from the automatic-choke THP rate calculation.

No open issues 🎉

What changed in this PR

Fixes the automatic-choke group tubing-head pressure (THP) solve so groups containing injectors do not request production controls from those wells.

Changes:

  • Skips injectors when evaluating trial THP values and summing production rates against the group target.
  • Adds a comment explaining why injectors are excluded, matching the existing behavior when applying the resulting THP.
File Description
opm/​simulators/​wells/​BlackoilWellModelNetwork_impl.hpp Adds an injector guard to the automatic-choke rate-mismatch loop.

Review effort: Balanced

@GitPaean

Copy link
Copy Markdown
Member

Thanks for the review request. You pointed to some other open PRs related, let me evaluate the relations between them.

This branch has not been deployed

No deployments
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.

3 participants