Report CNV Violation Pore-Volume Fraction to INFOITER
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().
As an example of the change, here is an excerpt from NORNE_ATW2013.INFOITER before and after this PR:
Current Master Sources
ReportStep TimeStep Time Iteration MB_Oil CNV_Oil MB_Water CNV_Water MB_Gas CNV_Gas WellStatus
0 0 0.0000e+00 0 8.6812e-06 1.2137e-01 7.0255e-09 1.1041e-02 3.2716e-06 1.2271e-01 CONV
0 0 0.0000e+00 1 3.1930e-06 1.0159e-02 5.1132e-08 1.6903e-02 1.1278e-06 6.1010e-01 CONV
0 0 0.0000e+00 2 2.5577e-06 1.5817e-03 1.1540e-07 5.3284e-04 1.1792e-06 3.7545e-03 CONV
0 1 1.0000e+00 0 2.8599e-05 1.1144e-02 1.3639e-07 4.9506e-03 1.1054e-05 1.5034e-02 CONV
0 1 1.0000e+00 1 2.5662e-06 4.6834e-02 2.9369e-07 7.0983e-03 1.4220e-06 2.8133e+00 CONV
0 1 1.0000e+00 2 5.3861e-07 2.2467e-02 2.9175e-07 5.2370e-04 1.7157e-07 5.2463e-02 CONV
0 1 1.0000e+00 3 8.0533e-09 5.9972e-03 9.8634e-08 2.3884e-04 4.4027e-07 3.7778e-02 CONV
0 1 1.0000e+00 4 1.9335e-07 1.2323e-03 8.9402e-09 1.5618e-04 1.3471e-07 4.5565e-03 CONV
0 2 4.0000e+00 0 3.4937e-05 2.5046e-02 3.6711e-08 1.7544e-02 1.3224e-05 1.2642e-02 CONV
This PR
ReportStep TimeStep Time CnvErrPvFrac Iteration MB_Oil CNV_Oil MB_Water CNV_Water MB_Gas CNV_Gas WellStatus
0 0 0.0000e+00 2.9158e-04 0 8.6812e-06 1.2137e-01 7.0255e-09 1.1041e-02 3.2716e-06 1.2271e-01 CONV
0 0 0.0000e+00 9.3513e-04 1 3.1930e-06 1.0159e-02 5.1132e-08 1.6903e-02 1.1278e-06 6.1010e-01 CONV
0 0 0.0000e+00 0.0000e+00 2 2.5577e-06 1.5817e-03 1.1540e-07 5.3284e-04 1.1792e-06 3.7545e-03 CONV
0 1 1.0000e+00 1.4926e-04 0 2.8599e-05 1.1144e-02 1.3639e-07 4.9506e-03 1.1054e-05 1.5034e-02 CONV
0 1 1.0000e+00 3.3672e-03 1 2.5662e-06 4.6834e-02 2.9369e-07 7.0983e-03 1.4220e-06 2.8133e+00 CONV
0 1 1.0000e+00 5.7769e-04 2 5.3861e-07 2.2467e-02 2.9175e-07 5.2370e-04 1.7157e-07 5.2463e-02 CONV
0 1 1.0000e+00 7.0193e-05 3 8.0533e-09 5.9972e-03 9.8634e-08 2.3884e-04 4.4027e-07 3.7778e-02 CONV
0 1 1.0000e+00 0.0000e+00 4 1.9335e-07 1.2323e-03 8.9402e-09 1.5618e-04 1.3471e-07 4.5565e-03 CONV
0 2 4.0000e+00 2.1297e-04 0 3.4937e-05 2.5046e-02 3.6711e-08 1.7544e-02 1.3224e-05 1.2642e-02 CONV
jenkins build this please
jenkins build this please
I think it would be easier for existing scripts etc. if we add the new column at the end instead of the beginning. Otherwise this is fine! Would like to add some more detailed output though: fraction of pore volume with each of {CNV > ToleranceCnvRelaxed, CNV > ToleranceCnv, [possibly more detailed as well to build a histogram]} as well as number of grid cells for each. That can be done in a followup though.
I think it would be easier for existing scripts etc. if we add the new column at the end instead of the beginning.
Maybe, but in that case I'm inclined to label those scripts "poorly written". I added it here because it's in a simple sequence of columns which will always be present whereas the other columns depend on the active phases and whether or not wells are active in the model.
fraction of pore volume with each of {CNV > ToleranceCnvRelaxed, CNV > ToleranceCnv, [possibly more detailed as well to build a histogram]} as well as number of grid cells for each.
Good idea
That can be done in a followup though.
Sure.
The prerequisite PR #5307 was merged into the master branch. I'm marking this as "ready for review" once again and I'm running a build check.
jenkins build this please
jenkins build this please