- Change SummaryState::add() -> SummaryState::update(), the
SummaryState::update() method is semantically aware of totals.
- Add an internal variable to the SummaryState class to keep track of the
elapsed simulation time.
This commit removes the restriction that cumulative totals are not
output in the case of creating OPM Extended Restart files. There
was a reason why we did not do this when the new restart facility
was introduced, but that reason no longer applies.
This commit refines our understanding of IWEL items relating to well
constraints. In particular Item 8 is the well's active control mode
as determined by the simulator from dynamic state variables. On the
other hand, Item 16 is the constraint that is requested in the
simulation run input for prediction wells (keywords WCONINJE,
WCONPROD) while Item 50 is the requested constraint for wells
controlled by observed rates (WCONINJH, WCONHIST).
Special Note: This commit outputs the requested control mode to Item
8 and will need an update later once the simulator becomes aware of
the distinction.
This commit adds support for saving and restoring cumulative
production quantities like WOPTH, GWPTH, FGPTH, GGITH, and WWITH.
While here, also cater to the case of wells alternating between
injecting gas and injecting water. This means that we'll save and
restore cumulative gas/water injection for all injectors,
irrespective of current injecting phase.
Update unit tests accordingly.
This commit adds a new class that aggregates the *WEL vectors for
restart purposes. Using the data sources
- Simulation run's "Schedule" object
- Simulation run's "UnitSystem" object
- Current simulation step ("sim_step")
- WellRates object from simulator at the end of sim_step
- SummaryState object from Summary class at the end of sim_step
this class will fill in the (presently) known elements of the IWEL
(integers), SWEL (Real/float), XWEL (double precision), and ZWEL
arrays for output to a restart file. We distinguish contributions
of data sources extracted directly from the simulation deck from
those computed dynamically by the simulator--mostly to separate
concerns and to enable independent testing. If this introduces too
much computational overhead in actual simulation runs we can fuse
the member functions
AggregateWellData::captureDeclaredWellData()
AggregateWellData::captureDynamicWellData()
to reduce the number of loops over active wells.
The overall structure of this facility is that we have a single
templated function, wellLoop(), that calls user-defined "operations"
on each active well. Each of these operations in turn define a
subset of one of the {I,S,X,Z}WEL arrays pertaining to the
particular well. We furthermore put implementation functions into
namespaces according to the pertinent arrays.
Many thanks to my Equinor collaborators.