A two-phase fluid system with only one component. More...
#include <dumux/material/fluidsystems/2p1c.hh>
A two-phase fluid system with only one component.
Public Types | |
using | Scalar = Scalar |
export the scalar type More... | |
using | ParameterCache = NullParameterCache |
The type of parameter cache objects. More... | |
Static Public Member Functions | |
static std::string | phaseName (int phaseIdx) |
Return the human readable name of a fluid phase. More... | |
static constexpr bool | isMiscible () |
Returns whether the fluids are miscible. More... | |
static constexpr bool | isGas (int phaseIdx) |
Return whether a phase is gaseous. More... | |
static constexpr bool | isIdealMixture (int phaseIdx) |
Returns true if and only if a fluid phase is assumed to be an ideal mixture. More... | |
static constexpr bool | isCompressible (int phaseIdx) |
Returns true if and only if a fluid phase is assumed to be compressible. More... | |
static constexpr bool | isIdealGas (int phaseIdx) |
Returns true if and only if a fluid phase is assumed to be an ideal gas. More... | |
static std::string | componentName (int compIdx) |
Return the human readable name of a component. More... | |
static Scalar | molarMass (int compIdx) |
Return the molar mass of a component in [kg/mol]. More... | |
static Scalar | criticalTemperature (int compIdx) |
Critical temperature of a component [K]. More... | |
static Scalar | criticalPressure (int compIdx) |
Critical pressure of a component [Pa]. More... | |
static Scalar | criticalMolarVolume (int compIdx) |
Molar volume of a component at the critical point [m^3/mol]. More... | |
static Scalar | acentricFactor (int compIdx) |
The acentric factor of a component []. More... | |
static void | init () |
Initialize the fluid system's static parameters generically. More... | |
static void | init (Scalar tempMin, Scalar tempMax, unsigned nTemp, Scalar pressMin, Scalar pressMax, unsigned nPress) |
Initialize the fluid system's static parameters using problem specific temperature and pressure ranges. More... | |
template<class FluidState > | |
static Scalar | density (const FluidState &fluidState, int phaseIdx) |
template<class FluidState > | |
static Scalar | molarDensity (const FluidState &fluidState, int phaseIdx) |
The molar density \(\rho_{mol,\alpha}\) of a fluid phase \(\alpha\) in \(\mathrm{[mol/m^3]}\). More... | |
template<class FluidState > | |
static Scalar | viscosity (const FluidState &fluidState, int phaseIdx) |
template<class FluidState > | |
static Scalar | vaporTemperature (const FluidState &fluidState, const unsigned int phaseIdx) |
calculate the temperature of vapor at a given pressure on the vapor pressure curve. More... | |
template<class FluidState > | |
static Scalar | fugacityCoefficient (const FluidState &fluidState, int phaseIdx, int compIdx) |
template<class FluidState > | |
static Scalar | diffusionCoefficient (const FluidState &fluidState, int phaseIdx, int compIdx) |
template<class FluidState > | |
static Scalar | binaryDiffusionCoefficient (const FluidState &fluidState, int phaseIdx, int compIIdx, int compJIdx) |
template<class FluidState > | |
static Scalar | enthalpy (const FluidState &fluidState, int phaseIdx) |
template<class FluidState > | |
static Scalar | thermalConductivity (const FluidState &fluidState, const int phaseIdx) |
template<class FluidState > | |
static Scalar | heatCapacity (const FluidState &fluidState, int phaseIdx) |
template<class FluidState > | |
static Scalar | density (const FluidState &fluidState, int phaseIdx) |
Calculate the density [kg/m^3] of a fluid phase. More... | |
template<class FluidState > | |
static Scalar | density (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx) |
Calculate the density [kg/m^3] of a fluid phase. More... | |
template<class FluidState > | |
static Scalar | molarDensity (const FluidState &fluidState, int phaseIdx) |
Calculate the molar density \(\mathrm{[mol/m^3]}\) of a fluid phase. More... | |
template<class FluidState > | |
static Scalar | molarDensity (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx) |
Calculate the molar density \(\mathrm{[mol/m^3]}\) of a fluid phase. More... | |
template<class FluidState > | |
static Scalar | viscosity (const FluidState &fluidState, int phaseIdx) |
Calculate the dynamic viscosity of a fluid phase [Pa*s]. More... | |
template<class FluidState > | |
static Scalar | viscosity (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx) |
Calculate the dynamic viscosity of a fluid phase [Pa*s]. More... | |
template<class FluidState > | |
static Scalar | fugacityCoefficient (const FluidState &fluidState, int phaseIdx, int compIdx) |
Calculate the fugacity coefficient [-] of an individual component in a fluid phase. More... | |
template<class FluidState > | |
static Scalar | fugacityCoefficient (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx, int compIdx) |
Calculate the fugacity coefficient [-] of an individual component in a fluid phase. More... | |
template<class FluidState > | |
static Scalar | diffusionCoefficient (const FluidState &fluidState, int phaseIdx, int compIdx) |
Calculate the molecular diffusion coefficient for a component in a fluid phase [mol^2 * s / (kg*m^3)]. More... | |
template<class FluidState > | |
static Scalar | diffusionCoefficient (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx, int compIdx) |
Calculate the molecular diffusion coefficient for a component in a fluid phase [mol^2 * s / (kg*m^3)]. More... | |
template<class FluidState > | |
static Scalar | binaryDiffusionCoefficient (const FluidState &fluidState, int phaseIdx, int compIIdx, int compJIdx) |
Given a phase's composition, temperature and pressure, return the binary diffusion coefficient for components \(i\) and \(j\) in this phase. More... | |
template<class FluidState > | |
static Scalar | binaryDiffusionCoefficient (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx, int compIIdx, int compJIdx) |
Given a phase's composition, temperature and pressure, return the binary diffusion coefficient for components \(i\) and \(j\) in this phase. More... | |
template<class FluidState > | |
static Scalar | enthalpy (const FluidState &fluidState, int phaseIdx) |
Calculate specific enthalpy [J/kg]. More... | |
template<class FluidState > | |
static Scalar | enthalpy (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx) |
Calculate specific enthalpy [J/kg]. More... | |
template<class FluidState > | |
static Scalar | thermalConductivity (const FluidState &fluidState, int phaseIdx) |
Thermal conductivity of a fluid phase [W/(m K)]. More... | |
template<class FluidState > | |
static Scalar | thermalConductivity (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx) |
Thermal conductivity of a fluid phase [W/(m K)]. More... | |
template<class FluidState > | |
static Scalar | heatCapacity (const FluidState &fluidState, int phaseIdx) |
Specific isobaric heat capacity of a fluid phase. \(\mathrm{[J/kg / K]}\). More... | |
template<class FluidState > | |
static Scalar | heatCapacity (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx) |
Specific isobaric heat capacity of a fluid phase. \(\mathrm{[J/kg / K]}\). More... | |
static constexpr bool | isTracerFluidSystem () |
Some properties of the fluid system. More... | |
static constexpr int | getMainComponent (int phaseIdx) |
Get the main component of a given phase if possible. More... | |
static constexpr bool | viscosityIsConstant (int phaseIdx) |
Returns true if and only if a fluid phase is assumed to have a constant viscosity. More... | |
Static Public Attributes | |
static constexpr int | numPhases = 2 |
Number of phases in the fluid system. More... | |
static constexpr int | numComponents = 1 |
Number of components in the fluid system. More... | |
static constexpr int | liquidPhaseIdx = 0 |
index of the liquid phase More... | |
static constexpr int | gasPhaseIdx = 1 |
index of the gas phase More... | |
static constexpr int | phase0Idx = liquidPhaseIdx |
index of the first phase More... | |
static constexpr int | phase1Idx = gasPhaseIdx |
index of the second phase More... | |
static constexpr int | comp0Idx = 0 |
index of the only component More... | |
|
inherited |
The type of parameter cache objects.
|
inherited |
export the scalar type
|
inlinestatic |
The acentric factor of a component [].
compIdx | The index of the component to consider |
|
inlinestatic |
Given a phase's composition, temperature and pressure, return the binary diffusion coefficient for components \(i\) and \(j\) in this phase.
fluidState | An arbitrary fluid state |
phaseIdx | The index of the fluid phase to consider |
compIIdx | The index of the first component to consider |
compJIdx | The index of the second component to consider |
|
inlinestatic |
Given a phase's composition, temperature and pressure, return the binary diffusion coefficient for components \(i\) and \(j\) in this phase.
fluidState | An arbitrary fluid state |
phaseIdx | The index of the fluid phase to consider |
compIIdx | The index of the first component to consider |
compJIdx | The index of the second component to consider |
|
inlinestatic |
|
inlinestatic |
Return the human readable name of a component.
compIdx | The index of the component to consider |
|
inlinestatic |
Molar volume of a component at the critical point [m^3/mol].
compIdx | The index of the component to consider |
|
inlinestatic |
Critical pressure of a component [Pa].
compIdx | The index of the component to consider |
|
inlinestatic |
Critical temperature of a component [K].
compIdx | The index of the component to consider |
|
inlinestatic |
Calculate the density [kg/m^3] of a fluid phase.
fluidState | An arbitrary fluid state |
phaseIdx | The index of the fluid phase to consider |
|
inlinestatic |
Calculate the density [kg/m^3] of a fluid phase.
fluidState | An arbitrary fluid state |
phaseIdx | The index of the fluid phase to consider |
|
inlinestatic |
|
inlinestatic |
Calculate the molecular diffusion coefficient for a component in a fluid phase [mol^2 * s / (kg*m^3)].
fluidState | An arbitrary fluid state |
phaseIdx | The index of the fluid phase to consider |
compIdx | The index of the component to consider |
|
inlinestatic |
Calculate the molecular diffusion coefficient for a component in a fluid phase [mol^2 * s / (kg*m^3)].
fluidState | An arbitrary fluid state |
phaseIdx | The index of the fluid phase to consider |
compIdx | The index of the component to consider |
|
inlinestatic |
|
inlinestatic |
Calculate specific enthalpy [J/kg].
fluidState | An arbitrary fluid state |
phaseIdx | The index of the fluid phase to consider |
|
inlinestatic |
Calculate specific enthalpy [J/kg].
fluidState | An arbitrary fluid state |
phaseIdx | The index of the fluid phase to consider |
|
inlinestatic |
|
inlinestatic |
Calculate the fugacity coefficient [-] of an individual component in a fluid phase.
The fugacity coefficient \(\phi^\kappa_\alpha\) of component \(\kappa\) in phase \(\alpha\) is connected to the fugacity \(f^\kappa_\alpha\) and the component's mole fraction \(x^\kappa_\alpha\) by means of the relation
\[ f^\kappa_\alpha = \phi^\kappa_\alpha\;x^\kappa_\alpha\;p_\alpha \]
where \(p_\alpha\) is the pressure of the fluid phase.
The quantity "fugacity" itself is just an other way to express the chemical potential \(\zeta^\kappa_\alpha\) of the component. It is defined via
\[ f^\kappa_\alpha := \exp\left\{\frac{\zeta^\kappa_\alpha}{k_B T_\alpha} \right\} \]
where \(k_B = 1.380\cdot10^{-23}\;J/K\) is the Boltzmann constant.
fluidState | An arbitrary fluid state |
phaseIdx | The index of the fluid phase to consider |
compIdx | The index of the component to consider |
|
inlinestatic |
Calculate the fugacity coefficient [-] of an individual component in a fluid phase.
The fugacity coefficient \(\phi^\kappa_\alpha\) of component \(\kappa\) in phase \(\alpha\) is connected to the fugacity \(f^\kappa_\alpha\) and the component's mole fraction \(x^\kappa_\alpha\) by means of the relation
\[ f^\kappa_\alpha = \phi^\kappa_\alpha\;x^\kappa_\alpha\;p_\alpha \]
where \(p_\alpha\) is the pressure of the fluid phase.
The quantity "fugacity" itself is just an other way to express the chemical potential \(\zeta^\kappa_\alpha\) of the component. It is defined via
\[ f^\kappa_\alpha := \exp\left\{\frac{\zeta^\kappa_\alpha}{k_B T_\alpha} \right\} \]
where \(k_B = 1.380\cdot10^{-23}\;J/K\) is the Boltzmann constant.
fluidState | An arbitrary fluid state |
phaseIdx | The index of the fluid phase to consider |
compIdx | The index of the component to consider |
|
inlinestatic |
|
inlinestaticconstexprinherited |
Get the main component of a given phase if possible.
phaseIdx | The index of the fluid phase to consider |
|
inlinestatic |
Specific isobaric heat capacity of a fluid phase. \(\mathrm{[J/kg / K]}\).
fluidState | An arbitrary fluid state |
phaseIdx | The index of the fluid phase to consider |
|
inlinestatic |
Specific isobaric heat capacity of a fluid phase. \(\mathrm{[J/kg / K]}\).
fluidState | An arbitrary fluid state |
phaseIdx | The index of the fluid phase to consider |
|
inlinestatic |
|
inlinestatic |
Initialize the fluid system's static parameters generically.
If a tabulated H2O component is used, we do our best to create tables that always work.
|
inlinestatic |
Initialize the fluid system's static parameters using problem specific temperature and pressure ranges.
tempMin | The minimum temperature used for tabulation of water [K] |
tempMax | The maximum temperature used for tabulation of water [K] |
nTemp | The number of ticks on the temperature axis of the table of water |
pressMin | The minimum pressure used for tabulation of water [Pa] |
pressMax | The maximum pressure used for tabulation of water [Pa] |
nPress | The number of ticks on the pressure axis of the table of water |
|
inlinestaticconstexpr |
Returns true if and only if a fluid phase is assumed to be compressible.
Compressible means that the partial derivative of the density to the fluid pressure is always larger than zero.
phaseIdx | The index of the fluid phase to consider |
|
inlinestaticconstexpr |
Return whether a phase is gaseous.
phaseIdx | The index of the fluid phase to consider |
|
inlinestaticconstexpr |
Returns true if and only if a fluid phase is assumed to be an ideal gas.
phaseIdx | The index of the fluid phase to consider |
|
inlinestaticconstexpr |
Returns true if and only if a fluid phase is assumed to be an ideal mixture.
We define an ideal mixture as a fluid phase where the fugacity coefficients of all components times the pressure of the phase are independent on the fluid composition. This assumption is true if Henry's law and Raoult's law apply. If you are unsure what this function should return, it is safe to return false. The only damage done will be (slightly) increased computation times in some cases.
phaseIdx | The index of the fluid phase to consider |
|
inlinestaticconstexpr |
Returns whether the fluids are miscible.
|
inlinestaticconstexprinherited |
Some properties of the fluid system.
If the fluid system only contains tracer components
|
inlinestatic |
Calculate the molar density \(\mathrm{[mol/m^3]}\) of a fluid phase.
fluidState | The fluid state |
paramCache | mutable parameters |
phaseIdx | Index of the fluid phase |
|
inlinestatic |
Calculate the molar density \(\mathrm{[mol/m^3]}\) of a fluid phase.
fluidState | The fluid state |
phaseIdx | Index of the fluid phase |
|
inlinestatic |
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 molar mass \(M_\alpha\):
\[\rho_{mol,\alpha} = \frac{\rho_\alpha}{M_\alpha} \;.\]
|
inlinestatic |
Return the molar mass of a component in [kg/mol].
compIdx | The index of the component to consider |
|
inlinestatic |
Return the human readable name of a fluid phase.
phaseIdx | The index of the fluid phase to consider |
|
inlinestatic |
|
inlinestatic |
Thermal conductivity of a fluid phase [W/(m K)].
Use the conductivity of vapor and liquid water at 100°C
fluidState | An arbitrary fluid state |
phaseIdx | The index of the fluid phase to consider |
|
inlinestatic |
Thermal conductivity of a fluid phase [W/(m K)].
Use the conductivity of vapor and liquid water at 100°C
fluidState | An arbitrary fluid state |
phaseIdx | The index of the fluid phase to consider |
|
inlinestatic |
calculate the temperature of vapor at a given pressure on the vapor pressure curve.
fluidState | An arbitrary fluid state |
phaseIdx | The index of the fluid phase to consider |
|
inlinestatic |
Calculate the dynamic viscosity of a fluid phase [Pa*s].
fluidState | An arbitrary fluid state |
phaseIdx | The index of the fluid phase to consider |
|
inlinestatic |
Calculate the dynamic viscosity of a fluid phase [Pa*s].
fluidState | An arbitrary fluid state |
phaseIdx | The index of the fluid phase to consider |
|
inlinestatic |
|
inlinestaticconstexprinherited |
Returns true if and only if a fluid phase is assumed to have a constant viscosity.
phaseIdx | The index of the fluid phase to consider |
|
staticconstexpr |
index of the only component
|
staticconstexpr |
index of the gas phase
|
staticconstexpr |
index of the liquid phase
|
staticconstexpr |
Number of components in the fluid system.
|
staticconstexpr |
Number of phases in the fluid system.
|
staticconstexpr |
index of the first phase
|
staticconstexpr |
index of the second phase