version 3.10-dev
Dumux::FluidSystems::Spe5< Scalar > Class Template Reference

The fluid system for the SPE-5 benchmark problem. More...

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

Description

template<class Scalar>
class Dumux::FluidSystems::Spe5< Scalar >

A three-phase fluid system featuring gas, oil and water as phases and the seven components distilled water, Methane \((\mathrm{C_1})\), Propane \((\mathrm{C_3})\), Pentane \((\mathrm{C_5})\), Heptane \((\mathrm{C_7})\), Decane \((\mathrm{C_{10}})\), Pentadecane \((\mathrm{C_{15}})\) and Icosane \((\mathrm{C_{20}})\). For the water phase the IAPWS-97 formulation is used as equation of state, while for the gas and oil phases a Peng-Robinson equation of state with slightly modified parameters is used. This fluid system is highly non-linear, and the gas and oil phases also cannot be considered ideal.

See:

J.E. Killough, et al.: Fifth Comparative Solution Project: Evaluation of Miscible Flood Simulators, Ninth SPE Symposium on Reservoir Simulation, 1987 [47]

Public Types

using ParameterCache = Spe5ParameterCache< Scalar, ThisType >
 
using H2O = Dumux::Components::H2O< Scalar >
 The component for pure water to be used. More...
 

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 isCompressible (int phaseIdx)
 Return whether a phase is compressible. More...
 
static bool isIdealMixture (int phaseIdx)
 Returns true if and only if a fluid phase is assumed to be an ideal mixture. More...
 
static bool isIdealGas (int phaseIdx)
 Returns true if and only if a fluid phase is assumed to be an ideal gas. 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 Scalar criticalTemperature (int compIdx)
 Critical temperature of a component \(\mathrm{[K]}\). More...
 
static Scalar criticalPressure (int compIdx)
 Critical pressure of a component \(\mathrm{[Pa]}\). More...
 
static Scalar criticalMolarVolume (int compIdx)
 Molar volume of a component at the critical point \(\mathrm{[m^3/mol]}\). More...
 
static Scalar acentricFactor (int compIdx)
 The acentric factor of a component \(\mathrm{[-]}\). More...
 
static Scalar interactionCoefficient (int comp1Idx, int comp2Idx)
 Returns the interaction coefficient for two components. More...
 
static void init ()
 Initialize the fluid system's static parameters. More...
 
template<class FluidState >
static Scalar density (const FluidState &fluidState, const ParameterCache &paramCache, int phaseIdx)
 Calculate the density \(\mathrm{[kg/m^3]}\) of a fluid phase. More...
 
template<class FluidState >
static Scalar molarDensity (const FluidState &fluidState, const ParameterCache &paramCache, int phaseIdx)
 The molar density \(\rho_{mol,\alpha}\) of a fluid phase \(\alpha\) in \(\mathrm{[mol/m^3]}\). More...
 
template<class FluidState >
static Scalar viscosity (const FluidState &fs, const ParameterCache &paramCache, int phaseIdx)
 Calculate the dynamic viscosity of a fluid phase \(\mathrm{[Pa*s]}\). More...
 
template<class FluidState >
static Scalar fugacityCoefficient (const FluidState &fs, const ParameterCache &paramCache, int phaseIdx, int compIdx)
 Calculate the fugacity coefficient \(\mathrm{[-]}\) of an individual component in a fluid phase. More...
 
template<class FluidState >
static Scalar diffusionCoefficient (const FluidState &fs, const ParameterCache &paramCache, int phaseIdx, int compIdx)
 Calculate the binary 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, const ParameterCache &paramCache, 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 \(i\) and \(j\) in this phase. More...
 
template<class FluidState >
static Scalar enthalpy (const FluidState &fs, const ParameterCache &paramCache, int phaseIdx)
 Given a phase's composition, temperature and pressure, calculate its specific enthalpy \(\mathrm{[J/kg]}\). More...
 
template<class FluidState >
static Scalar thermalConductivity (const FluidState &fluidState, const ParameterCache &paramCache, int phaseIdx)
 Given a phase's composition, temperature and pressure, calculate its thermal conductivity \(\mathrm{[W/(m K)]}\). More...
 
template<class FluidState >
static Scalar heatCapacity (const FluidState &fluidState, const ParameterCache &paramCache, int phaseIdx)
 Given a phase's composition, temperature and pressure, calculate its heat capacity \(\mathrm{[J/(kg K)]}\). More...
 

Static Public Attributes

static const int numPhases = 3
 Number of phases in the fluid system. More...
 
static const int gPhaseIdx = 0
 Index of the gas phase. More...
 
static const int wPhaseIdx = 1
 Index of the water phase. More...
 
static const int oPhaseIdx = 2
 Index of the oil phase. More...
 
static const int numComponents = 7
 Number of components in the fluid system. More...
 
static const int H2OIdx = 0
 
static const int C1Idx = 1
 
static const int C3Idx = 2
 
static const int C6Idx = 3
 
static const int C10Idx = 4
 
static const int C15Idx = 5
 
static const int C20Idx = 6
 

Member Typedef Documentation

◆ H2O

template<class Scalar >
using Dumux::FluidSystems::Spe5< Scalar >::H2O = Dumux::Components::H2O<Scalar>

◆ ParameterCache

template<class Scalar >
using Dumux::FluidSystems::Spe5< Scalar >::ParameterCache = Spe5ParameterCache<Scalar, ThisType>

Member Function Documentation

◆ acentricFactor()

template<class Scalar >
static Scalar Dumux::FluidSystems::Spe5< Scalar >::acentricFactor ( int  compIdx)
inlinestatic
Parameters
compIdxThe index of the component to consider

◆ binaryDiffusionCoefficient()

template<class Scalar >
template<class FluidState >
static Scalar Dumux::FluidSystems::Spe5< Scalar >::binaryDiffusionCoefficient ( const FluidState &  fluidState,
const ParameterCache paramCache,
int  phaseIdx,
int  compIIdx,
int  compJIdx 
)
inlinestatic
Parameters
fluidStateAn arbitrary fluid state
paramCacheContainer for cache parameters
phaseIdxThe index of the fluid phase to consider
compIIdxThe index of the first component to consider
compJIdxThe index of the second component to consider

◆ componentName()

template<class Scalar >
static std::string Dumux::FluidSystems::Spe5< Scalar >::componentName ( int  compIdx)
inlinestatic
Parameters
compIdxThe index of the component to consider

◆ criticalMolarVolume()

template<class Scalar >
static Scalar Dumux::FluidSystems::Spe5< Scalar >::criticalMolarVolume ( int  compIdx)
inlinestatic
Parameters
compIdxThe index of the component to consider

◆ criticalPressure()

template<class Scalar >
static Scalar Dumux::FluidSystems::Spe5< Scalar >::criticalPressure ( int  compIdx)
inlinestatic
Parameters
compIdxThe index of the component to consider

◆ criticalTemperature()

template<class Scalar >
static Scalar Dumux::FluidSystems::Spe5< Scalar >::criticalTemperature ( int  compIdx)
inlinestatic
Parameters
compIdxThe index of the component to consider

◆ density()

template<class Scalar >
template<class FluidState >
static Scalar Dumux::FluidSystems::Spe5< Scalar >::density ( const FluidState &  fluidState,
const ParameterCache paramCache,
int  phaseIdx 
)
inlinestatic
Parameters
fluidStateAn arbitrary fluid state
paramCacheContainer for cache parameters
phaseIdxThe index of the fluid phase to consider

◆ diffusionCoefficient()

template<class Scalar >
template<class FluidState >
static Scalar Dumux::FluidSystems::Spe5< Scalar >::diffusionCoefficient ( const FluidState &  fs,
const ParameterCache paramCache,
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 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.

Parameters
fsAn arbitrary fluid state
paramCacheContainer for cache parameters
phaseIdxThe index of the fluid phase to consider
compIdxThe index of the component to consider

◆ enthalpy()

template<class Scalar >
template<class FluidState >
static Scalar Dumux::FluidSystems::Spe5< Scalar >::enthalpy ( const FluidState &  fs,
const ParameterCache paramCache,
int  phaseIdx 
)
inlinestatic
Parameters
fsAn arbitrary fluid state
paramCacheContainer for cache parameters
phaseIdxThe index of the fluid phase to consider

◆ fugacityCoefficient()

template<class Scalar >
template<class FluidState >
static Scalar Dumux::FluidSystems::Spe5< Scalar >::fugacityCoefficient ( const FluidState &  fs,
const ParameterCache paramCache,
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 in a phase \(\mathrm{x^\kappa_\alpha}\) by means of the relation

\[ f^\kappa_\alpha = \phi^\kappa_\alpha \cdot x^\kappa_\alpha \cdot p_alpha \]

Parameters
fsAn arbitrary fluid state
paramCacheContainer for cache parameters
phaseIdxThe index of the fluid phase to consider
compIdxThe index of the component to consider

◆ heatCapacity()

template<class Scalar >
template<class FluidState >
static Scalar Dumux::FluidSystems::Spe5< Scalar >::heatCapacity ( const FluidState &  fluidState,
const ParameterCache paramCache,
int  phaseIdx 
)
inlinestatic
Parameters
fluidStateAn arbitrary fluid state
paramCacheContainer for cache parameters
phaseIdxThe index of the fluid phase to consider

◆ init()

template<class Scalar >
static void Dumux::FluidSystems::Spe5< Scalar >::init ( )
inlinestatic

◆ interactionCoefficient()

template<class Scalar >
static Scalar Dumux::FluidSystems::Spe5< Scalar >::interactionCoefficient ( int  comp1Idx,
int  comp2Idx 
)
inlinestatic
Parameters
comp1IdxThe index of component 1 to consider
comp2IdxThe index of component 2 to consider

The values are given by the SPE5 paper.

◆ isCompressible()

template<class Scalar >
static constexpr bool Dumux::FluidSystems::Spe5< Scalar >::isCompressible ( int  phaseIdx)
inlinestaticconstexpr
Parameters
phaseIdxThe index of the fluid phase to consider

In the SPE-5 problems all fluids are compressible...

◆ isGas()

template<class Scalar >
static constexpr bool Dumux::FluidSystems::Spe5< Scalar >::isGas ( int  phaseIdx)
inlinestaticconstexpr
Parameters
phaseIdxThe index of the fluid phase to consider

◆ isIdealGas()

template<class Scalar >
static bool Dumux::FluidSystems::Spe5< Scalar >::isIdealGas ( int  phaseIdx)
inlinestatic
Parameters
phaseIdxThe index of the fluid phase to consider

◆ isIdealMixture()

template<class Scalar >
static bool Dumux::FluidSystems::Spe5< Scalar >::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 >
static constexpr bool Dumux::FluidSystems::Spe5< Scalar >::isMiscible ( )
inlinestaticconstexpr

◆ molarDensity()

template<class Scalar >
template<class FluidState >
static Scalar Dumux::FluidSystems::Spe5< Scalar >::molarDensity ( const FluidState &  fluidState,
const ParameterCache paramCache,
int  phaseIdx 
)
inlinestatic

The molar density is defined by the mass density \(\rho_\alpha\) and the mean molar mass \(\overline M_\alpha\):

\[\rho_{mol,\alpha} = \frac{\rho_\alpha}{\overline M_\alpha} \;.\]

◆ molarMass()

template<class Scalar >
static Scalar Dumux::FluidSystems::Spe5< Scalar >::molarMass ( int  compIdx)
inlinestatic
Parameters
compIdxThe index of the component to consider

◆ phaseName()

template<class Scalar >
static std::string Dumux::FluidSystems::Spe5< Scalar >::phaseName ( int  phaseIdx)
inlinestatic
Parameters
phaseIdxThe index of the fluid phase to consider

◆ thermalConductivity()

template<class Scalar >
template<class FluidState >
static Scalar Dumux::FluidSystems::Spe5< Scalar >::thermalConductivity ( const FluidState &  fluidState,
const ParameterCache paramCache,
int  phaseIdx 
)
inlinestatic
Parameters
fluidStateAn arbitrary fluid state
paramCacheContainer for cache parameters
phaseIdxThe index of the fluid phase to consider

◆ viscosity()

template<class Scalar >
template<class FluidState >
static Scalar Dumux::FluidSystems::Spe5< Scalar >::viscosity ( const FluidState &  fs,
const ParameterCache paramCache,
int  phaseIdx 
)
inlinestatic
Parameters
fsAn arbitrary fluid state
paramCacheContainer for cache parameters
phaseIdxThe index of the fluid phase to consider

Member Data Documentation

◆ C10Idx

template<class Scalar >
const int Dumux::FluidSystems::Spe5< Scalar >::C10Idx = 4
static

◆ C15Idx

template<class Scalar >
const int Dumux::FluidSystems::Spe5< Scalar >::C15Idx = 5
static

◆ C1Idx

template<class Scalar >
const int Dumux::FluidSystems::Spe5< Scalar >::C1Idx = 1
static

◆ C20Idx

template<class Scalar >
const int Dumux::FluidSystems::Spe5< Scalar >::C20Idx = 6
static

◆ C3Idx

template<class Scalar >
const int Dumux::FluidSystems::Spe5< Scalar >::C3Idx = 2
static

◆ C6Idx

template<class Scalar >
const int Dumux::FluidSystems::Spe5< Scalar >::C6Idx = 3
static

◆ gPhaseIdx

template<class Scalar >
const int Dumux::FluidSystems::Spe5< Scalar >::gPhaseIdx = 0
static

◆ H2OIdx

template<class Scalar >
const int Dumux::FluidSystems::Spe5< Scalar >::H2OIdx = 0
static

◆ numComponents

template<class Scalar >
const int Dumux::FluidSystems::Spe5< Scalar >::numComponents = 7
static

◆ numPhases

template<class Scalar >
const int Dumux::FluidSystems::Spe5< Scalar >::numPhases = 3
static

◆ oPhaseIdx

template<class Scalar >
const int Dumux::FluidSystems::Spe5< Scalar >::oPhaseIdx = 2
static

◆ wPhaseIdx

template<class Scalar >
const int Dumux::FluidSystems::Spe5< Scalar >::wPhaseIdx = 1
static

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