Output CNV Histogram to INFOITER File
This PR 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 { \mathrm{CNV}_p } \le \text{strict CNV tolerance}$
- 1: $\max_p { \mathrm{CNV}_p } \in (\text{strict}, \text{relaxed}]$
- 2: $\max_p { \mathrm{CNV}_p } > \text{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.
I am creating this PR in draft mode for two reasons
- I'm not convinced that the added complexity and memory cost is justified by the new information
- This PR depends on, and contains, the earlier PR #5337.
I will keep the PR in a draft state pending additional testing and general agreement that it is a good idea to do this at all before marking it ready for review.
jenkins build this please
As an example of what the .INFOITER file looks like following this change, here's an excerpt from a run on a model with 123,346 active cells:
ReportStep TimeStep Time Iteration CnvPvFracConv CnvPvFracRelax CnvPvFracUnconv CnvCellCntConv CnvCellCntRelax CnvCellCntUnconv MB_Oil CNV_Oil MB_Water CNV_Water MB_Gas CNV_Gas WellStatus
0 0 0.0000e+00 0 1.0000e+00 0.0000e+00 0.0000e+00 123346 0 0 2.2826e-18 1.3506e-04 9.5042e-19 2.4890e-09 1.0193e-18 1.1896e-04 CONV
0 0 0.0000e+00 1 1.0000e+00 0.0000e+00 0.0000e+00 123346 0 0 1.6937e-10 3.7719e-06 4.7823e-11 2.3484e-06 2.2024e-10 2.7589e-06 CONV
0 0 0.0000e+00 2 1.0000e+00 0.0000e+00 0.0000e+00 123346 0 0 1.5512e-08 2.3701e-05 1.9598e-12 1.8911e-06 8.2474e-09 1.2615e-05 CONV
1 0 1.0000e+00 0 1.0000e+00 0.0000e+00 0.0000e+00 123346 0 0 1.1809e-19 1.5808e-05 5.9408e-18 1.8912e-06 4.6028e-20 8.4172e-06 CONV
[...]
8 0 2.8000e+02 0 9.9987e-01 1.2746e-04 0.0000e+00 123333 13 0 2.6156e-05 4.5857e-02 1.3279e-06 4.3841e-02 5.9606e-06 1.3648e-01 CONV
8 0 2.8000e+02 1 9.9917e-01 8.2956e-04 2.8898e-06 123224 120 2 1.8881e-07 9.8740e+00 2.1523e-08 2.7970e-01 2.4261e-07 3.8504e+00 CONV
8 0 2.8000e+02 2 1.0000e+00 3.7309e-06 0.0000e+00 123344 2 0 1.9174e-07 1.6706e-02 3.0947e-08 9.0722e-03 3.3914e-09 8.2581e-03 CONV
8 0 2.8000e+02 3 9.9998e-01 7.1144e-06 8.7431e-06 123342 2 2 1.3183e-08 1.0736e+00 2.5728e-10 5.6936e-03 4.1159e-09 2.1522e+01 CONV
8 0 2.8000e+02 4 9.9999e-01 8.7431e-06 0.0000e+00 123344 2 0 7.2738e-08 9.9769e-03 2.1936e-09 1.1767e-04 6.0659e-08 6.6867e-02 CONV
Thanks a lot for looking at this. I'll pick this up when I'm back in the office in the second week of August.
I've pushed an update here that I think is an okay start so I'll mark this PR as "ready for review" and run a build check.
jenkins build this please
jenkins build this please
jenkins build this please
jenkins build this please
jenkins build this please
jenkins build this please
Looks good to me.
Much appreciated. That said, since this PR conflicts with the BlackoilModel.hpp parts of #5157 and there's no particular rush to get it in, I'm going to reset it back to draft state pending the resolution of #5157.
I believe the dust has settled sufficiently from #5157 that I'd like to resubmit this work for review. I'll run a build check just to be sure that I haven't accidentally introduced a regression.
jenkins build this please
I believe the dust has settled sufficiently from #5157 that I'd like to resubmit this work for review. I'll run a build check just to be sure that I haven't accidentally introduced a regression.
There were no regressions so I'll mark this as "ready for review" now.
jenkins build this please
All green, issues adressed, and approved. Merging!