Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes | Friends
thermo< Thermo, Type > Class Template Reference

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 (Istream &)
 Construct from Istream. More...
 
 thermo (const dictionary &dict)
 Construct from dictionary. More...
 
 thermo (const word &name, const thermo &)
 Construct as named copy. More...
 
scalar he (const scalar p, const scalar T) const
 Enthalpy/Internal energy [J/kmol]. More...
 
scalar cv (const scalar p, const scalar T) const
 Heat capacity at constant volume [J/(kmol K)]. More...
 
scalar cpv (const scalar p, const scalar T) const
 Heat capacity at constant pressure/volume [J/(kmol K)]. More...
 
scalar gamma (const scalar p, const scalar T) const
 Gamma = cp/cv []. More...
 
scalar cpBycpv (const scalar p, const scalar T) const
 Ratio of heat capacity at constant pressure to that at. More...
 
scalar es (const scalar p, const scalar T) const
 Sensible internal energy [J/kmol]. More...
 
scalar ea (const scalar p, const scalar T) const
 Absolute internal energy [J/kmol]. More...
 
scalar g (const scalar p, const scalar T) const
 Gibbs free energy [J/kmol]. More...
 
scalar a (const scalar p, const scalar T) const
 Helmholtz free energy [J/kmol]. More...
 
scalar Cp (const scalar p, const scalar T) const
 Heat capacity at constant pressure [J/(kg K)]. More...
 
scalar Cv (const scalar p, const scalar T) const
 Heat capacity at constant volume [J/(kg K)]. More...
 
scalar Cpv (const scalar p, const scalar T) const
 Heat capacity at constant pressure/volume [J/(kg K)]. More...
 
scalar HE (const scalar p, const scalar T) const
 Enthalpy/Internal energy [J/kg]. More...
 
scalar Hs (const scalar p, const scalar T) const
 Sensible enthalpy [J/kg]. More...
 
scalar Hc () const
 Chemical enthalpy [J/kg]. More...
 
scalar Ha (const scalar p, const scalar T) const
 Absolute Enthalpy [J/kg]. More...
 
scalar S (const scalar p, const scalar T) const
 Entropy [J/(kg K)]. More...
 
scalar E (const scalar p, const scalar T) const
 Internal energy [J/kg]. More...
 
scalar Es (const scalar p, const scalar T) const
 Sensible internal energy [J/kg]. More...
 
scalar Ea (const scalar p, const scalar T) const
 Absolute 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...
 
void write (Ostream &os) const
 Write to Ostream. More...
 
void operator+= (const thermo &)
 
void operator-= (const thermo &)
 
void operator*= (const scalar)
 

Static Public Member Functions

static word typeName ()
 Return the instantiated type name. More...
 
static word heName ()
 Name of Enthalpy/Internal energy. More...
 

Private Member Functions

scalar T (scalar f, scalar p, scalar T0, scalar(thermo::*F)(const scalar, const scalar) const, scalar(thermo::*dFdT)(const scalar, const scalar) const, scalar(thermo::*limit)(const scalar) const) const
 Return the temperature corresponding to the value of the. More...
 

Static Private Attributes

static const scalar tol_ = 1.0e-3
 Convergence tolerance of energy -> temperature inversion functions. More...
 
static const int maxIter_ = 100
 Max number of iterations in energy->temperature inversion functions. More...
 

Friends

thermo operator+ (const thermo &, const thermo &)
 
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 >

Definition at line 52 of file thermo.H.

Member Typedef Documentation

◆ thermoType

typedef thermo<Thermo, Type> thermoType

The thermodynamics of the individual species'.

Definition at line 128 of file thermo.H.

Constructor & Destructor Documentation

◆ thermo() [1/4]

thermo ( const Thermo &  sp)
inline

Construct from components.

Definition at line 32 of file thermoI.H.

◆ thermo() [2/4]

thermo ( Istream is)

Construct from Istream.

Definition at line 41 of file thermo.C.

References IOstream::check().

Here is the call graph for this function:

◆ thermo() [3/4]

thermo ( const dictionary dict)

Construct from dictionary.

Definition at line 50 of file thermo.C.

◆ thermo() [4/4]

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

Construct as named copy.

Definition at line 81 of file thermoI.H.

Member Function Documentation

◆ T()

Foam::scalar T ( scalar  f,
scalar  p,
scalar  T0,
scalar(thermo< Thermo, Type >::*)(const scalar, const scalar) const  F,
scalar(thermo< Thermo, Type >::*)(const scalar, const scalar) const  dFdT,
scalar(thermo< Thermo, Type >::*)(const scalar) const  limit 
) const
inlineprivate

Return the temperature corresponding to the value of the.

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

Definition at line 42 of file thermoI.H.

References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, Foam::MULES::limit(), Foam::mag(), and p.

Here is the call graph for this function:

◆ typeName()

static word typeName ( )
inlinestatic

Return the instantiated type name.

Definition at line 149 of file thermo.H.

◆ heName()

Foam::word heName
inlinestatic

Name of Enthalpy/Internal energy.

Definition at line 94 of file thermoI.H.

References Foam::name().

Here is the call graph for this function:

◆ he()

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

Enthalpy/Internal energy [J/kmol].

Definition at line 102 of file thermoI.H.

References he, p, and T.

◆ cv()

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

Heat capacity at constant volume [J/(kmol K)].

Definition at line 110 of file thermoI.H.

References cp, p, and T.

◆ cpv()

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

Heat capacity at constant pressure/volume [J/(kmol K)].

Definition at line 118 of file thermoI.H.

References p, and T.

◆ gamma()

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

Gamma = cp/cv [].

Definition at line 126 of file thermoI.H.

References cp, p, and T.

◆ cpBycpv()

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

Ratio of heat capacity at constant pressure to that at.

constant pressure/volume []

Definition at line 136 of file thermoI.H.

References p, and T.

◆ es()

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

Sensible internal energy [J/kmol].

Definition at line 147 of file thermoI.H.

References p, rho, and T.

◆ ea()

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

Absolute internal energy [J/kmol].

Definition at line 155 of file thermoI.H.

References p, rho, and T.

◆ g()

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

Gibbs free energy [J/kmol].

Definition at line 163 of file thermoI.H.

References p, s(), and 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/kmol].

Definition at line 171 of file thermoI.H.

References p, s(), and T.

Here is the call graph for this function:

◆ Cp()

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

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

Definition at line 187 of file thermoI.H.

References cp, and T.

◆ Cv()

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

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

Definition at line 195 of file thermoI.H.

References p, and T.

◆ Cpv()

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

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

Definition at line 179 of file thermoI.H.

References p, and T.

◆ HE()

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

Enthalpy/Internal energy [J/kg].

Definition at line 203 of file thermoI.H.

References p, and T.

◆ Hs()

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

Sensible enthalpy [J/kg].

Definition at line 211 of file thermoI.H.

References p, and T.

◆ Hc()

Foam::scalar Hc
inline

Chemical enthalpy [J/kg].

Definition at line 219 of file thermoI.H.

◆ Ha()

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

Absolute Enthalpy [J/kg].

Definition at line 227 of file thermoI.H.

References p, and T.

◆ S()

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

Entropy [J/(kg K)].

Definition at line 235 of file thermoI.H.

References s(), and T.

Here is the call graph for this function:

◆ E()

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

Internal energy [J/kg].

Definition at line 243 of file thermoI.H.

References Foam::constant::electromagnetic::e, and T.

◆ Es()

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

Sensible internal energy [J/kg].

Definition at line 251 of file thermoI.H.

References p, and T.

◆ Ea()

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

Absolute internal energy [J/kg].

Definition at line 258 of file thermoI.H.

References p, and T.

◆ G()

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

Gibbs free energy [J/kg].

Definition at line 266 of file thermoI.H.

References g, and T.

◆ A()

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

Helmholtz free energy [J/kg].

Definition at line 274 of file thermoI.H.

References p, and T.

◆ 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 282 of file thermoI.H.

References Foam::exp(), g, Foam::constant::standard::Pstd, Foam::constant::thermodynamic::RR, and T.

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 299 of file thermoI.H.

References p, and T.

◆ 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 307 of file thermoI.H.

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

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 322 of file thermoI.H.

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

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 340 of file thermoI.H.

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

Here is the call graph for this function:

◆ 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 359 of file thermoI.H.

References he, and p.

◆ 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 371 of file thermoI.H.

References p, and T.

◆ 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 391 of file thermoI.H.

References p, and T.

◆ 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 411 of file thermoI.H.

References p, and T.

◆ 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 431 of file thermoI.H.

References p, and T.

◆ write()

void write ( Ostream os) const

Write to Ostream.

Definition at line 59 of file thermo.C.

References write().

Here is the call graph for this function:

◆ operator+=()

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

Definition at line 453 of file thermoI.H.

◆ operator-=()

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

Definition at line 463 of file thermoI.H.

◆ operator*=()

void operator*= ( const scalar  s)
inline

Definition at line 472 of file thermoI.H.

References s().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator+

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

◆ 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

Field Documentation

◆ tol_

const Foam::scalar tol_ = 1.0e-3
staticprivate

Convergence tolerance of energy -> temperature inversion functions.

Definition at line 103 of file thermo.H.

◆ maxIter_

const int maxIter_ = 100
staticprivate

Max number of iterations in energy->temperature inversion functions.

Definition at line 106 of file thermo.H.


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