Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Friends
janafThermo Class Reference

JANAF tables based thermodynamics package templated into the equation of state. More...

Collaboration diagram for janafThermo:
Collaboration graph
[legend]

Public Types

typedef FixedList< scalar, nCoeffs_coeffArray
 

Public Member Functions

 janafThermo (const EquationOfState &st, const scalar Tlow, const scalar Thigh, const scalar Tcommon, const coeffArray &highCpCoeffs, const coeffArray &lowCpCoeffs)
 Construct from components. More...
 
 janafThermo (Istream &)
 Construct from Istream. More...
 
 janafThermo (const dictionary &dict)
 Construct from dictionary. More...
 
 janafThermo (const word &, const janafThermo &)
 Construct as a named copy. More...
 
scalar limit (const scalar T) const
 Limit the temperature to be in the range Tlow_ to Thigh_. More...
 
scalar Tlow () const
 Return const access to the low temperature limit. More...
 
scalar Thigh () const
 Return const access to the high temperature limit. More...
 
scalar Tcommon () const
 Return const access to the common temperature. More...
 
const coeffArrayhighCpCoeffs () const
 Return const access to the high temperature poly coefficients. More...
 
const coeffArraylowCpCoeffs () const
 Return const access to the low temperature poly coefficients. 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
 Chemical enthalpy [J/kmol]. More...
 
scalar s (const scalar p, const scalar T) const
 Entropy [J/(kmol K)]. More...
 
void write (Ostream &os) const
 Write to Ostream. More...
 
void operator+= (const janafThermo &)
 
void operator-= (const janafThermo &)
 

Static Public Member Functions

static word typeName ()
 Return the instantiated type name. More...
 

Static Public Attributes

static const int nCoeffs_ = 7
 

Private Member Functions

void checkInputData () const
 Check that input data is valid. More...
 
const coeffArraycoeffs (const scalar T) const
 Return the coefficients corresponding to the given temperature. More...
 

Private Attributes

scalar Tlow_
 
scalar Thigh_
 
scalar Tcommon_
 
coeffArray highCpCoeffs_
 
coeffArray lowCpCoeffs_
 

Friends

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

Detailed Description

JANAF tables based thermodynamics package templated into the equation of state.

Source files

Definition at line 49 of file janafThermo.H.

Member Typedef Documentation

◆ coeffArray

typedef FixedList<scalar, nCoeffs_> coeffArray

Definition at line 102 of file janafThermo.H.

Constructor & Destructor Documentation

◆ janafThermo() [1/4]

janafThermo ( const EquationOfState &  st,
const scalar  Tlow,
const scalar  Thigh,
const scalar  Tcommon,
const coeffArray highCpCoeffs,
const coeffArray lowCpCoeffs 
)
inline

Construct from components.

◆ janafThermo() [2/4]

Construct from Istream.

◆ janafThermo() [3/4]

janafThermo ( const dictionary dict)

Construct from dictionary.

Definition at line 85 of file janafThermo.C.

References janafThermo::checkInputData().

Here is the call graph for this function:

◆ janafThermo() [4/4]

janafThermo ( const word ,
const janafThermo  
)
inline

Construct as a named copy.

Member Function Documentation

◆ checkInputData()

void checkInputData ( ) const
private

Check that input data is valid.

Definition at line 32 of file janafThermo.C.

References Foam::exit(), Foam::FatalError, and FatalErrorInFunction.

Referenced by janafThermo::janafThermo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ coeffs()

const Foam::janafThermo< EquationOfState >::coeffArray & coeffs ( const scalar  T) const
inlineprivate

Return the coefficients corresponding to the given temperature.

Definition at line 58 of file janafThermoI.H.

References Foam::T().

Here is the call graph for this function:

◆ typeName()

static word typeName ( )
inlinestatic

Return the instantiated type name.

Definition at line 153 of file janafThermo.H.

◆ limit()

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

Limit the temperature to be in the range Tlow_ to Thigh_.

Definition at line 99 of file janafThermoI.H.

References Foam::endl(), Foam::max(), Foam::min(), Foam::T(), and WarningInFunction.

Here is the call graph for this function:

◆ Tlow()

Foam::scalar Tlow ( ) const
inline

Return const access to the low temperature limit.

Definition at line 121 of file janafThermoI.H.

◆ Thigh()

Foam::scalar Thigh ( ) const
inline

Return const access to the high temperature limit.

Definition at line 128 of file janafThermoI.H.

◆ Tcommon()

Foam::scalar Tcommon ( ) const
inline

Return const access to the common temperature.

Definition at line 135 of file janafThermoI.H.

◆ highCpCoeffs()

const Foam::janafThermo< EquationOfState >::coeffArray & highCpCoeffs ( ) const
inline

Return const access to the high temperature poly coefficients.

Definition at line 143 of file janafThermoI.H.

◆ lowCpCoeffs()

const Foam::janafThermo< EquationOfState >::coeffArray & lowCpCoeffs ( ) const
inline

Return const access to the low temperature poly coefficients.

Definition at line 151 of file janafThermoI.H.

◆ cp()

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

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

Definition at line 159 of file janafThermoI.H.

References Foam::constant::thermodynamic::RR, and Foam::T().

Here is the call graph for this function:

◆ ha()

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

Absolute Enthalpy [J/kmol].

Definition at line 171 of file janafThermoI.H.

References Foam::constant::thermodynamic::RR, and Foam::T().

Here is the call graph for this function:

◆ hs()

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

Sensible enthalpy [J/kmol].

Definition at line 187 of file janafThermoI.H.

References p, and Foam::T().

Here is the call graph for this function:

◆ hc()

Foam::scalar hc ( ) const
inline

Chemical enthalpy [J/kmol].

Definition at line 197 of file janafThermoI.H.

References Foam::constant::thermodynamic::RR, and Foam::constant::standard::Tstd.

◆ s()

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

Entropy [J/(kmol K)].

Definition at line 212 of file janafThermoI.H.

References Foam::log(), p, Foam::constant::thermodynamic::RR, s(), and Foam::T().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const

Write to Ostream.

Definition at line 101 of file janafThermo.C.

References dictionary::add(), dict, dictionaryName::dictName(), Foam::indent(), and write().

Here is the call graph for this function:

◆ operator+=()

void operator+= ( const janafThermo )
inline

◆ operator-=()

void operator-= ( const janafThermo )
inline

Friends And Related Function Documentation

◆ operator+

janafThermo operator+ ( const janafThermo ,
const janafThermo  
)
friend

◆ operator-

janafThermo operator- ( const janafThermo ,
const janafThermo  
)
friend

◆ operator*

janafThermo operator* ( const  scalar,
const janafThermo  
)
friend

◆ operator==

janafThermo operator== ( const janafThermo ,
const janafThermo  
)
friend

◆ operator

Ostream& operator ( Ostream ,
const janafThermo  
)
friend

Field Documentation

◆ nCoeffs_

const int nCoeffs_ = 7
static

Definition at line 101 of file janafThermo.H.

◆ Tlow_

scalar Tlow_
private

Definition at line 110 of file janafThermo.H.

Referenced by janafThermo::operator+=(), and janafThermo::operator-=().

◆ Thigh_

scalar Thigh_
private

Definition at line 110 of file janafThermo.H.

Referenced by janafThermo::operator+=(), and janafThermo::operator-=().

◆ Tcommon_

scalar Tcommon_
private

Definition at line 110 of file janafThermo.H.

Referenced by janafThermo::operator+=(), and janafThermo::operator-=().

◆ highCpCoeffs_

coeffArray highCpCoeffs_
private

Definition at line 112 of file janafThermo.H.

Referenced by janafThermo::operator+=(), and janafThermo::operator-=().

◆ lowCpCoeffs_

coeffArray lowCpCoeffs_
private

Definition at line 113 of file janafThermo.H.

Referenced by janafThermo::operator+=(), and janafThermo::operator-=().


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