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 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).
This commit passes the run's notion of its active phases, an object
of type Opm::Phases, through to the initialisation layer for the
saturation functions' scaling properties. In particular, this
allows us to discriminate between the phases and to not index into
tables or properties that would not be appropriate (e.g., maximum
gas saturation (SGU) in a simulation run without active gas).
Moreover, we now have enough information to know to look for SOF2 in
two-phase run using family II saturation function keywords. These
changes are necessary in order to extend Flow's support for the
FILLEPS output request to two-phase runs.
motivation: an upcoming parallel frontend to the field props manager.
templated functions cannot be virtualized, and thus having these exposed
would give a great chance of confusing the users in the downstream
code, where properties would be caught from the (potentially) empty
backend instead of from the frontend.
- The lowest level get method is called init_get() - this will unconditionally
create new keyword. The init_get() method is private.
- Introduced FieldDataManager which keeps track of data pointer and status.
- Refactored get( ) implementation