dynamical parameter given in the parameter file. The default is 0 (as before).
In addition the relaxation parameter has been added to the parameter with the
default preserving the state from before.
Also, the default parameter for use_amg and use_bicgstab in the constructor of
CPRPrecondition have been removed.
Note that this patch does not introduce any real temperature
dependence but only changes the APIs for the viscosity and for the
density related methods. Note that I also don't like the fact that
this requires so many changes to so many files, but with the current
design of the property classes I cannot see a way to avoid this...
This restores the performance to approximately the level it had before
the change to support non-diagonal well jacobians, for SPE9. All changes
are to the eliminateVariable() method.
- Explicitly compute and apply the inverse.
- Change loop ordering to apply inverse only num_eq - 1 times, instead
of (numeq - 1)^2.
- Use UmfPackLU instead of SparseLU.
1. The right hand side is solved only once
2. The solver is constructed directly with the matrix
3. const is added where it was missing
4. More commennts is added
5. Variable names are changed for clarification
The following comments has been adressed
1. An array is used in stead of pair
2. is not empty is used instead of size>0 to check if the well has been
initialized before
3. const_iterator is used instead of iterator
4. partial copy is removed
5. WellMapType is no longer mutable
If we need more than 150 linear iterations, it's probably something
wrong, and we may be better of by restarting with smaller time-steps.
TODO: make it possible for the user to specify this number.
The non-diagonal elements in the sub-matrices in the Schur complement is
no longer ignored. Instead of assuming the matrix do be diagonal, and
compute the invert of the sub-matrix, small linear systems are solved
using superLU.
Tested on SPE3 and Norne. (With this fix a slightly modified norne runs
until 3292 days)
The residual output is changed from max residual to
total mass balance residual. In this way the output
resemble what is actually used as convergence criteria.
With the introduction of shut wells the same ordering in the well states
can no longer be assumed. The well names is instead used to map the old
well state to the new. Also the partial_copying is moved into the
initialization.
Tested on SPE1, SPE3, SPE9 and Norne. (Do not change the SPEs and is
nessesary for the Norne)
The old rs and rv values are used in the phase transitions calculations.
The update of rs and rv to the state is therefore moved after the phase
transitions in order for the code to use the old values.
of the matrix internal allocators.
This fix also avoid the copying of the BCRSMatrix by providing a contructor that creates
the DuneMatrix for a given Eigen SparseMatrix.
Using a different construction method for the sparse matrix
used makes the methods a little faster. There is probably
still room for improvement by refactoring to avoid the
sparse matrix products.
New parameters are:
- cpr_use_amg (default false) if true, use AMG preconditioner for elliptic part
- cpr_use_bicgstab (default true) if true, use BiCGStab (else use CG) for elliptic part
The 'props_' table of PVT functions has one entry for each active
phase. Fix four instances of indexing into the table using the
canonical rather than active phase indices.
This is necessary, but not sufficient, to run two-phase problems
without a "dummy" third phase.
First the change in oil saturation is calculated from changes in water
and oil saturation. Then oil saturation is updated based on this change
instead of just fixed to 1-sw-sg. With this change the oil saturation is
less sensitive towards numerical errors that may cause very small oil
saturations. Witch again may cause the simulator to think that the gas
phase is saturation with vaporized oil when it is not.
Currently, there are two abstract interface for the grids. One that
usually returns pods and arrays of them that also can be used by C
and is used also in opm-core, and one that returns Eigen datastructures
needed within opm-autodiff.
This commit adds a postfix ToEigen to those functions (faceCells, and
cellCentroidsZ) one could imagine to also return pods and arrays of them.
This should at least resolve the confusion about the two faceCells functions.
The next step will be issue #192Fixes#176
Now it takes a std::vector instead of an Eigen::Array, more importantly
it expects one element per face, not interior face. The mapping now takes
place in setThresholdPressures().
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.
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.