version 3.9-dev
Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy > Class Template Reference

A compositional fluid with brine (H2O & NaCl) and carbon dioxide as components in both the liquid and the gas (supercritical) phase. More...

#include <dumux/material/fluidsystems/brineco2.hh>

Inheritance diagram for Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >:

Description

template<class Scalar, class CO2Component, class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
class Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >
Note
Depending on the chosen policy, the salinity is assumed to be constant (in which case Brine is used as a pseudo component) or salt (here NaCl) is considered as an individual component.
This implementation always assumes NaCl stays in the liquid phase.

Public Types

using ParameterCache = NullParameterCache
 
using H2O = H2OType
 
using Brine = BrineType
 
using CO2 = CO2Component
 

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 isIdealGas (int phaseIdx)
 Returns true if and only if a fluid phase is assumed to be an ideal gas. More...
 
static 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 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 \(\mathrm{[kg/mol]}\). More...
 
static void init ()
 
static void init (Scalar startTemp, Scalar endTemp, int tempSteps, Scalar startPressure, Scalar endPressure, int pressureSteps)
 
template<class FluidState >
static Scalar density (const FluidState &fluidState, int phaseIdx)
 Given a phase's composition, temperature, pressure, and the partial pressures of all components, return its density \(\mathrm{[kg/m^3]}\). 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 viscosity (const FluidState &fluidState, int phaseIdx)
 Calculate the dynamic viscosity of a fluid phase \(\mathrm{[Pa*s]}\). More...
 
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. More...
 
template<class FluidState >
static Scalar equilibriumMoleFraction (const FluidState &fluidState, const ParameterCache &paramCache, int phaseIdx)
 Returns the equilibrium mole fraction of the dissolved component in a 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 \(\mathrm{[mol^2 * s / (kg*m^3)]}\). More...
 
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 componentEnthalpy (const FluidState &fluidState, int phaseIdx, int componentIdx)
 Returns the specific enthalpy \(\mathrm{[J/kg]}\) of a component in a specific phase. More...
 
template<class FluidState >
static Scalar thermalConductivity (const FluidState &fluidState, int phaseIdx)
 Thermal conductivity of a fluid phase \(\mathrm{[W/(m K)]}\). More...
 
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)]}\). More...
 

Static Public Attributes

static constexpr int numComponents = useConstantSalinity ? 2 : 3
 
static constexpr int numPhases = 2
 
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
 
static constexpr int comp1Idx = 1
 
static constexpr int CO2Idx = comp1Idx
 

Member Typedef Documentation

◆ Brine

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
using Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::Brine = BrineType

◆ CO2

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
using Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::CO2 = CO2Component

◆ H2O

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
using Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::H2O = H2OType

◆ ParameterCache

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
using Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::ParameterCache = NullParameterCache

Member Function Documentation

◆ binaryDiffusionCoefficient()

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
template<class FluidState >
static Scalar Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::binaryDiffusionCoefficient ( const FluidState &  fluidState,
int  phaseIdx,
int  compIIdx,
int  compJIdx 
)
inlinestatic

◆ componentEnthalpy()

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
template<class FluidState >
static Scalar Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::componentEnthalpy ( const FluidState &  fluidState,
int  phaseIdx,
int  componentIdx 
)
inlinestatic
Parameters
fluidStateThe fluid state
phaseIdxThe index of the phase
componentIdxThe index of the component

◆ componentName()

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
static std::string Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::componentName ( int  compIdx)
inlinestatic
Parameters
compIdxThe index of the component to consider

◆ density()

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
template<class FluidState >
static Scalar Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::density ( const FluidState &  fluidState,
int  phaseIdx 
)
inlinestatic
Parameters
fluidStateThe fluid state
phaseIdxThe index of the phase

◆ diffusionCoefficient()

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
template<class FluidState >
static Scalar Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::diffusionCoefficient ( const FluidState &  fluidState,
int  phaseIdx,
int  compIdx 
)
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, \(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.

Maybe see http://www.ddbst.de/en/EED/PCP/DIF_C1050.php

Parameters
fluidStateAn arbitrary fluid state
phaseIdxThe index of the fluid phase to consider
compIdxThe index of the component to consider

◆ enthalpy()

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
template<class FluidState >
static Scalar Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::enthalpy ( const FluidState &  fluidState,
int  phaseIdx 
)
inlinestatic

◆ equilibriumMoleFraction()

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
template<class FluidState >
static Scalar Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::equilibriumMoleFraction ( const FluidState &  fluidState,
const ParameterCache paramCache,
int  phaseIdx 
)
inlinestatic
Parameters
fluidStateAn arbitrary fluid state
paramCacheParameter cache
phaseIdxThe index of the fluid phase to consider

◆ fugacityCoefficient()

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
template<class FluidState >
static Scalar Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::fugacityCoefficient ( const FluidState &  fluidState,
int  phaseIdx,
int  compIdx 
)
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 \]

Parameters
fluidStateThe fluid state
phaseIdxIndex of the fluid phase
compIdxIndex of the component

◆ heatCapacity()

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
template<class FluidState >
static Scalar Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::heatCapacity ( const FluidState &  fluidState,
int  phaseIdx 
)
inlinestatic
Note
We employ the heat capacity of the pure phases.
Parameters
fluidStateAn arbitrary fluid state
phaseIdxThe index of the fluid phase to consider

◆ init() [1/2]

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
static void Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::init ( )
inlinestatic

◆ init() [2/2]

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
static void Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::init ( Scalar  startTemp,
Scalar  endTemp,
int  tempSteps,
Scalar  startPressure,
Scalar  endPressure,
int  pressureSteps 
)
inlinestatic

◆ isCompressible()

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
static constexpr bool Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::isCompressible ( int  phaseIdx)
inlinestaticconstexpr

Compressible means that the partial derivative of the density to the fluid pressure is always larger than zero.

Parameters
phaseIdxThe index of the fluid phase to consider

◆ isGas()

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
static constexpr bool Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::isGas ( int  phaseIdx)
inlinestaticconstexpr
Parameters
phaseIdxThe index of the fluid phase to consider

◆ isIdealGas()

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
static constexpr bool Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::isIdealGas ( int  phaseIdx)
inlinestaticconstexpr
Parameters
phaseIdxThe index of the fluid phase to consider

◆ isIdealMixture()

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
static bool Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::isIdealMixture ( int  phaseIdx)
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.

Parameters
phaseIdxThe index of the fluid phase to consider

◆ isMiscible()

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
static constexpr bool Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::isMiscible ( )
inlinestaticconstexpr

◆ molarDensity()

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
template<class FluidState >
static Scalar Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::molarDensity ( const FluidState &  fluidState,
int  phaseIdx 
)
inlinestatic
Parameters
fluidStateThe fluid state
phaseIdxIndex of the fluid phase

◆ molarMass()

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
static Scalar Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::molarMass ( int  compIdx)
inlinestatic
Parameters
compIdxThe index of the component to consider

◆ phaseName()

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
static std::string Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::phaseName ( int  phaseIdx)
inlinestatic
Parameters
phaseIdxThe index of the fluid phase to consider

◆ thermalConductivity()

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
template<class FluidState >
static Scalar Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::thermalConductivity ( const FluidState &  fluidState,
int  phaseIdx 
)
inlinestatic
Parameters
fluidStateAn arbitrary fluid state
phaseIdxThe index of the fluid phase to consider
Note
For the thermal conductivity of the phases the contribution of the minor component is neglected. This contribution is probably not big, but somebody would have to find out its influence.

◆ viscosity()

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
template<class FluidState >
static Scalar Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::viscosity ( const FluidState &  fluidState,
int  phaseIdx 
)
inlinestatic
Parameters
fluidStateAn arbitrary fluid state
phaseIdxThe index of the fluid phase to consider
Note
For the viscosity of the phases the contribution of the minor component is neglected. This contribution is probably not big, but somebody would have to find out its influence.

Member Data Documentation

◆ CO2Idx

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
constexpr int Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::CO2Idx = comp1Idx
staticconstexpr

◆ comp0Idx

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
constexpr int Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::comp0Idx = 0
staticconstexpr

◆ comp1Idx

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
constexpr int Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::comp1Idx = 1
staticconstexpr

◆ gasPhaseIdx

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
constexpr int Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::gasPhaseIdx = 1
staticconstexpr

◆ liquidPhaseIdx

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
constexpr int Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::liquidPhaseIdx = 0
staticconstexpr

◆ numComponents

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
constexpr int Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::numComponents = useConstantSalinity ? 2 : 3
staticconstexpr

◆ numPhases

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
constexpr int Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::numPhases = 2
staticconstexpr

◆ phase0Idx

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
constexpr int Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::phase0Idx = liquidPhaseIdx
staticconstexpr

◆ phase1Idx

template<class Scalar , class CO2Component , class H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>, class Policy = BrineCO2DefaultPolicy<true>>
constexpr int Dumux::FluidSystems::BrineCO2< Scalar, CO2Component, H2OType, Policy >::phase1Idx = gasPhaseIdx
staticconstexpr

The documentation for this class was generated from the following file: