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

Container for compositional variables in a 1p2c situation. More...

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

Description

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

Container for compositional variables in a 1p2c situation.

This class holds variables for single-phase situations in a 2p2c context. It is used in case of a multiphysics approach. For the non-present phase, no information is stored but 0-values are returned to allow for general output methods. The "flash" calculation routines are in the sequential flash constrain solver, see CompositionalFlash .

Public Types

enum  { phase0Idx = FluidSystem::phase0Idx , phase1Idx = FluidSystem::phase1Idx , comp0Idx = FluidSystem::comp0Idx , comp1Idx = FluidSystem::comp1Idx }
 
using Scalar = ScalarType
 export the scalar type More...
 

Public Member Functions

Acess functions
Scalar saturation (int phaseIdx) const
 Returns the saturation \(S_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[-]}\). More...
 
int presentPhaseIdx () const
 Returns the index of the phase that is present in that cell. More...
 
Scalar partialPressure (int compIdx) const
 Return the partial pressure of a component in the gas phase. More...
 
Scalar partialPressure (int phaseIdx, int compIdx) const
 The partial pressure of a component in a phase \(\mathrm{[Pa]}\). More...
 
Scalar pressure (int phaseIdx) const
 The pressure \(p_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[Pa]}\). More...
 
Scalar density (int phaseIdx) const
 Set the density of a phase \(\mathrm{[kg / m^3]}\). More...
 
Scalar molarDensity (int phaseIdx) const
 The molar density \(\rho_\alpha\) of the fluid phase \(\alpha\) in \(\mathrm{[mol/m^3]}\). 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 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 viscosity (int phaseIdx) const
 The dynamic viscosity \(\mu_\alpha\) of fluid phase \(\alpha\) in \(\mathrm{[Pa s]}\). More...
 
Scalar averageMolarMass (int phaseIdx) const
 The average molar mass \(\overline M_\alpha\) of phase \(\alpha\) in \(\mathrm{[kg/mol]}\). 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 temperature (int phaseIdx) const
 Returns the temperature of the fluids \(\mathrm{[K]}\). More...
 

Static Public Attributes

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

Functions to set Data

Scalar pressure_ [numPhases] = {}
 
Scalar massConcentration_ [numComponents] = {}
 
Scalar averageMolarMass_ = 0.0
 
Scalar massFractionWater_ = 0.0
 
Scalar moleFractionWater_ = 0.0
 
Scalar density_ = 0.0
 
Scalar molarDensity_ = 0.0
 
Scalar viscosity_ = 0.0
 
Scalar enthalpy_ = 0.0
 
Scalar temperature_ = 0.0
 
int presentPhaseIdx_ = 0
 
void setViscosity (int phaseIdx, Scalar value)
 Sets the viscosity of a phase \(\mathrm{[Pa*s]}\). More...
 
void setMassFraction (int phaseIdx, int compIdx, Scalar value)
 Sets the mass fraction of a component in a phase. More...
 
void setMoleFraction (int phaseIdx, int compIdx, Scalar value)
 Sets the molar fraction of a component in a fluid phase. More...
 
void setDensity (int phaseIdx, Scalar value)
 Sets the density of a phase \(\mathrm{[kg/m^3]}\). More...
 
void setMolarDensity (int phaseIdx, Scalar value)
 Set the molar density of a phase \(\mathrm{[mol / m^3]}\). More...
 
void setPresentPhaseIdx (int phaseIdx)
 Sets the phase Index that is present in this fluidState. More...
 
void setTemperature (Scalar value)
 Sets the temperature. More...
 
void setAverageMolarMass (int phaseIdx, Scalar value)
 Set the average molar mass of a fluid phase [kg/mol]. More...
 
void setPressure (int phaseIdx, Scalar value)
 Sets the phase pressure \(\mathrm{[Pa]}\). More...
 
void setEnthalpy (int phaseIdx, Scalar value)
 Sets phase enthalpy. More...
 

Member Typedef Documentation

◆ Scalar

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

export the scalar type

Member Enumeration Documentation

◆ anonymous enum

template<class ScalarType , class FluidSystem >
anonymous enum
Enumerator
phase0Idx 
phase1Idx 
comp0Idx 
comp1Idx 

Member Function Documentation

◆ averageMolarMass()

template<class ScalarType , class FluidSystem >
Scalar Dumux::PseudoOnePTwoCFluidState< ScalarType, FluidSystem >::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 ScalarType , class FluidSystem >
Scalar Dumux::PseudoOnePTwoCFluidState< ScalarType, FluidSystem >::density ( int  phaseIdx) const
inline

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

◆ enthalpy()

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

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

◆ internalEnergy()

template<class ScalarType , class FluidSystem >
Scalar Dumux::PseudoOnePTwoCFluidState< ScalarType, FluidSystem >::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 ScalarType , class FluidSystem >
Scalar Dumux::PseudoOnePTwoCFluidState< ScalarType, FluidSystem >::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 ScalarType , class FluidSystem >
Scalar Dumux::PseudoOnePTwoCFluidState< ScalarType, FluidSystem >::molarDensity ( int  phaseIdx) const
inline

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

◆ moleFraction()

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

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

This is either set to 1 or 0 depending on the phase presence for the nonwetting phase in general. It is set to the mole fraction of water or 1-moleFractionWater if the considered component is the main component of the wetting phase.

Parameters
phaseIdxthe index of the phase
compIdxthe index of the component

◆ partialPressure() [1/2]

template<class ScalarType , class FluidSystem >
Scalar Dumux::PseudoOnePTwoCFluidState< ScalarType, FluidSystem >::partialPressure ( int  compIdx) const
inline

Return the partial pressure of a component in the gas phase.

Todo:
is this needed?

For an ideal gas, this means \( R*T*c \). Unit: \(\mathrm{[Pa] = [N/m^2]}\)

Parameters
compIdxthe index of the component

◆ partialPressure() [2/2]

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

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

Todo:
is this needed?

◆ presentPhaseIdx()

template<class ScalarType , class FluidSystem >
int Dumux::PseudoOnePTwoCFluidState< ScalarType, FluidSystem >::presentPhaseIdx ( ) const
inline

Returns the index of the phase that is present in that cell.

◆ pressure()

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

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

◆ saturation()

template<class ScalarType , class FluidSystem >
Scalar Dumux::PseudoOnePTwoCFluidState< ScalarType, FluidSystem >::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}}\]

This is set either to 1 or 0 depending on the phase presence.

Parameters
phaseIdxthe index of the phase

◆ setAverageMolarMass()

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

Set the average molar mass of a fluid phase [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:

\[ \bar M_\alpha = \sum_\kappa M^\kappa x_\alpha^\kappa \]

◆ setDensity()

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

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

Parameters
phaseIdxthe index of the phase
valueValue to be stored

◆ setEnthalpy()

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

Sets phase enthalpy.

Parameters
phaseIdxthe index of the phase
valueValue to be stored

◆ setMassFraction()

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

Sets the mass fraction of a component in a phase.

Parameters
phaseIdxthe index of the phase
compIdxthe index of the component
valueValue to be stored

◆ setMolarDensity()

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

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

Parameters
phaseIdxthe index of the phase
valueValue to be stored

◆ setMoleFraction()

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

Sets the molar fraction of a component in a fluid phase.

Parameters
phaseIdxthe index of the phase
compIdxthe index of the component
valueValue to be stored

◆ setPresentPhaseIdx()

template<class ScalarType , class FluidSystem >
void Dumux::PseudoOnePTwoCFluidState< ScalarType, FluidSystem >::setPresentPhaseIdx ( int  phaseIdx)
inline

Sets the phase Index that is present in this fluidState.

Parameters
phaseIdxthe index of the phase

◆ setPressure()

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

Sets the phase pressure \(\mathrm{[Pa]}\).

◆ setTemperature()

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

Sets the temperature.

Parameters
valueValue to be stored

◆ setViscosity()

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

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

Parameters
phaseIdxthe index of the phase
valueValue to be stored

◆ temperature()

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

Returns the temperature of the fluids \(\mathrm{[K]}\).

Note that we assume thermodynamic equilibrium, so all fluids and the rock matrix exhibit the same temperature.

◆ viscosity()

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

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

Member Data Documentation

◆ averageMolarMass_

template<class ScalarType , class FluidSystem >
Scalar Dumux::PseudoOnePTwoCFluidState< ScalarType, FluidSystem >::averageMolarMass_ = 0.0
protected

◆ density_

template<class ScalarType , class FluidSystem >
Scalar Dumux::PseudoOnePTwoCFluidState< ScalarType, FluidSystem >::density_ = 0.0
protected

◆ enthalpy_

template<class ScalarType , class FluidSystem >
Scalar Dumux::PseudoOnePTwoCFluidState< ScalarType, FluidSystem >::enthalpy_ = 0.0
protected

◆ massConcentration_

template<class ScalarType , class FluidSystem >
Scalar Dumux::PseudoOnePTwoCFluidState< ScalarType, FluidSystem >::massConcentration_[numComponents] = {}
protected

◆ massFractionWater_

template<class ScalarType , class FluidSystem >
Scalar Dumux::PseudoOnePTwoCFluidState< ScalarType, FluidSystem >::massFractionWater_ = 0.0
protected

◆ molarDensity_

template<class ScalarType , class FluidSystem >
Scalar Dumux::PseudoOnePTwoCFluidState< ScalarType, FluidSystem >::molarDensity_ = 0.0
protected

◆ moleFractionWater_

template<class ScalarType , class FluidSystem >
Scalar Dumux::PseudoOnePTwoCFluidState< ScalarType, FluidSystem >::moleFractionWater_ = 0.0
protected

◆ numComponents

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

◆ numPhases

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

◆ presentPhaseIdx_

template<class ScalarType , class FluidSystem >
int Dumux::PseudoOnePTwoCFluidState< ScalarType, FluidSystem >::presentPhaseIdx_ = 0
protected

◆ pressure_

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

◆ temperature_

template<class ScalarType , class FluidSystem >
Scalar Dumux::PseudoOnePTwoCFluidState< ScalarType, FluidSystem >::temperature_ = 0.0
protected

◆ viscosity_

template<class ScalarType , class FluidSystem >
Scalar Dumux::PseudoOnePTwoCFluidState< ScalarType, FluidSystem >::viscosity_ = 0.0
protected

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