An adapter for multi-phase fluid systems to be used with (compositional) one-phase models. More...
#include <dumux/material/fluidsystems/1padapter.hh>
MPFluidSystem | the multi-phase fluid system to be adapted |
phase | the index of the phase we choose from the multi-phase fluid system |
Public Types | |
using | Scalar = typename MPFluidSystem::Scalar |
using | ParameterCache = NullParameterCache |
using | MultiPhaseFluidSystem = MPFluidSystem |
export the wrapped MultiPhaseFluidSystem type More... | |
Static Public Member Functions | |
static constexpr int | compIdx (int multiPhaseFluidSystemCompIdx) |
convert a component index of the multi-phase component index to the actual component index More... | |
template<class ... Args> | |
static void | init (Args &&... args) |
Initialize the fluid system's static parameters generically. More... | |
static std::string | phaseName (int phaseIdx=0) |
Return the human readable name of a fluid phase. More... | |
static std::string | componentName (int compIdx) |
A human readable name for the component. More... | |
static std::string | name () |
A human readable name for the component. More... | |
static constexpr bool | isMiscible () |
There is only one phase, so no mass transfer between phases can occur. More... | |
static constexpr bool | isGas (int phaseIdx=0) |
Returns whether the fluid is gaseous. More... | |
static constexpr bool | isIdealMixture (int phaseIdx=0) |
Returns true if and only if a fluid phase is assumed to be an ideal mixture. More... | |
static constexpr bool | isCompressible (int phaseIdx=0) |
Returns true if the fluid is assumed to be compressible. More... | |
static constexpr bool | viscosityIsConstant (int phaseIdx=0) |
Returns true if the fluid viscosity is constant. More... | |
static constexpr bool | isIdealGas (int phaseIdx=0) |
Returns true if the fluid is assumed to be an ideal gas. More... | |
static Scalar | molarMass (int compIdx) |
The mass in | |
template<class FluidState > | |
static Scalar | density (const FluidState &fluidState, int phaseIdx=0) |
Calculate the density | |
template<class FluidState > | |
static Scalar | molarDensity (const FluidState &fluidState, int phaseIdx=0) |
Calculate the molar density | |
template<class FluidState > | |
static Scalar | enthalpy (const FluidState &fluidState, int phaseIdx=0) |
Given a phase's composition, temperature, pressure and density, calculate its specific enthalpy | |
template<class FluidState > | |
static Scalar | componentEnthalpy (const FluidState &fluidState, int phaseIdx, int compIdx) |
Returns the specific enthalpy | |
template<class FluidState > | |
static Scalar | viscosity (const FluidState &fluidState, int phaseIdx=0) |
Calculate the dynamic viscosity of a fluid phase | |
template<class FluidState > | |
static Scalar | fugacityCoefficient (const FluidState &fluidState, int phaseIdx, int compIdx) |
Calculate the fugacity coefficient | |
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 | |
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 | |
template<class FluidState > | |
static Scalar | thermalConductivity (const FluidState &fluidState, int phaseIdx=0) |
Thermal conductivity | |
template<class FluidState > | |
static Scalar | heatCapacity (const FluidState &fluidState, int phaseIdx=0) |
Specific isobaric heat capacity | |
template<class FluidState > | |
static Scalar | vaporPressure (const FluidState &fluidState, int compIdx) |
Vapor pressure of a component | |
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 Scalar | density (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx) |
Calculate the density | |
static Scalar | molarDensity (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx) |
Calculate the molar density | |
static Scalar | fugacityCoefficient (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx, int compIdx) |
Calculate the fugacity coefficient | |
static Scalar | viscosity (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx) |
Calculate the dynamic viscosity of a fluid phase | |
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 | |
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 | |
static Scalar | enthalpy (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx) |
Given a phase's composition, temperature, pressure and density, calculate its specific enthalpy | |
static Scalar | thermalConductivity (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx) |
Thermal conductivity | |
static Scalar | heatCapacity (const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx) |
Specific isobaric heat capacity | |
Static Public Attributes | |
static constexpr int | multiphaseFluidsystemPhaseIdx = phase |
the index of the phase we choose from the multi-phase fluid system More... | |
static constexpr int | numPhases = 1 |
number of phases in the fluid system More... | |
static constexpr int | numComponents = MultiPhaseFluidSystem::isMiscible() ? MultiPhaseFluidSystem::numComponents : numPhases |
static constexpr int | phase0Idx = 0 |
number of components has to be the same as in the multi-phase fluid system as the composition needs to be defined More... | |
using Dumux::FluidSystems::OnePAdapter< MPFluidSystem, phase >::MultiPhaseFluidSystem = MPFluidSystem |
using Dumux::FluidSystems::OnePAdapter< MPFluidSystem, phase >::ParameterCache = NullParameterCache |
using Dumux::FluidSystems::OnePAdapter< MPFluidSystem, phase >::Scalar = typename MPFluidSystem::Scalar |
|
inlinestaticinherited |
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 |
|
inlinestatic |
fluidState | The fluid state |
phaseIdx | Index of the fluid phase |
compIIdx | Index of the component i |
compJIdx | Index of the component j |
|
inlinestaticconstexpr |
|
inlinestatic |
fluidState | An arbitrary fluid state |
phaseIdx | The index of the fluid phase to consider |
compIdx | The index of the component to consider |
|
inlinestatic |
compIdx | The index of the component to consider |
|
inlinestaticinherited |
fluidState | The fluid state |
paramCache | mutable parameters |
phaseIdx | Index of the fluid phase |
|
inlinestatic |
fluidState | The fluid state |
phaseIdx | Index of the fluid phase |
|
inlinestaticinherited |
Molecular diffusion of a component
where
where
fluidState | The fluid state |
paramCache | mutable parameters |
phaseIdx | Index of the fluid phase |
compIdx | Index of the component |
|
inlinestatic |
Molecular diffusion of a component
where
where
fluidState | The fluid state |
phaseIdx | Index of the fluid phase |
compIdx | Index of the component |
|
inlinestaticinherited |
fluidState | The fluid state |
paramCache | mutable parameters |
phaseIdx | Index of the fluid phase |
|
inlinestatic |
fluidState | The fluid state |
phaseIdx | Index of the fluid phase |
|
inlinestaticinherited |
The fugacity coefficient
fluidState | The fluid state |
paramCache | mutable parameters |
phaseIdx | Index of the fluid phase |
compIdx | Index of the component |
|
inlinestatic |
The fugacity coefficient
fluidState | The fluid state |
phaseIdx | Index of the fluid phase |
compIdx | Index of the component |
|
inlinestaticconstexprinherited |
phaseIdx | The index of the fluid phase to consider |
|
inlinestaticinherited |
Given a fluid state, an up-to-date parameter cache and a phase index, this method computes the isobaric heat capacity
fluidState | represents all relevant thermodynamic quantities of a fluid system |
paramCache | mutable parameters |
phaseIdx | Index of the fluid phase |
|
inlinestatic |
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
|
inlinestatic |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
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 only a single component is involved. 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 |
|
inlinestaticconstexprinherited |
If the fluid system only contains tracer components
|
inlinestaticinherited |
The molar density is defined by the mass density
fluidState | The fluid state |
paramCache | mutable parameters |
phaseIdx | Index of the fluid phase |
|
inlinestatic |
fluidState | The fluid state |
phaseIdx | Index of the fluid phase |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
phaseIdx | The index of the fluid phase to consider |
|
inlinestaticinherited |
fluidState | The fluid state |
paramCache | mutable parameters |
phaseIdx | Index of the fluid phase |
|
inlinestatic |
fluidState | The fluid state |
phaseIdx | Index of the fluid phase |
|
inlinestatic |
fluidState | The fluid state |
compIdx | The index of the component to consider |
|
inlinestaticinherited |
fluidState | The fluid state |
paramCache | mutable parameters |
phaseIdx | Index of the fluid phase |
|
inlinestatic |
fluidState | The fluid state |
phaseIdx | Index of the fluid phase |
|
inlinestaticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
for compositional models, the number of components has to be the same as in the multi-phase fluid system as the composition needs to be defined, while for non-compositional models, the number of components must equal the number of phases (1 in this case)
|
staticconstexpr |
|
staticconstexpr |
index of the only phase