Skip to content

Calculate ROEW From External Per-Region Contributions - #5280

Draft
bska wants to merge 2 commits into
OPM:masterfrom
bska:roew-no-copt
Draft

Calculate ROEW From External Per-Region Contributions#5280
bska wants to merge 2 commits into
OPM:masterfrom
bska:roew-no-copt

Conversation

@bska

@bska bska commented Aug 6, 2026

Copy link
Copy Markdown
Member

This PR switches the ROEW calculation away from using the ad-hoc mechanism of defining additional COPT vectors and mapping these to region contributions using the RegionCache. Instead, we rely on client code to provide a dedicated ConnOPT region variable (#5279, OPM/opm-simulators#7293) defined for all regions in all region sets and use that value, combined with the existing "initial in-place" container, to infer the ROEW recovery factor per region and region set.

The practical benefit of this change is that users no longer see the COPT vectors that were added only as a means of calculating ROEW and which were not requested in the run's SUMMARY section.

@bska bska added manual:bugfix This PR is a bug fix and should be noted in the manual manual:enhancement This is an enhancement/improvent that needs to be documented in the manual labels Aug 6, 2026
@bska

bska commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

I'm creating this PR in draft mode for two reasons:

  1. It depends on, and contains, the earlier PR Populate Region Variable Mapping From Summary Config #5279
  2. It depends on the simulator populating the special purpose ConnOPT region level summary variable in Track Per-Region Cumulative Oil Production From Wells opm-simulators#7293.

I will keep the PR in a draft state until both requirements have been satisfied and this PR is ready for review and merging.

@bska
bska force-pushed the roew-no-copt branch 13 times, most recently from 33f392b to 7c89cdc Compare August 14, 2026 09:16
@bska
bska force-pushed the roew-no-copt branch 5 times, most recently from deb479a to 83ceec1 Compare August 17, 2026 10:10
bska added 2 commits August 17, 2026 16:26
This commit adds a special purpose helper function,

    populateRegVarMapping()

that, based on the run's configured summary vectors, populates an
object of type data::RegionVariableMapping.

In this initial implementation, we define a variable named

    ConnOPT

if any of the *OEW* summary vectors are configured in the run's
SUMMARY section.  Those OEW vectors require tracking the per-region
cumulative oil production from wells and it's easier to have a
dedicated variable for this than to introduce extra "COPT" summary
vectors that are visible to the user through the result set's
summary files (e.g., .SMSPEC and .UNSMRY).
This commit switches the ROEW calculation away from using the ad-hoc
mechanism of defining additional "COPT" vectors and mapping these to
region contributions using the RegionCache.  Instead, we rely on
client code to provide a dedicated "ConnOPT" region variable defined
for all regions in all region sets and use that value, combined with
the existing "initial in-place" container, to infer the ROEW
recovery factor per region and region set.

The practical benefit of this change is that users no longer see the
COPT vectors that were added only as a means of calculating ROEW and
which were not requested in the run's SUMMARY section.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual:bugfix This PR is a bug fix and should be noted in the manual manual:enhancement This is an enhancement/improvent that needs to be documented in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant