This commit introduces a new helper function
void GridProperty<>::setElement(i, val, dflt)
that handles paired assignments to 'm_data' and 'm_defaulted'[%].
This simplifies the bookkeeping and implementation of the various
assignment and value operations.
While here, also add a unit test to demonstrate expected behaviour
of the m_defaulted flag. The only really questionable setting is
what happens if the deck applies a relative operator (e.g., ADD or
MULTIPLY) to a value that would otherwise be defaulted. In the
current implementation the m_defaulted flag will remain set in this
case, but it arguably should be switched to unset (false).
[%]: Suggested by [at]akva2
This commit adds a comment block to the new
setPostProcessor
member function, explaining the reasoning behind its excistence and
remarking on the fact that the ability to replace the post-processor
is essentially a hack. The hack suggests that we need to rethink
our handling of (3D) grid properties.
This commit calls the SOGCR post-processor hook if the simulation
run uses SGOF. In this case we need to subtract (scaled) connate
water saturations from defaulted SOGCR values.
This revealed a problem in one of the unit tests which used the
incorrect critical oil saturation due to a missing SGOF record.
This commit adds a new member function
Eclipse3DProperties::adjustSOGCRwithSWL
which mutates the SupportedKeywordInformation of the various *SOGCR*
keywords created by makeSupportedDoubleKeywords(). Specifically,
adjust*() installs new post-processors for the critical oil-in-gas
saturations--post-processors that subtract the (scaled) connate
water saturation from the defaulted SOGCR. This is only applicable
if the simulation run uses Family I (SWOF/SGOF) saturation function
keywords, because the SGOF table is implicitly defined in terms of
the connate water saturation.
This is a special purpose hook that is mainly intended to add a
post-processor after the keyword information is established only if
certain conditions are satisfied (e.g., if certain keyword relations
like the run using 'SGOF' tables hold).
Immediate use case is to install a post-processor for SOGCR to
subtract the scaled connate water saturation from defaulted SOGCR
values if the simulation run uses family I (SWOF/SGOF) saturation
function descriptions.
This commit alters the post-processor API to accept a vector<bool>
of defaulted flags (true if defaulted, false if explicitly
assigned). This, in turn, enables running the post-processor only
on defaulted (or assigned) property values.
Update existing post-processor implementation to honour the new
calling conventions.
This commit adds a new data member (GridProperty<T>::m_defaulted)
that keeps track of whether or not a particular data item has been
implicitly assigned from the input deck. GridProperty::setDataItem
assigns 'false', while the constructor initialises 'm_defaulted' to
true for all Cartesian cells.
The main objective is to be able to apply a post processor only to
those cells for which the input deck does not supply an explicit
value.
WELOPEN and WCON* can open well closed due to various reasons, physical
or economic.
If a well is shut with WELOPEN and WCON*, we do not try to re-open it
through WTEST.
This is necessary to support the table-based gas mobility reduction model.
In order to extend support to the function-based model the FOAMFSC-related
things have been kept.
- Use const reference to the dynamic state in handleWFOAM() and handleWPOLYMER().
- Throw if trying to set foam or polymer injection properties on a production well.
- Update some tests that failed due to the point above.