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::PressureOverlayFluidState< FluidState > Class Template Reference

This is a fluid state which allows to set the fluid pressures and takes all other quantities from an other fluid state. More...

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

Description

template<class FluidState>
class Dumux::PressureOverlayFluidState< FluidState >

This is a fluid state which allows to set the fluid pressures and takes all other quantities from an other fluid state.

Public Types

using Scalar = typename FluidState::Scalar
 export the scalar type More...
 

Public Member Functions

 PressureOverlayFluidState (const FluidState &fs)
 Constructor. More...
 
 PressureOverlayFluidState (const PressureOverlayFluidState &fs)=default
 
 PressureOverlayFluidState (PressureOverlayFluidState &&fs)=default
 
PressureOverlayFluidStateoperator= (const PressureOverlayFluidState &fs)=default
 
PressureOverlayFluidStateoperator= (PressureOverlayFluidState &&fs)=default
 
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 fugacity (int phaseIdx, int compIdx) const
 The fugacity \(f^\kappa_\alpha\) of component \(\kappa\) in fluid phase \(\alpha\) in \(\mathrm{[Pa]}\). 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 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 (int phaseIdx) const
 The absolute temperature \(T_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[K]}\). More...
 
Scalar pressure (int phaseIdx) const
 The pressure \(p_\alpha\) of a fluid phase \(\alpha\) in \(\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 pressure \(\mathrm{[Pa]}\) of a fluid phase. More...
 

Static Public Attributes

static constexpr int numPhases = FluidState::numPhases
 
static constexpr int numComponents = FluidState::numComponents
 

Protected Attributes

const FluidState * fs_
 
Scalar pressure_ [numPhases] = {}
 

Member Typedef Documentation

◆ Scalar

template<class FluidState >
using Dumux::PressureOverlayFluidState< FluidState >::Scalar = typename FluidState::Scalar

export the scalar type

Constructor & Destructor Documentation

◆ PressureOverlayFluidState() [1/3]

template<class FluidState >
Dumux::PressureOverlayFluidState< FluidState >::PressureOverlayFluidState ( const FluidState &  fs)
inline

Constructor.

Parameters
fsFluidstate The overlay fluid state copies the pressures from the argument, so it initially behaves exactly like the underlying fluid state.

◆ PressureOverlayFluidState() [2/3]

template<class FluidState >
Dumux::PressureOverlayFluidState< FluidState >::PressureOverlayFluidState ( const PressureOverlayFluidState< FluidState > &  fs)
default

◆ PressureOverlayFluidState() [3/3]

template<class FluidState >
Dumux::PressureOverlayFluidState< FluidState >::PressureOverlayFluidState ( PressureOverlayFluidState< FluidState > &&  fs)
default

Member Function Documentation

◆ averageMolarMass()

template<class FluidState >
Scalar Dumux::PressureOverlayFluidState< FluidState >::averageMolarMass ( int  phaseIdx) const
inline

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 FluidState >
Scalar Dumux::PressureOverlayFluidState< FluidState >::density ( int  phaseIdx) const
inline

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

◆ enthalpy()

template<class FluidState >
Scalar Dumux::PressureOverlayFluidState< FluidState >::enthalpy ( int  phaseIdx) const
inline

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

◆ fugacity()

template<class FluidState >
Scalar Dumux::PressureOverlayFluidState< FluidState >::fugacity ( int  phaseIdx,
int  compIdx 
) const
inline

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 FluidState >
Scalar Dumux::PressureOverlayFluidState< FluidState >::fugacityCoefficient ( int  phaseIdx,
int  compIdx 
) const
inline

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

◆ internalEnergy()

template<class FluidState >
Scalar Dumux::PressureOverlayFluidState< FluidState >::internalEnergy ( int  phaseIdx) const
inline

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 FluidState >
Scalar Dumux::PressureOverlayFluidState< FluidState >::massFraction ( int  phaseIdx,
int  compIdx 
) const
inline

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 FluidState >
Scalar Dumux::PressureOverlayFluidState< FluidState >::molarDensity ( int  phaseIdx) const
inline

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 FluidState >
Scalar Dumux::PressureOverlayFluidState< FluidState >::molarity ( int  phaseIdx,
int  compIdx 
) const
inline

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 FluidState >
Scalar Dumux::PressureOverlayFluidState< FluidState >::molarVolume ( int  phaseIdx) const
inline

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 FluidState >
Scalar Dumux::PressureOverlayFluidState< FluidState >::moleFraction ( int  phaseIdx,
int  compIdx 
) const
inline

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

◆ operator=() [1/2]

template<class FluidState >
PressureOverlayFluidState & Dumux::PressureOverlayFluidState< FluidState >::operator= ( const PressureOverlayFluidState< FluidState > &  fs)
default

◆ operator=() [2/2]

template<class FluidState >
PressureOverlayFluidState & Dumux::PressureOverlayFluidState< FluidState >::operator= ( PressureOverlayFluidState< FluidState > &&  fs)
default

◆ pressure()

template<class FluidState >
Scalar Dumux::PressureOverlayFluidState< FluidState >::pressure ( int  phaseIdx) const
inline

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

◆ saturation()

template<class FluidState >
Scalar Dumux::PressureOverlayFluidState< FluidState >::saturation ( int  phaseIdx) const
inline

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

◆ setPressure()

template<class FluidState >
void Dumux::PressureOverlayFluidState< FluidState >::setPressure ( int  phaseIdx,
Scalar  value 
)
inline

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

◆ temperature()

template<class FluidState >
Scalar Dumux::PressureOverlayFluidState< FluidState >::temperature ( int  phaseIdx) const
inline

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

◆ viscosity()

template<class FluidState >
Scalar Dumux::PressureOverlayFluidState< FluidState >::viscosity ( int  phaseIdx) const
inline

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

Member Data Documentation

◆ fs_

template<class FluidState >
const FluidState* Dumux::PressureOverlayFluidState< FluidState >::fs_
protected

◆ numComponents

template<class FluidState >
constexpr int Dumux::PressureOverlayFluidState< FluidState >::numComponents = FluidState::numComponents
staticconstexpr

◆ numPhases

template<class FluidState >
constexpr int Dumux::PressureOverlayFluidState< FluidState >::numPhases = FluidState::numPhases
staticconstexpr

◆ pressure_

template<class FluidState >
Scalar Dumux::PressureOverlayFluidState< FluidState >::pressure_[numPhases] = {}
protected

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