Support wecon item14 and16 - #7297
Draft
GitPaean wants to merge 5 commits into
Draft
Conversation
The minimum liquid rate limit was already checked, but it looked up the oil and water rates unconditionally. PhaseUsageInfo::canonicalToActivePhaseIdx throws for an inactive phase, so a run without one of those phases aborted with a std::logic_error instead of applying the limit. Sum only the phases the run actually has, and skip the check when it has neither. The same guard is applied to the minimum oil and gas rate limits (items 2 and 3), which could abort the same way, and item 14 is no longer reported as unsupported.
Convert the surface rates, or the potentials when item 10 is POTN, to a reservoir voidage rate with the same rate converter used for the voidage rates in the well state, and shut the well when it falls below the limit. Replaces the warning that the limit was not supported. The check is a further case in checkRateEconLimits(), so it inherits the POTN double-check against the actual rates and the zero group target guard that already apply to the surface rate limits.
The message only said that a rate economic limit was hit. Name the quantity that fell below its limit and print both values, so the log says which of the WECON limits closed the well. The layout now matches the ratio-limit workover messages, and the "at time ... (date = ...)" clause those and the CECON messages build inline moves to a shared helper.
to test the item 14 of WECON
Member
Author
|
jenkins build this please |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds full WECON minimum liquid and reservoir-fluid rate handling while improving economic-limit logging.
Changes:
- Handles active phases safely for minimum-rate checks.
- Converts surface rates or potentials to reservoir voidage for item 16.
- Improves closure and WTEST outcome messages.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
regressionTests.cmake |
Registers the WECON regression case. |
opm/simulators/wells/WellTest.hpp |
Defines rate-limit reporting interfaces. |
opm/simulators/wells/WellTest.cpp |
Implements rate checks and closure messages. |
opm/simulators/wells/WellInterfaceGeneric.hpp |
Extends well-test and voidage APIs. |
opm/simulators/wells/WellInterfaceGeneric.cpp |
Forwards closure-reason reporting. |
opm/simulators/wells/WellInterfaceFluidSystem.hpp |
Declares voidage-rate conversion. |
opm/simulators/wells/WellInterfaceFluidSystem.cpp |
Implements total reservoir voidage calculation. |
opm/simulators/wells/WellInterface_impl.hpp |
Reports WTEST reopening outcomes. |
opm/simulators/wells/EconomicLimitsMessage.hpp |
Centralizes closure timestamp formatting. |
opm/simulators/utils/PartiallySupportedFlowKeywords.cpp |
Marks WECON items 14 and 16 supported. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
GitPaean
force-pushed
the
support_wecon_item14_16
branch
from
August 8, 2026 22:35
74946f1 to
ba343cd
Compare
Member
Author
|
jenkins build this please |
GitPaean
force-pushed
the
support_wecon_item14_16
branch
3 times, most recently
from
August 9, 2026 22:09
008abc5 to
f298951
Compare
A test that does not re-open the well discarded the tested state without a word, so the log showed the well being tested and then nothing. Report the outcome from every exit -- unsolvable, inoperable, potentials that could not be computed, or a limit that closed the well again -- with the reason left to the debug log. The exception text of a failed potential calculation was also passed to a format string that had no placeholder for it, and was lost. A shut well is re-tested every interval, so that message stays a plain line, while the one-off re-opening is framed like the shut-in it reverses. Log output only, the simulation results are unchanged.
GitPaean
force-pushed
the
support_wecon_item14_16
branch
from
August 9, 2026 22:16
f298951 to
14daa3a
Compare
Member
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.
Supports items 14 (minimum liquid rate) and 16 (minimum reservoir fluid rate)
of the WECON keyword.
Item 14 was already checked, but it looked up the oil and water rates
unconditionally, so a run without one of those phases aborted with a
std::logic_error. The liquid rate is now summed over the active phases only,and the same guard is applied to the minimum oil and gas rate limits.
Item 16 converts the surface rates, or the potentials when item 10 is POTN, to
a reservoir voidage rate and shuts the well when it falls below the limit.
Two commits improve the logging: the closing message names the limit
that was violated, and a well test that does not re-open a well says so.
A regression test based on WECON-02.DATA from opm-tests is added.