This commit adds support for reporting the simulator's guiderate
values at the well and group levels to the output layer through the
wellData() and groupData() member functions. We add several new
member functions that collectively assemble the values and assign
them to objects of type Opm::data::GuideRateValue for subsequent
output to the summary and restart files.
In particular
getGuideRateValues(const Well&) const
getGuideRateValues(const Group&) const
retrieve the guiderate values for all phases for those individual
wells and groups for which the guideRate_ data member defines a
value. The most complicated function of this commit is
calculateAllGroupGuideRates
which aggregates those individual contributions from the well (leaf)
level up to the root of the group tree (the FIELD group). This
process uses an ancillary array ('up') to keep track of the parent
groups of all wells and all groups, and to ensure that we only visit
each parent group once (sort+unique on subsets of the 'up' array).
We do not currently support outputting guiderates for reservoir
voidage volume (GuideRateModel::Target::RES).
This commit creates a single implementation function for deriving
'RateVector' objects that go into the guiderate calculation. In
particular, we now use the same implementation function for both the
well and the group levels. While here, also expose the group level
derivation as a free function and reimplement the FractionCalculator
version in terms of this free function. Finally, remove the
previous attempt at such a free function taking only the group name.
This function no longer exists in isolation and is only accessible
through the FractionCalculator.
This is in preparation of reporting guiderate values to the output
layer (summary and restart files).
This commit adds two new predicate member functions
bool hasWellRates(well_name) const
bool hasProductionGroupRates(group_name) const
that enable querying the existence of the corresponding flow rate
values for wells and group production.
This is in preparation of reporting the simulator's guiderate values
to the summary and restart files.
Remove left parenthesis character left over from transitioning to
the type-based parameter system. The '(' produced a build failure
which only manifested in debug builds.
Thanks to Håkon Hægland for bringing the issue to our attention.
Especially, grab a copy of the "oldControl" to avoid reading through
a reference for which the underlying object is reset in
setCurrent*GroupControl()
This in turn avoids generating confusing diagnostic messages of the
form
Switching production control mode for group G from FLD to FLD