The new parameter CheckSatfuncConsistency, command line option
--check-satfunc-consistency, allows users to opt into running the
checks. The option currently defaults to 'false' to reflect the
somewhat experimental nature of the new facility.
The new parameter --num-satfunc-consistency-sample-points allows the
user to select the maximum number of reported failures for each
individual consistency check. By default, the simulator will report
at most five failures for each check.
We check the unscaled curves if the run does not activate the
end-point scaling option and the scaled curves otherwise. At
present we're limited to reversible and non-directional saturation
functions for the drainage process, but those restrictions will be
lifted in due time.
This commit introduces a new top-level "manager" for all saturation
function consistency checks. This component associates collections
of saturation function curves with per-cell or per-region end-point
definitions and provides an interface to run all checks for all
interior entities (i.e., active cells) in a DUNE grid view. We form
one set of SatfuncConsistencyChecks objects for each
SatfuncCheckPointInterface<> object, thereby enabling running the
same set of consistency checks for both the unscaled, tabulated,
per-region saturation functions and the per-cell scaled saturation
functions. The latter is executed only if the run enables end-point
scaling for the saturation functions while the former is executed
only if the run does not enable end-point scaling.
At present we're limited to reversible and non-directional
saturation functions for the drainage process only, but those
restrictions will be lifted in due time.
As an aid to enabling the pertinent individual checks, we add a
private factory function which considers the run's active phases and
whether or not the run uses the alternative, three-point horizontal
scaling method ("SCALECRS = YES").
This commit introduces a set of callback functions, packaged in an
abstract base class SatfuncCheckPointInterface<Scalar>, for querying
and populating the saturation function end-points that get probed by
the individual consistency checks. Member function
SatfuncCheckPointInterface::pointID(cellIdx)
translates the active cell index 'cellIdx' into a point ID, assumed
to be unique on at least the current MPI rank. This function will
return 'nullopt' if the 'cellIdx' is not eligible for this
particular end-point. This typically happens for the region based
tabulated (unscaled) saturation function checks when the 'cellIdx'
happens to be in a region that's already been visited. Member
function
SatfuncCheckPointInterface::populateCheckPoint(cellIdx, endPoints)
fills in (assigns) all data members of the 'endPoints' structure
with the pertinent values for the active cell 'cellIdx'.
We implement this interface for the tabulated/unscaled end-points in
derived class UnscaledSatfuncCheckPoint<Scalar> and for the scaled
end-points in derived class ScaledSatfuncCheckPoint<Scalar>. The
former keeps track of which saturation regions have been visited
and short-circuits its 'pointID()' member function based on that
information while the latter uses an instance of the former in order
initialise the 'endPoints' structure in its populateCheckPoint()
member function.
In particular, put more of the common setup code into the test
fixture and use more powerful constructors for the EclipseState
object. While here, also switch to using the update_well_var() and
update_group_var() member functions on the SummaryState object where
appropriate since the resulting statements become slightly easier to
understand in isolation.
The earlier condition
0 <= SGU < 1
was not appropriate and would, for instance, fail the NORNE_ATW2013
test case in which SGU = 1 in the unscaled table for saturation
region 1. Revise the condition to be more in line with that of SWU,
i.e., as
0 < SGU <= 1
Pointy Hat: [at]bska
This commit introduces consistency checks for the scaled displacing
saturation in the three point horizontal scaling method
(SCALECRS=YES). These plug into the framework introduced in commit
c3939c544 (PR #5438). We implement the following two checks
- SGCR < 1-SOGCR-SWL < SGU
- SWCR < 1-SOWCR-SGL < SWU
which collectively guarantee a mobile displacing oil saturation in
the two phase gas/oil and oil/water systems.
this holds a key-value pair for a parameter with some utility functions
for comparison and printing.
use this to move Parameters::getLists to the translation unit
This commit introduces a set of consistency checks for the water
phase saturation functions. These plug into the framework
introduced in commit c3939c544 (PR #5438). We implement the
following three checks
- 0 <= SWL < 1
- 0 < SWU <= 1
- SWL <= SWCR < SWU
which collectively enable a non-negative oil saturation in the two
phase oil/water system.
This commit introduces a set of consistency checks for the gas phase
saturation functions. These plug into the framework introduced in
commit c3939c544 (PR #5438). We implement the following three checks
- 0 <= SGL < 1
- 0 <= SGU < 1
- SGL <= SGCR < SGU
which collectively enable a non-negative oil saturation in the two
phase gas/oil system.
This commit introduces a set of consistency checks for the oil phase
saturation functions. These plug into the framework introduced in
commit c3939c544 (PR #5438). We implement the following four checks
for the gas/oil two-phase system
- 0 <= SOGCR < 1
- SWL + SGU <= 1
- SOGCR < 1 - SWL - SGL
- SOGCR < 1 - SWL - SGCR
which all guarantee a non-negative (mobile) oil saturation in the
gas/oil system. Similarly, we implement the following four checks
for the oil/water two-phase system
- 0 <= SOWCR < 1
- SGL + SWU <= 1
- SOWCR < 1 - SWL - SGL
- SOWCR < 1 - SWCR - SGL
which provide the same guarantees as outlined above, but for the
oil/water system.
We add a base class, PhaseCheckBase<Scalar>, which provides a common
representation of the violated/critical predicates and implement the
specific checks as derived types of this base class.
This commit switches the parallel implemenation of function
Opm::gatherConvergenceReport() into using the general serialisation
framework (classes Opm::Serializer<> and Opm::Mpi::Packer). In
particular, we add serializeOp() functions to each of the types
- ConvergenceReport
- ConvergenceReport::ReservoirFailure
- ConvergenceReport::ReservoirConvergenceMetric
- ConvergenceReport::WellFailure
and defer the job of converting the objects between in-memory and
byte stream representations to Opm::Serializer<>. The new special
purpose class CollectConvReports inherits from the latter and uses
its pack() and unpack() member functions, along with its internal
m_buffer data member, to distribute each rank's convergence report
object to all ranks. We add this feature here, in a very narrowly
scoped use case, to enable testing and experimentation before we
consider adding this distribution mechanism as a general feature in
Opm::MpiSerializer.