thermo< Thermo, Type > Class Template Reference

Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the template argument type thermo. All other properties are derived from these primitive functions. More...

Inheritance diagram for thermo< Thermo, Type >:
Collaboration diagram for thermo< Thermo, Type >:

Public Types

typedef thermo< Thermo, Type > thermoType
 The thermodynamics of the individual species'. More...
 

Public Member Functions

 thermo (const Thermo &sp)
 Construct from components. More...
 
 thermo (const word &name, const dictionary &dict)
 Construct from name and dictionary. More...
 
 thermo (const word &name, const thermo &)
 Construct as named copy. More...
 
scalar Cpv (const scalar p, const scalar T) const
 Heat capacity at constant pressure/volume [J/kg/K]. More...
 
scalar gamma (const scalar p, const scalar T) const
 Gamma = Cp/Cv []. More...
 
scalar he (const scalar p, const scalar T) const
 Enthalpy/Internal energy [J/kg]. More...
 
scalar g (const scalar p, const scalar T) const
 Gibbs free energy [J/kg]. More...
 
scalar a (const scalar p, const scalar T) const
 Helmholtz free energy [J/kg]. More...
 
scalar K (const scalar p, const scalar T) const
 Equilibrium constant [] i.t.o fugacities. More...
 
scalar Kp (const scalar p, const scalar T) const
 Equilibrium constant [] i.t.o. partial pressures. More...
 
scalar Kc (const scalar p, const scalar T) const
 Equilibrium constant i.t.o. molar concentration. More...
 
scalar Kx (const scalar p, const scalar T) const
 Equilibrium constant [] i.t.o. mole-fractions. More...
 
scalar Kn (const scalar p, const scalar T, const scalar n) const
 Equilibrium constant [] i.t.o. number of moles. More...
 
scalar The (const scalar H, const scalar p, const scalar T0) const
 Temperature from enthalpy or internal energy. More...
 
scalar THs (const scalar hs, const scalar p, const scalar T0) const
 Temperature from sensible enthalpy given an initial T0. More...
 
scalar Tha (const scalar H, const scalar p, const scalar T0) const
 Temperature from absolute enthalpy. More...
 
scalar Tes (const scalar E, const scalar p, const scalar T0) const
 Temperature from sensible internal energy. More...
 
scalar Tea (const scalar E, const scalar p, const scalar T0) const
 Temperature from absolute internal energy. More...
 
scalar dKcdTbyKc (const scalar p, const scalar T) const
 Derivative of B (according to Niemeyer et al.) More...
 
void write (Ostream &os) const
 Write to Ostream. More...
 
void operator+= (const thermo &)
 
void operator*= (const scalar)
 
template<class ThermoType , class FType , class dFdTType , class LimitType >
Foam::scalar T (const ThermoType &thermo, const scalar f, const scalar p, const scalar T0, FType F, dFdTType dFdT, LimitType limit, const bool diagnostics)
 

Static Public Member Functions

static word typeName ()
 Return the instantiated type name. More...
 
static bool enthalpy ()
 Return true if energy type is enthalpy. More...
 
static word heName ()
 Name of Enthalpy/Internal energy. More...
 
template<class ThermoType , class FType , class dFdTType , class LimitType >
static scalar T (const ThermoType &thermo, const scalar f, const scalar p, const scalar T0, FType F, dFdTType dFdT, LimitType limit, const bool diagnostics=false)
 Return the temperature corresponding to the value of the. More...
 

Friends

thermo operator+ (const thermo &, const thermo &)
 
thermo operator* (const scalar s, const thermo &)
 
thermo operator== (const thermo &, const thermo &)
 
Ostreamoperator (Ostream &, const thermo &)
 

Detailed Description

template<class Thermo, template< class > class Type>
class Foam::species::thermo< Thermo, Type >

Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the template argument type thermo. All other properties are derived from these primitive functions.

Source files

Definition at line 88 of file thermo.H.

Member Typedef Documentation

◆ thermoType

typedef thermo<Thermo, Type> thermoType

The thermodynamics of the individual species'.

Definition at line 107 of file thermo.H.

Constructor & Destructor Documentation

◆ thermo() [1/3]

thermo ( const Thermo &  sp)
inline

Construct from components.

Definition at line 33 of file thermoI.H.

◆ thermo() [2/3]

thermo ( const word name,
const dictionary dict 
)

Construct from name and dictionary.

Definition at line 40 of file thermo.C.

◆ thermo() [3/3]

thermo ( const word name,
const thermo< Thermo, Type > &  st 
)
inline

Construct as named copy.

Definition at line 43 of file thermoI.H.

Member Function Documentation

◆ typeName()

static word typeName ( )
inlinestatic

Return the instantiated type name.

Definition at line 125 of file thermo.H.

◆ enthalpy()

bool enthalpy
inlinestatic

Return true if energy type is enthalpy.

Definition at line 57 of file thermoI.H.

◆ heName()

Foam::word heName
inlinestatic

Name of Enthalpy/Internal energy.

Definition at line 65 of file thermoI.H.

◆ Cpv()

Foam::scalar Cpv ( const scalar  p,
const scalar  T 
) const
inline

Heat capacity at constant pressure/volume [J/kg/K].

Definition at line 73 of file thermoI.H.

References p, and Foam::T().

Here is the call graph for this function:

◆ gamma()

Foam::scalar gamma ( const scalar  p,
const scalar  T 
) const
inline

Gamma = Cp/Cv [].

Definition at line 81 of file thermoI.H.

References Cp(), p, and Foam::T().

Here is the call graph for this function:

◆ he()

Foam::scalar he ( const scalar  p,
const scalar  T 
) const
inline

Enthalpy/Internal energy [J/kg].

Definition at line 90 of file thermoI.H.

References he(), p, and Foam::T().

Here is the call graph for this function:

◆ g()

Foam::scalar g ( const scalar  p,
const scalar  T 
) const
inline

Gibbs free energy [J/kg].

Definition at line 98 of file thermoI.H.

References ha(), s(), and Foam::T().

Here is the call graph for this function:

◆ a()

Foam::scalar a ( const scalar  p,
const scalar  T 
) const
inline

Helmholtz free energy [J/kg].

Definition at line 106 of file thermoI.H.

References ea(), s(), and Foam::T().

Here is the call graph for this function:

◆ K()

Foam::scalar K ( const scalar  p,
const scalar  T 
) const
inline

Equilibrium constant [] i.t.o fugacities.

= PIi(fi/Pstd)^nui

Definition at line 114 of file thermoI.H.

References Foam::exp(), Foam::constant::physicoChemical::RR, Foam::T(), and Y.

Here is the call graph for this function:

◆ Kp()

Foam::scalar Kp ( const scalar  p,
const scalar  T 
) const
inline

Equilibrium constant [] i.t.o. partial pressures.

= PIi(pi/Pstd)^nui For low pressures (where the gas mixture is near perfect) Kp = K

Definition at line 131 of file thermoI.H.

References K, p, and Foam::T().

Here is the call graph for this function:

◆ Kc()

Foam::scalar Kc ( const scalar  p,
const scalar  T 
) const
inline

Equilibrium constant i.t.o. molar concentration.

= PIi(ci/cStd)^nui For low pressures (where the gas mixture is near perfect) Kc = Kp(Pstd/(RR*T))^nu

Definition at line 139 of file thermoI.H.

References Foam::equal(), p, Foam::pow(), Foam::constant::standard::Pstd, Foam::constant::physicoChemical::RR, Foam::T(), Foam::W(), and Y.

Here is the call graph for this function:

◆ Kx()

Foam::scalar Kx ( const scalar  p,
const scalar  T 
) const
inline

Equilibrium constant [] i.t.o. mole-fractions.

For low pressures (where the gas mixture is near perfect) Kx = Kp(Pstd/p)^nui

Definition at line 155 of file thermoI.H.

References Foam::equal(), p, Foam::pow(), Foam::constant::standard::Pstd, Foam::T(), Foam::W(), and Y.

Here is the call graph for this function:

◆ Kn()

Foam::scalar Kn ( const scalar  p,
const scalar  T,
const scalar  n 
) const
inline

Equilibrium constant [] i.t.o. number of moles.

For low pressures (where the gas mixture is near perfect) Kn = Kp(n*Pstd/p)^nui where n = number of moles in mixture

Definition at line 175 of file thermoI.H.

References Foam::equal(), n, p, Foam::pow(), Foam::constant::standard::Pstd, Foam::T(), Foam::W(), and Y.

Here is the call graph for this function:

◆ T() [1/2]

static scalar T ( const ThermoType &  thermo,
const scalar  f,
const scalar  p,
const scalar  T0,
FType  F,
dFdTType  dFdT,
LimitType  limit,
const bool  diagnostics = false 
)
inlinestatic

Return the temperature corresponding to the value of the.

thermodynamic property f, given the function f = F(p, T) and dF(p, T)/dT

◆ The()

Foam::scalar The ( const scalar  H,
const scalar  p,
const scalar  T0 
) const
inline

Temperature from enthalpy or internal energy.

given an initial temperature T0

Definition at line 273 of file thermoI.H.

References he(), p, and T0.

Here is the call graph for this function:

◆ THs()

Foam::scalar THs ( const scalar  hs,
const scalar  p,
const scalar  T0 
) const
inline

Temperature from sensible enthalpy given an initial T0.

Definition at line 285 of file thermoI.H.

References hs(), p, Foam::T(), and T0.

Here is the call graph for this function:

◆ Tha()

Foam::scalar Tha ( const scalar  H,
const scalar  p,
const scalar  T0 
) const
inline

Temperature from absolute enthalpy.

given an initial temperature T0

Definition at line 306 of file thermoI.H.

References ha(), p, Foam::T(), and T0.

Here is the call graph for this function:

◆ Tes()

Foam::scalar Tes ( const scalar  E,
const scalar  p,
const scalar  T0 
) const
inline

Temperature from sensible internal energy.

given an initial temperature T0

Definition at line 327 of file thermoI.H.

References es(), p, Foam::T(), and T0.

Here is the call graph for this function:

◆ Tea()

Foam::scalar Tea ( const scalar  E,
const scalar  p,
const scalar  T0 
) const
inline

Temperature from absolute internal energy.

given an initial temperature T0

Definition at line 348 of file thermoI.H.

References ea(), p, Foam::T(), and T0.

Here is the call graph for this function:

◆ dKcdTbyKc()

Foam::scalar dKcdTbyKc ( const scalar  p,
const scalar  T 
) const
inline

Derivative of B (according to Niemeyer et al.)

w.r.t. temperature

Definition at line 370 of file thermoI.H.

References Foam::equal(), Foam::constant::standard::Pstd, Foam::constant::physicoChemical::RR, s(), Foam::T(), Foam::W(), and Y.

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const

Write to Ostream.

Definition at line 53 of file thermo.C.

References Foam::vtkWriteOps::write().

Here is the call graph for this function:

◆ operator+=()

void operator+= ( const thermo< Thermo, Type > &  )
inline

Definition at line 394 of file thermoI.H.

◆ operator*=()

void operator*= ( const scalar  s)
inline

Definition at line 404 of file thermoI.H.

References s().

Here is the call graph for this function:

◆ T() [2/2]

Foam::scalar T ( const ThermoType &  thermo,
const scalar  f,
const scalar  p,
const scalar  T0,
FType  F,
dFdTType  dFdT,
LimitType  limit,
const bool  diagnostics 
)
inline

Friends And Related Function Documentation

◆ operator+

thermo operator+ ( const thermo< Thermo, Type > &  ,
const thermo< Thermo, Type > &   
)
friend

◆ operator*

thermo operator* ( const scalar  s,
const thermo< Thermo, Type > &   
)
friend

◆ operator==

thermo operator== ( const thermo< Thermo, Type > &  ,
const thermo< Thermo, Type > &   
)
friend

◆ operator

Ostream& operator ( Ostream ,
const thermo< Thermo, Type > &   
)
friend

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