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.
In particular, fix a few instances of "signed vs. unsigned"
comparisons, one "no previous declaration for", and include the
<algorithm> header for std::find().
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.