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

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/io/vtkphasepresencemodule.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 <cassert>`
`#include <cstddef>`
`#include <iostream>`
`#include <memory>`
`#include <sstream>`
`#include <stdexcept>`
`#include <string>`
`#include <tuple>`
`#include <vector>`

Go to the source code of this file.

## Classes

struct | Opm::Properties::TTag::PvsModel
| The type tag for the isothermal single phase problems. More...
struct | Opm::Properties::LocalResidual< TypeTag, TTag::PvsModel >
| Use the PVS local jacobian operator for the PVS model. More...
struct | Opm::Properties::NewtonMethod< TypeTag, TTag::PvsModel >
| Use the PVS specific newton method for the PVS model. More...
struct | Opm::Properties::Model< TypeTag, TTag::PvsModel >
| the Model property More...
struct | Opm::Properties::PrimaryVariables< TypeTag, TTag::PvsModel >
| the PrimaryVariables property More...
struct | Opm::Properties::RateVector< TypeTag, TTag::PvsModel >
| the RateVector property More...
struct | Opm::Properties::BoundaryRateVector< TypeTag, TTag::PvsModel >
| the BoundaryRateVector property More...
struct | Opm::Properties::IntensiveQuantities< TypeTag, TTag::PvsModel >
| the IntensiveQuantities property More...
struct | Opm::Properties::ExtensiveQuantities< TypeTag, TTag::PvsModel >
| the ExtensiveQuantities property More...
struct | Opm::Properties::Indices< TypeTag, TTag::PvsModel >
| The indices required by the isothermal PVS model. More...
struct | Opm::Properties::EnableEnergy< TypeTag, TTag::PvsModel >
| Disable the energy equation by default. More...
struct | Opm::Properties::EnableDiffusion< TypeTag, TTag::PvsModel >
struct | Opm::Properties::PvsPressureBaseWeight< TypeTag, TTag::PvsModel >
| The basis value for the weight of the pressure primary variable. More...
struct | Opm::Properties::PvsSaturationsBaseWeight< TypeTag, TTag::PvsModel >
| The basis value for the weight of the saturation primary variables. More...
struct | Opm::Properties::PvsMoleFractionsBaseWeight< TypeTag, TTag::PvsModel >
| The basis value for the weight of the mole fraction primary variables. More...
struct | Opm::Parameters::PvsVerbosity
| The verbosity of the model (0 -> do not print anything, 2 -> spam stdout a lot). More...
class | Opm::PvsModel< TypeTag >
| A generic compositional multi-phase model using primary-variable switching. 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 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

template<class TypeTag>
struct FluxModule<TypeTag, TTag::MyProblemTypeTag> { using type = Opm::ForchheimerFluxModule<TypeTag>; };
Opm::ForchheimerFluxModule
Specifies a flux module which uses the Forchheimer relation.
Definition forchheimerfluxmodule.hh:66

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:

- If phase is present according to the pseudo primary variable, but after the Newton update, consider the phase disappeared for the next iteration and use the set of primary variables which correspond to the new phase presence.
- If phase is not present according to the pseudo primary variable, but the sum of the component mole fractions in the phase is larger than 1, i.e. , consider the phase present in the the next iteration and update the set of primary variables to make it consistent with the new phase presence.

- In all other cases don't modify the phase presence for phase .

The model always requires primary variables, but their interpretation is dependent on the phase presence:

- The first primary variable is always interpreted as the pressure of the phase with the lowest index .

- Then, "switching primary variables" follow, which are interpreted depending in the presence of the first phases: If phase is present, its saturation is used as primary variable; if it is not present, the mole fraction of the component with index in the phase with the lowest index that is present is used instead.

- Finally, the mole fractions of the components with the largest index in the phase with the lowest index that is present are used as primary variables.