FreeFOAM The Cross-Platform CFD Toolkit
specieThermo< thermo > 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...

#include <specie/specieThermo.H>


Detailed Description

template<class thermo>
class Foam::specieThermo< thermo >

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 91 of file specieThermo.H.

List of all members.

Public Member Functions

 specieThermo (const thermo &sp)
 construct from components
 specieThermo (Istream &)
 Construct from Istream.
 specieThermo (const word &name, const specieThermo &)
 Construct as named copy.
scalar cv (const scalar T) const
 Heat capacity at constant volume [J/(kmol K)].
scalar gamma (const scalar T) const
 gamma = cp/cv []
scalar e (const scalar T) const
 Internal energy [J/kmol].
scalar es (const scalar T) const
 Sensible internal energy [J/kmol].
scalar g (const scalar T) const
 Gibbs free energy [J/kmol].
scalar a (const scalar T) const
 Helmholtz free energy [J/kmol].
scalar Cp (const scalar T) const
 Heat capacity at constant pressure [J/(kg K)].
scalar Cv (const scalar T) const
 Heat capacity at constant volume [J/(kg K)].
scalar H (const scalar T) const
 Enthalpy [J/kg].
scalar Hs (const scalar T) const
 Sensible enthalpy [J/kg].
scalar Hc () const
 Chemical enthalpy [J/kg].
scalar S (const scalar T) const
 Entropy [J/(kg K)].
scalar E (const scalar T) const
 Internal energy [J/kg].
scalar G (const scalar T) const
 Gibbs free energy [J/kg].
scalar A (const scalar T) const
 Helmholtz free energy [J/kg].
scalar K (const scalar T) const
 Equilibrium constant [] i.t.o fugacities.
scalar Kp (const scalar T) const
 Equilibrium constant [] i.t.o. partial pressures.
scalar Kc (const scalar T) const
 Equilibrium constant i.t.o. molar concentration.
scalar Kx (const scalar T, const scalar p) const
 Equilibrium constant [] i.t.o. mole-fractions.
scalar Kn (const scalar T, const scalar p, const scalar n) const
 Equilibrium constant [] i.t.o. number of moles.
scalar TH (const scalar H, const scalar T0) const
 Temperature from Enthalpy given an initial temperature T0.
scalar THs (const scalar Hs, const scalar T0) const
 Temperature from sensible Enthalpy given an initial T0.
scalar TE (const scalar E, const scalar T0) const
 Temperature from internal energy given an initial temperature T0.
void operator+= (const specieThermo &)
void operator-= (const specieThermo &)
void operator*= (const scalar)

Friends

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

Constructor & Destructor Documentation

specieThermo ( const thermo sp)
inline

construct from components

Definition at line 32 of file specieThermoI.H.

specieThermo ( Istream is)

Construct from Istream.

Definition at line 41 of file specieThermo.C.

References IOstream::check().

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

Construct as named copy.

Definition at line 81 of file specieThermoI.H.


Member Function Documentation

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

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

Definition at line 93 of file specieThermoI.H.

References cp.

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

gamma = cp/cv []

Definition at line 100 of file specieThermoI.H.

References cp.

Foam::scalar e ( const scalar  T) const
inline

Internal energy [J/kmol].

Definition at line 108 of file specieThermoI.H.

References h.

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

Sensible internal energy [J/kmol].

Definition at line 115 of file specieThermoI.H.

References hs.

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

Gibbs free energy [J/kmol].

Definition at line 122 of file specieThermoI.H.

References h.

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

Helmholtz free energy [J/kmol].

Definition at line 129 of file specieThermoI.H.

References e.

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

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

Definition at line 136 of file specieThermoI.H.

References cp.

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

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

Definition at line 143 of file specieThermoI.H.

Foam::scalar H ( const scalar  T) const
inline

Enthalpy [J/kg].

Definition at line 150 of file specieThermoI.H.

References h.

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

Sensible enthalpy [J/kg].

Definition at line 157 of file specieThermoI.H.

References hs.

Foam::scalar Hc ( ) const
inline

Chemical enthalpy [J/kg].

Definition at line 164 of file specieThermoI.H.

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

Entropy [J/(kg K)].

Definition at line 171 of file specieThermoI.H.

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

Internal energy [J/kg].

Definition at line 178 of file specieThermoI.H.

References e.

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

Gibbs free energy [J/kg].

Definition at line 185 of file specieThermoI.H.

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

Helmholtz free energy [J/kg].

Definition at line 192 of file specieThermoI.H.

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

Equilibrium constant [] i.t.o fugacities.

= PIi(fi/Pstd)^nui

Definition at line 199 of file specieThermoI.H.

References Foam::exp(), and T.

Foam::scalar Kp ( 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 215 of file specieThermoI.H.

References K.

Foam::scalar Kc ( 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 222 of file specieThermoI.H.

References equal(), and Foam::pow().

Foam::scalar Kx ( const scalar  T,
const scalar  p 
) 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 237 of file specieThermoI.H.

References equal(), and Foam::pow().

Foam::scalar Kn ( const scalar  T,
const scalar  p,
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 255 of file specieThermoI.H.

References equal(), and Foam::pow().

Foam::scalar TH ( const scalar  H,
const scalar  T0 
) const
inline

Temperature from Enthalpy given an initial temperature T0.

Definition at line 274 of file specieThermoI.H.

References T.

Foam::scalar THs ( const scalar  Hs,
const scalar  T0 
) const
inline

Temperature from sensible Enthalpy given an initial T0.

Definition at line 285 of file specieThermoI.H.

References T.

Foam::scalar TE ( const scalar  E,
const scalar  T0 
) const
inline

Temperature from internal energy given an initial temperature T0.

Definition at line 296 of file specieThermoI.H.

References T.

void operator+= ( const specieThermo< thermo > &  )
inline

Definition at line 309 of file specieThermoI.H.

void operator-= ( const specieThermo< thermo > &  )
inline

Definition at line 318 of file specieThermoI.H.

void operator*= ( const scalar  s)
inline

Definition at line 326 of file specieThermoI.H.


Friends And Related Function Documentation

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

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