This commit switches the custom diagnostic message formatting based
on std::ostringstream to using a formatter implemented in terms of
the fmt::format function. This removes the custom indentation from
earlier. Note that we output at most four records to the console,
including a message limit notification if applicable, and that this
limit is currently not adjustable by the user. We do on the other
hand output all flipped records to the .PRT file.
New Example Diagnostic Output:
* To the Console
Warning: Non-Monotonic Oil Formation Volume Factor Detected in Keyword PVTO, PVTNUM=1
In /path/to/PVTO.INCL line 6
Record 9: FVF 1.234 at RS 123.456 is not greater than FVF 2.345 at RS 121.212
Record 10: FVF 1.233 at RS 123.457 is not greater than FVF 1.234 at RS 123.456
Record 11: FVF 1.233 at RS 123.460 is not greater than FVF 1.233 at RS 123.457
Report limit reached, see PRT-file for additional records.
* In the PRT File (Unlimited Records)
Warning: Non-Monotonic Oil Formation Volume Factor Detected in Keyword PVTO, PVTNUM=1
In /path/to/PVTO.INCL line 6
Record 9: FVF 1.234 at RS 123.456 is not greater than FVF 2.345 at RS 121.212
Record 10: FVF 1.233 at RS 123.457 is not greater than FVF 1.234 at RS 123.456
Record 11: FVF 1.233 at RS 123.460 is not greater than FVF 1.233 at RS 123.457
Record 12: FVF 1.233 at RS 123.461 is not greater than FVF 1.233 at RS 123.460
Record 13: FVF 1.233 at RS 123.470 is not greater than FVF 1.233 at RS 123.461
The length of each 'Record' line is 78 characters as of this change
(assuming METRIC conventions, FIELD conventions not tested). The
length of the 'In ...' line depends on the number of characters in
the full filepath.
This commit introduces a way of diagnosing an uncommon but possible
issue in the PVTO table. If the formation volume factor (BO) in the
saturated table (record 1 of each subtable) does not increase
monotonically as a function of the dissolved gas/oil ratio (RS),
then there is a risk that the simulation run will have convergence
problems.
We add a special purpose member function
PvtoTable::nonMonotonicSaturatedFVF
which checks for this condition and returns a vector records for
which the condition is true. The new member function
TableManager::checkPVTOMonotonicity
then collates these records into a formatted string which is printed
to the console and the .PRT file.
Example Diagnostic Output:
Warning: Non-Monotonic Oil Formation Volume Factor Detected
* PVTO [PVTNUM = 1]
Record 9: FVF 1.23 at RS 123 is not greater than FVF 2.34 at RS 120
Record 10: FVF 1.22 at RS 125 is not greater than FVF 1.23 at RS 123
Record 11: FVF 1.21 at RS 125 is not greater than FVF 1.22 at RS 125
This commit adds support for recognizing a small subset of the
summary quantities that are reported at the node level of an
extended network--especially the 'GPR' keyword.
Briefly, we add a new 'Node' config category and a processor for
this category which knows about the distinction between nodes and
groups. It uses member function ExtNetwork::node_names() to produce
configuration nodes whose named entity is the node rather than a
group. Deriving this list of node names across all timesteps is
potentially expensive, so perform this operation at most once and
pass the result into the processor from the SummaryConfig
constructor.
Add a simple unit test for demonstration purposes.
This commit adds a new member function
ExtNetwork::node_names() const
which collects the names (std::string) of all nodes in a network.
The immediate use case is creating summary config nodes for network
level quantities specified without explicit lists of nodes, e.g.,
GPR
/
Add a simple unit test for demonstration.
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.
We need this in opm-simulators where we need to query the
FieldProperties associated with the TranCalculator (e.g. TRANX0). Previously,
this were listed by FieldPropertiesManager::keys() but calling
get_int_field_data with the keyword would raise an exception resulting
in a deadlock.
This commit allows passing true as an additional argument to prevent
this (it gets passed to all functions called). This allows for running
with edited transmissibilities in parallel.
This is needed for communication in the simulator. Previously,
that just used the data (std::vector), but the TranCaclulator
also needs the value_status to correctly. Hence this needs
to be communicated, too.
Previously modifications were applied directly to the field
properties. Unfortunately, for unset TRANX this resulted in
modifying 1.0 even if the simulator is calculating
transmissibilities itself. This was one of the reasons
why we got wrong results (others are in the simulator code).
Now these operations recorded in a calculator which can later be
applied to compressed arrays using apply_tran.
This commit introduces a new helper structure, RawFunctionValues,
which collects unscaled saturation function values that are needed
for vertical scaling of saturation functions using keywords such as
KRO, KRORG, KRGR, PCW
and their hysteretic and directional counterparts. We also
introduce a new helper function, getRawFunctionValues, which
extracts those values from the function tables in TableManager.
Add a set of unit tests to exercise the new feature.
This commit centralises the way we incorporate damping factors (item
10 of the GUIDERAT keyword) into the calculation of group/well guide
rates. In particular, we create a structure that manages both the
current and the previous (damped) guiderate values and ensures that
the new guiderate value is
GR_p = f*GR_p' + (1 - f)*GR_p^{n-1}
with GR_p' denoting the "raw" guiderate value calculated directly
from potential rates at the current timelevel (n). GR_p^{n-1} is
the damped-and previously used-guiderate value from timelevel n-1.
Finally 'f' denotes the damping factor. This is the same approach
used previously, but with some small changes to exclude zero-valued
guiderates.
We furthermore remove one of the early returns in GuideRate::get().
There is no need to return the nominated phase's guiderate value if
the model phase rate is very low and doing so produces incorrect
water guiderates for the OPL5 well in the MOD4_GRP test case.