so the FlowProblemComp can output ecl style output.
it duplicates the OutputBlackoilModule and GenericOutputBlackoilModule
for compositional related output for now.
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.
This commit includes the fraction of pore-volume whose CNV targets
are violated as a new per-iteration quantity in the INFOITER file
(--output-extra-convergence-info=iteration), with the column header
"CnvErrPvFrac". We collect the values which are already calculated
in
BlackoilModel<>::getReservoirConvergence()
and store these as a pair of numerator and denominator in the
ConvergenceReport class. Note that we need both the numerator and
the denominator in order to aggregate contributions from multiple
ranks.
While here, also make a few more objects 'const' and calculate
column widths directly instead of the maximum number of characters
in writeConvergenceHeader().
The step size might still need to be smaller than suggested to not
simulate beyond the end of the current report step. To ensure this we
now use AdaptiveTimeSimulationTimer::provideTimeStepEstimate which
will limit it and also make sure that subsequent time steps will not
get to small either.
This makes them available for use in other places. The function
std::string to_string(const ConvergenceReport::WellFailure& wf) is new,
but uses the format already established.