A compositional multi-phase model based on non-linear complementarity functions.
More...
|
| NcpModel (Simulator &simulator) |
|
void | finishInit () |
| Apply the initial conditions to the model. More...
|
|
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 | 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...
|
|
void | updatePVWeights (const ElementContext &elemCtx) const |
| Update the weights of all primary variables within an element given the complete set of intensive quantities. 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...
|
|
Scalar | minActivityCoeff (int globalDofIdx, int compIdx) const |
| Returns the smallest activity coefficient of a component for the most current solution at a vertex. More...
|
|
void | registerOutputModules_ () |
|
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::NcpModel< TypeTag >
A compositional multi-phase model based on non-linear complementarity functions.
This model implements a -phase flow of a fluid mixture composed of chemical species. The phases are denoted by lower index . All fluid phases are mixtures of chemical species which are denoted by the upper index .
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
For the missing model assumptions, the model uses non-linear complementarity functions. These are based on the observation that if a fluid phase is not present, the sum of the mole fractions of this fluid phase is smaller than , i.e.
Also, if a fluid phase may be present at a given spatial location its saturation must be non-negative:
Since at any given spatial location, a phase is always either present or not present, one of the strict equalities on the right hand side is always true, i.e.
always holds.
These three equations constitute a non-linear complementarity problem, which can be solved using so-called non-linear complementarity functions . Such functions have the property
Several non-linear complementarity functions have been suggested, e.g. the Fischer-Burmeister function
This model uses
because of its piecewise linearity.
The model assumes local thermodynamic equilibrium and uses the following primary variables:
- The pressure of the first phase
- The component fugacities
- The saturations of the first phases
- Temperature if the energy equation is enabled