Fluid system base class.
More...
#include <dumux/material/fluidsystems/base.hh>
Inherited by Dumux::FluidSystems::Brine< Scalar, H2OType >, Dumux::FluidSystems::Brine< Scalar, H2Otype >, Dumux::FluidSystems::BrineAir< Scalar, H2Otype, Policy >, Dumux::FluidSystems::BrineAir< Scalar, Components::H2O< Scalar > >, Dumux::FluidSystems::BrineCO2< Scalar, CO2Table, H2OType, Policy >, Dumux::FluidSystems::BrineCO2< GetPropType< TypeTag, Properties::Scalar >, HeterogeneousCO2Tables::CO2Tables, Components::TabulatedComponent< Components::H2O< GetPropType< TypeTag, Properties::Scalar > > >, FluidSystems::BrineCO2DefaultPolicy< true, true > >, Dumux::FluidSystems::H2OAir< Scalar, H2Otype, Policy >, Dumux::FluidSystems::H2OAir< Scalar, Components::SimpleH2O< Scalar >, FluidSystems::H2OAirDefaultPolicy< true > >, Dumux::FluidSystems::H2OAir< GetPropType< TypeTag, Properties::Scalar > >, Dumux::FluidSystems::H2OAir< Scalar, Components::TabulatedComponent< Components::H2O< Scalar > >, FluidSystems::H2OAirDefaultPolicy< true >, true >, Dumux::FluidSystems::H2OAir< Scalar, Components::H2O< Scalar > >, Dumux::FluidSystems::H2OAir< Scalar, Components::H2O< Scalar >, FluidSystems::H2OAirDefaultPolicy< true > >, Dumux::FluidSystems::H2OAirMesitylene< Scalar, H2OType >, Dumux::FluidSystems::H2OAirMesitylene< GetPropType< TypeTag, Properties::Scalar > >, Dumux::FluidSystems::H2OAirXylene< Scalar, H2OType >, Dumux::FluidSystems::H2OAirXylene< GetPropType< TypeTag, Properties::Scalar > >, Dumux::FluidSystems::H2OHeavyOil< Scalar, H2OType >, Dumux::FluidSystems::H2OHeavyOil< GetPropType< TypeTag, Properties::Scalar > >, Dumux::FluidSystems::H2ON2< Scalar, Policy >, Dumux::FluidSystems::H2ON2< Scalar, FluidSystems::H2ON2DefaultPolicy< true > >, Dumux::FluidSystems::H2ON2< GetPropType< TypeTag, Properties::Scalar >, FluidSystems::H2ON2DefaultPolicy< true > >, Dumux::FluidSystems::H2ON2O2< Scalar, Policy >, Dumux::FluidSystems::LiquidPhaseTwoC< Scalar, Components::SimpleH2O< Scalar >, Components::Constant< 1, Scalar > >, Dumux::FluidSystems::OnePAdapter< MPFluidSystem, phase >, Dumux::FluidSystems::OnePAdapter< H2OAir, phaseIdx >, Dumux::FluidSystems::OnePAdapter< typename CouplingFluidSystem< TypeTag >::type, phaseIdx >, Dumux::FluidSystems::OnePAdapter< H2ON2, H2ON2::liquidPhaseIdx >, Dumux::FluidSystems::OnePAdapter< H2ON2, phaseIdx >, Dumux::FluidSystems::OnePGas< Scalar, Components::Air< Scalar > >, Dumux::FluidSystems::OnePGas< Scalar, AirType >, Dumux::FluidSystems::OnePLiquid< Scalar, Components::Constant< 1, Scalar > >, Dumux::FluidSystems::OnePLiquid< GetPropType< TypeTag, Properties::Scalar >, Dumux::Components::Constant< 0, GetPropType< TypeTag, Properties::Scalar > > >, Dumux::FluidSystems::OnePLiquid< Scalar, Components::SimpleH2O< Scalar > >, Dumux::FluidSystems::OnePLiquid< Scalar, Dumux::Components::SimpleH2O< Scalar > >, Dumux::FluidSystems::OnePLiquid< Scalar, H2OType >, Dumux::FluidSystems::OnePLiquid< Scalar, Components::TabulatedComponent< Components::H2O< Scalar > > >, Dumux::FluidSystems::OnePLiquid< Scalar, Components::Constant< 0, Scalar > >, Dumux::FluidSystems::OnePLiquid< GetPropType< TypeTag, Properties::Scalar >, Components::H2O< GetPropType< TypeTag, Properties::Scalar > > >, Dumux::FluidSystems::OnePLiquid< Scalar, Components::Trichloroethene< Scalar > >, Dumux::FluidSystems::OnePLiquid< Scalar, Water >, Dumux::FluidSystems::OnePLiquid< Scalar, Components::Mesitylene< Scalar > >, Dumux::FluidSystems::TwoPImmiscible< Scalar, FluidSystems::OnePLiquid< Scalar, Components::SimpleH2O< Scalar > >, FluidSystems::OnePGas< Scalar, Components::CH4< Scalar > > >, Dumux::FluidSystems::TwoPImmiscible< Scalar, H2OPhase, AirPhase >, Dumux::FluidSystems::TwoPImmiscible< Scalar, WettingPhase, NonwettingPhase >, Dumux::FluidSystems::TwoPOneC< Scalar, H2OType >, Dumux::FluidSystems::H2OAir< Scalar, H2Otype, Policy, useKelvinVaporPressure >, Dumux::FluidSystems::H2OAirMesitylene< Scalar, H2OType >, Dumux::FluidSystems::H2OAirXylene< Scalar, H2OType >, and Dumux::FluidSystems::H2OHeavyOil< Scalar, H2OType >.
template<class ScalarType, class Implementation>
class Dumux::FluidSystems::Base< ScalarType, Implementation >
Fluid system base class.
- Note
- Always derive your fluid system from this class to be sure that all basic functionality is available!
|
| static constexpr bool | isTracerFluidSystem () |
| | Some properties of the fluid system.
|
| static constexpr int | getMainComponent (int phaseIdx) |
| | Get the main component of a given phase if possible.
|
| template<class T = Implementation> |
| static constexpr bool | isCompressible (int phaseIdx) |
| | Returns true if and only if a fluid phase is assumed to be compressible.
|
| template<class T = Implementation> |
| static constexpr bool | isMiscible () |
| | Returns whether the fluids are miscible.
|
| static constexpr bool | viscosityIsConstant (int phaseIdx) |
| | Returns true if and only if a fluid phase is assumed to have a constant viscosity.
|
| static std::string | phaseName (int phaseIdx) |
| | Return the human readable name of a fluid phase.
|
| static std::string | componentName (int phaseIdx) |
| | Return the human readable name of a fluid phase.
|
| template<class FluidState> |
| static Scalar | density (const FluidState &fluidState, int phaseIdx) |
| | Calculate the density \(\mathrm{[kg/m^3]}\) of a fluid phase.
|
| template<class FluidState> |
| static Scalar | density (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx) |
| | Calculate the density \(\mathrm{[kg/m^3]}\) of a fluid phase.
|
| template<class FluidState> |
| static Scalar | molarDensity (const FluidState &fluidState, int phaseIdx) |
| | Calculate the molar density \(\mathrm{[mol/m^3]}\) of a fluid phase.
|
| 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.
|
| template<class FluidState> |
| static Scalar | fugacityCoefficient (const FluidState &fluidState, int phaseIdx, int compIdx) |
| | Calculate the fugacity coefficient \(\mathrm{[Pa]}\) of an individual component in a fluid phase.
|
| template<class FluidState> |
| static Scalar | fugacityCoefficient (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx, int compIdx) |
| | Calculate the fugacity coefficient \(\mathrm{[Pa]}\) of an individual component in a fluid phase.
|
| template<class FluidState> |
| static Scalar | viscosity (const FluidState &fluidState, int phaseIdx) |
| | Calculate the dynamic viscosity of a fluid phase \(\mathrm{[Pa*s]}\).
|
| template<class FluidState> |
| static Scalar | viscosity (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx) |
| | Calculate the dynamic viscosity of a fluid phase \(\mathrm{[Pa*s]}\).
|
| template<class FluidState> |
| static Scalar | diffusionCoefficient (const FluidState &fluidState, int phaseIdx, int compIdx) |
| | Calculate the binary molecular diffusion coefficient for a component in a fluid phase \(\mathrm{[mol^2 * s / (kg*m^3)]}\).
|
| template<class FluidState> |
| static Scalar | diffusionCoefficient (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx, int compIdx) |
| | Calculate the binary molecular diffusion coefficient for a component in a fluid phase \(\mathrm{[mol^2 * s / (kg*m^3)]}\).
|
| 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 \(\mathrm{[m^2/s]}\) for components \(\mathrm{i}\) and \(\mathrm{j}\) in this phase.
|
| 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 \(\mathrm{[m^2/s]}\) for components \(\mathrm{i}\) and \(\mathrm{j}\) in this phase.
|
| template<class FluidState> |
| static Scalar | enthalpy (const FluidState &fluidState, int phaseIdx) |
| | Given a phase's composition, temperature, pressure and density, calculate its specific enthalpy \(\mathrm{[J/kg]}\).
|
| template<class FluidState> |
| static Scalar | enthalpy (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx) |
| | Given a phase's composition, temperature, pressure and density, calculate its specific enthalpy \(\mathrm{[J/kg]}\).
|
| template<class FluidState> |
| static Scalar | thermalConductivity (const FluidState &fluidState, int phaseIdx) |
| | Thermal conductivity \(\lambda_\alpha \) of a fluid phase \(\mathrm{[W/(m K)]}\).
|
| template<class FluidState> |
| static Scalar | thermalConductivity (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx) |
| | Thermal conductivity \(\lambda_\alpha \) of a fluid phase \(\mathrm{[W/(m K)]}\).
|
| template<class FluidState> |
| static Scalar | heatCapacity (const FluidState &fluidState, int phaseIdx) |
| | Specific isobaric heat capacity \(c_{p,\alpha}\) of a fluid phase \(\mathrm{[J/(kg*K)]}\).
|
| template<class FluidState> |
| static Scalar | heatCapacity (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx) |
| | Specific isobaric heat capacity \(c_{p,\alpha}\) of a fluid phase \(\mathrm{[J/(kg*K)]}\).
|
◆ ParameterCache
template<class ScalarType, class Implementation>
The type of parameter cache objects.
◆ Scalar
template<class ScalarType, class Implementation>
◆ binaryDiffusionCoefficient() [1/2]
template<class ScalarType, class Implementation>
template<class FluidState>
Given a phase's composition, temperature and pressure, return the binary diffusion coefficient \(\mathrm{[m^2/s]}\) for components \(\mathrm{i}\) and \(\mathrm{j}\) in this phase.
- Parameters
-
| fluidState | The fluid state |
| paramCache | mutable parameters |
| phaseIdx | Index of the fluid phase |
| compIIdx | Index of the component i |
| compJIdx | Index of the component j |
◆ binaryDiffusionCoefficient() [2/2]
template<class ScalarType, class Implementation>
template<class FluidState>
| Scalar Dumux::FluidSystems::Base< ScalarType, Implementation >::binaryDiffusionCoefficient |
( |
const FluidState & | fluidState, |
|
|
int | phaseIdx, |
|
|
int | compIIdx, |
|
|
int | compJIdx ) |
|
inlinestatic |
Given a phase's composition, temperature and pressure, return the binary diffusion coefficient \(\mathrm{[m^2/s]}\) for components \(\mathrm{i}\) and \(\mathrm{j}\) in this phase.
- Parameters
-
| fluidState | The fluid state |
| phaseIdx | Index of the fluid phase |
| compIIdx | Index of the component i |
| compJIdx | Index of the component j |
◆ componentName()
template<class ScalarType, class Implementation>
Return the human readable name of a fluid phase.
- Parameters
-
| phaseIdx | The index of the fluid phase to consider |
◆ density() [1/2]
template<class ScalarType, class Implementation>
template<class FluidState>
Calculate the density \(\mathrm{[kg/m^3]}\) of a fluid phase.
- Parameters
-
| fluidState | The fluid state |
| paramCache | mutable parameters |
| phaseIdx | Index of the fluid phase |
◆ density() [2/2]
template<class ScalarType, class Implementation>
template<class FluidState>
Calculate the density \(\mathrm{[kg/m^3]}\) of a fluid phase.
- Parameters
-
| fluidState | The fluid state |
| phaseIdx | Index of the fluid phase |
◆ diffusionCoefficient() [1/2]
template<class ScalarType, class Implementation>
template<class FluidState>
Calculate the binary molecular diffusion coefficient for a component in a fluid phase \(\mathrm{[mol^2 * s / (kg*m^3)]}\).
- Parameters
-
| fluidState | The fluid state |
| paramCache | mutable parameters |
| phaseIdx | Index of the fluid phase |
| compIdx | Index of the component Molecular diffusion of a component \(\mathrm{\kappa}\) is caused by a gradient of the chemical potential and follows the law |
\[ J = - D \mathbf{grad} \mu_\kappa \]
where \(\mathrm{\mu_\kappa}\) is the component's chemical potential, \(\mathrm{D}\) is the diffusion coefficient and \(\mathrm{J}\) is the diffusive flux. \(\mathrm{\mu_\kappa}\) is connected to the component's fugacity \(\mathrm{f_\kappa}\) by the relation
\[ \mu_\kappa = R T_\alpha \mathrm{ln} \frac{f_\kappa}{p_\alpha} \]
where \(\mathrm{p_\alpha}\) and \(\mathrm{T_\alpha}\) are the fluid phase' pressure and temperature.
◆ diffusionCoefficient() [2/2]
template<class ScalarType, class Implementation>
template<class FluidState>
Calculate the binary molecular diffusion coefficient for a component in a fluid phase \(\mathrm{[mol^2 * s / (kg*m^3)]}\).
- Parameters
-
| fluidState | The fluid state |
| phaseIdx | Index of the fluid phase |
| compIdx | Index of the component Molecular diffusion of a component \(\mathrm{\kappa}\) is caused by a gradient of the chemical potential and follows the law |
\[ J = - D \mathbf{grad} \mu_\kappa \]
where \(\mathrm{\mu_\kappa}\) is the component's chemical potential, \(\mathrm{D}\) is the diffusion coefficient and \(\mathrm{J}\) is the diffusive flux. \(\mathrm{\mu_\kappa}\) is connected to the component's fugacity \(\mathrm{f_\kappa}\) by the relation
\[ \mu_\kappa = R T_\alpha \mathrm{ln} \frac{f_\kappa}{p_\alpha} \]
where \(\mathrm{p_\alpha}\) and \(\mathrm{T_\alpha}\) are the fluid phase' pressure and temperature.
◆ enthalpy() [1/2]
template<class ScalarType, class Implementation>
template<class FluidState>
Given a phase's composition, temperature, pressure and density, calculate its specific enthalpy \(\mathrm{[J/kg]}\).
- Parameters
-
| fluidState | The fluid state |
| paramCache | mutable parameters |
| phaseIdx | Index of the fluid phase |
◆ enthalpy() [2/2]
template<class ScalarType, class Implementation>
template<class FluidState>
Given a phase's composition, temperature, pressure and density, calculate its specific enthalpy \(\mathrm{[J/kg]}\).
- Parameters
-
| fluidState | The fluid state |
| phaseIdx | Index of the fluid phase |
◆ fugacityCoefficient() [1/2]
template<class ScalarType, class Implementation>
template<class FluidState>
Calculate the fugacity coefficient \(\mathrm{[Pa]}\) of an individual component in a fluid phase.
The fugacity coefficient \(\mathrm{\phi^\kappa_\alpha}\) is connected to the fugacity \(\mathrm{f^\kappa_\alpha}\) and the component's mole fraction \(\mathrm{x^\kappa_\alpha}\) by means of the relation
\[f^\kappa_\alpha = \phi^\kappa_\alpha\;x^\kappa_\alpha\;p_\alpha
\]
- Parameters
-
| fluidState | The fluid state |
| paramCache | mutable parameters |
| phaseIdx | Index of the fluid phase |
| compIdx | Index of the component |
◆ fugacityCoefficient() [2/2]
template<class ScalarType, class Implementation>
template<class FluidState>
Calculate the fugacity coefficient \(\mathrm{[Pa]}\) of an individual component in a fluid phase.
The fugacity coefficient \(\mathrm{\phi^\kappa_\alpha}\) is connected to the fugacity \(\mathrm{f^\kappa_\alpha}\) and the component's mole fraction \(\mathrm{x^\kappa_\alpha}\) by means of the relation
\[f^\kappa_\alpha = \phi^\kappa_\alpha\;x^\kappa_\alpha\;p_\alpha
\]
- Parameters
-
| fluidState | The fluid state |
| phaseIdx | Index of the fluid phase |
| compIdx | Index of the component |
◆ getMainComponent()
template<class ScalarType, class Implementation>
Get the main component of a given phase if possible.
- Parameters
-
| phaseIdx | The index of the fluid phase to consider |
- Note
- This method has to can assert at compile time if the fluid system doesn't assume a main phase. Then using e.g. Fick's law will fail compiling.
- Todo
- Unfortunately we currently still have the assumption in some volume variables (e.g. 1pnc, 2pnc) that the main component index of a phase is equal to the phase index of that phase. This means changing this only works if the volume variables are written accordingly.
◆ heatCapacity() [1/2]
template<class ScalarType, class Implementation>
template<class FluidState>
Specific isobaric heat capacity \(c_{p,\alpha}\) of a fluid phase \(\mathrm{[J/(kg*K)]}\).
- Parameters
-
| fluidState | represents all relevant thermodynamic quantities of a fluid system |
| paramCache | mutable parameters |
| phaseIdx | Index of the fluid phase |
Given a fluid state, an up-to-date parameter cache and a phase index, this method computes the isobaric heat capacity \(c_{p,\alpha}\) of the fluid phase. The isobaric heat capacity is defined as the partial derivative of the specific enthalpy \(h_\alpha\) to the fluid pressure \(p_\alpha\):
\( c_{p,\alpha} = \frac{\partial h_\alpha}{\partial p_\alpha} \)
◆ heatCapacity() [2/2]
template<class ScalarType, class Implementation>
template<class FluidState>
Specific isobaric heat capacity \(c_{p,\alpha}\) of a fluid phase \(\mathrm{[J/(kg*K)]}\).
- Parameters
-
| fluidState | represents all relevant thermodynamic quantities of a fluid system |
| phaseIdx | Index of the fluid phase |
Given a fluid state, an up-to-date parameter cache and a phase index, this method computes the isobaric heat capacity \(c_{p,\alpha}\) of the fluid phase. The isobaric heat capacity is defined as the partial derivative of the specific enthalpy \(h_\alpha\) to the fluid pressure \(p_\alpha\):
\( c_{p,\alpha} = \frac{\partial h_\alpha}{\partial p_\alpha} \)
◆ isCompressible()
template<class ScalarType, class Implementation>
template<class T = Implementation>
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.
- Parameters
-
| phaseIdx | The index of the fluid phase to consider |
◆ isMiscible()
template<class ScalarType, class Implementation>
template<class T = Implementation>
Returns whether the fluids are miscible.
◆ isTracerFluidSystem()
template<class ScalarType, class Implementation>
Some properties of the fluid system.
If the fluid system only contains tracer components
◆ molarDensity() [1/2]
template<class ScalarType, class Implementation>
template<class FluidState>
Calculate the molar density \(\mathrm{[mol/m^3]}\) of a fluid phase.
- Parameters
-
| fluidState | The fluid state |
| paramCache | mutable parameters |
| phaseIdx | Index of the fluid phase |
◆ molarDensity() [2/2]
template<class ScalarType, class Implementation>
template<class FluidState>
Calculate the molar density \(\mathrm{[mol/m^3]}\) of a fluid phase.
- Parameters
-
| fluidState | The fluid state |
| phaseIdx | Index of the fluid phase |
◆ phaseName()
template<class ScalarType, class Implementation>
Return the human readable name of a fluid phase.
- Parameters
-
| phaseIdx | The index of the fluid phase to consider |
◆ thermalConductivity() [1/2]
template<class ScalarType, class Implementation>
template<class FluidState>
Thermal conductivity \(\lambda_\alpha \) of a fluid phase \(\mathrm{[W/(m K)]}\).
- Parameters
-
| fluidState | The fluid state |
| paramCache | mutable parameters |
| phaseIdx | Index of the fluid phase |
◆ thermalConductivity() [2/2]
template<class ScalarType, class Implementation>
template<class FluidState>
Thermal conductivity \(\lambda_\alpha \) of a fluid phase \(\mathrm{[W/(m K)]}\).
- Parameters
-
| fluidState | The fluid state |
| phaseIdx | Index of the fluid phase |
◆ viscosity() [1/2]
template<class ScalarType, class Implementation>
template<class FluidState>
Calculate the dynamic viscosity of a fluid phase \(\mathrm{[Pa*s]}\).
- Parameters
-
| fluidState | The fluid state |
| paramCache | mutable parameters |
| phaseIdx | Index of the fluid phase |
◆ viscosity() [2/2]
template<class ScalarType, class Implementation>
template<class FluidState>
Calculate the dynamic viscosity of a fluid phase \(\mathrm{[Pa*s]}\).
- Parameters
-
| fluidState | The fluid state |
| phaseIdx | Index of the fluid phase |
◆ viscosityIsConstant()
template<class ScalarType, class Implementation>
Returns true if and only if a fluid phase is assumed to have a constant viscosity.
- Parameters
-
| phaseIdx | The index of the fluid phase to consider |
The documentation for this class was generated from the following file: