This commit completes the set of unit tests for the segment-related
summary vectors
SOFR, SGFR, SWFR, and SPR
by adding a test (Restart_Segment/Write_Read) that serializes the
result of multiple Summary::add_timestep() calls for SOFR_TEST.DATA
and reads that summary file back in.
This commit makes the helper function find_wells() aware of summary
vectors defined on segments. Previously, this helper function would
return an empty list of wells in the case of ECL_SMSPEC_SEGMENT_VAR
whence all segment-related summary vectors would be zero at all
times.
Add a small set of unit tests to verify that we transmit the known
(small) set of segment-related summary vectors (SOFR, SGFR, SWFR,
SPR) to the internal "prev_state" with correct output units and sign
convention (producing flow rates--reservoir to well--positive).
This commit extends Opm::data::Wells to include a set of output
vectors for well segment information. At present we define output
structures for segment rates and segment pressures. The immediate
use case is properly assigning restart vector items RSEG[8 .. 11],
but these same values are also usable for outputting the summary
vectors SPR, SOFR, SGFR, and SWFR. Future expansion is likely.
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
The main content of this commit is that the loading of restart files is
based on map of keys passed in from calling scope. This way the
selection of keywords to save and load is fully under control of calling
scope, but in addition there are many small refactorings:
- The EclipseWriter class and implementation has been renamed
EclipseIO.
- The loading and saving of restart files has been moved to file and
namespace RestartIO, which contains two loose functions load( ) and
save( ).
- The Summary() and RFT( ) data get their own copies of the data::Cells
vector.
- Removed some abstractions and wrrappers around C / ert
datastructures. Using ecl_file_view when loading restart files,
instead of bare ecl_file. Simplified opening of unified restart
files.
- Removed the ability to save restart keywords in double precision.
Field efficiency: (OIP(initial) - OIP(now)) / OIP(initial). The initial
OIP is cached, and FOIP is reused for OIP(now). Adds the
operator-(double,quantity) to make the formula obvious from the FOE
function.
The data exchanged in data::Well::Completions is now a vector, more
closely matching the disk format and the order exposed by the simulator.
Zero'd wells and complations are still written for shut wells, or wells
the simulator does not provide any information for; however, all
non-closed wells (according to the schedule) will be restored. The
completions are written and restored in the same order as CompletionSet
from parser.
Change the structure used to populate OPM_XWEL to use a plain map of
data::Wells objects rather than dumping a series of vectors to
data::Wells. Tests are added for serialising and restoring wells.