|
opm-simulators
|
A compositional multi-phase model based on non-linear complementarity functions. More...
#include <dune/common/fvector.hh>#include <opm/common/Exceptions.hpp>#include <opm/material/common/Valgrind.hpp>#include <opm/material/densead/Math.hpp>#include <opm/models/ncp/ncpproperties.hh>#include <opm/models/ncp/ncplocalresidual.hh>#include <opm/models/ncp/ncpextensivequantities.hh>#include <opm/models/ncp/ncpprimaryvariables.hh>#include <opm/models/ncp/ncpboundaryratevector.hh>#include <opm/models/ncp/ncpratevector.hh>#include <opm/models/ncp/ncpintensivequantities.hh>#include <opm/models/ncp/ncpnewtonmethod.hh>#include <opm/models/ncp/ncpindices.hh>#include <opm/models/common/diffusionmodule.hh>#include <opm/models/common/energymodule.hh>#include <opm/models/common/multiphasebasemodel.hh>#include <opm/models/io/vtkcompositionmodule.hpp>#include <opm/models/io/vtkdiffusionmodule.hpp>#include <opm/models/io/vtkenergymodule.hpp>#include <algorithm>#include <cassert>#include <cmath>#include <memory>#include <sstream>#include <string>#include <tuple>#include <vector>Go to the source code of this file.
Namespaces | |
| namespace | Opm |
| This file contains a set of helper functions used by VFPProd / VFPInj. | |
| namespace | Opm::Properties::TTag |
| The generic type tag for problems using the immiscible multi-phase model. | |
A compositional multi-phase model based on non-linear complementarity functions.
This model implements a 




By default, the standard multi-phase Darcy approach is used to determine the velocity, i.e.
![\[ \mathbf{v}_\alpha = - \frac{k_{r\alpha}}{\mu_\alpha} \mathbf{K}
\left(\mathbf{grad}\, p_\alpha - \varrho_{\alpha} \mathbf{g} \right) \;,
\]](form_84.png)
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
![\[ \sum_\alpha \frac{\partial\;\phi c_\alpha^\kappa S_\alpha }{\partial t}
- \sum_\alpha \mathrm{div} \left\{ c_\alpha^\kappa \mathbf{v}_\alpha \right\}
- q^\kappa = 0 \;.
\]](form_67.png)
For the missing 

![\[ \forall \alpha: S_\alpha = 0 \implies \sum_\kappa
x_\alpha^\kappa \leq 1 \]](form_86.png)
Also, if a fluid phase may be present at a given spatial location its saturation must be non-negative:
![\[ \forall \alpha: \sum_\kappa x_\alpha^\kappa = 1 \implies S_\alpha \geq 0
*\]](form_87.png)
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.
![\[ \forall \alpha: S_\alpha \left( \sum_\kappa x_\alpha^\kappa - 1 \right) = 0
\]](form_88.png)
always holds.
These three equations constitute a non-linear complementarity problem, which can be solved using so-called non-linear complementarity functions 
![\[\Phi(a,b) = 0 \iff a \geq0 \land b \geq0 \land a \cdot b = 0 \]](form_90.png)
Several non-linear complementarity functions have been suggested, e.g. the Fischer-Burmeister function
![\[ \Phi(a,b) = a + b - \sqrt{a^2 + b^2} \;. \]](form_91.png)
This model uses
![\[ \Phi(a,b) = \min \{a, b \}\;, \]](form_92.png)
because of its piecewise linearity.
The model assumes local thermodynamic equilibrium and uses the following primary variables:




