|
| PvsModel (Simulator &simulator) |
|
std::string | primaryVarName (int pvIdx) const |
| Given an primary variable index, return a human readable name. More...
|
|
std::string | eqName (int eqIdx) const |
| Given an equation index, return a human readable name. More...
|
|
void | updateFailed () |
| Called by the update() method if it was unsuccessful. This is primary a hook which the actual model can overload. More...
|
|
void | updateBegin () |
| Called by the update() method before it tries to apply the newton method. This is primary a hook which the actual model can overload. More...
|
|
Scalar | primaryVarWeight (int globalDofIdx, int pvIdx) const |
| Returns the relative weight of a primary variable for calculating relative errors. More...
|
|
Scalar | eqWeight (int globalDofIdx, int eqIdx) const |
| Returns the relative weight of an equation. More...
|
|
void | advanceTimeLevel () |
| Called by the problem if a time integration was successful, post processing of the solution is done and the result has been written to disk. More...
|
|
bool | switched () const |
| Return true if the primary variables were switched for at least one vertex after the last timestep. More...
|
|
template<class DofEntity > |
void | serializeEntity (std::ostream &outstream, const DofEntity &dofEntity) |
| Write the current solution for a degree of freedom to a restart file. More...
|
|
template<class DofEntity > |
void | deserializeEntity (std::istream &instream, const DofEntity &dofEntity) |
| Reads the current solution variables for a degree of freedom from a restart file. More...
|
|
void | switchPrimaryVars_ () |
|
template<class FluidState > |
void | printSwitchedPhases_ (const ElementContext &elemCtx, int dofIdx, const FluidState &fs, int oldPhasePresence, const PrimaryVariables &newPv) const |
|
void | registerOutputModules_ () |
|
void | finishInit () |
| Apply the initial conditions to the model. More...
|
|
bool | phaseIsConsidered (int phaseIdx) const |
| Returns true iff a fluid phase is used by the model. More...
|
|
void | globalPhaseStorage (EqVector &storage, int phaseIdx) |
| Compute the total storage inside one phase of all conservation quantities. More...
|
|
template<class TypeTag>
class Ewoms::PvsModel< TypeTag >
A generic compositional multi-phase model using primary-variable switching.
This model assumes a flow of fluid phases , each of which is assumed to be a mixture chemical species .
By default, the standard multi-phase Darcy approach is used to determine the velocity, i.e.
although the actual approach which is used can be specified via the FluxModule
property. For example, the velocity model can by changed to the Forchheimer approach by
The core of the model is the conservation mass of each component by means of the equation
To close the system mathematically, model equations are also required. This model uses the primary variable switching assumptions, which are given by:
To make this approach applicable, a pseudo primary variable phase presence has to be introduced. Its purpose is to specify for each phase whether it is present or not. It is a pseudo primary variable because it is not directly considered when linearizing the system in the Newton method, but after each Newton iteration, it gets updated like the "real" primary variables. The following rules are used for this update procedure:
The model always requires primary variables, but their interpretation is dependent on the phase presence: