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

This fluid state ensures that only the allowed quantities are accessed. More...

#include <test/material/fluidsystems/checkfluidsystem.hh>

Inheritance diagram for Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >:
Inheritance graph

Description

template<class ScalarType, class FluidSystem, class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
class Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >

This fluid state ensures that only the allowed quantities are accessed.

Public Member Functions

 HairSplittingFluidState ()
 
void allowTemperature (bool yesno)
 
void allowPressure (bool yesno)
 
void allowComposition (bool yesno)
 
void allowDensity (bool yesno)
 
void restrictToPhase (int phaseIdx)
 
Scalar temperature (int phaseIdx) const
 
Scalar wettingPhase () const
 
Scalar partialPressure (int phaseIdx, int compIdx) const
 
Scalar pressure (int phaseIdx) const
 
Scalar moleFraction (int phaseIdx, int compIdx) const
 
Scalar massFraction (int phaseIdx, int compIdx) const
 
Scalar averageMolarMass (int phaseIdx) const
 
Scalar molarity (int phaseIdx, int compIdx) const
 
Scalar molarDensity (int phaseIdx) const
 
Scalar molarVolume (int phaseIdx) const
 
Scalar density (int phaseIdx) const
 
Scalar saturation (int phaseIdx) const
 
Scalar fugacity (int phaseIdx, int compIdx) const
 
Scalar fugacityCoefficient (int phaseIdx, int compIdx) const
 
Scalar enthalpy (int phaseIdx) const
 
Scalar internalEnergy (int phaseIdx) const
 
Scalar viscosity (int phaseIdx) const
 

Static Public Attributes

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

Protected Types

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

Protected Member Functions

Scalar phaseMassFraction (int phaseIdx) const
 Returns the phase mass fraction, i.e. phase mass per total mass \(\mathrm{[kg/kg]}\). More...
 
Scalar fugacity (int compIdx) const
 The fugacity of a component \(\mathrm{[Pa]}\). More...
 
Scalar temperature () const
 The temperature within the domain \(\mathrm{[K]}\). More...
 
template<class FluidState >
void assign (const FluidState &fs)
 Retrieve all parameters from an arbitrary fluid state. More...
 
void setTemperature (Scalar value)
 Set the temperature \(\mathrm{[K]}\) of all phases. More...
 
void setTemperature (const int phaseIdx, const Scalar value)
 Set the temperature \(\mathrm{[K]}\) of a specific phase. This is not implemented in this fluidstate. 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{[-]}\) and update the average molar mass \(\mathrm{[kg/mol]}\) according to the current composition of the phase. 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...
 
template<class FluidState >
void setRelativeHumidity (FluidState &fluidState, int phaseIdx, int compIdx, Scalar value)
 Set the relative humidity 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 coefficient \(\Phi^\kappa_\alpha\) of component \(\kappa\) in fluid phase \(\alpha\) in \(\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{[mol / m^3]}\). More...
 
void setEnthalpy (int phaseIdx, Scalar value)
 Set the specific enthalpy of a phase \(\mathrm{[J/kg]}\). 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...
 

Protected Attributes

std::array< std::array< Scalar, numComponents >, numPhasesmoleFraction_ = {}
 zero-initialize all data members with braces syntax More...
 
std::array< std::array< Scalar, numComponents >, numPhasesfugacityCoefficient_ = {}
 
std::array< Scalar, numPhasesaverageMolarMass_ = {}
 
std::array< Scalar, numPhasessumMoleFractions_ = {}
 
std::array< Scalar, numPhasespressure_ = {}
 
std::array< Scalar, numPhasessaturation_ = {}
 
std::array< Scalar, numPhasesdensity_ = {}
 
std::array< Scalar, numPhasesmolarDensity_ = {}
 
std::array< Scalar, numPhasesenthalpy_ = {}
 
std::array< Scalar, numPhasesviscosity_ = {}
 
std::array< Scalar, numPhasestemperature_ = {}
 
int wPhaseIdx_ {0}
 

Member Typedef Documentation

◆ Scalar

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

export the scalar type

Constructor & Destructor Documentation

◆ HairSplittingFluidState()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::HairSplittingFluidState ( )
inline

Member Function Documentation

◆ allowComposition()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
void Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::allowComposition ( bool  yesno)
inline

◆ allowDensity()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
void Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::allowDensity ( bool  yesno)
inline

◆ allowPressure()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
void Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::allowPressure ( bool  yesno)
inline

◆ allowTemperature()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
void Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::allowTemperature ( bool  yesno)
inline

◆ assign()

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

Retrieve all parameters from an arbitrary fluid state.

Note
If the other fluid state object is inconsistent with the thermodynamic equilibrium, the result of this method is undefined.

◆ averageMolarMass()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
Scalar Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::averageMolarMass ( int  phaseIdx) const
inline

◆ density()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
Scalar Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::density ( int  phaseIdx) const
inline

◆ enthalpy()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
Scalar Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::enthalpy ( int  phaseIdx) const
inline

◆ fugacity() [1/2]

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

The fugacity of a component \(\mathrm{[Pa]}\).

This assumes chemical equilibrium.

◆ fugacity() [2/2]

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
Scalar Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::fugacity ( int  phaseIdx,
int  compIdx 
) const
inline

◆ fugacityCoefficient()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
Scalar Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::fugacityCoefficient ( int  phaseIdx,
int  compIdx 
) const
inline

◆ internalEnergy()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
Scalar Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::internalEnergy ( int  phaseIdx) const
inline

◆ massFraction()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
Scalar Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::massFraction ( int  phaseIdx,
int  compIdx 
) const
inline

◆ molarDensity()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
Scalar Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::molarDensity ( int  phaseIdx) const
inline

◆ molarity()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
Scalar Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::molarity ( int  phaseIdx,
int  compIdx 
) const
inline

◆ molarVolume()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
Scalar Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::molarVolume ( int  phaseIdx) const
inline

◆ moleFraction()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
Scalar Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::moleFraction ( int  phaseIdx,
int  compIdx 
) const
inline

◆ partialPressure()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
Scalar Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::partialPressure ( int  phaseIdx,
int  compIdx 
) const
inline

◆ phaseMassFraction()

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

Returns the phase mass fraction, i.e. phase mass per total mass \(\mathrm{[kg/kg]}\).

Parameters
phaseIdxthe index of the phase

◆ pressure()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
Scalar Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::pressure ( int  phaseIdx) const
inline

◆ restrictToPhase()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
void Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::restrictToPhase ( int  phaseIdx)
inline

◆ saturation()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
Scalar Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::saturation ( int  phaseIdx) const
inline

◆ setDensity()

template<class ScalarType , class FluidSystem >
void Dumux::CompositionalFluidState< 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::CompositionalFluidState< ScalarType, FluidSystem >::setEnthalpy ( int  phaseIdx,
Scalar  value 
)
inlineinherited

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

◆ setFugacityCoefficient()

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

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

◆ setMassFraction()

template<class ScalarType , class FluidSystem >
void Dumux::CompositionalFluidState< 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::CompositionalFluidState< ScalarType, FluidSystem >::setMolarDensity ( int  phaseIdx,
Scalar  value 
)
inlineinherited

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

◆ setMoleFraction()

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

Set the mole 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.

◆ setPressure()

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

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

◆ setRelativeHumidity()

template<class ScalarType , class FluidSystem >
template<class FluidState >
void Dumux::CompositionalFluidState< ScalarType, FluidSystem >::setRelativeHumidity ( FluidState &  fluidState,
int  phaseIdx,
int  compIdx,
Scalar  value 
)
inlineinherited

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

◆ setSaturation()

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

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

◆ setTemperature() [1/2]

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

Set the temperature \(\mathrm{[K]}\) of a specific phase. This is not implemented in this fluidstate.

◆ setTemperature() [2/2]

template<class ScalarType , class FluidSystem >
void Dumux::CompositionalFluidState< ScalarType, FluidSystem >::setTemperature ( Scalar  value)
inlineinherited

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

◆ setViscosity()

template<class ScalarType , class FluidSystem >
void Dumux::CompositionalFluidState< 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::CompositionalFluidState< ScalarType, FluidSystem >::setWettingPhase ( int  phaseIdx)
inlineinherited

Set the index of the wetting phase.

◆ temperature() [1/2]

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

The temperature within the domain \(\mathrm{[K]}\).

◆ temperature() [2/2]

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
Scalar Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::temperature ( int  phaseIdx) const
inline

◆ viscosity()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
Scalar Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::viscosity ( int  phaseIdx) const
inline

◆ wettingPhase()

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
Scalar Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::wettingPhase ( ) const
inline

Member Data Documentation

◆ averageMolarMass_

template<class ScalarType , class FluidSystem >
std::array<Scalar, numPhases> Dumux::CompositionalFluidState< ScalarType, FluidSystem >::averageMolarMass_ = {}
protectedinherited

◆ density_

template<class ScalarType , class FluidSystem >
std::array<Scalar, numPhases> Dumux::CompositionalFluidState< ScalarType, FluidSystem >::density_ = {}
protectedinherited

◆ enthalpy_

template<class ScalarType , class FluidSystem >
std::array<Scalar, numPhases> Dumux::CompositionalFluidState< ScalarType, FluidSystem >::enthalpy_ = {}
protectedinherited

◆ fugacityCoefficient_

template<class ScalarType , class FluidSystem >
std::array<std::array<Scalar, numComponents>, numPhases> Dumux::CompositionalFluidState< ScalarType, FluidSystem >::fugacityCoefficient_ = {}
protectedinherited

◆ molarDensity_

template<class ScalarType , class FluidSystem >
std::array<Scalar, numPhases> Dumux::CompositionalFluidState< ScalarType, FluidSystem >::molarDensity_ = {}
protectedinherited

◆ moleFraction_

template<class ScalarType , class FluidSystem >
std::array<std::array<Scalar, numComponents>, numPhases> Dumux::CompositionalFluidState< ScalarType, FluidSystem >::moleFraction_ = {}
protectedinherited

zero-initialize all data members with braces syntax

◆ numComponents

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
constexpr int Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::numComponents = FluidSystem::numComponents
staticconstexpr

◆ numPhases

template<class ScalarType , class FluidSystem , class BaseFluidState = CompositionalFluidState<ScalarType, FluidSystem>>
constexpr int Dumux::HairSplittingFluidState< ScalarType, FluidSystem, BaseFluidState >::numPhases = FluidSystem::numPhases
staticconstexpr

◆ pressure_

template<class ScalarType , class FluidSystem >
std::array<Scalar, numPhases> Dumux::CompositionalFluidState< ScalarType, FluidSystem >::pressure_ = {}
protectedinherited

◆ saturation_

template<class ScalarType , class FluidSystem >
std::array<Scalar, numPhases> Dumux::CompositionalFluidState< ScalarType, FluidSystem >::saturation_ = {}
protectedinherited

◆ sumMoleFractions_

template<class ScalarType , class FluidSystem >
std::array<Scalar, numPhases> Dumux::CompositionalFluidState< ScalarType, FluidSystem >::sumMoleFractions_ = {}
protectedinherited

◆ temperature_

template<class ScalarType , class FluidSystem >
std::array<Scalar, numPhases> Dumux::CompositionalFluidState< ScalarType, FluidSystem >::temperature_ = {}
protectedinherited

◆ viscosity_

template<class ScalarType , class FluidSystem >
std::array<Scalar, numPhases> Dumux::CompositionalFluidState< ScalarType, FluidSystem >::viscosity_ = {}
protectedinherited

◆ wPhaseIdx_

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

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