Skip to content

Skip GCONSALE sales rate limits for groups without gas injectors - #7729

Draft
vkip wants to merge 2 commits into
OPM:masterfrom
vkip:gconsale-no-gas-injectors
Draft

vkip wants to merge 2 commits into
OPM:masterfrom
vkip:gconsale-no-gas-injectors

Conversation

@vkip

@vkip vkip commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Sales gas control works by reinjecting the surplus gas not required for sale, which requires gas injectors subordinate to the group. When a group with GCONSALE has no open gas injectors in its subtree, there is no reinjection to adjust. Previously the maximum sales rate procedure (e.g. RATE) would still put the group on GRAT control with a target derived from the sales target, overriding the group's own production controls. The sales gas rate limits are now not enforced in this case, and a warning is issued when a limit is violated.

Adds the regression test 9_3G_GAS_EXPORT_NO_GINJ_STW (OPM/opm-tests#1741)

Also (after review comments): OPM/opm-tests#1742

Sales gas control works by reinjecting the surplus gas not required for
sale, which requires gas injectors subordinate to the group. When a
group with GCONSALE has no open gas injectors in its subtree, there is
no reinjection to adjust. Previously the maximum sales rate procedure
(e.g. RATE) would still put the group on GRAT control with a target
derived from the sales target, overriding the group's own production
controls. The sales gas rate limits are now not enforced in this case,
and a warning is issued when a limit is violated.

Adds the regression test 9_3G_GAS_EXPORT_NO_GINJ_STW.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vkip
vkip requested a balanced review from Copilot November 23, 2026 13:29
@vkip vkip added the manual:irrelevant This PR is a minor fix and should not appear in the manual label Nov 23, 2026

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.

🟡 Changes recommended

GCONSALE handling can leave stale sales-derived production limits after the last gas injector shuts and incorrectly skip enforcement when open injectors exist only in a coupled slave.

2 open issues
What changed in this PR

This PR aims to prevent GCONSALE sales limits from overriding group production controls when no open gas injectors are available for reinjection.

Changes:

  • Adds a recursive check for schedule-open gas injectors in a group’s subtree.
  • Skips sales-limit enforcement when none are found, warning if a limit is violated.
  • Registers the no-gas-injector regression case supplied by OPM/opm-tests#1741.
File Description
regressionTests.cmake Registers 9_3G_GAS_EXPORT_NO_GINJ_STW.
opm/​simulators/​wells/​BlackoilWellModelGeneric.hpp Declares the gas-injector availability helper.
opm/​simulators/​wells/​BlackoilWellModelGeneric.cpp Implements the recursive check, enforcement bypass, and warning.

Review effort: Balanced

When a group loses its last gas injector after a sales gas action has
placed it on GRAT control, the cached sales gas target and the GRAT
control would otherwise remain and keep production sales-limited. The
cached target is now cleared, and a group on GRAT without a gas rate
limit of its own falls back to its own production control.

The wells of a reservoir coupling slave are not part of the master's
schedule, so a reservoir coupling master group is assumed to have gas
injectors available. This keeps sales gas control active for coupled
groups.

Adds the regression test 9_3H_GINJ_SHUT_GAS_MAX_EXPORT_STW, where the
last gas injector is shut after the sales gas action.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vkip

vkip commented Nov 23, 2026

Copy link
Copy Markdown
Member Author

jenkins build this opm-tests=1742 please

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.

2 participants