Loading...
Searching...
No Matches
ncpmodel.hh File Reference

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.

## Classes

struct | Opm::Properties::TTag::NcpModel
| Define the type tag for the compositional NCP model. More...
struct | Opm::Properties::LocalResidual< TypeTag, TTag::NcpModel >
| Use the Ncp local jacobian operator for the compositional NCP model. More...
struct | Opm::Properties::NewtonMethod< TypeTag, TTag::NcpModel >
| Use the Ncp specific newton method for the compositional NCP model. More...
struct | Opm::Properties::Model< TypeTag, TTag::NcpModel >
| the Model property More...
struct | Opm::Properties::BaseProblem< TypeTag, TTag::NcpModel >
| The type of the base base class for actual problems. More...
struct | Opm::Properties::EnableEnergy< TypeTag, TTag::NcpModel >
| Disable the energy equation by default. More...
struct | Opm::Properties::EnableDiffusion< TypeTag, TTag::NcpModel >
| disable diffusion by default More...
struct | Opm::Properties::RateVector< TypeTag, TTag::NcpModel >
| the RateVector property More...
struct | Opm::Properties::BoundaryRateVector< TypeTag, TTag::NcpModel >
| the BoundaryRateVector property More...
struct | Opm::Properties::PrimaryVariables< TypeTag, TTag::NcpModel >
| the PrimaryVariables property More...
struct | Opm::Properties::IntensiveQuantities< TypeTag, TTag::NcpModel >
| the IntensiveQuantities property More...
struct | Opm::Properties::ExtensiveQuantities< TypeTag, TTag::NcpModel >
| the ExtensiveQuantities property More...
struct | Opm::Properties::Indices< TypeTag, TTag::NcpModel >
| The indices required by the compositional NCP model. More...
struct | Opm::Properties::NcpPressureBaseWeight< TypeTag, TTag::NcpModel >
| The unmodified weight for the pressure primary variable. More...
struct | Opm::Properties::NcpSaturationsBaseWeight< TypeTag, TTag::NcpModel >
| The weight for the saturation primary variables. More...
struct | Opm::Properties::NcpFugacitiesBaseWeight< TypeTag, TTag::NcpModel >
| The unmodified weight for the fugacity primary variables. More...
class | Opm::NcpModel< TypeTag >
| A compositional multi-phase model based on non-linear complementarity functions. More...

## 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.

## Detailed Description

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

template<class TypeTag>
struct FluxModule<TypeTag, TTag::MyProblemTypeTag> { using type = ForchheimerFluxModule<TypeTag>; };

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