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

Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system. More...

#include <dumux/material/fluidstates/nonequilibriummass.hh>

Inheritance diagram for Dumux::NonEquilibriumMassFluidState< ScalarType, FluidSystem >:
Inheritance graph

Description

template<class ScalarType, class FluidSystem>
class Dumux::NonEquilibriumMassFluidState< ScalarType, FluidSystem >

Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system.

This fluidstate ought to be used for the case of:

Public Types

using Scalar = ScalarType
 export the scalar type More...
 

Public Member Functions

void setTemperature (const int phaseIdx, const Scalar value)
 Set the temperature \(\mathrm{[K]}\) of a fluid phase. More...
 
void setTemperature (int phaseIdx, Scalar value)
 Set the temperature \(\mathrm{[K]}\) of a fluid phase. More...
 
void setTemperature (Scalar value)
 Set the temperature \(\mathrm{[K]}\) of all fluid phases. More...
 
int wettingPhase () const
 Returns the index of the wetting phase in the fluid-solid configuration (for porous medium systems). More...
 
Scalar saturation (int phaseIdx) const
 Returns the saturation \(S_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[-]}\). More...
 
Scalar moleFraction (int phaseIdx, int compIdx) const
 Returns the molar fraction \(x^\kappa_\alpha\) of the component \(\kappa\) in fluid phase \(\alpha\) in \(\mathrm{[-]}\). More...
 
Scalar massFraction (int phaseIdx, int compIdx) const
 Returns the mass fraction \(X^\kappa_\alpha\) of component \(\kappa\) in fluid phase \(\alpha\) in \(\mathrm{[-]}\). More...
 
Scalar averageMolarMass (int phaseIdx) const
 The average molar mass \(\overline M_\alpha\) of phase \(\alpha\) in \(\mathrm{[kg/mol]}\). More...
 
Scalar molarity (int phaseIdx, int compIdx) const
 The molar concentration \(c^\kappa_\alpha\) of component \(\kappa\) in fluid phase \(\alpha\) in \(\mathrm{[mol/m^3]}\). More...
 
Scalar fugacityCoefficient (int phaseIdx, int compIdx) const
 The fugacity coefficient \(\Phi^\kappa_\alpha\) of component \(\kappa\) in fluid phase \(\alpha\) in \(\mathrm{[-]}\). More...
 
Scalar fugacity (int phaseIdx, int compIdx) const
 The fugacity \(f^\kappa_\alpha\) of component \(\kappa\) in fluid phase \(\alpha\) in \(\mathrm{[Pa]}\). More...
 
Scalar fugacity (int compIdx) const
 
Scalar molarVolume (int phaseIdx) const
 The molar volume \(v_{mol,\alpha}\) of a fluid phase \(\alpha\) in \(\mathrm{[m^3/mol]}\). More...
 
Scalar density (int phaseIdx) const
 The mass density \(\rho_\alpha\) of the fluid phase \(\alpha\) in \(\mathrm{[kg/m^3]}\). More...
 
Scalar molarDensity (int phaseIdx) const
 The molar density \(\rho_{mol,\alpha}\) of a fluid phase \(\alpha\) in \(\mathrm{[mol/m^3]}\). More...
 
Scalar temperature (const int phaseIdx) const
 The absolute temperature \(T_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[K]}\). More...
 
Scalar temperature () const
 Get the equilibrium temperature \(\mathrm{[K]}\) of the fluid phases. More...
 
Scalar pressure (int phaseIdx) const
 The pressure \(p_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[Pa]}\). More...
 
Scalar partialPressure (int phaseIdx, int compIdx) const
 The partial pressure of a component in a phase \(\mathrm{[Pa]}\). More...
 
Scalar enthalpy (int phaseIdx) const
 The specific enthalpy \(h_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[J/kg]}\). More...
 
Scalar internalEnergy (int phaseIdx) const
 The specific internal energy \(u_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[J/kg]}\). More...
 
Scalar viscosity (int phaseIdx) const
 The dynamic viscosity \(\mu_\alpha\) of fluid phase \(\alpha\) in \(\mathrm{[Pa s]}\). More...
 
void setPressure (int phaseIdx, Scalar value)
 Set the fluid pressure of a phase \(\mathrm{[Pa]}\). More...
 
void setSaturation (int phaseIdx, Scalar value)
 Set the saturation of a phase \(\mathrm{[-]}\). More...
 
void setMoleFraction (int phaseIdx, int compIdx, Scalar value)
 Set the mole fraction of a component in a phase \(\mathrm{[-]}\). More...
 
void setMassFraction (int phaseIdx, int compIdx, Scalar value)
 Set the mass fraction of a component in a phase \(\mathrm{[-]}\) and update the average molar mass \(\mathrm{[kg/mol]}\) according to the current composition of the phase. More...
 
void setFugacityCoefficient (int phaseIdx, int compIdx, Scalar value)
 Set the fugacity of a component in a phase \(\mathrm{[-]}\). More...
 
void setDensity (int phaseIdx, Scalar value)
 Set the density of a phase \(\mathrm{[kg / m^3]}\). More...
 
void setMolarDensity (int phaseIdx, Scalar value)
 Set the molar density of a phase \(\mathrm{[kg / m^3]}\). More...
 
void setEnthalpy (int phaseIdx, Scalar value)
 Set the specific enthalpy of a phase \(\mathrm{[J/m^3]}\). More...
 
void setViscosity (int phaseIdx, Scalar value)
 Set the dynamic viscosity of a phase \(\mathrm{[Pa s]}\). More...
 
void setWettingPhase (int phaseIdx)
 Set the index of the wetting phase. More...
 
template<class FluidState >
void assign (const FluidState &fs)
 Retrieve all parameters from an arbitrary fluid state. More...
 

Static Public Attributes

static constexpr int numPhases = FluidSystem::numPhases
 
static constexpr int numComponents = FluidSystem::numComponents
 

Protected Attributes

Scalar moleFraction_ [numPhases][numComponents] = {}
 
Scalar fugacityCoefficient_ [numPhases][numComponents] = {}
 
Scalar averageMolarMass_ [numPhases] = {}
 
Scalar sumMoleFractions_ [numPhases] = {}
 
Scalar pressure_ [numPhases] = {}
 
Scalar saturation_ [numPhases] = {}
 
Scalar density_ [numPhases] = {}
 
Scalar molarDensity_ [numPhases] = {}
 
Scalar enthalpy_ [numPhases] = {}
 
Scalar viscosity_ [numPhases] = {}
 
Scalar temperature_ [numPhases] = {}
 
Scalar temperatureEquil_ = 0.0
 
int wPhaseIdx_ {0}
 

Member Typedef Documentation

◆ Scalar

template<class ScalarType , class FluidSystem >
using Dumux::NonEquilibriumMassFluidState< ScalarType, FluidSystem >::Scalar = ScalarType

export the scalar type

Member Function Documentation

◆ assign()

template<class ScalarType , class FluidSystem >
template<class FluidState >
void Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::assign ( const FluidState &  fs)
inlineinherited

Retrieve all parameters from an arbitrary fluid state.

Parameters
fsFluidstate

◆ averageMolarMass()

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::averageMolarMass ( int  phaseIdx) const
inlineinherited

The average molar mass \(\overline M_\alpha\) of phase \(\alpha\) in \(\mathrm{[kg/mol]}\).

The average molar mass is the mean mass of a mole of the fluid at current composition. It is defined as the sum of the component's molar masses weighted by the current mole fraction:

\[\mathrm{ \overline M_\alpha = \sum_\kappa M^\kappa x_\alpha^\kappa}\]

◆ density()

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::density ( int  phaseIdx) const
inlineinherited

The mass density \(\rho_\alpha\) of the fluid phase \(\alpha\) in \(\mathrm{[kg/m^3]}\).

◆ enthalpy()

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::enthalpy ( int  phaseIdx) const
inlineinherited

The specific enthalpy \(h_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[J/kg]}\).

◆ fugacity() [1/2]

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::fugacity ( int  compIdx) const
inlineinherited

◆ fugacity() [2/2]

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::fugacity ( int  phaseIdx,
int  compIdx 
) const
inlineinherited

The fugacity \(f^\kappa_\alpha\) of component \(\kappa\) in fluid phase \(\alpha\) in \(\mathrm{[Pa]}\).

The fugacity is defined as: \(f_\alpha^\kappa := \Phi^\kappa_\alpha x^\kappa_\alpha p_\alpha \;,\) where \(\Phi^\kappa_\alpha\) is the fugacity coefficient [53] . The physical meaning of fugacity becomes clear from the equation:

\[f_\alpha^\kappa = p_\alpha \exp\left\{\frac{\zeta^\kappa_\alpha}{R T_\alpha} \right\} \;,\]

where \(\zeta^\kappa_\alpha\) represents the \(\kappa\)'s chemical potential in phase \(\alpha\), \(R\) stands for the ideal gas constant, and \(T_\alpha\) for the absolute temperature of phase \(\alpha\). Assuming thermal equilibrium, there is a one-to-one mapping between a component's chemical potential \(\zeta^\kappa_\alpha\) and its fugacity \(f^\kappa_\alpha\). In this case chemical equilibrium can thus be expressed by:

\[f^\kappa := f^\kappa_\alpha = f^\kappa_\beta\quad\forall \alpha, \beta\]

◆ fugacityCoefficient()

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::fugacityCoefficient ( int  phaseIdx,
int  compIdx 
) const
inlineinherited

The fugacity coefficient \(\Phi^\kappa_\alpha\) of component \(\kappa\) in fluid phase \(\alpha\) in \(\mathrm{[-]}\).

◆ internalEnergy()

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::internalEnergy ( int  phaseIdx) const
inlineinherited

The specific internal energy \(u_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[J/kg]}\).

The specific internal energy is defined by the relation:

\[u_\alpha = h_\alpha - \frac{p_\alpha}{\rho_\alpha}\]

◆ massFraction()

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::massFraction ( int  phaseIdx,
int  compIdx 
) const
inlineinherited

Returns the mass fraction \(X^\kappa_\alpha\) of component \(\kappa\) in fluid phase \(\alpha\) in \(\mathrm{[-]}\).

The mass fraction \(X^\kappa_\alpha\) is defined as the weight of all molecules of a component divided by the total mass of the fluid phase. It is related with the component's mole fraction by means of the relation

\[X^\kappa_\alpha = x^\kappa_\alpha \frac{M^\kappa}{\overline M_\alpha}\;,\]

where \(M^\kappa\) is the molar mass of component \(\kappa\) and \(\overline M_\alpha\) is the mean molar mass of a molecule of phase \(\alpha\).

Parameters
phaseIdxthe index of the phase
compIdxthe index of the component

◆ molarDensity()

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::molarDensity ( int  phaseIdx) const
inlineinherited

The molar density \(\rho_{mol,\alpha}\) of a fluid phase \(\alpha\) in \(\mathrm{[mol/m^3]}\).

The molar density is defined by the mass density \(\rho_\alpha\) and the mean molar mass \(\overline M_\alpha\):

\[\rho_{mol,\alpha} = \frac{\rho_\alpha}{\overline M_\alpha} \;.\]

◆ molarity()

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::molarity ( int  phaseIdx,
int  compIdx 
) const
inlineinherited

The molar concentration \(c^\kappa_\alpha\) of component \(\kappa\) in fluid phase \(\alpha\) in \(\mathrm{[mol/m^3]}\).

This quantity is usually called "molar concentration" or just "concentration", but there are many other (though less common) measures for concentration.

http://en.wikipedia.org/wiki/Concentration

◆ molarVolume()

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::molarVolume ( int  phaseIdx) const
inlineinherited

The molar volume \(v_{mol,\alpha}\) of a fluid phase \(\alpha\) in \(\mathrm{[m^3/mol]}\).

This quantity is the inverse of the molar density.

◆ moleFraction()

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::moleFraction ( int  phaseIdx,
int  compIdx 
) const
inlineinherited

Returns the molar fraction \(x^\kappa_\alpha\) of the component \(\kappa\) in fluid phase \(\alpha\) in \(\mathrm{[-]}\).

The molar fraction \(x^\kappa_\alpha\) is defined as the ratio of the number of molecules of component \(\kappa\) and the total number of molecules of the phase \(\alpha\).

Parameters
phaseIdxthe index of the phase
compIdxthe index of the component

◆ partialPressure()

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::partialPressure ( int  phaseIdx,
int  compIdx 
) const
inlineinherited

The partial pressure of a component in a phase \(\mathrm{[Pa]}\).

Todo:
is this needed?

◆ pressure()

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::pressure ( int  phaseIdx) const
inlineinherited

The pressure \(p_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[Pa]}\).

◆ saturation()

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::saturation ( int  phaseIdx) const
inlineinherited

Returns the saturation \(S_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[-]}\).

The saturation is defined as the pore space occupied by the fluid divided by the total pore space:

\[S_\alpha := \frac{\phi \mathcal{V}_\alpha}{\phi \mathcal{V}}\]

Parameters
phaseIdxthe index of the phase

◆ setDensity()

template<class ScalarType , class FluidSystem >
void Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::setDensity ( int  phaseIdx,
Scalar  value 
)
inlineinherited

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

◆ setEnthalpy()

template<class ScalarType , class FluidSystem >
void Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::setEnthalpy ( int  phaseIdx,
Scalar  value 
)
inlineinherited

Set the specific enthalpy of a phase \(\mathrm{[J/m^3]}\).

◆ setFugacityCoefficient()

template<class ScalarType , class FluidSystem >
void Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::setFugacityCoefficient ( int  phaseIdx,
int  compIdx,
Scalar  value 
)
inlineinherited

Set the fugacity of a component in a phase \(\mathrm{[-]}\).

◆ setMassFraction()

template<class ScalarType , class FluidSystem >
void Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::setMassFraction ( int  phaseIdx,
int  compIdx,
Scalar  value 
)
inlineinherited

Set the mass fraction of a component in a phase \(\mathrm{[-]}\) and update the average molar mass \(\mathrm{[kg/mol]}\) according to the current composition of the phase.

◆ setMolarDensity()

template<class ScalarType , class FluidSystem >
void Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::setMolarDensity ( int  phaseIdx,
Scalar  value 
)
inlineinherited

Set the molar density of a phase \(\mathrm{[kg / m^3]}\).

◆ setMoleFraction()

template<class ScalarType , class FluidSystem >
void Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::setMoleFraction ( int  phaseIdx,
int  compIdx,
Scalar  value 
)
inlineinherited

Set the mole fraction of a component in a phase \(\mathrm{[-]}\).

◆ setPressure()

template<class ScalarType , class FluidSystem >
void Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::setPressure ( int  phaseIdx,
Scalar  value 
)
inlineinherited

Set the fluid pressure of a phase \(\mathrm{[Pa]}\).

◆ setSaturation()

template<class ScalarType , class FluidSystem >
void Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::setSaturation ( int  phaseIdx,
Scalar  value 
)
inlineinherited

Set the saturation of a phase \(\mathrm{[-]}\).

◆ setTemperature() [1/3]

template<class ScalarType , class FluidSystem >
void Dumux::NonEquilibriumMassFluidState< ScalarType, FluidSystem >::setTemperature ( const int  phaseIdx,
const Scalar  value 
)
inline

Set the temperature \(\mathrm{[K]}\) of a fluid phase.

Note
only the setTemperature(value) overload in the NonEquilibriumFluidState makes sense for thermal equilibrium

◆ setTemperature() [2/3]

template<class ScalarType , class FluidSystem >
void Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::setTemperature ( int  phaseIdx,
Scalar  value 
)
inline

Set the temperature \(\mathrm{[K]}\) of a fluid phase.

◆ setTemperature() [3/3]

template<class ScalarType , class FluidSystem >
void Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::setTemperature ( Scalar  value)
inline

Set the temperature \(\mathrm{[K]}\) of all fluid phases.

◆ setViscosity()

template<class ScalarType , class FluidSystem >
void Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::setViscosity ( int  phaseIdx,
Scalar  value 
)
inlineinherited

Set the dynamic viscosity of a phase \(\mathrm{[Pa s]}\).

◆ setWettingPhase()

template<class ScalarType , class FluidSystem >
void Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::setWettingPhase ( int  phaseIdx)
inlineinherited

Set the index of the wetting phase.

◆ temperature() [1/2]

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::temperature ( ) const
inlineinherited

Get the equilibrium temperature \(\mathrm{[K]}\) of the fluid phases.

◆ temperature() [2/2]

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::temperature ( const int  phaseIdx) const
inlineinherited

The absolute temperature \(T_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[K]}\).

◆ viscosity()

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::viscosity ( int  phaseIdx) const
inlineinherited

The dynamic viscosity \(\mu_\alpha\) of fluid phase \(\alpha\) in \(\mathrm{[Pa s]}\).

◆ wettingPhase()

template<class ScalarType , class FluidSystem >
int Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::wettingPhase ( ) const
inlineinherited

Returns the index of the wetting phase in the fluid-solid configuration (for porous medium systems).

Member Data Documentation

◆ averageMolarMass_

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::averageMolarMass_[numPhases] = {}
protectedinherited

◆ density_

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::density_[numPhases] = {}
protectedinherited

◆ enthalpy_

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::enthalpy_[numPhases] = {}
protectedinherited

◆ fugacityCoefficient_

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::fugacityCoefficient_[numPhases][numComponents] = {}
protectedinherited

◆ molarDensity_

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::molarDensity_[numPhases] = {}
protectedinherited

◆ moleFraction_

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::moleFraction_[numPhases][numComponents] = {}
protectedinherited

◆ numComponents

template<class ScalarType , class FluidSystem >
constexpr int Dumux::NonEquilibriumMassFluidState< ScalarType, FluidSystem >::numComponents = FluidSystem::numComponents
staticconstexpr

◆ numPhases

template<class ScalarType , class FluidSystem >
constexpr int Dumux::NonEquilibriumMassFluidState< ScalarType, FluidSystem >::numPhases = FluidSystem::numPhases
staticconstexpr

◆ pressure_

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::pressure_[numPhases] = {}
protectedinherited

◆ saturation_

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::saturation_[numPhases] = {}
protectedinherited

◆ sumMoleFractions_

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::sumMoleFractions_[numPhases] = {}
protectedinherited

◆ temperature_

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::temperature_[numPhases] = {}
protectedinherited

◆ temperatureEquil_

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::temperatureEquil_ = 0.0
protectedinherited

◆ viscosity_

template<class ScalarType , class FluidSystem >
Scalar Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::viscosity_[numPhases] = {}
protectedinherited

◆ wPhaseIdx_

template<class ScalarType , class FluidSystem >
int Dumux::NonEquilibriumFluidState< ScalarType, FluidSystem >::wPhaseIdx_ {0}
protectedinherited

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