A compositional single phase fluid system consisting of two components, which are H2O and NaCl.
#include <dumux/material/fluidsystems/brine.hh>
Public Types | |
using | H2O = H2OType |
export the involved components | |
using | NaCl = Dumux::Components::NaCl<Scalar> |
Static Public Member Functions | |
static const std::string | phaseName (int phaseIdx=liquidPhaseIdx) |
Return the human readable name of the phase. | |
static constexpr bool | isMiscible () |
Returns whether the fluids are miscible. | |
static constexpr bool | isGas (int phaseIdx=liquidPhaseIdx) |
Return whether a phase is gaseous. | |
static bool | isIdealMixture (int phaseIdx=liquidPhaseIdx) |
Returns true if and only if a fluid phase is assumed to be an ideal mixture. | |
static bool | isCompressible (int phaseIdx=liquidPhaseIdx) |
Returns true if and only if a fluid phase is assumed to be compressible. | |
static bool | isIdealGas (int phaseIdx=liquidPhaseIdx) |
Returns true if and only if a fluid phase is assumed to be an ideal gas. | |
static std::string | componentName (int compIdx) |
Return the human readable name of a component. | |
static Scalar | molarMass (int compIdx) |
Return the molar mass of a component in \(\mathrm{[kg/mol]}\). | |
static void | init () |
Initialize the fluid system's static parameters generically. | |
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. | |
template<class FluidState > | |
static Scalar | density (const FluidState &fluidState, int phaseIdx=liquidPhaseIdx) |
Return the phase density [kg/m^3]. | |
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 | viscosity (const FluidState &fluidState, int phaseIdx=liquidPhaseIdx) |
Return the viscosity of the phase. | |
template<class FluidState > | |
static Scalar | vaporPressure (const FluidState &fluidState, int compIdx) |
Vapor pressure of a component \(\mathrm{[Pa]}\). | |
template<class FluidState > | |
static Scalar | enthalpy (const FluidState &fluidState, int phaseIdx) |
Given a phase's composition, temperature and pressure, return its specific enthalpy \(\mathrm{[J/kg]}\). | |
template<class FluidState > | |
static Scalar | componentEnthalpy (const FluidState &fluidState, int phaseIdx, int componentIdx) |
Returns the specific enthalpy \(\mathrm{[J/kg]}\) of a component in a specific phase. | |
template<class FluidState > | |
static Scalar | molarDensity (const FluidState &fluidState, int phaseIdx=liquidPhaseIdx) |
Calculate the molar density \(\mathrm{[mol/m^3]}\) of 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) |
Thermal conductivity 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)]}\). | |
Static Public Attributes | |
static const int | numPhases = 1 |
Number of phases in the fluid system. | |
static const int | numComponents = 2 |
Number of components in the fluid system (H2O, NaCl) | |
static constexpr int | phase0Idx = 0 |
Index of the first (and only) phase. | |
static constexpr int | liquidPhaseIdx = phase0Idx |
The one considered phase is liquid. | |
static constexpr int | H2OIdx = 0 |
index of the water component | |
static constexpr int | NaClIdx = 1 |
index of the NaCl component | |
static constexpr int | comp0Idx = H2OIdx |
index of the first component | |
static constexpr int | comp1Idx = NaClIdx |
index of the second component | |
using Dumux::FluidSystems::Brine< Scalar, H2OType >::H2O = H2OType |
using Dumux::FluidSystems::Brine< Scalar, H2OType >::NaCl = Dumux::Components::NaCl<Scalar> |
|
inlinestatic |
fluidState | The fluid state |
phaseIdx | Index of the fluid phase |
compIIdx | Index of the component i |
compJIdx | Index of the component j |
The implemented value for NaCl is for a molar concentration of 2.5984 mol/l and a temperature of 25°C, see Rard and Miller, 1979 (DOI: 10.1007/BF00648776) [Rard1979]. Dependent on the salt concentration the coefficient can vary between 1.47e-9 m^2/s and 1.6e-9 m^2/s, see Rard and Miller, 1979. It also depends on temperature; values for different temperatures can e.g. found here: Alanis et al., 2000 (DOI: 10.1117/1.602422) [Alanis2000].
|
inlinestatic |
fluidState | An arbitrary fluid state |
phaseIdx | The index of the fluid phase to consider |
componentIdx | The index of the component to consider |
|
inlinestatic |
compIdx | The index of the component to consider |
|
inlinestatic |
fluidState | An arbitrary fluid state |
phaseIdx | The index of the phase for which to compute the density (for compatibility, should be liquidPhaseIdx ) |
|
inlinestatic |
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.
fluidState | The fluid state |
phaseIdx | Index of the fluid phase |
compIdx | Index of the component |
|
inlinestatic |
fluidState | The fluid state |
phaseIdx | The index of the phase to consider |
Equations given in:
|
inlinestatic |
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 \]
fluidState | The fluid state |
phaseIdx | Index of the fluid phase |
compIdx | Index of the component |
|
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 \(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} \)
|
inlinestatic |
|
inlinestatic |
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 |
|
inlinestatic |
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 |
phaseIdx | The index of the fluid phase to consider |
|
inlinestatic |
phaseIdx | The index of the fluid phase to consider |
|
inlinestatic |
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 |
|
inlinestatic |
fluidState | The fluid state |
phaseIdx | Index of the fluid phase |
|
inlinestatic |
compIdx | The index of the component to consider |
|
inlinestatic |
phaseIdx | The index of the fluid phase to consider |
|
inlinestatic |
fluidState | An arbitrary fluid state |
phaseIdx | The index of the fluid phase to consider |
The thermal conductivity of brine is implemented based on the contribution of NaCl ( \(\lambda_{brine}\)/ \(\lambda_{H_2O}\)) of [Yusufova1975] https://link.springer.com/content/pdf/10.1007/BF00867119.pdf, also discussed in [Ozbek1980] https://docecity.com/thermal-conductivity-of-aqueous-sodium-chloride-acs-publicat-5f10766acba00.html
|
inlinestatic |
fluidState | The fluid state |
compIdx | The index of the component to consider |
|
inlinestatic |
fluidState | An arbitrary fluid state |
phaseIdx | The index of the phase for which to compute the viscosity (for compatibility, should be liquidPhaseIdx ) |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
static |
|
static |
|
staticconstexpr |