This fixes the following bugs:
- No longer overwrite the matlab-output files each step.
- Create output also for the initial state.
- Change filenames of matlab-output by one (initial state is 000.txt,
final state is NNN.txt and not (NNN-1).txt for total of NNN steps).
- Eclipse binary output matches eclipse output (includes the same
steps including initial state) for the same case.
Also added several comments outlining the parts of the run() function.
Also add some other features that have been added to sim_fibo_ad
but not to sim_fibo_ad_cp:
- (Un)Strict parsing parameter.
- EQUIL init (currently throws, since initEquil not yet made generic).
Total time will be written to walltime.txt, and single step times to
step_timing.txt (changed suffix from param to txt). This did not work
properly before this fix (step_timing file was overwritten each step).
When this kw is active, BlackoilPropsAdFromDeck now modifies rvSat
and rsSat curves cell-wise by a power of (sat_oil_cell /
sat_oil_cell_historical_max). Currently, the associated jacobians do
not reflect terms of type d/d_sat_oil, but code for doing this is given
as comments to BlackoilPropsAdFromDeck::applyVap(ADB& r, ...).
This commit replaces an if-else-based query of the primaryVariable_
with the equivalent switch() statement for uniformity with the rest
of the implementation.
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.
This commit adds a simple facility for converting component rates at
surface conditions to voidage rates at reservoir conditions. It is
intentionally limited in scope and meant to be employed only in the
context of class FullyImplicitBlackoilSolver<> or something very
similar. In particular, class SurfaceToReservoirVoidage<> assumes
that it will be used to compute conversion coefficients for
component rates to voidage rates, and that those coefficients will
typically be entered into the coefficient matrix of a linearised
residual.
Add a trivial test just to demonstrate the setup and calling
process. This is not a feature or correctness test.
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.
This is a relic of the way we originally handled gravity. The member
remained after the change, and is now a major time-consumption sink
due to the unfortunate fact that it is computed every time step
(unnecessary), and because the gravityOperator() function (now removed)
was very unperformant after changing to use the faceCells() function.