Loading...
Searching...
No Matches
Opm::BlackOilModel< TypeTag > Class Template Reference

A fully-implicit black-oil flow model. More...

`#include <blackoilmodel.hh>`

Inheritance diagram for Opm::BlackOilModel< TypeTag >:

## Public Types

using | Indices = GetPropType<TypeTag, Properties::Indices>
using | FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>
using | PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>
using | LocalResidual = GetPropType<TypeTag, Properties::LocalResidual>

## Public Member Functions

| BlackOilModel (Simulator &simulator)
std::string | primaryVarName (int pvIdx) const
| Given an primary variable index, return a human readable name.
std::string | eqName (int eqIdx) const
| Given an equation index, return a human readable name.
Scalar | primaryVarWeight (unsigned globalDofIdx, unsigned pvIdx) const
| Returns the relative weight of a primary variable for calculating relative errors.
Scalar | eqWeight (unsigned globalDofIdx, unsigned eqIdx) const
| Returns the relative weight of an equation.
void | setEqWeight (unsigned eqIdx, Scalar value)
template<class DofEntity>
void | serializeEntity (std::ostream &outstream, const DofEntity &dof)
| Write the current solution for a degree of freedom to a restart file.
template<class DofEntity>
void | deserializeEntity (std::istream &instream, const DofEntity &dof)
| Reads the current solution variables for a degree of freedom from a restart file.
template<class Restarter>
void | deserialize (Restarter &res)
| Deserializes the state of the model.
template<class Context>
void | supplementInitialSolution_ (PrimaryVariables &priVars, const Context &context, unsigned dofIdx, unsigned timeIdx)
void | registerOutputModules_ ()
Public Member Functions inherited from Opm::MultiPhaseBaseModel< TypeTag >
| MultiPhaseBaseModel (Simulator &simulator)
bool | phaseIsConsidered (unsigned) const
| Returns true iff a fluid phase is used by the model.
void | globalPhaseStorage (EqVector &storage, unsigned phaseIdx)
| Compute the total storage inside one phase of all conservation quantities.
void | registerOutputModules_ ()

## Static Public Member Functions

static void | registerParameters ()
| Register all run-time parameters for the immiscible model.
static std::string | name ()
Static Public Member Functions inherited from Opm::MultiPhaseBaseModel< TypeTag >
static void | registerParameters ()
| Register all run-time parameters for the immiscible model.

## Detailed Description

template<class TypeTag>
class Opm::BlackOilModel< TypeTag >

A fully-implicit black-oil flow model.

The black-oil model is a three-phase, three-component model widely used for oil reservoir simulation. The phases are denoted by lower index ("water", "gas" and "oil") and the components by upper index ("Water", "Gas" and "Oil"). The model assumes partial miscibility:

- Water and the gas phases are immisicible and are assumed to be only composed of the water and gas components respectively-
- The oil phase is assumed to be a mixture of the gas and the oil components.

The densities of the phases are determined by so-called formation volume factors:

Since the gas and water phases are assumed to be immiscible, this is sufficient to calculate their density. For the formation volume factor of the the oil phase determines the density of saturated oil, i.e. the density of the oil phase if some gas phase is present.

The composition of the oil phase is given by the gas dissolution factor , which defined as the volume of gas at atmospheric pressure that is dissolved in a given amount of oil at reservoir pressure:

This allows to calculate all quantities required for the mass-conservation equations for each component, i.e.

where is the filter velocity of the phase .

By default is determined by using the standard multi-phase Darcy approach, 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 primary variables used by this model are:

- The pressure of the phase with the lowest index
- The two saturations of the phases with the lowest indices

## Member Function Documentation

## deserialize()

template<class TypeTag>
template<class Restarter>

void Opm::BlackOilModel< TypeTag >::deserialize | ( | Restarter & | res | ) |

inline

Deserializes the state of the model.

Template Parameters

  Restarter | The type of the serializer class

Parameters

  res | The serializer object

## deserializeEntity()

template<class TypeTag>
template<class DofEntity>

void Opm::BlackOilModel< TypeTag >::deserializeEntity | ( | std::istream & | instream,
|  | const DofEntity & | dof )

inline

Reads the current solution variables for a degree of freedom from a restart file.

Parameters

  instream | The stream from which the vertex data should be deserialized from
  dof | The Dune entity which's data should be deserialized

## eqName()

template<class TypeTag>

std::string Opm::BlackOilModel< TypeTag >::eqName | ( | int | eqIdx | ) | const

inline

Given an equation index, return a human readable name.

Parameters

  eqIdx | The index of the conservation equation of interest.

## eqWeight()

template<class TypeTag>

Scalar Opm::BlackOilModel< TypeTag >::eqWeight | ( | unsigned | globalDofIdx,
|  | unsigned | eqIdx ) const

inline

Returns the relative weight of an equation.

Parameters

  globalVertexIdx | The global index of the vertex
  eqIdx | The index of the equation
  globalDofIdx | Global DOF
  eqIdx | Equation index

## name()

template<class TypeTag>

std::string Opm::BlackOilModel< TypeTag >::name | ( |  | ) |

inline static

## primaryVarName()

template<class TypeTag>

std::string Opm::BlackOilModel< TypeTag >::primaryVarName | ( | int | pvIdx | ) | const

inline

Given an primary variable index, return a human readable name.

Parameters

  pvIdx | The index of the primary variable of interest.

## primaryVarWeight()

template<class TypeTag>

Scalar Opm::BlackOilModel< TypeTag >::primaryVarWeight | ( | unsigned | globalDofIdx,
|  | unsigned | pvIdx ) const

inline

Returns the relative weight of a primary variable for calculating relative errors.

Parameters

  globalDofIdx | The global index of the degree of freedom
  pvIdx | The index of the primary variable

## serializeEntity()

template<class TypeTag>
template<class DofEntity>

void Opm::BlackOilModel< TypeTag >::serializeEntity | ( | std::ostream & | outstream,
|  | const DofEntity & | dof )

inline

Write the current solution for a degree of freedom to a restart file.

Parameters

  outstream | The stream into which the vertex data should be serialized to
  dof | The Dune entity which's data should be serialized

The documentation for this class was generated from the following file:

- opm/models/blackoil/blackoilmodel.hh