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
If the user chooses a specific number of NLDD domains, there is no
need to compute the default number of domains based on a specific
target number of cells per domain. Defer the, potentially costly,
calculation to when we know we need it.
While here, also split/rejoin a couple of long lines.
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 introduces helper functions for each individual part of
a convergence report record in the INFOITER file. In particular, we
create helpers for
- Time related columns (report step, time step, time &c)
- CNV pore-volume histogram columns
- Reservoir convergence metrics (CNV and MB values per phase)
- Well convergence metrics
This makes the body of the main loop in writeConvergenceRequest()
slightly easier to read and means that we can apply some additional
logic to the CNV pore-volume histograms if the number of values does
not match the expected 3 per type. In that case we output sentinel
values (e.g., NaN and -1) to signify that the corresponding pieces
of information are unavailable.
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.
This commit tracks the number of cells and their associate fraction
of the model's "eligible" pore volume (total pore volume in
numerical aquifers subtracted from the model's total pore volume) in
three distinct categories as a function of the non-linear iteration
number:
- 0: MAX_p { CNV_p } <= strict CNV tolerance
- 1: MAX_p { CNV_p } \in (strict, relaxed]
- 2: MAX_p { CNV_p } > relaxed CNV tolerance
We then output these cell counts and pore volume fractions as new
items in the INFOITER file to enable more targeted analysis of the
non-linear convergence behaviour.
To this end, introduce a type alias CnvPvSplit in the
ConvergenceReport and aggregate these across the MPI ranks before we
collect them in the ConvergenceReport objects.
While here, also reduce the amount of repeated logic in
gatherConvergenceReport.cpp through a few local lambdas.
BILU0: optionally instantiate for float
BISAI: optionally instantiate for float
CPR: optionally instantiate for float
CPRCreation: optionally instantiate for float
Misc: optionally instantiate for float