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 | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Dumux::MPNCVolumeVariablesImplementation< Traits, true > Class Template Reference

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

Inheritance diagram for Dumux::MPNCVolumeVariablesImplementation< Traits, true >:
Inheritance graph

Public Types

using FluidSystem = typename Traits::FluidSystem
 Export the underlying fluid system. More...
 
using FluidState = typename Traits::FluidState
 Export the fluid state type. More...
 
using SolidState = typename Traits::SolidState
 Export type of solid state. More...
 
using SolidSystem = typename Traits::SolidSystem
 Export type of solid system. More...
 
using ConstraintSolver = MiscibleMultiPhaseComposition< Scalar, FluidSystem >
 
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)
 Sets complete fluid state. More...
 
void updateMoleFraction (FluidState &actualFluidState, ParameterCache &paramCache, const typename Traits::PrimaryVariables &priVars)
 Updates composition of all phases in the mutable parameters from the primary variables. More...
 
const Scalar xEquil (const unsigned int phaseIdx, const unsigned int compIdx) const
 The mole fraction we would have in the case of chemical equilibrium / on the interface. 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 saturation (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 molarity (const int phaseIdx, int compIdx) const
 Returns the concentration \(\mathrm{[mol/m^3]}\) of a component in the phase. More...
 
Scalar molarDensity (const int phaseIdx) const
 Returns the molar density \(\mathrm{[mol/m^3]}\) the of the fluid phase. More...
 
Scalar pressure (const int phaseIdx) const
 Returns the effective pressure \(\mathrm{[Pa]}\) of a given phase within the control volume. More...
 
Scalar density (const int phaseIdx) const
 Returns the density \(\mathrm{[kg/m^3]}\) the of the fluid phase. More...
 
Scalar temperature () const
 Returns the temperature inside the sub-control volume. More...
 
Scalar enthalpy (const int phaseIdx) const
 Returns the enthalpy \(\mathrm{[kg/m^3]}\) the of the fluid phase. More...
 
Scalar internalEnergy (const int phaseIdx) const
 Returns the internal energy \(\mathrm{[kg/m^3]}\) the of the fluid phase. More...
 
Scalar fluidThermalConductivity (const int phaseIdx) const
 Returns the thermal conductivity \(\mathrm{[W/(m*K)]}\) of a fluid phase in the sub-control volume. More...
 
Scalar fugacity (const int compIdx) const
 Returns the fugacity \(\mathrm{[kg/m^3]}\) the of the component. More...
 
Scalar averageMolarMass (const int phaseIdx) const
 Returns the average molar mass \(\mathrm{[kg/m^3]}\) the of the phase. More...
 
Scalar mobility (const unsigned int phaseIdx) const
 Returns the effective mobility of a given phase within the control volume. More...
 
Scalar viscosity (const unsigned int phaseIdx) const
 Returns the viscosity of a given phase within the control volume. More...
 
Scalar relativePermeability (const unsigned int phaseIdx) const
 Returns the relative permeability of a given phase within the control volume. 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...
 
bool isPhaseActive (const unsigned int phaseIdx) const
 Returns true if the fluid state is in the active set for a phase,. More...
 
Scalar diffusionCoefficient (int phaseIdx, int compIdx) const
 Returns the diffusion coefficient. More...
 
Scalar phaseNcp (const unsigned int phaseIdx) const
 Returns the value of the NCP-function for a phase. More...
 
Scalar phasePresentIneq (const FluidState &fluidState, const unsigned int phaseIdx) const
 Returns the value of the inequality where a phase is present. More...
 
Scalar phaseNotPresentIneq (const FluidState &fluidState, const unsigned int phaseIdx) const
 Returns the value of the inequality where a phase is not present. 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 numFluidComps = ParentType::numFluidComponents()
 Return number of components considered by the model. More...
 

Protected Member Functions

void setDiffusionCoefficient_ (int phaseIdx, int compIdx, Scalar d)
 

Protected Attributes

std::array< std::array< Scalar, numFluidComps-1 >, numFluidPhases()> diffCoefficient_
 
std::array< Scalar, ModelTraits::numFluidPhases()> relativePermeability_
 Effective relative permeability within the control volume. More...
 
PermeabilityType permeability_
 
std::array< std::array< Scalar, numFluidComps >, numFluidPhases()> xEquil_
 
FluidState fluidState_
 Mass fractions of each component within each phase. More...
 
SolidState solidState_
 

Member Typedef Documentation

◆ ConstraintSolver

template<class Traits >
using Dumux::MPNCVolumeVariablesImplementation< Traits, true >::ConstraintSolver = MiscibleMultiPhaseComposition<Scalar, FluidSystem>

◆ FluidState

template<class Traits >
using Dumux::MPNCVolumeVariablesImplementation< Traits, true >::FluidState = typename Traits::FluidState

Export the fluid state type.

◆ FluidSystem

template<class Traits >
using Dumux::MPNCVolumeVariablesImplementation< Traits, true >::FluidSystem = typename Traits::FluidSystem

Export the underlying fluid system.

◆ 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::MPNCVolumeVariablesImplementation< Traits, true >::SolidState = typename Traits::SolidState

Export type of solid state.

◆ SolidSystem

template<class Traits >
using Dumux::MPNCVolumeVariablesImplementation< Traits, true >::SolidSystem = typename Traits::SolidSystem

Export type of solid system.

Member Function Documentation

◆ averageMolarMass()

template<class Traits >
Scalar Dumux::MPNCVolumeVariablesImplementation< Traits, true >::averageMolarMass ( const int  phaseIdx) const
inline

Returns the average molar mass \(\mathrm{[kg/m^3]}\) the of the phase.

◆ completeFluidState()

template<class Traits >
template<class ElemSol , class Problem , class Element , class Scv >
void Dumux::MPNCVolumeVariablesImplementation< Traits, true >::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

◆ density()

template<class Traits >
Scalar Dumux::MPNCVolumeVariablesImplementation< Traits, true >::density ( const int  phaseIdx) const
inline

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

Parameters
phaseIdxThe phase index

◆ diffusionCoefficient()

template<class Traits >
Scalar Dumux::MPNCVolumeVariablesImplementation< Traits, true >::diffusionCoefficient ( int  phaseIdx,
int  compIdx 
) const
inline

Returns the diffusion coefficient.

◆ enthalpy()

template<class Traits >
Scalar Dumux::MPNCVolumeVariablesImplementation< Traits, true >::enthalpy ( const int  phaseIdx) const
inline

Returns the enthalpy \(\mathrm{[kg/m^3]}\) the of the fluid phase.

◆ 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::MPNCVolumeVariablesImplementation< Traits, true >::fluidState ( ) const
inline

Returns the fluid configuration at the given primary variables.

◆ fluidThermalConductivity()

template<class Traits >
Scalar Dumux::MPNCVolumeVariablesImplementation< Traits, true >::fluidThermalConductivity ( const int  phaseIdx) const
inline

Returns the thermal conductivity \(\mathrm{[W/(m*K)]}\) of a fluid phase in the sub-control volume.

◆ fugacity()

template<class Traits >
Scalar Dumux::MPNCVolumeVariablesImplementation< Traits, true >::fugacity ( const int  compIdx) const
inline

Returns the fugacity \(\mathrm{[kg/m^3]}\) the of the component.

◆ internalEnergy()

template<class Traits >
Scalar Dumux::MPNCVolumeVariablesImplementation< Traits, true >::internalEnergy ( const int  phaseIdx) const
inline

Returns the internal energy \(\mathrm{[kg/m^3]}\) the of the fluid phase.

◆ isPhaseActive()

template<class Traits >
bool Dumux::MPNCVolumeVariablesImplementation< Traits, true >::isPhaseActive ( const unsigned int  phaseIdx) const
inline

Returns true if the fluid state is in the active set for a phase,.

Parameters
phaseIdxThe local index of the phases

◆ massFraction()

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

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

template<class Traits >
Scalar Dumux::MPNCVolumeVariablesImplementation< Traits, true >::mobility ( const unsigned int  phaseIdx) const
inline

Returns the effective mobility of a given phase within the control volume.

Parameters
phaseIdxThe local index of the phases

◆ molarDensity()

template<class Traits >
Scalar Dumux::MPNCVolumeVariablesImplementation< Traits, true >::molarDensity ( const int  phaseIdx) const
inline

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

Parameters
phaseIdxThe phase index

◆ molarity()

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

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

Parameters
phaseIdxThe phase index
compIdxThe index of the component

◆ moleFraction()

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

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::MPNCVolumeVariablesImplementation< Traits, true >::numFluidPhases ( )
inlinestaticconstexpr

Return number of phases considered by the model.

◆ permeability()

template<class Traits >
const PermeabilityType & Dumux::MPNCVolumeVariablesImplementation< Traits, true >::permeability ( ) const
inline

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

◆ phaseNcp()

template<class Traits >
Scalar Dumux::MPNCVolumeVariablesImplementation< Traits, true >::phaseNcp ( const unsigned int  phaseIdx) const
inline

Returns the value of the NCP-function for a phase.

 \param phaseIdx The local index of the phases

◆ phaseNotPresentIneq()

template<class Traits >
Scalar Dumux::MPNCVolumeVariablesImplementation< Traits, true >::phaseNotPresentIneq ( const FluidState fluidState,
const unsigned int  phaseIdx 
) const
inline

Returns the value of the inequality where a phase is not present.

Parameters
phaseIdxThe local index of the phases
fluidStateContainer for all the secondary variables concerning the fluids

◆ phasePresentIneq()

template<class Traits >
Scalar Dumux::MPNCVolumeVariablesImplementation< Traits, true >::phasePresentIneq ( const FluidState fluidState,
const unsigned int  phaseIdx 
) const
inline

Returns the value of the inequality where a phase is present.

Parameters
phaseIdxThe local index of the phases
fluidStateContainer for all the secondary variables concerning the fluids

◆ porosity()

template<class Traits >
Scalar Dumux::MPNCVolumeVariablesImplementation< Traits, true >::porosity ( ) const
inline

Returns the average porosity within the control volume.

◆ pressure()

template<class Traits >
Scalar Dumux::MPNCVolumeVariablesImplementation< Traits, true >::pressure ( const int  phaseIdx) const
inline

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

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

◆ priVars()

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

Returns the vector of primary variables.

◆ relativePermeability()

template<class Traits >
Scalar Dumux::MPNCVolumeVariablesImplementation< Traits, true >::relativePermeability ( const unsigned int  phaseIdx) const
inline

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

Parameters
phaseIdxThe local index of the phases

◆ saturation()

template<class Traits >
Scalar Dumux::MPNCVolumeVariablesImplementation< Traits, true >::saturation ( int  phaseIdx) const
inline

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

Parameters
phaseIdxThe phase index

◆ setDiffusionCoefficient_()

template<class Traits >
void Dumux::MPNCVolumeVariablesImplementation< Traits, true >::setDiffusionCoefficient_ ( int  phaseIdx,
int  compIdx,
Scalar  d 
)
inlineprotected

◆ solidState()

template<class Traits >
const SolidState & Dumux::MPNCVolumeVariablesImplementation< Traits, true >::solidState ( ) const
inline

Returns the phase state for the control-volume.

◆ temperature()

template<class Traits >
Scalar Dumux::MPNCVolumeVariablesImplementation< Traits, true >::temperature ( ) const
inline

Returns the temperature inside the sub-control volume.

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

◆ update()

template<class Traits >
template<class ElemSol , class Problem , class Element , class Scv >
void Dumux::MPNCVolumeVariablesImplementation< Traits, true >::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

◆ updateMoleFraction()

template<class Traits >
void Dumux::MPNCVolumeVariablesImplementation< Traits, true >::updateMoleFraction ( FluidState actualFluidState,
ParameterCache &  paramCache,
const typename Traits::PrimaryVariables &  priVars 
)
inline

Updates composition of all phases in the mutable parameters from the primary variables.

Parameters
actualFluidStateContainer for all the secondary variables concerning the fluids
paramCacheContainer for cache parameters
priVarsThe primary Variables

◆ viscosity()

template<class Traits >
Scalar Dumux::MPNCVolumeVariablesImplementation< Traits, true >::viscosity ( const unsigned int  phaseIdx) const
inline

Returns the viscosity of a given phase within the control volume.

◆ xEquil()

template<class Traits >
const Scalar Dumux::MPNCVolumeVariablesImplementation< Traits, true >::xEquil ( const unsigned int  phaseIdx,
const unsigned int  compIdx 
) const
inline

The mole fraction we would have in the case of chemical equilibrium / on the interface.

Parameters
phaseIdxThe index of the fluid phase
compIdxThe local index of the component

Member Data Documentation

◆ diffCoefficient_

template<class Traits >
std::array<std::array<Scalar, numFluidComps-1>, numFluidPhases()> Dumux::MPNCVolumeVariablesImplementation< Traits, true >::diffCoefficient_
protected

◆ fluidState_

template<class Traits >
FluidState Dumux::MPNCVolumeVariablesImplementation< Traits, true >::fluidState_
protected

Mass fractions of each component within each phase.

◆ numFluidComps

template<class Traits >
constexpr int Dumux::MPNCVolumeVariablesImplementation< Traits, true >::numFluidComps = ParentType::numFluidComponents()
staticconstexpr

Return number of components considered by the model.

◆ permeability_

template<class Traits >
PermeabilityType Dumux::MPNCVolumeVariablesImplementation< Traits, true >::permeability_
protected

◆ relativePermeability_

template<class Traits >
std::array<Scalar, ModelTraits::numFluidPhases()> Dumux::MPNCVolumeVariablesImplementation< Traits, true >::relativePermeability_
protected

Effective relative permeability within the control volume.

◆ solidState_

template<class Traits >
SolidState Dumux::MPNCVolumeVariablesImplementation< Traits, true >::solidState_
protected

◆ xEquil_

template<class Traits >
std::array<std::array<Scalar, numFluidComps>, numFluidPhases()> Dumux::MPNCVolumeVariablesImplementation< Traits, true >::xEquil_
protected

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