Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
thermo< Thermo, Type > Class Template Reference
Inheritance diagram for thermo< Thermo, Type >:
Inheritance graph
[legend]
Collaboration diagram for thermo< Thermo, Type >:
Collaboration graph
[legend]

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...
 

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

typedef thermo<Thermo, Type> thermoType

The thermodynamics of the individual species'.

Definition at line 128 of file thermo.H.

Constructor & Destructor Documentation

thermo ( const Thermo &  sp)
inline

Construct from components.

Definition at line 32 of file thermoI.H.

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

Here is the call graph for this function:

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 ( const dictionary dict)

Construct from dictionary.

Definition at line 50 of file thermo.C.

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

static word typeName ( )
inlinestatic

Return the instantiated type name.

Definition at line 149 of file thermo.H.

References g, Foam::constant::universal::G, he, n, s(), Foam::T(), and write().

Here is the call graph for this function:

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:

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.

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.

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.

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

Gamma = cp/cv [].

Definition at line 126 of file thermoI.H.

References cp, and thermo< Thermo, Type >::cpBycpv().

Here is the call graph for this function:

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.

Referenced by thermo< Thermo, Type >::gamma().

Here is the caller graph for this function:

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 rho.

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 rho.

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 s().

Here is the call graph for this function:

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 s().

Here is the call graph for this function:

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.

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.

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.

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

Enthalpy/Internal energy [J/kg].

Definition at line 203 of file thermoI.H.

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

Sensible enthalpy [J/kg].

Definition at line 211 of file thermoI.H.

Foam::scalar Hc ( ) const
inline

Chemical enthalpy [J/kg].

Definition at line 219 of file thermoI.H.

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

Absolute Enthalpy [J/kg].

Definition at line 227 of file thermoI.H.

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().

Here is the call graph for this function:

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.

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

Sensible internal energy [J/kg].

Definition at line 251 of file thermoI.H.

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

Absolute internal energy [J/kg].

Definition at line 258 of file thermoI.H.

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.

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

Helmholtz free energy [J/kg].

Definition at line 274 of file thermoI.H.

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:

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.

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(), thermo< Thermo, Type >::Kx(), Foam::pow(), Foam::constant::standard::Pstd, and Foam::constant::thermodynamic::RR.

Here is the call graph for this function:

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(), thermo< Thermo, Type >::Kn(), Foam::pow(), and Foam::constant::standard::Pstd.

Referenced by thermo< Thermo, Type >::Kc().

Here is the call graph for this function:

Here is the caller graph for this function:

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(), Foam::pow(), Foam::constant::standard::Pstd, and thermo< Thermo, Type >::THE().

Referenced by thermo< Thermo, Type >::Kx().

Here is the call graph for this function:

Here is the caller graph for this function:

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 thermo< Thermo, Type >::THs().

Referenced by thermo< Thermo, Type >::Kn().

Here is the call graph for this function:

Here is the caller graph for this function:

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 T, and thermo< Thermo, Type >::THa().

Referenced by thermo< Thermo, Type >::THE().

Here is the call graph for this function:

Here is the caller graph for this function:

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 T, and thermo< Thermo, Type >::TEs().

Referenced by thermo< Thermo, Type >::THs().

Here is the call graph for this function:

Here is the caller graph for this function:

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 T, and thermo< Thermo, Type >::TEa().

Referenced by thermo< Thermo, Type >::THa().

Here is the call graph for this function:

Here is the caller graph for this function:

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 T.

Referenced by thermo< Thermo, Type >::TEs().

Here is the caller graph for this function:

void write ( Ostream os) const

Write to Ostream.

Definition at line 59 of file thermo.C.

References IOstream::check(), and write().

Here is the call graph for this function:

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

Definition at line 453 of file thermoI.H.

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

Definition at line 463 of file thermoI.H.

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

thermo operator+ ( const thermo< Thermo, Type > &  ,
const thermo< Thermo, Type > &   
)
friend
thermo operator- ( const thermo< Thermo, Type > &  ,
const thermo< Thermo, Type > &   
)
friend
thermo operator* ( const scalar  s,
const thermo< Thermo, Type > &   
)
friend
thermo operator== ( const thermo< Thermo, Type > &  ,
const thermo< Thermo, Type > &   
)
friend
Ostream& operator ( Ostream ,
const thermo< Thermo, Type > &   
)
friend

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