This commit switches the region set tag matching algorithm to using
unique prefixes. This enables the parser to recognise that the
summary vector
ROPR_UNI
should match up with the user defined region set 'FIPUNIT'. In the
current master sources, the above summary vector would produce a
diagnostic message saying that the region set 'FIPUNI' (without the
final 'T') does not exist.
We add a prefix-to-canonical region set name translation table to
the FieldProps class and funnel all FIP-like requests through this
translation table. In the case of non-unique prefixes-e.g., FIPUNIT
and FIPUNIX, we currently elect to have the last keyword entered in
the simulation model "win". This behaviour may be altered in the
future if deemed appropriate/necessary.
Existence of certain EPS keywords (SWL, SGCR, others) is sufficient
to activate the end-point scaling option. The deck does not *need*
to have the ENDSCALE keyword in these cases, but it is recommended
that ENDSCALE nevertheless be used.
On the other hand, certain other keywords do require the presence of
ENDSCALE so record this in "requires" clauses.
The main content of this commit is that for keywords with multiple TRAN
modifications like
MULTIPLY
TRANX 1.50 1 10 1 10 1 1 /
TRANX 2.50 1 10 1 10 2 2 /
/
The different operations are collapes to one entry in tran calculator.
This commit also explicitly throws a std::logic_error() exception if TRAN
manipulations are attempted with the OPERATE keyword or one of the region
keywords ADDREG, MULTIREG, EQUALREG or OPERATER.
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 makes the 'critical_*()' helper functions aware of the
TOLCRIT feature. We now consider a phase to be immobile at a one
saturation value if its relative permeability at that saturation is
less than or equal to TOLCRIT. TOLCRIT mirrors E100's default value
of 1.0e-6 unless otherwise specified in the PROPS section.
All table scanners are implemented in terms of the expression
std::lower_bound(begin, end, tolcrit, predicate)
which ultimately returns the first position in [begin, end) for
which
predicate(*iter, tolcrit)
is false. Using predicate = std::greater<>{} thus determines the
first position in the sequence for which the elements is less than
or equal to 'tolcrit'. Similarly, a predicate equivalent to '<='
returns the first position for which the elements is strictly
greater than 'tolcrit'.
Add a set of unit tests to demonstrate and exercise the new feature.
This is a pure API change. The TOLCRIT value is not yet used as
part of determining the critical saturations.
While here, also add a unit test for getRawTableEndPoints() and
update the existing sat-func property unit tests to explicitly pass
TOLCRIT = 0 in preparation of adding actual TOLCRIT support.
Exercises the initializers for SW{L,CR,U}, SO{W,G}CR, SG{L,CR,U}, as
well as the function values KRW, KRWR, KRG, KRGR, KRO, KRORW, KRORG
and capillary pressure function values PCW and PCG.
Example data from region one (1) of
opm-tests/model1/include/sattab_basemod1.sattab
Example phrased both as family I (S*OF) and as family II (S*FN, SOF3).