Some models will use lower-case strings to input the direction of
penetration, e.g., 'x' or 'z'. This commit extends our direction
parser to support such strings.
Changed (BASE_SIM.DATA, BASE_SIM_THPRES.DATA, RESTART_SIM.DATA), testblackoilstate3.DATA and testrft.DATA since they affect the tests in test_Restart.cpp, test_restartwellinfo.cpp and test_RFT.cpp respectively.
This commit adds a new helper function
getCompletionNumberFromGlobalConnectionIndex
which returns an optional<int> containing the completion number of
the connection with the associated global cell index, or nullopt if
no such connection exists. We then reimplement the CxL summary
keywords in terms of this function to handle connections being added
dynamically during the simulation. The connections at the end of
the simulation, from which we configure all connection-related
summary nodes, might not accurately reflect the connections existing
at all times during the simulation.
This commit adds a new in/out parameter, scalingApplicable, to the
applyWellProdIndexScaling functions. This parameter carries time
(history) information on whether or not a particular connection is
eligible for WELPI-based CTF scaling. Entries are marked ineligible
(false) and left untouched on subsequent calls if the corresponding
connection is ineligible at any point--e.g., as a result of new
COMPDAT entries.
This ability enables implementing WELPI CTF scaling at the Schedule
level which is the only level that has sufficient time information
to identify all the unique Well/WellConnections object combinations.
This commit adds logic implementing the static parts of the WELPI
keyword. We internalize the keyword data, record appropriate events
and provide hooks for dynamically adjusting the per-connection
transmissibility factor (Connection::CF()) when those events occur.
We implement support at three levels
- WellConnections:
Add new public member functions prepareWellPIScaling and
applyWellPIScaling which, respectively, creates bookkeeping
data to track those connections which are subject to CF scaling
and actually applies that CF scaling.
- Well:
Add new data member 'productivity_index' which holds the 'WELPI'
data value from the input keyword (converted to SI) and new
member functions updateWellProductivityIndex and
applyWellProdIndexScaling. The first follows the 'update*'
protocol (return 'true' if state change) and assigns new values
to 'productivity_index' while the second uses the stored PI
value and a dynamically calculated effective PI value to rescale
the pertinent connections' CF value.
- Schedule:
Add new member function handleWELPI which internalizes the WELPI
keyword and its data and records WELPI events for subsequent
playback in the simulator layer.
Also add a set of unit tests to exercise the new features at all
levels.
In particular, include standard library headers as needed, fix
function declarations (operator<<() for Well::WellProductionProperties),
and make a few helper functions 'static' to avoid warnings of the
form "no previous declaration for".
For the Schedule's keyword handlers, also switch to storing member
function pointers directly instead of std::function objects. This
saves space and does not incur function pointer conversions. Use
std::invoke to call those handlers to avoid having to spell out the
'->*' operator.
This commit passes the run's notion of its active phases, an object
of type Opm::Phases, through to the initialisation layer for the
saturation functions' scaling properties. In particular, this
allows us to discriminate between the phases and to not index into
tables or properties that would not be appropriate (e.g., maximum
gas saturation (SGU) in a simulation run without active gas).
Moreover, we now have enough information to know to look for SOF2 in
two-phase run using family II saturation function keywords. These
changes are necessary in order to extend Flow's support for the
FILLEPS output request to two-phase runs.
This commit adds a new type (Connection::CTFKind), and new data
member of this type (Connection::m_ctfkin, initialised in the
constructor) that tracks the source of the connection's
transmissibility factor (Connection::m_CF). The primary user of
this information is the restart file writing code which needs to
know if the connection transmissbility factor is assigned from the
input file (e.g., directly from the COMPDAT keyword) or if the value
is calculated from other information.
Add a convenience predicate function,
Connection::ctfAssignedFromInput
that returns true if the connection transmissibility factor source
indeed is a direct assignment in the COMPDAT keyword.
Update Connection constructor callers accordingly.
calculated and stored as private data members in EclipseGrid.
The API for the class is unchanged except for some minor changes for exportACTNUM, exportZCORN and exportCOORD.
These changes have triggered some very few modifications in the opm-grid and opm-simulators repo.
For the output code the total number of connections entered in the input deck is
required, we therefor keep track of the number of connections filtered out due
to inactive cells - and return the total in WellConnection::inputSize()