This commit extends function RestartIO::load() to retrieve most of
the well restart data (aggregate flow rates per well connection,
or per well) from the standard ECL restart vectors IWEL, XWEL, ICON,
and XCON. We still prefer the dedicated OPM_* variants if
available, but this commit brings us closer to being able to retire
OPM_XWEL.
While here, also add WELLDIMS to FIRST_SIM_THPRES to restore the
STORE_THPRES unit test.
Well info at correct step for save & load RESTART
Retrieve number of wells and completions at the beginning of the
simulated step. Otherwise a well introduced at the same time step as the
report will be included - even though there doesn't exist any simulated
data yet.
This issue would trigger a throw if WRFTPLT was added at the same time
step as a well is introduced in the schedule section.
Removed one DATES item in FIRST_SIM.DATA. The
EclipseReadWriteWellStateData in test_Restart compared state at T1,
which did not include any well data as it was. No other tests were
affected.
Added new implementation of serialize_ICON
The new function has been added to the file WriteRestartHelpers, and
intended to take over for the local function 'serialize_ICON' in
`restartIO.cpp` when `restartIO::save()` is to be updated. The purpose
of the new implementation is to be compatible with Eclipse.
Handle wildcard in group keywords
Added function getGroups(pattern) to allow records with wildcard.
Included the functionality for GCONPROD, GCONINJE and GEFAC - currently
the only group keywords that should accept wildcards.
Add key string to RestartKey
Pass dimension information for extra fields in restart
Verify that the extra container has THPRES
- The calculation of well connection transmissibility CF and effective
permeability is calculated.
- The Connection objects are immutable; should never be updated.
- The properties of the Connection class are just plain properties, have
removed getter methods and the use of Value<double>.
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 adds new helper classes,
Opm::RestartIO::Helpers::CharArrayNullTerm<NChar>
Opm::RestartIO::Helpers::WindowedArray<T>
Opm::RestartIO::Helpers::WindowedMatrix<T>
the first of which represents a nul-terminated character string of
'NChar' user data (total array size is NChar + 1). Mainly intended
for representing Fortran-compatible characters arrays--especially
for ZWEL and similar restart vectors (e.g., ZGRP).
The second two simplify working with subsets of large linear arrays,
particularly those that represent N items per well, group, or
segment. The WindowedArray is a linear array of windows (N items
per window) packed into a std::vector<T> and the WindowedMatrix
additionally imposes a Row-by-Colum structure which is useful for
the case of N windows (each of size K) for each of M entities (e.g.,
K items for each of N connections for each of M wells).