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

Contains the quantities which are constant within a finite volume in the two-phase two-component model. Specialization for chemical equilibrium. More...

#include <dumux/porousmediumflow/2p2c/volumevariables.hh>

Inheritance diagram for Dumux::TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver >:
Inheritance graph

Description

template<class Traits, bool useConstraintSolver>
class Dumux::TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver >

Contains the quantities which are constant within a finite volume in the two-phase two-component model. Specialization for chemical equilibrium.

Public Types

using FluidState = typename Traits::FluidState
 The type of the object returned by the fluidState() method. More...
 
using FluidSystem = typename Traits::FluidSystem
 The fluid system used here. More...
 
using SolidState = typename Traits::SolidState
 Export type of solid state. More...
 
using SolidSystem = typename Traits::SolidSystem
 Export type of solid system. More...
 
using PrimaryVariableSwitch = TwoPNCPrimaryVariableSwitch
 Export the primary variable switch. More...
 
using PrimaryVariables = typename Traits::PrimaryVariables
 Export the type used for the primary variables. More...
 
using Indices = typename Traits::ModelTraits::Indices
 Export the type encapsulating primary variable indices. More...
 

Public Member Functions

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)
 Sets complete fluid state. More...
 
void update (const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
 Updates all quantities for a given control volume. More...
 
const FluidStatefluidState () const
 Returns the phase state within the control volume. More...
 
const SolidStatesolidState () const
 Returns the phase state for the control-volume. More...
 
Scalar averageMolarMass (int phaseIdx) const
 Returns the average molar mass \(\mathrm{[kg/mol]}\) of the fluid phase. More...
 
Scalar saturation (const int phaseIdx) const
 Returns the saturation of a given phase within the control volume in \([-]\). More...
 
Scalar massFraction (const int phaseIdx, const int compIdx) const
 Returns the mass fraction of a given component in a given phase within the control volume in \([-]\). More...
 
Scalar moleFraction (const int phaseIdx, const int compIdx) const
 Returns the mole fraction of a given component in a given phase within the control volume in \([-]\). More...
 
Scalar density (const int phaseIdx) const
 Returns the mass density of a given phase within the control volume in \([kg/m^3]\). More...
 
Scalar viscosity (const int phaseIdx) const
 Returns the dynamic viscosity of the fluid within the control volume in \(\mathrm{[Pa s]}\). More...
 
Scalar molarDensity (const int phaseIdx) const
 Returns the mass density of a given phase within the control volume in \([mol/m^3]\). More...
 
Scalar pressure (const int phaseIdx) const
 Returns the effective pressure of a given phase within the control volume in \([kg/(m*s^2)=N/m^2=Pa]\). More...
 
Scalar temperature () const
 Returns temperature within the control volume in \([K]\). More...
 
Scalar relativePermeability (const int phaseIdx) const
 Returns the relative permeability of a given phase within the control volume in \([-]\). More...
 
Scalar mobility (const int phaseIdx) const
 Returns the effective mobility of a given phase within the control volume in \([s*m/kg]\). More...
 
Scalar capillaryPressure () const
 Returns the effective capillary pressure within the control volume in \([kg/(m*s^2)=N/m^2=Pa]\). More...
 
Scalar porosity () const
 Returns the average porosity within the control volume in \([-]\). More...
 
const PermeabilityType & permeability () const
 Returns the average permeability within the control volume in \([m^2]\). More...
 
Scalar diffusionCoefficient (int phaseIdx, int compIdx) const
 Returns the binary 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 bool useMoles ()
 Return whether moles or masses are balanced. More...
 
static constexpr TwoPFormulation priVarFormulation ()
 Return the two-phase formulation used here. More...
 
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...
 

Protected Member Functions

const TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > & asImp_ () const
 
TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > & asImp_ ()
 

Member Typedef Documentation

◆ FluidState

template<class Traits , bool useConstraintSolver>
using Dumux::TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver >::FluidState = typename Traits::FluidState

The type of the object returned by the fluidState() method.

◆ FluidSystem

template<class Traits , bool useConstraintSolver>
using Dumux::TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver >::FluidSystem = typename Traits::FluidSystem

The fluid system used here.

◆ Indices

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

Export the type encapsulating primary variable indices.

◆ PrimaryVariables

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

Export the type used for the primary variables.

◆ PrimaryVariableSwitch

template<class Traits , bool useConstraintSolver>
using Dumux::TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver >::PrimaryVariableSwitch = TwoPNCPrimaryVariableSwitch

Export the primary variable switch.

◆ SolidState

template<class Traits , bool useConstraintSolver>
using Dumux::TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver >::SolidState = typename Traits::SolidState

Export type of solid state.

◆ SolidSystem

template<class Traits , bool useConstraintSolver>
using Dumux::TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver >::SolidSystem = typename Traits::SolidSystem

Export type of solid system.

Member Function Documentation

◆ asImp_() [1/2]

TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > & Dumux::TwoPTwoCVolumeVariablesBase< Traits, TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > >::asImp_ ( )
inlineprotectedinherited

◆ asImp_() [2/2]

const TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > & Dumux::TwoPTwoCVolumeVariablesBase< Traits, TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > >::asImp_ ( ) const
inlineprotectedinherited

◆ averageMolarMass()

Scalar Dumux::TwoPTwoCVolumeVariablesBase< Traits, TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > >::averageMolarMass ( int  phaseIdx) const
inlineinherited

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

Parameters
phaseIdxThe phase index

◆ capillaryPressure()

Scalar Dumux::TwoPTwoCVolumeVariablesBase< Traits, TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > >::capillaryPressure ( ) const
inlineinherited

Returns the effective capillary pressure within the control volume in \([kg/(m*s^2)=N/m^2=Pa]\).

◆ completeFluidState()

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

Sets complete fluid state.

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
fluidStateA container with the current (physical) state of the fluid
solidStateA container with the current (physical) state of the solid

Set temperature, saturations, capillary pressures, viscosities, densities and enthalpies.

◆ density()

Scalar Dumux::TwoPTwoCVolumeVariablesBase< Traits, TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > >::density ( const int  phaseIdx) const
inlineinherited

Returns the mass density of a given phase within the control volume in \([kg/m^3]\).

Parameters
phaseIdxThe phase index

◆ diffusionCoefficient()

Scalar Dumux::TwoPTwoCVolumeVariablesBase< Traits, TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > >::diffusionCoefficient ( int  phaseIdx,
int  compIdx 
) const
inlineinherited

Returns the binary 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()

const FluidState & Dumux::TwoPTwoCVolumeVariablesBase< Traits, TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > >::fluidState ( ) const
inlineinherited

Returns the phase state within the control volume.

◆ massFraction()

Scalar Dumux::TwoPTwoCVolumeVariablesBase< Traits, TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > >::massFraction ( const int  phaseIdx,
const int  compIdx 
) const
inlineinherited

Returns the mass fraction of a given component in a given phase within the control volume in \([-]\).

Parameters
phaseIdxThe phase index
compIdxThe component index

◆ mobility()

Scalar Dumux::TwoPTwoCVolumeVariablesBase< Traits, TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > >::mobility ( const int  phaseIdx) const
inlineinherited

Returns the effective mobility of a given phase within the control volume in \([s*m/kg]\).

Parameters
phaseIdxThe phase index

◆ molarDensity()

Scalar Dumux::TwoPTwoCVolumeVariablesBase< Traits, TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > >::molarDensity ( const int  phaseIdx) const
inlineinherited

Returns the mass density of a given phase within the control volume in \([mol/m^3]\).

Parameters
phaseIdxThe phase index

◆ moleFraction()

Scalar Dumux::TwoPTwoCVolumeVariablesBase< Traits, TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > >::moleFraction ( const int  phaseIdx,
const int  compIdx 
) const
inlineinherited

Returns the mole fraction of a given component in a given phase within the control volume in \([-]\).

Parameters
phaseIdxThe phase index
compIdxThe component index

◆ 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()

const PermeabilityType & Dumux::TwoPTwoCVolumeVariablesBase< Traits, TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > >::permeability ( ) const
inlineinherited

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

◆ porosity()

Scalar Dumux::TwoPTwoCVolumeVariablesBase< Traits, TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > >::porosity ( ) const
inlineinherited

Returns the average porosity within the control volume in \([-]\).

◆ pressure()

Scalar Dumux::TwoPTwoCVolumeVariablesBase< Traits, TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > >::pressure ( const int  phaseIdx) const
inlineinherited

Returns the effective pressure of a given phase within the control volume in \([kg/(m*s^2)=N/m^2=Pa]\).

Parameters
phaseIdxThe phase index

◆ 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

◆ priVarFormulation()

template<class Traits , bool useConstraintSolver>
static constexpr TwoPFormulation Dumux::TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver >::priVarFormulation ( )
inlinestaticconstexpr

Return the two-phase formulation used here.

◆ priVars()

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

Returns the vector of primary variables.

◆ relativePermeability()

Scalar Dumux::TwoPTwoCVolumeVariablesBase< Traits, TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > >::relativePermeability ( const int  phaseIdx) const
inlineinherited

Returns the relative permeability of a given phase within the control volume in \([-]\).

Parameters
phaseIdxThe phase index

◆ saturation()

Scalar Dumux::TwoPTwoCVolumeVariablesBase< Traits, TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > >::saturation ( const int  phaseIdx) const
inlineinherited

Returns the saturation of a given phase within the control volume in \([-]\).

Parameters
phaseIdxThe phase index

◆ solidState()

const SolidState & Dumux::TwoPTwoCVolumeVariablesBase< Traits, TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > >::solidState ( ) const
inlineinherited

Returns the phase state for the control-volume.

◆ temperature()

Scalar Dumux::TwoPTwoCVolumeVariablesBase< Traits, TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > >::temperature ( ) const
inlineinherited

Returns temperature within the control volume in \([K]\).

Note that we assume thermodynamic equilibrium, i.e. the temperature of the rock matrix and of all fluid phases are identical.

◆ update()

void Dumux::TwoPTwoCVolumeVariablesBase< Traits, TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > >::update ( const ElemSol &  elemSol,
const Problem &  problem,
const Element &  element,
const Scv &  scv 
)
inlineinherited

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

◆ useMoles()

template<class Traits , bool useConstraintSolver>
static constexpr bool Dumux::TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver >::useMoles ( )
inlinestaticconstexpr

Return whether moles or masses are balanced.

◆ viscosity()

Scalar Dumux::TwoPTwoCVolumeVariablesBase< Traits, TwoPTwoCVolumeVariablesImplementation< Traits, false, useConstraintSolver > >::viscosity ( const int  phaseIdx) const
inlineinherited

Returns the dynamic viscosity of the fluid within the control volume in \(\mathrm{[Pa s]}\).

Parameters
phaseIdxThe phase index

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