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.
This commit ensures that the following set of vectors are stored/updated in
Summary::add_timestep()
for all active wells and well groups (including FIELD):
- Production rates for Oil, Water, Gas, and Reservoir Volume
(i.e., (O|W|G|V)PR).
- Cumulative production totals for Oil, Water, Gas, and
Reservoir Volume (i.e., (O|W|G|V)PT).
- Injection rates for Water and Gas (i.e., (W|G)IR).
- Cumulative injection totals for Water and Gas ((W|G)IT).
- Producing Water Cut (WCT).
- Producing Gas/Oil ratio (GOR).
We additionally capture the well bottom-hole pressure (WBHP) for all
wells that are active at the pertinent simulation step (sim_step).
Add an accessor function
const SummaryState& Summary::get_restart_vectors() const
that returns the 'prev_state' which contains these summary vectors
and add a set of unit tests to exercise the new interface.
Decrement timestep where necessary to avoid well post-configuration.
Consider the following:
.
.
.
WELLSPECS
'W1' 'G1' ... /
TSTEP
2*1 /
WELLSPECS
'W1' 'G2' .../
TSTEP
2*1 /
In that case the parent group of W1 is changed after two timesteps. At timestep
two the Group parent will indicate G2, while the GOPT:G2 at timestep two should
be reported for what has progressed up until timestep two.
Efficiency factors are multiplied when specified at multiple levels of
the well/group hierarchy.
The factors are included as follows:
* Well Rate - No efficiency factor
* Well Total - WEFAC & GEFAC (whole hierarchy)
* Group Rate - WEFAC & GEFAC (only subgroups)
* Group Total - WEFAC & GEFAC (whole hierarchy)
* Field Rate - WEFAC & GEFAC (whole hierarchy)
* Field Total - WEFAC & GEFAC (whole hierarchy)
* Region Rate - WEFAC & GEFAC (whole hierarchy)
* Region Total - WEFAC & GEFAC (whole hierarchy)
* Completion Rate - No efficiency factor
* Completion Total - WEFAC & GEFAC (whole hierarchy)
Authored by Sveinung Rundhovde and Lars Petter Hauge
Applying efficiency factor to region keywords requires a list of wells
having completions inside the region.
Authored by Sveinung Rundhovde and Lars Petter Hauge