The records are norally terminated on the first unquoted '/', but for the UDQ
and ACTIONX keywords the data sections of a keyword contain mathematical
expressions which can contain '/' literals. This commit adds a per-keyword
ability to terminate the records on the last '/' instead of the first '/'.
1) Start of new class EclFile which includes one anonomus namespace with routines for reading binary eclipse format files
2) One very basic test of EclFile constructor included in test_EclFile.cpp
- testing that file exist, throwing an exception if not.
Mostly removing leading 'tab' characters, splitting long lines and
realigning '=' characters where appropriate. Also make a few more
objects 'const'.
Finally, don't copy large objects (e.g., the Schedule) when we only
need to read from it.
In particular, defer unit conversion to the member function
RestartValue::convertFromSI()
and detect presence of multisegment wells using std::any_of(). We
don't need to know the exact number of MS wells to activate segment
output.
This commit refines our understanding of IWEL items relating to well
constraints. In particular Item 8 is the well's active control mode
as determined by the simulator from dynamic state variables. On the
other hand, Item 16 is the constraint that is requested in the
simulation run input for prediction wells (keywords WCONINJE,
WCONPROD) while Item 50 is the requested constraint for wells
controlled by observed rates (WCONINJH, WCONHIST).
Special Note: This commit outputs the requested control mode to Item
8 and will need an update later once the simulator becomes aware of
the distinction.
This commit adds support for saving and restoring cumulative
production quantities like WOPTH, GWPTH, FGPTH, GGITH, and WWITH.
While here, also cater to the case of wells alternating between
injecting gas and injecting water. This means that we'll save and
restore cumulative gas/water injection for all injectors,
irrespective of current injecting phase.
Update unit tests accordingly.
This commit adds an intermediate layer to the save/restore code that
will translate between Flow's hysteresis parameters and a compatible
subset of ECLIPSE's hysteresis model parameters when creating a
stricly ECLIPSE compatible restart file. In particular we save and
restore Flow's KRNSW_OW and PCSWM_OW parameters in terms of the
SOMAX parameter using the relations
KRNSW_OW = 1 - SOMAX
PCSWM_OW = 1 - SOMAX
Similarly, we save and restore Flow's KRNSW_GO and PCSWM_GO
parameters in terms of ECLIPSE's SGMAX parameter using the relations
KRNSW_GO = 1 - SGMAX
PCSWM_GO = 1 - SGMAX
This does implicitly assume that KRNSW_OW = PCSWM_OW and that
KRNSW_GO = PCSWM_GO and will likely need refinement later. On the
other hand, the current relations are sufficient for the Norne
model.