Skip to content

Reservoir coupling: Populate satellite data for summary output#6979

Merged
bska merged 2 commits intoOPM:masterfrom
hakonhagland:fix_summary2
Apr 14, 2026
Merged

Reservoir coupling: Populate satellite data for summary output#6979
bska merged 2 commits intoOPM:masterfrom
hakonhagland:fix_summary2

Conversation

@hakonhagland
Copy link
Copy Markdown
Contributor

@hakonhagland hakonhagland commented Apr 10, 2026

Add collectGroupRatesForSummary() to ReservoirCouplingMasterReportStep and ReservoirCouplingMaster, collecting slave production/injection rates into a ReservoirCouplingGroupRates struct

  • Pass RC rates through DynamicSimulatorState to Summary::eval() via an optional rcGroupRates parameter on evalSummary()
  • Call from EclWriter::evalSummaryState() before summary evaluation so that all rate-based summary vectors (FOPR, GOPR, FGOR, FWCT, etc.) are computed correctly for the master process

Background

In reservoir coupling, the master model has no wells, all production and injection happens in the slave models. Previously, all rate-based summary vectors (FOPR, GOPR, etc.) were zero in the master's summary output because opm-common's Summary.cpp computes them by summing well rates, and the master has no wells.

The companion opm-common PR adds a ReservoirCouplingGroupRates struct to DynamicSimulatorState and extends the satellite_rate function in Summary.cpp to check for RC group rates alongside the existing GSatProd/GSATINJE sources. The accum_groups tree-walking logic accumulates the rates through the group hierarchy for both group-level (GOPR) and field-level (FOPR) vectors.

This PR populates the ReservoirCouplingGroupRates struct from the slave data received via MPI and passes it through the evalSummary() call chain.

@hakonhagland hakonhagland added the manual:irrelevant This PR is a minor fix and should not appear in the manual label Apr 10, 2026
@hakonhagland hakonhagland marked this pull request as draft April 10, 2026 07:26
@hakonhagland
Copy link
Copy Markdown
Contributor Author

Putting this in draft mode until #6978 has been merged

Add updateScheduleSatelliteData() to ReservoirCouplingMaster
and ReservoirCouplingMasterReportStep.  Called from
EclWriter::evalSummaryState() before summary evaluation.

This populates the Schedule's GSatProd and
GroupSatelliteInjection with slave production/injection rates
received via MPI.  The existing satellite_rate machinery in
opm-common's Summary.cpp then automatically computes all
rate-based summary vectors (FOPR, GOPR, FGOR, FWCT, etc.)
correctly for the master model.

Requires the companion opm-common PR that adds
Schedule::updateSatelliteProduction/Injection().
@hakonhagland hakonhagland marked this pull request as ready for review April 10, 2026 08:40
@hakonhagland
Copy link
Copy Markdown
Contributor Author

Running jenkins build from OPM/opm-common#5101

Replace Schedule mutation with DynamicSimulatorState for
passing reservoir coupling group rates to Summary::eval().

Add collectGroupRatesForSummary() on ReservoirCouplingMaster
and ReservoirCouplingMasterReportStep, returning a
ReservoirCouplingGroupRates struct.  EclWriter populates this
and passes it through evalSummary() to DynamicSimulatorState.

Remove updateScheduleSatelliteData() which mutated the
Schedule's GSatProd/GroupSatelliteInjection at runtime.

Requires the companion opm-common commit that adds
ReservoirCouplingGroupRates to DynamicSimulatorState and
modifies satellite_rate() in Summary.cpp to use it.
@hakonhagland
Copy link
Copy Markdown
Contributor Author

jenkins build this serial please

1 similar comment
@bska
Copy link
Copy Markdown
Member

bska commented Apr 14, 2026

jenkins build this serial please

Copy link
Copy Markdown
Member

@bska bska left a comment

Choose a reason for hiding this comment

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

Thanks a lot. This looks good to me and I'll merge into master.

@bska bska merged commit 98282b3 into OPM:master Apr 14, 2026
2 checks passed
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