3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
Dumux::RichardsNCVolumeVariables< Traits > Class Template Reference

Contains the quantities which are constant within a finite volume in the Richards, n-component model. More...

#include <dumux/porousmediumflow/richardsnc/volumevariables.hh>

Inheritance diagram for Dumux::RichardsNCVolumeVariables< Traits >:

Description

template<class Traits>
class Dumux::RichardsNCVolumeVariables< Traits >

Contains the quantities which are constant within a finite volume in the Richards, n-component model.

Public Types

using FluidSystem = typename Traits::FluidSystem
 Export type of the fluid system. More...
 
using FluidState = typename Traits::FluidState
 Export type of the fluid state. More...
 
using SolidState = typename Traits::SolidState
 Export type of solid state. More...
 
using SolidSystem = typename Traits::SolidSystem
 Export type of solid system. More...
 
using Indices = typename Traits::ModelTraits::Indices
 Export indices. More...
 
using PrimaryVariables = typename Traits::PrimaryVariables
 Export the type used for the primary variables. More...
 

Public Member Functions

template<class ElemSol , class Problem , class Element , class Scv >
void update (const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
 Updates all quantities for a given control volume. More...
 
template<class ElemSol , class Problem , class Element , class Scv >
void completeFluidState (const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv, FluidState &fluidState, SolidState &solidState)
 Fills the fluid state according to the primary variables. More...
 
const FluidStatefluidState () const
 Returns the fluid configuration at the given primary variables. More...
 
const SolidStatesolidState () const
 Returns the phase state for the control volume. More...
 
Scalar averageMolarMass (const int phaseIdx=0) const
 Returns the average molar mass \(\mathrm{[kg/mol]}\) of the fluid phase. More...
 
Scalar temperature () const
 Returns the temperature. More...
 
Scalar porosity () const
 Returns the average porosity [] within the control volume. More...
 
const PermeabilityType & permeability () const
 Returns the permeability within the control volume in \([m^2]\). More...
 
Scalar saturation (const int phaseIdx=0) const
 Returns the average absolute saturation [] of a given fluid phase within the finite volume. More...
 
Scalar density (const int phaseIdx=0) const
 Returns the average mass density \(\mathrm{[kg/m^3]}\) of a given fluid phase within the control volume. More...
 
Scalar pressure (const int phaseIdx=0) const
 Returns the effective pressure \(\mathrm{[Pa]}\) of a given phase within the control volume. More...
 
Scalar mobility (const int phaseIdx=0) const
 Returns the effective mobility \(\mathrm{[1/(Pa*s)]}\) of a given phase within the control volume. More...
 
Scalar viscosity (const int phaseIdx=0) const
 Returns the dynamic viscosity \(\mathrm{[Pa*s]}\) of a given phase within the control volume. More...
 
Scalar relativePermeability (const int phaseIdx=0) const
 Returns relative permeability [-] of a given phase within the control volume. More...
 
Scalar capillaryPressure () const
 Returns the effective capillary pressure \(\mathrm{[Pa]}\) within the control volume. More...
 
Scalar pressureHead (const int phaseIdx=0) const
 Returns the pressureHead \(\mathrm{[cm]}\) of a given phase within the control volume. More...
 
Scalar waterContent (const int phaseIdx=0) const
 Returns the water content fluid phase within the finite volume. More...
 
Scalar molarDensity (const int phaseIdx=0) const
 Returns the molar density \(\mathrm{[mol/m^3]}\) the of the fluid phase. More...
 
Scalar moleFraction (const int phaseIdx, const int compIdx) const
 Returns the mole fraction \(\mathrm{[mol/mol]}\) of a component in the phase. More...
 
Scalar massFraction (const int phaseIdx, const int compIdx) const
 Returns the mass fraction \(\mathrm{[kg/kg]}\) of a component in the phase. More...
 
Scalar molarity (const int phaseIdx, const int compIdx) const
 Returns the concentration \(\mathrm{[mol/m^3]}\) of a component in the phase. More...
 
Scalar diffusionCoefficient (int phaseIdx, int compIIdx, int compJIdx) const
 Returns the binary diffusion coefficients for a phase in \([m^2/s]\). More...
 
Scalar effectiveDiffusionCoefficient (int phaseIdx, int compIIdx, int compJIdx) const
 Returns the effective diffusion coefficients for a phase in \([m^2/s]\). More...
 
const PrimaryVariablespriVars () const
 Returns the vector of primary variables. More...
 
Scalar priVar (const int pvIdx) const
 Returns a component of primary variable vector. More...
 
Scalar extrusionFactor () const
 Returns how much the sub-control volume is extruded. More...
 

Static Public Member Functions

static constexpr int numFluidPhases ()
 Return number of phases considered by the model. More...
 
static constexpr int numFluidComponents ()
 Return number of components considered by the model. More...
 

Static Public Attributes

static constexpr int liquidPhaseIdx = 0
 Export phase acess indices. More...
 
static constexpr int gasPhaseIdx = 1
 

Protected Attributes

FluidState fluidState_
 the fluid state More...
 

Member Typedef Documentation

◆ FluidState

template<class Traits >
using Dumux::RichardsNCVolumeVariables< Traits >::FluidState = typename Traits::FluidState

Export type of the fluid state.

◆ FluidSystem

template<class Traits >
using Dumux::RichardsNCVolumeVariables< Traits >::FluidSystem = typename Traits::FluidSystem

Export type of the fluid system.

◆ Indices

template<class Traits >
using Dumux::RichardsNCVolumeVariables< Traits >::Indices = typename Traits::ModelTraits::Indices

Export indices.

◆ PrimaryVariables

template<class Traits >
using Dumux::PorousMediumFlowVolumeVariables< Traits >::PrimaryVariables = typename Traits::PrimaryVariables
inherited

Export the type used for the primary variables.

◆ SolidState

template<class Traits >
using Dumux::RichardsNCVolumeVariables< Traits >::SolidState = typename Traits::SolidState

Export type of solid state.

◆ SolidSystem

template<class Traits >
using Dumux::RichardsNCVolumeVariables< Traits >::SolidSystem = typename Traits::SolidSystem

Export type of solid system.

Member Function Documentation

◆ averageMolarMass()

template<class Traits >
Scalar Dumux::RichardsNCVolumeVariables< Traits >::averageMolarMass ( const int  phaseIdx = 0) const
inline

Returns the average molar mass \(\mathrm{[kg/mol]}\) of the fluid phase.

Parameters
phaseIdxThe phase index

◆ capillaryPressure()

template<class Traits >
Scalar Dumux::RichardsNCVolumeVariables< Traits >::capillaryPressure ( ) const
inline

Returns the effective capillary pressure \(\mathrm{[Pa]}\) within the control volume.

The capillary pressure is defined as the difference in pressures of the nonwetting and the wetting phase, i.e.

\[ p_c = p_n - p_w \]

Note
Capillary pressures are always larger than the entry pressure This regularization doesn't affect the residual in which pc is not needed.

◆ completeFluidState()

template<class Traits >
template<class ElemSol , class Problem , class Element , class Scv >
void Dumux::RichardsNCVolumeVariables< Traits >::completeFluidState ( const ElemSol &  elemSol,
const Problem &  problem,
const Element &  element,
const Scv &  scv,
FluidState fluidState,
SolidState solidState 
)
inline

Fills the fluid state according to the primary variables.

Taking the information from the primary variables, the fluid state is filled with every information that is necessary to evaluate the model's local residual.

Parameters
elemSolA vector containing all primary variables connected to the element
problemThe problem at hand.
elementThe current element.
scvThe subcontrol volume.
fluidStateThe fluid state to fill.
solidStateThe solid state to fill.

◆ density()

template<class Traits >
Scalar Dumux::RichardsNCVolumeVariables< Traits >::density ( const int  phaseIdx = 0) const
inline

Returns the average mass density \(\mathrm{[kg/m^3]}\) of a given fluid phase within the control volume.

Parameters
phaseIdxThe index of the fluid phase

◆ diffusionCoefficient()

template<class Traits >
Scalar Dumux::RichardsNCVolumeVariables< Traits >::diffusionCoefficient ( int  phaseIdx,
int  compIIdx,
int  compJIdx 
) const
inline

Returns the binary diffusion coefficients for a phase in \([m^2/s]\).

◆ effectiveDiffusionCoefficient()

template<class Traits >
Scalar Dumux::RichardsNCVolumeVariables< Traits >::effectiveDiffusionCoefficient ( int  phaseIdx,
int  compIIdx,
int  compJIdx 
) const
inline

Returns the effective diffusion coefficients for a phase in \([m^2/s]\).

◆ extrusionFactor()

template<class Traits >
Scalar Dumux::PorousMediumFlowVolumeVariables< Traits >::extrusionFactor ( ) const
inlineinherited

Returns how much the sub-control volume is extruded.

This means the factor by which a lower-dimensional (1D or 2D) entity needs to be expanded to get a full dimensional cell. The default is 1.0 which means that 1D problems are actually thought as pipes with a cross section of 1 m^2 and 2D problems are assumed to extend 1 m to the back.

◆ fluidState()

template<class Traits >
const FluidState & Dumux::RichardsNCVolumeVariables< Traits >::fluidState ( ) const
inline

Returns the fluid configuration at the given primary variables.

◆ massFraction()

template<class Traits >
Scalar Dumux::RichardsNCVolumeVariables< Traits >::massFraction ( const int  phaseIdx,
const int  compIdx 
) const
inline

Returns the mass fraction \(\mathrm{[kg/kg]}\) of a component in the phase.

Parameters
phaseIdxThe index of the phase.
compIdxThe index of the component

We always forward to the fluid state with the phaseIdx property (see class description).

◆ mobility()

template<class Traits >
Scalar Dumux::RichardsNCVolumeVariables< Traits >::mobility ( const int  phaseIdx = 0) const
inline

Returns the effective mobility \(\mathrm{[1/(Pa*s)]}\) of a given phase within the control volume.

The mobility of a fluid phase is defined as the relative permeability of the phase (given by the chosen material law) divided by the dynamic viscosity of the fluid, i.e.

\[ \lambda_\alpha := \frac{k_{r\alpha}}{\mu_\alpha} \]

Parameters
phaseIdxThe index of the fluid phase

◆ molarDensity()

template<class Traits >
Scalar Dumux::RichardsNCVolumeVariables< Traits >::molarDensity ( const int  phaseIdx = 0) const
inline

Returns the molar density \(\mathrm{[mol/m^3]}\) the of the fluid phase.

We always forward to the fluid state with the phaseIdx property (see class description).

◆ molarity()

template<class Traits >
Scalar Dumux::RichardsNCVolumeVariables< Traits >::molarity ( const int  phaseIdx,
const int  compIdx 
) const
inline

Returns the concentration \(\mathrm{[mol/m^3]}\) of a component in the phase.

Parameters
phaseIdxThe index of the phase.
compIdxThe index of the component

We always forward to the fluid state with the phaseIdx property (see class description).

◆ moleFraction()

template<class Traits >
Scalar Dumux::RichardsNCVolumeVariables< Traits >::moleFraction ( const int  phaseIdx,
const int  compIdx 
) const
inline

Returns the mole fraction \(\mathrm{[mol/mol]}\) of a component in the phase.

Parameters
phaseIdxThe index of the phase.
compIdxThe index of the component.

We always forward to the fluid state with the phaseIdx property (see class description).

◆ numFluidComponents()

template<class Traits >
static constexpr int Dumux::PorousMediumFlowVolumeVariables< Traits >::numFluidComponents ( )
inlinestaticconstexprinherited

Return number of components considered by the model.

◆ numFluidPhases()

template<class Traits >
static constexpr int Dumux::PorousMediumFlowVolumeVariables< Traits >::numFluidPhases ( )
inlinestaticconstexprinherited

Return number of phases considered by the model.

◆ permeability()

template<class Traits >
const PermeabilityType & Dumux::RichardsNCVolumeVariables< Traits >::permeability ( ) const
inline

Returns the permeability within the control volume in \([m^2]\).

◆ porosity()

template<class Traits >
Scalar Dumux::RichardsNCVolumeVariables< Traits >::porosity ( ) const
inline

Returns the average porosity [] within the control volume.

The porosity is defined as the ratio of the pore space to the total volume, i.e.

\[ \Phi := \frac{V_{pore}}{V_{pore} + V_{rock}} \]

◆ pressure()

template<class Traits >
Scalar Dumux::RichardsNCVolumeVariables< Traits >::pressure ( const int  phaseIdx = 0) const
inline

Returns the effective pressure \(\mathrm{[Pa]}\) of a given phase within the control volume.

For the nonwetting phase (i.e. the gas phase), we assume infinite mobility, which implies that the nonwetting phase pressure is equal to the finite volume's reference pressure defined by the problem.

Parameters
phaseIdxThe index of the fluid phase

◆ pressureHead()

template<class Traits >
Scalar Dumux::RichardsNCVolumeVariables< Traits >::pressureHead ( const int  phaseIdx = 0) const
inline

Returns the pressureHead \(\mathrm{[cm]}\) of a given phase within the control volume.

For the nonwetting phase (i.e. the gas phase), we assume infinite mobility, which implies that the nonwetting phase pressure is equal to the finite volume's reference pressure defined by the problem.

Parameters
phaseIdxThe index of the fluid phase
Note
this function is here as a convenience to the user to not have to manually do a conversion. It is not correct if the density is not constant or the gravity different

◆ priVar()

template<class Traits >
Scalar Dumux::PorousMediumFlowVolumeVariables< Traits >::priVar ( const int  pvIdx) const
inlineinherited

Returns a component of primary variable vector.

Parameters
pvIdxThe index of the primary variable of interest

◆ priVars()

template<class Traits >
const PrimaryVariables & Dumux::PorousMediumFlowVolumeVariables< Traits >::priVars ( ) const
inlineinherited

Returns the vector of primary variables.

◆ relativePermeability()

template<class Traits >
Scalar Dumux::RichardsNCVolumeVariables< Traits >::relativePermeability ( const int  phaseIdx = 0) const
inline

Returns relative permeability [-] of a given phase within the control volume.

Parameters
phaseIdxThe index of the fluid phase

◆ saturation()

template<class Traits >
Scalar Dumux::RichardsNCVolumeVariables< Traits >::saturation ( const int  phaseIdx = 0) const
inline

Returns the average absolute saturation [] of a given fluid phase within the finite volume.

The saturation of a fluid phase is defined as the fraction of the pore volume filled by it, i.e.

\[ S_\alpha := \frac{V_\alpha}{V_{pore}} = \phi \frac{V_\alpha}{V} \]

Parameters
phaseIdxThe index of the fluid phase

◆ solidState()

template<class Traits >
const SolidState & Dumux::RichardsNCVolumeVariables< Traits >::solidState ( ) const
inline

Returns the phase state for the control volume.

◆ temperature()

template<class Traits >
Scalar Dumux::RichardsNCVolumeVariables< Traits >::temperature ( ) const
inline

Returns the temperature.

◆ update()

template<class Traits >
template<class ElemSol , class Problem , class Element , class Scv >
void Dumux::RichardsNCVolumeVariables< Traits >::update ( const ElemSol &  elemSol,
const Problem &  problem,
const Element &  element,
const Scv &  scv 
)
inline

Updates all quantities for a given control volume.

Parameters
elemSolA vector containing all primary variables connected to the element
problemThe object specifying the problem which ought to be simulated
elementAn element which contains part of the control volume
scvThe sub-control volume

◆ viscosity()

template<class Traits >
Scalar Dumux::RichardsNCVolumeVariables< Traits >::viscosity ( const int  phaseIdx = 0) const
inline

Returns the dynamic viscosity \(\mathrm{[Pa*s]}\) of a given phase within the control volume.

Parameters
phaseIdxThe index of the fluid phase
Note
The nonwetting phase is infinitely mobile

◆ waterContent()

template<class Traits >
Scalar Dumux::RichardsNCVolumeVariables< Traits >::waterContent ( const int  phaseIdx = 0) const
inline

Returns the water content fluid phase within the finite volume.

The water content is defined as the fraction of the saturation devided by the porosity

Parameters
phaseIdxThe index of the fluid phase
Note
this function is here as a convenience to the user to not have to manually do a conversion.

Member Data Documentation

◆ fluidState_

template<class Traits >
FluidState Dumux::RichardsNCVolumeVariables< Traits >::fluidState_
protected

the fluid state

◆ gasPhaseIdx

template<class Traits >
constexpr int Dumux::RichardsNCVolumeVariables< Traits >::gasPhaseIdx = 1
staticconstexpr

◆ liquidPhaseIdx

template<class Traits >
constexpr int Dumux::RichardsNCVolumeVariables< Traits >::liquidPhaseIdx = 0
staticconstexpr

Export phase acess indices.


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