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.
This commit switches to outputting all relative permeability values
less than TOLCRIT (default 1.0E-6) as zero when writing saturation
function tables to the INIT file's TAB vector. Doing so also
nominally affects the relative permeability function derivatives for
small values of Kr.
Update the SPE1-based unit test since this has very low Kr values
for water and some of the nodes now fall below the 1.0e-6 threshold.
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.
This commit internalises the TOLCRIT keyword into the EclipseState
for subsequent use in determining critical saturations when
processing saturation function keywords such as SGOF and SOF3.
Specifically, we add a new type
Opm::SatFuncControls
that, at present, stores only the TOLCRIT data item (defaulted to
the keyword's default value). Client code can then retrieve the
value by calling the
SatFuncControls::minimumRelpermMobilityThreshold()
member function.
Add a new data member of this type to the Opm::Runspec class so that
we complete the chain from EclipseState, and a few simple unit tests
to exercise the expected functionality.