|
My Project
|
A generic compositional multi-phase model using primary-variable switching. More...
#include <opm/common/Exceptions.hpp>#include <opm/material/densead/Math.hpp>#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>#include <opm/material/fluidmatrixinteractions/NullMaterial.hpp>#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/vtkenergymodule.hpp>#include <opm/models/io/vtkdiffusionmodule.hpp>#include <opm/models/pvs/pvsboundaryratevector.hh>#include <opm/models/pvs/pvsextensivequantities.hh>#include <opm/models/pvs/pvsindices.hh>#include <opm/models/pvs/pvsintensivequantities.hh>#include <opm/models/pvs/pvslocalresidual.hh>#include <opm/models/pvs/pvsnewtonmethod.hh>#include <opm/models/pvs/pvsprimaryvariables.hh>#include <opm/models/pvs/pvsproperties.hh>#include <opm/models/pvs/pvsratevector.hh>#include <iostream>#include <sstream>#include <string>#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 generic compositional multi-phase model using primary-variable switching.
This model assumes a flow of 



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_97.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)
To close the system mathematically, 
![\[
0 \stackrel{!}{=}
f_\alpha = \left\{
\begin{array}{cl}
S_\alpha& \quad \text{if phase }\alpha\text{ is not present} \ \
1 - \sum_\kappa x_\alpha^\kappa& \quad \text{else}
\end{array}
\right.
\]](form_98.png)
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:






In all other cases don't modify the phase presence for phase 
The model always requires 
The first primary variable is always interpreted as the pressure of the phase with the lowest index 
Then, 






Finally, the mole fractions of the 
