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...
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 dictionary &dict) | |
Construct from 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 | cp (const scalar p, const scalar T) const |
Heat capacity at constant pressure [J/kmol/K]. More... | |
scalar | ha (const scalar p, const scalar T) const |
Absolute enthalpy [J/kmol]. More... | |
scalar | hs (const scalar p, const scalar T) const |
Sensible enthalpy [J/kmol]. More... | |
scalar | hc () const |
Enthalpy of formation [J/kmol]. More... | |
scalar | s (const scalar p, const scalar T) const |
Entropy [J/kmol/K]. 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 | 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 | 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... | |
scalar | dcpdT (const scalar p, const scalar T) const |
Derivative of cp w.r.t. temperature. 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 &) |
Ostream & | operator (Ostream &, const 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.
typedef thermo<Thermo, Type> thermoType |
|
inline |
thermo | ( | const dictionary & | dict | ) |
|
inlinestatic |
Return the instantiated type name.
Definition at line 123 of file thermo.H.
References Foam::cp(), f(), Foam::constant::physicoChemical::F, g, Foam::constant::universal::G, he(), Hs(), Foam::limit(), n, p, s(), Foam::T(), T0, and Foam::vtkWriteOps::write().
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
Gibbs free energy [J/kg].
Definition at line 97 of file thermoI.H.
References Ha(), and Foam::fvm::S().
|
inline |
Helmholtz free energy [J/kg].
Definition at line 105 of file thermoI.H.
References Ea(), and Foam::fvm::S().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Entropy [J/kmol/K].
Definition at line 145 of file thermoI.H.
References Foam::fvm::S(), and W().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Gibbs free energy [J/kmol].
Definition at line 185 of file thermoI.H.
References Foam::constant::universal::G, and W().
|
inline |
|
inline |
Equilibrium constant [] i.t.o fugacities.
= PIi(fi/Pstd)^nui
Definition at line 201 of file thermoI.H.
References Foam::exp(), Foam::constant::physicoChemical::RR, T, and Y.
|
inline |
|
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 226 of file thermoI.H.
References Foam::equal(), thermo< Thermo, Type >::Kx(), Foam::pow(), Foam::constant::standard::Pstd, Foam::constant::physicoChemical::RR, W(), and Y.
|
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 243 of file thermoI.H.
References Foam::equal(), thermo< Thermo, Type >::Kn(), Foam::pow(), Foam::constant::standard::Pstd, W(), and Y.
Referenced by thermo< Thermo, Type >::Kc().
|
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 263 of file thermoI.H.
References Foam::equal(), Foam::pow(), Foam::constant::standard::Pstd, thermo< Thermo, Type >::T(), W(), and Y.
Referenced by thermo< Thermo, Type >::Kx().
|
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
Referenced by thermo< Thermo, Type >::Kn().
|
inline |
Temperature from enthalpy or internal energy.
given an initial temperature T0
Definition at line 361 of file thermoI.H.
References thermo< Thermo, Type >::THs().
Referenced by thermo< Thermo, Type >::T().
|
inline |
Temperature from sensible enthalpy given an initial T0.
Definition at line 373 of file thermoI.H.
References T, and thermo< Thermo, Type >::THa().
Referenced by thermo< Thermo, Type >::THE().
|
inline |
Temperature from absolute enthalpy.
given an initial temperature T0
Definition at line 394 of file thermoI.H.
References T, and thermo< Thermo, Type >::TEs().
Referenced by thermo< Thermo, Type >::THs().
|
inline |
Temperature from sensible internal energy.
given an initial temperature T0
Definition at line 415 of file thermoI.H.
References T, and thermo< Thermo, Type >::TEa().
Referenced by thermo< Thermo, Type >::THa().
|
inline |
Temperature from absolute internal energy.
given an initial temperature T0
Definition at line 436 of file thermoI.H.
References thermo< Thermo, Type >::dKcdTbyKc(), and T.
Referenced by thermo< Thermo, Type >::TEs().
|
inline |
Derivative of B (according to Niemeyer et al.)
w.r.t. temperature
Definition at line 458 of file thermoI.H.
References Foam::equal(), Foam::constant::standard::Pstd, Foam::constant::physicoChemical::RR, Foam::fvm::S(), T, W(), and Y.
Referenced by thermo< Thermo, Type >::TEa().
|
inline |
void write | ( | Ostream & | os | ) | const |
Write to Ostream.
Definition at line 49 of file thermo.C.
References Foam::vtkWriteOps::write(), and Ostream::write().
|
inline |
|
inline |
Definition at line 286 of file thermoI.H.
References Foam::abort(), Foam::endl(), Foam::constant::physicoChemical::F, Foam::FatalError, FatalErrorInFunction, InfoInFunction, Foam::MULES::limit(), Foam::mag(), Foam::Pout, Foam::setw(), T, T0, and thermo< Thermo, Type >::THE().