In particular
* Tag a single argument constructor as 'explicit',
* Remove an unused private function
* Fix mismatched tags (struct vs. class) in forward declaration
* Return 'false' in an impossible updateHyst() case
While here, also use a real UnitSystem object instead of creating
a METRIC system just to infer unit strings.
This initial commit changes the Summary class's API for consuming
block-averaged well level pressure values (summary keywords WBPn).
The former approach was intended to consume a collection of source
values--pressures, densities, and pore-volumes--and then to defer
calculation of the WBPn summary vectors to the Summary class.
This commit introduces a 'WellBlockAvgPress' container class which
holds precomputed WBPn results and the intention is to move the
calculation to the simulator side for greater parallelism.
This commit adds a new parameter, interreg_flows, to the eval()
member function of class Opm::Summary. This is in preparation of
adding summary file output of inter-region flow rates and
cumulatives-e.g., the ROFT summary vectors.
- command line option --enable-esmry, default = false
- complete re-write of esmry file for every time step
Updating of class ESmry
- remove automatic loading from ESMRY
This commit adds a level of indirection to the existing group-level
data (active controls and guiderates), and adds a new 'NodeData'
level to the 'data::' protocol for transporting values from the
simulator to the output layer.
Update all call sites and users accordingly.
This commit adds a level of indirection to the current per-group
summary quantities that is directly assigned by the simulator. In
particular, introduce a new structure named
GroupData
that contains a 'GroupConstraints' object and make the per-group
values into 'map<string, GroupData>' rather than the current
'map<string, GroupConstraints>'. This is in preparation of adding
support for reporting group-level production/injection guiderates
(Gx[IP]GR) to the summary file.
Update tests and APIs accordingly.
This commit replaces the existing system for writing summary and
specification (SMSPEC) files with a new implementation based on
class EclOutput. We package the evaluators of individual parameters
in a set of classes determined by the parameter's category which
each implement a virtual 'update()' function. This update function
ultimately writes new values into a SummaryState object.
Add a factory-like system for instantiating the appropriate class
depending on a SummaryNode's 'category()'. Also, add a helper class
for managing the parameters that a configured in a simulation
model's SUMMARY section in order to distinguish these from those
parameters that are merely needed for restart purposes. The summary
class's 'eval()' function then becomes a loop over the evaluators
for parameters in SUMMARY followed by a loop over the evaluators for
restart vectors.
We reimplement the 'internal_store()' function in terms of an
std::vector of a helper structure 'MiniStep' which holds a ministep
ID (contiguous counter started at zero), a report step ID, and all
the evaluated parameters of this ministep. The final write function
then consists of outputting those ministep structures that have
accumulated since the previous call to write(). If a simulation
does not call write at all, then this will accumulate all parameters
for all ministeps throughout the simulation history.
We create the SMSPEC file at most once, and write to it at most each
report step. We create the summary file once (if unified) or at
each report step (if separate).
calculated and stored as private data members in EclipseGrid.
The API for the class is unchanged except for some minor changes for exportACTNUM, exportZCORN and exportCOORD.
These changes have triggered some very few modifications in the opm-grid and opm-simulators repo.
This commit introduces a new mutating operation on Summary objects,
Summary::reset_cumulative_quantities(const SummaryState&)
which overwrites the values of cumulative ("total") summary
quantities with those of the input argument. The only *intended*
use case is reinitialising cumulative quantities in the case of
simulation restart, but other uses may exist.
Add a test case to exercise the new interface.
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.
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.
Will use one common container for both the solution data required for the
restart, e.g. PRESSURE and SWAT and also the auxillary data like KRG and
FIP which is intended as extra information in the restart file, or
alternatively the summary file.
- The outputwriter will now take a a separate EclipseGrid instance as
input argument, it is assumed that calling scope has already made sure
ACTNUM and ZCORN are correct.
- All active/inactive cell mappings are based on the grid argument, the
naked int* with global / active cell mappings has been completely
removed.
A rewritten Summary.cpp with some minor header modifications. Synposis
of the new implementation:
* Uses unordered_map< string, std::function > for dispatch, instead of
multiple functions and a switch
* Some poor man's function composition support has been added
(privately) to avoid a lot of reptition in the post processing.
* Functions assume they work over lists of wells instead of single wells
being special cased - this means groups of well etc. can share
implementation with single wells and field keywords.
* Unsupported keywords are not written in the Summary file.
Furthermore, some comments on special cases and overall approach and
a generally more declarative implementation. This change is invisible to
downstream developers. Users will obviously see no more garbage
keywords.
The to_si/from_si functions were moved into UnitSystem which now manages
table lookup for clients, rather than having to store the raw
conversion tables.
To stay consistent with the interface exposed by the other
eclipse-writer components, the summary facilities takes its time elapsed
since simulation start, not on a per-step basis.
By precomputing and storing the keyword-to-enum mapping, accessing and
writing to a node overhead changes from log(N) to constant, and should
behave better w.r.t. cache and memory access.