Support Report Generation With Integer Controls
The "integer control" format support in RPTSCHED influenced only the restart-like processing in RSTConfig and had no counterpart in the RPTConfig class. This commit corrects this omission and restores PRT file report generation for the older style RPTSCHED keyword. As an example, the NORNE_ATW2013 example model now gets injection, production, cumulative and WELSPECS reports whereas this was missing before.
We don't expect that there are many new cases using this format, but this commit does at ensure that we don't remove useful reports for some existing simulation models.
To this end, extract the restart-like integer control handling to a new helper class, RPTKeywordNormalisation, which consumes both mnemonics and integer controls and generates a map<string,int> of strictly mnemonic-like values. This class uses a callback function to process integer controls and we extract the RPTSCHED format handling to another pair of helper components
SimpleRPTIntegerControlsRptschedKeywordNormalisation
The former is constructed from an ordered list of mnemonic strings and assigns the mnemonic map given a vector of integer control values. The latter uses the RPTKeywordNormalisation and an instance of the SimpleRPTIntegerControls constructed from RPTSCHED's curated list extracted from RSTConfig.cpp.
We then use these components to form the RPTConfig instance in the RPTSCHED keyword handler while preserving the single argument RPTConfig constructor for use in the context of RPTSOL handling. This constructor does currently not support integer controls.
I'm creating this PR in draft mode because I would like some additional testing, including a few unit tests, before it's ready for merging. We nevertheless get outputs like the WELSPECS report in NORNE_ATW2013 now, even with the integer controls in that model.
Report step 7/247 at day 143/3312, date = 29-Mar-1998
**************************************************************************
WELSPECS AT 0.00 DAYS * * FLOW
REPORT 0 31 DEC 2007 * * RUN AT 12:41 ON 12 SEP 2016
**************************************************************************
WELL SPECIFICATION DATA
-----------------------
--------------------------------------------------------------------------------------------------------------------------
: WELL : GROUP : WELLHEAD : B.H.REF : PREF- : DRAINAGE : GAS : SHUT-IN : CROSS : PVT : WELL : FIP : WELL :
: NAME : NAME : LOCATION : DEPTH : ERRED : RADIUS : INFL : INSTRCT : FLOW : TAB : DENS : REG : D-FACTOR 1 :
: : : ( I, J ) : METRES : PHASE : METRES : EQUN : : ABLTY : : CALC : : DAY/SM3 :
--------------------------------------------------------------------------------------------------------------------------
: B-4H : B1-DUMMY : 10, 32 : 2533.3 : OIL : P.EQUIV.R: STD : SHUT : YES : 1 : SEG : 0 : 0 :
--------------------------------------------------------------------------------------------------------------------------
1: The WELL D-FACTOR is not implemented - and the report will always show the default value 0.
WELL CONNECTION DATA
--------------------
---------------------------------------------------------------------------------------------------------------------------------------
: WELL : GRID : CMPL: CENTRE : OPEN: SAT : CONNECTION : INT : K H : SKIN : CONNECTION : SATURATION SCALING DATA :
: NAME : BLOCK : NO# : DEPTH : SHUT: TAB : FACTOR* : DIAM : VALUE : FACTOR : D-FACTOR 1 :SWMIN SWMAX SGMIN SGMAX 2:
: : : : METRES : : : CPM3/D/B : METRES : MD.METRE: : DAY/SM3 : :
---------------------------------------------------------------------------------------------------------------------------------------
: B-4H : 10, 32, 1 : 1 : 2533.3 : OPEN: 1 : 118.457000 :0.216000: 0.000000:0.000000: 0 : :
: B-4H : 10, 32, 2 : 2 : 2545.2 : OPEN: 1 : 88.058000 :0.216000: 0.000000:0.000000: 0 : :
: B-4H : 10, 32, 3 : 3 : 2557.7 : OPEN: 1 : 6.493000 :0.216000: 0.000000:0.000000: 0 : :
: B-4H : 10, 32, 5 : 4 : 2574.2 : OPEN: 1 : 37.039000 :0.216000: 0.000000:0.000000: 0 : :
: B-4H : 10, 32, 6 : 5 : 2579.7 : OPEN: 1 : 37.182000 :0.216000: 0.000000:0.000000: 0 : :
: B-4H : 10, 32, 7 : 6 : 2585.5 : OPEN: 1 : 27.449000 :0.216000: 0.000000:0.000000: 0 : :
: B-4H : 10, 32, 8 : 7 : 2591.8 : OPEN: 1 : 27.553000 :0.216000: 0.000000:0.000000: 0 : :
: B-4H : 10, 32, 9 : 8 : 2596.6 : OPEN: 1 : 55.934000 :0.216000: 0.000000:0.000000: 0 : :
: B-4H : 10, 32, 10 : 9 : 2607.1 : OPEN: 1 : 343.826000 :0.216000: 0.000000:0.000000: 0 : :
: B-4H : 9, 32, 13 : 10 : 2620.6 : OPEN: 1 : 247.048000 :0.216000: 0.000000:0.000000: 0 : :
: B-4H : 9, 32, 14 : 11 : 2633.3 : OPEN: 1 : 200.684000 :0.216000: 0.000000:0.000000: 0 : :
: B-4H : 9, 32, 15 : 12 : 2646.1 : OPEN: 1 : 60.756000 :0.216000: 0.000000:0.000000: 0 : :
: B-4H : 9, 32, 16 : 13 : 2657.6 : OPEN: 1 : 131.035000 :0.216000: 0.000000:0.000000: 0 : :
: B-4H : 9, 32, 17 : 14 : 2663.7 : OPEN: 1 : 1.215000 :0.216000: 0.000000:0.000000: 0 : :
: B-4H : 9, 32, 18 : 15 : 2666.5 : OPEN: 1 : 122.230000 :0.216000: 0.000000:0.000000: 0 : :
: B-4H : 9, 32, 19 : 16 : 2678.6 : OPEN: 1 : 50.908000 :0.216000: 0.000000:0.000000: 0 : :
: B-4H : 9, 32, 20 : 17 : 2701.2 : OPEN: 1 : 84.765000 :0.216000: 0.000000:0.000000: 0 : :
: B-4H : 9, 31, 20 : 18 : 2703.3 : OPEN: 1 : 65.987000 :0.216000: 0.000000:0.000000: 0 : :
: B-4H : 9, 31, 21 : 19 : 2738.1 : OPEN: 1 : 40.421000 :0.216000: 0.000000:0.000000: 0 : :
: B-4H : 9, 31, 22 : 20 : 2774.6 : OPEN: 1 : 440.439000 :0.216000: 0.000000:0.000000: 0 : :
---------------------------------------------------------------------------------------------------------------------------------------
1: The well connection D-FACTOR is not implemented in opm and the report will always show 0.
2: The saturation scaling data has not been implemented in the report and will always be blank.
jenkins build this please
I'm creating this PR in draft mode because I would like some additional testing, including a few unit tests, before it's ready for merging.
I have added some unit tests here and I now think that this work is ready for review. I'll mark it as such and I'll run a build check.
jenkins build this please
Looks good to me
Thanks. I think I'll hold off on merging this until #4545 is in, however, as there could be a merge conflict in RSTConfig.cpp and given that this PR fundamentally alters some aspects of that processing it's better that the smaller changes go in first.
Resetting this back to draft mode pending #4545.
Resetting this back to draft mode pending #4545.
PR #4545 was merged into the master branch and I've rebased this on top of the current master. I also added a bit more documentation to certain new classes, so I welcome a second review of the new bits.
jenkins build this please
i did a second pass of the doxy, did not find anything.
i did a second pass of the doxy, did not find anything.
Cool&thanks! I'm tracking down the failed unit test at the moment and I'll update the PR once I've found what causes the problem.
jenkins build this please
PR approved and build check is green. I'll merge into master.