version 3.9-dev
Dumux::Components::Constant< id, Scalar > Class Template Reference

A component which returns run time specified values for all fluid properties. More...

#include <dumux/material/components/constant.hh>

Inheritance diagram for Dumux::Components::Constant< id, Scalar >:

Description

template<int id, class Scalar>
class Dumux::Components::Constant< id, Scalar >
Template Parameters
idThe id used to read from the input file / parametertree
ScalarThe type used for scalar values
Note
For the constant component with id=1 you would specify the parameters in the input file as follows
[1.Component]
MolarMass = 0.018 # kg/mol
If you only have one component you can also omit the "1.".

Public Types

using Scalar = Scalar
 export the scalar type used by the component More...
 

Static Public Member Functions

static constexpr bool gasIsCompressible ()
 Returns true if the gas phase is assumed to be compressible. More...
 
static constexpr bool gasViscosityIsConstant ()
 Returns true if the gas phase viscosity is constant. More...
 
static constexpr bool gasIsIdeal ()
 Returns true if the gas phase is assumed to be ideal. More...
 
static constexpr bool liquidIsCompressible ()
 Returns true if the liquid phase is assumed to be compressible. More...
 
static constexpr bool liquidViscosityIsConstant ()
 Returns true if the liquid phase viscosity is constant. More...
 
static const std::string & name ()
 A human readable name for the component. More...
 
static Scalar molarMass ()
 The mass in \(\mathrm{[kg]}\) of one mole of the component. More...
 
static Scalar tripleTemperature ()
 Returns the temperature \(\mathrm{[K]}\) at the components's triple point. More...
 
static Scalar triplePressure ()
 Returns the pressure \(\mathrm{[Pa]}\) at the component's triple point. More...
 
static Scalar vaporizationEnthalpy ()
 The vaporization enthalpy in \(\mathrm{[J/kg]}\) needed to vaporize one kilogram of the liquid component to the gaseous state. More...
 
static Scalar liquidDensity (Scalar temperature, Scalar pressure)
 Sets the liquid density in \(\mathrm{[kg/m^3]}\). More...
 
static Scalar liquidMolarDensity (Scalar temperature, Scalar pressure)
 The molar density in \(\mathrm{[mol/m^3]}\) at a given pressure and temperature. More...
 
static Scalar liquidViscosity (Scalar temperature, Scalar pressure)
 Sets the liquid dynamic viscosity in \(\mathrm{[Pa*s]}\). More...
 
static Scalar liquidThermalConductivity (Scalar temperature, Scalar pressure)
 Thermal conductivity of the component \(\mathrm{[W/(m*K)]}\) as a liquid. More...
 
static Scalar liquidInternalEnergy (Scalar temperature, Scalar pressure)
 Specific internal energy of the component \(\mathrm{[J/kg]}\) as a liquid. More...
 
static Scalar liquidEnthalpy (Scalar temperature, Scalar pressure)
 Specific enthalpy of the component \(\mathrm{[J/kg]}\) as a liquid. More...
 
static Scalar liquidHeatCapacity (Scalar temperature, Scalar pressure)
 Specific isobaric heat capacity of the component \(\mathrm{[J/(kg*K)]}\) as a liquid. More...
 
static Scalar gasDensity (Scalar temperature, Scalar pressure)
 Sets the gas density in \(\mathrm{[kg/m^3]}\). More...
 
static Scalar gasMolarDensity (Scalar temperature, Scalar pressure)
 The molar density in \(\mathrm{[mol/m^3]}\) at a given pressure and temperature. More...
 
static Scalar gasViscosity (Scalar temperature, Scalar pressure)
 Sets the gas dynamic viscosity in \(\mathrm{[Pa*s]}\). More...
 
static Scalar gasThermalConductivity (Scalar temperature, Scalar pressure)
 Thermal conductivity of the component \(\mathrm{[W/(m*K)]}\) as a gas. More...
 
static Scalar gasInternalEnergy (Scalar temperature, Scalar pressure)
 Specific internal energy of the component \(\mathrm{[J/kg]}\) as a gas. More...
 
static Scalar gasEnthalpy (Scalar temperature, Scalar pressure)
 Specific enthalpy of the component \(\mathrm{[J/kg]}\) as a gas. More...
 
static Scalar gasHeatCapacity (Scalar temperature, Scalar pressure)
 Specific isobaric heat capacity of the component \(\mathrm{[J/(kg*K)]}\) as a gas. More...
 
static Scalar vaporPressure (Scalar T)
 The vapor pressure in \(\mathrm{[Pa]}\) of a the component at a given temperature. More...
 
static Scalar solidDensity (Scalar temperature)
 The density in \(\mathrm{[kg/m^3]}\) of the component at a given pressure in \(\mathrm{[Pa]}\) and temperature in \(\mathrm{[K]}\). More...
 
static Scalar solidThermalConductivity (Scalar temperature)
 Thermal conductivity of the component \(\mathrm{[W/(m*K)]}\) as a solid. More...
 
static Scalar solidHeatCapacity (Scalar temperature)
 Specific isobaric heat capacity of the component \(\mathrm{[J/(kg*K)]}\) as a solid. More...
 
static void init (Scalar tempMin, Scalar tempMax, unsigned nTemp, Scalar pressMin, Scalar pressMax, unsigned nPress)
 A default routine for initialization, not needed for components and must not be called. More...
 
static constexpr Scalar criticalTemperature ()
 Returns the critical temperature in \(\mathrm{[K]}\) of the component. More...
 
static constexpr Scalar criticalPressure ()
 Returns the critical pressure in \(\mathrm{[Pa]}\) of the component. More...
 
static constexpr bool solidIsCompressible ()
 Returns true if the solid phase is assumed to be compressible. More...
 

Static Public Attributes

static constexpr bool isTabulated
 if the component relies on tabulated values More...
 

Member Typedef Documentation

◆ Scalar

using Dumux::Components::Base< Scalar , Constant< id, Scalar > >::Scalar = Scalar
inherited

Member Function Documentation

◆ criticalPressure()

static constexpr Scalar Dumux::Components::Base< Scalar , Constant< id, Scalar > >::criticalPressure ( )
inlinestaticconstexprinherited

◆ criticalTemperature()

static constexpr Scalar Dumux::Components::Base< Scalar , Constant< id, Scalar > >::criticalTemperature ( )
inlinestaticconstexprinherited

◆ gasDensity()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::gasDensity ( Scalar  temperature,
Scalar  pressure 
)
inlinestatic
Parameters
temperaturephase temperature in \(\mathrm{[K]}\)
pressurephase pressure in \(\mathrm{[Pa]}\)

◆ gasEnthalpy()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::gasEnthalpy ( Scalar  temperature,
Scalar  pressure 
)
inlinestatic
Parameters
temperaturetemperature of phase in \(\mathrm{[K]}\)
pressurepressure of phase in \(\mathrm{[Pa]}\)

◆ gasHeatCapacity()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::gasHeatCapacity ( Scalar  temperature,
Scalar  pressure 
)
inlinestatic
Parameters
temperaturetemperature of phase in \(\mathrm{[K]}\)
pressurepressure of phase in \(\mathrm{[Pa]}\)

◆ gasInternalEnergy()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::gasInternalEnergy ( Scalar  temperature,
Scalar  pressure 
)
inlinestatic
   Definition of enthalpy: \f$h= u + pv = u + p / \rho\f$.

   Rearranging for internal energy yields: \f$u = h - pv\f$.

   Exploiting the Ideal Gas assumption (\f$pv = R_{\textnormal{specific}} T\f$)gives: \f$u = h - R / M T \f$.

   The universal gas constant can only be used in the case of molar formulations.
Parameters
temperaturetemperature of phase in \(\mathrm{[K]}\)
pressurepressure of phase in \(\mathrm{[Pa]}\)

◆ gasIsCompressible()

template<int id, class Scalar >
static constexpr bool Dumux::Components::Constant< id, Scalar >::gasIsCompressible ( )
inlinestaticconstexpr

◆ gasIsIdeal()

template<int id, class Scalar >
static constexpr bool Dumux::Components::Constant< id, Scalar >::gasIsIdeal ( )
inlinestaticconstexpr

◆ gasMolarDensity()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::gasMolarDensity ( Scalar  temperature,
Scalar  pressure 
)
inlinestatic
Parameters
temperaturetemperature of component in \(\mathrm{[K]}\)
pressurepressure of component in \(\mathrm{[Pa]}\)

◆ gasThermalConductivity()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::gasThermalConductivity ( Scalar  temperature,
Scalar  pressure 
)
inlinestatic
Parameters
temperaturetemperature of phase in \(\mathrm{[K]}\)
pressurepressure of phase in \(\mathrm{[Pa]}\)

◆ gasViscosity()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::gasViscosity ( Scalar  temperature,
Scalar  pressure 
)
inlinestatic
Note
We look for Component.GasKinematicViscosity or Component.GasDynamicViscosity. If both parameters are specified, it is considered a configuration error because it can be ambiguous if defaults are specified for several constant components in the plain "Component" group (without ID-prefix).
Parameters
temperaturephase temperature in \(\mathrm{[K]}\)
pressurephase pressure in \(\mathrm{[Pa]}\)

◆ gasViscosityIsConstant()

template<int id, class Scalar >
static constexpr bool Dumux::Components::Constant< id, Scalar >::gasViscosityIsConstant ( )
inlinestaticconstexpr

◆ init()

static void Dumux::Components::Base< Scalar , Constant< id, Scalar > >::init ( Scalar  tempMin,
Scalar  tempMax,
unsigned  nTemp,
Scalar  pressMin,
Scalar  pressMax,
unsigned  nPress 
)
inlinestaticinherited
Parameters
tempMinThe minimum of the temperature range in \(\mathrm{[K]}\)
tempMaxThe maximum of the temperature range in \(\mathrm{[K]}\)
nTempThe number of entries/steps within the temperature range
pressMinThe minimum of the pressure range in \(\mathrm{[Pa]}\)
pressMaxThe maximum of the pressure range in \(\mathrm{[Pa]}\)
nPressThe number of entries/steps within the pressure range

This function throws a warning when called: "No init routine defined - make sure that this is not necessary!"

◆ liquidDensity()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::liquidDensity ( Scalar  temperature,
Scalar  pressure 
)
inlinestatic
Parameters
temperaturephase temperature in \(\mathrm{[K]}\)
pressurephase pressure in \(\mathrm{[Pa]}\)

◆ liquidEnthalpy()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::liquidEnthalpy ( Scalar  temperature,
Scalar  pressure 
)
inlinestatic
Parameters
temperaturetemperature of phase in \(\mathrm{[K]}\)
pressurepressure of phase in \(\mathrm{[Pa]}\)

◆ liquidHeatCapacity()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::liquidHeatCapacity ( Scalar  temperature,
Scalar  pressure 
)
inlinestatic
Parameters
temperaturetemperature of phase in \(\mathrm{[K]}\)
pressurepressure of phase in \(\mathrm{[Pa]}\)

◆ liquidInternalEnergy()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::liquidInternalEnergy ( Scalar  temperature,
Scalar  pressure 
)
inlinestatic
Parameters
temperaturetemperature of phase in \(\mathrm{[K]}\)
pressurepressure of phase in \(\mathrm{[Pa]}\)

◆ liquidIsCompressible()

template<int id, class Scalar >
static constexpr bool Dumux::Components::Constant< id, Scalar >::liquidIsCompressible ( )
inlinestaticconstexpr

◆ liquidMolarDensity()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::liquidMolarDensity ( Scalar  temperature,
Scalar  pressure 
)
inlinestatic
Parameters
temperaturetemperature of component in \(\mathrm{[K]}\)
pressurepressure of component in \(\mathrm{[Pa]}\)

◆ liquidThermalConductivity()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::liquidThermalConductivity ( Scalar  temperature,
Scalar  pressure 
)
inlinestatic
Parameters
temperaturetemperature of phase in \(\mathrm{[K]}\)
pressurepressure of phase in \(\mathrm{[Pa]}\)

◆ liquidViscosity()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::liquidViscosity ( Scalar  temperature,
Scalar  pressure 
)
inlinestatic
Note
We look for Component.LiquidKinematicViscosity or Component.LiquidDynamicViscosity. If both parameters are specified, it is considered a configuration error because it can be ambiguous if defaults are specified for several constant components in the plain "Component" group (without ID-prefix).
Parameters
temperaturephase temperature in \(\mathrm{[K]}\)
pressurephase pressure in \(\mathrm{[Pa]}\)

◆ liquidViscosityIsConstant()

template<int id, class Scalar >
static constexpr bool Dumux::Components::Constant< id, Scalar >::liquidViscosityIsConstant ( )
inlinestaticconstexpr

◆ molarMass()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::molarMass ( )
inlinestatic

◆ name()

template<int id, class Scalar >
static const std::string & Dumux::Components::Constant< id, Scalar >::name ( )
inlinestatic

◆ solidDensity()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::solidDensity ( Scalar  temperature)
inlinestatic
Parameters
temperaturetemperature of component in \(\mathrm{[K]}\)

◆ solidHeatCapacity()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::solidHeatCapacity ( Scalar  temperature)
inlinestatic
Parameters
temperaturetemperature of component in \(\mathrm{[K]}\)

◆ solidIsCompressible()

static constexpr bool Dumux::Components::Solid< Scalar, Constant< id, Scalar > >::solidIsCompressible ( )
inlinestaticconstexprinherited

◆ solidThermalConductivity()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::solidThermalConductivity ( Scalar  temperature)
inlinestatic
Parameters
temperaturetemperature of component in \(\mathrm{[K]}\)

◆ triplePressure()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::triplePressure ( )
inlinestatic

◆ tripleTemperature()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::tripleTemperature ( )
inlinestatic

◆ vaporizationEnthalpy()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::vaporizationEnthalpy ( )
inlinestatic

◆ vaporPressure()

template<int id, class Scalar >
static Scalar Dumux::Components::Constant< id, Scalar >::vaporPressure ( Scalar  T)
inlinestatic
Parameters
Ttemperature of component in \(\mathrm{[K]}\)

We use the Clausius-Clapeyron Equation to estimate the vapor pressure. Vapor pressure depends on the enthalpy of vaporization. We use the triple point pressure and temperature as a reference point.

Member Data Documentation

◆ isTabulated

constexpr bool Dumux::Components::Base< Scalar , Constant< id, Scalar > >::isTabulated
staticconstexprinherited

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