An adapter for multi-phase fluid systems to be used with (compositional) one-phase models.
More...
template<class MPFluidSystem, int phase = 0>
class Dumux::FluidSystems::OnePAdapter< MPFluidSystem, phase >
- Template Parameters
-
| MPFluidSystem | the multi-phase fluid system to be adapted |
| phase | the index of the phase we choose from the multi-phase fluid system |
|
| static constexpr int | compIdx (int multiPhaseFluidSystemCompIdx) |
| | convert a component index of the multi-phase component index to the actual component index
|
| template<class ... Args> |
| static void | init (Args &&... args) |
| | Initialize the fluid system's static parameters generically.
|
| static std::string | phaseName (int phaseIdx=0) |
| | Return the human readable name of a fluid phase.
|
| static std::string | componentName (int compIdx) |
| | A human readable name for the component.
|
| static std::string | name () |
| | A human readable name for the component.
|
| static constexpr bool | isMiscible () |
| | There is only one phase, so no mass transfer between phases can occur.
|
| static constexpr bool | isGas (int phaseIdx=0) |
| | Returns whether the fluid is gaseous.
|
| static constexpr bool | isIdealMixture (int phaseIdx=0) |
| | Returns true if and only if a fluid phase is assumed to be an ideal mixture.
|
| static constexpr bool | isCompressible (int phaseIdx=0) |
| | Returns true if the fluid is assumed to be compressible.
|
| static constexpr bool | viscosityIsConstant (int phaseIdx=0) |
| | Returns true if the fluid viscosity is constant.
|
| static constexpr bool | isIdealGas (int phaseIdx=0) |
| | Returns true if the fluid is assumed to be an ideal gas.
|
| static Scalar | molarMass (int compIdx) |
| | The mass in \(\mathrm{[kg]}\) of one mole of the component.
|
| template<class FluidState> |
| static Scalar | density (const FluidState &fluidState, int phaseIdx=0) |
| | Calculate the density \(\mathrm{[kg/m^3]}\) of a fluid phase.
|
| template<class FluidState> |
| static Scalar | molarDensity (const FluidState &fluidState, int phaseIdx=0) |
| | Calculate the molar density \(\mathrm{[mol/m^3]}\) of a fluid phase.
|
| 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 \(\mathrm{[J/kg]}\).
|
| template<class FluidState> |
| static Scalar | componentEnthalpy (const FluidState &fluidState, int phaseIdx, int compIdx) |
| | Returns the specific enthalpy \(\mathrm{[J/kg]}\) of a component in a specific phase.
|
| template<class FluidState> |
| static Scalar | viscosity (const FluidState &fluidState, int phaseIdx=0) |
| | Calculate the dynamic viscosity of a fluid phase \(\mathrm{[Pa*s]}\).
|
| 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 | 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 | 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 | thermalConductivity (const FluidState &fluidState, int phaseIdx=0) |
| | Thermal conductivity \(\lambda_\alpha \) of a fluid phase \(\mathrm{[W/(m K)]}\).
|
| template<class FluidState> |
| static Scalar | heatCapacity (const FluidState &fluidState, int phaseIdx=0) |
| | Specific isobaric heat capacity \(c_{p,\alpha}\) of a fluid phase \(\mathrm{[J/(kg*K)]}\).
|
| template<class FluidState> |
| static Scalar | vaporPressure (const FluidState &fluidState, int compIdx) |
| | Vapor pressure of a component \(\mathrm{[Pa]}\).
|
| 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 MPFluidSystem, int phase = 0>
template<class FluidState>
Molecular diffusion of a component \(\mathrm{\kappa}\) is caused by a gradient of the chemical potential and follows the law
\[ J = - D \nabla \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.
- Parameters
-
| fluidState | The fluid state |
| phaseIdx | Index of the fluid phase |
| compIdx | Index of the component |