This commit introduces support for the RESV control mode of
prediction (WCONPROD) and history-matching (WCONHIST) alike. The
implementation uses class SurfaceToReservoirVoidage<> to compute
coefficients that convert component rates at surface conditions
(i.e., the primary degrees of freedom in the well residual) to phase
rates at reservoir condition. The resulting coefficients can be
entered directly into system matrix of the linearised residual.
Note: We abuse the "distr" mechanism of struct WellControls to store
the conversion coefficients. This may require refactorisation and
clarification at a later stage. In the meantime, it allows for
transparent assembly of well equations--irrespective of surface- or
reservoir (voidage) rates.
Note: We do not yet support injectors controlled by total reservoir
voidage rate--either in history-matching (WCONINJH) or
prediction-scenario capacity.
This commit changes the API of class SimulatorFullyImplicitBlackoil<>
in order to support wells controlled by (total) reservoir voidage
volume rates. Specifically, we switch to holding a mutable Wells
object (backed by a std::shared_ptr<>) in class Impl rather than a
reference to a WellsManager. This allows dynamically updating rate
distributions and targets of individual well controls. That, in
turn, is a prerequisite to supporting ECL-style "RESV" control
modes--be it in prediction or history matching capacity.
While in the process of API changes, also prepare for the second
stage of "WCONHIST/RESV" support: Accept a ScheduleConstPtr that
holds the input deck's notion of the history matching vs. prediction
controls. We need to distinguish the two in order to support the
exact semantics of "WCONHIST/RESV".
Update SimFIBO<> clients accordingly.
This was copy-pasted into the class at its inception (a94f1921) and
never used thereafter. If we need it we can bring it back in
modified form at a later stage.
The solver (class FullyImplicitBlackoilSolver<>) gained the ability
to do control mode switching/updating in commit 4a22c56 at which
point using WellsManager::conditionsMet() ceased to be useful. This
is a preparatory step towards adding support for RESV-type control
modes.
If we need this type of behaviour in the Simulator*, we can bring it
back (in modified form) at a later time.
Manually resolved conficts in the following files
examples/sim_fibo_ad.cpp
opm/autodiff/FullyImplicitBlackoilSolver_impl.hpp
opm/autodiff/SimulatorFullyImplicitBlackoil_impl.hpp
In additions examples/sim_fibo_ad_cp.cpp was adapted to compile again.