PengRobinsonGas< Specie > Class Template Reference

PengRobinsonGas cubic equation of state for gases. More...

Inheritance diagram for PengRobinsonGas< Specie >:
Collaboration diagram for PengRobinsonGas< Specie >:

Public Member Functions

 PengRobinsonGas (const Specie &sp, const scalar &Tc, const scalar &Vc, const scalar &Zc, const scalar &Pc, const scalar &omega)
 Construct from components. More...
 
 PengRobinsonGas (const word &name, const dictionary &dict)
 Construct from name and dictionary. More...
 
 PengRobinsonGas (const word &name, const PengRobinsonGas &)
 Construct as named copy. More...
 
autoPtr< PengRobinsonGasclone () const
 Construct and return a clone. More...
 
scalar rho (scalar p, scalar T) const
 Return density [kg/m^3]. More...
 
scalar H (const scalar p, const scalar T) const
 Return enthalpy contribution [J/kg]. More...
 
scalar Cp (scalar p, scalar T) const
 Return Cp contribution [J/(kg K]. More...
 
scalar E (const scalar p, const scalar T) const
 Return internal energy contribution [J/kg]. More...
 
scalar Cv (scalar p, scalar T) const
 Return Cv contribution [J/(kg K]. More...
 
scalar Sp (const scalar p, const scalar T) const
 Return entropy contribution to the integral of Cp/T [J/kg/K]. More...
 
scalar Sv (const scalar p, const scalar T) const
 Return entropy contribution to the integral of Cv/T [J/kg/K]. More...
 
scalar psi (scalar p, scalar T) const
 Return compressibility [s^2/m^2]. More...
 
scalar Z (scalar p, scalar T) const
 Return compression factor []. More...
 
scalar CpMCv (scalar p, scalar T) const
 Return (Cp - Cv) [J/(kg K]. More...
 
scalar alphav (const scalar p, const scalar T) const
 Return volumetric coefficient of thermal expansion [1/T]. More...
 
void write (Ostream &os) const
 Write to Ostream. More...
 
void operator+= (const PengRobinsonGas &)
 
void operator*= (const scalar)
 

Static Public Member Functions

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

Static Public Attributes

static const bool incompressible = false
 Is the equation of state is incompressible i.e. rho != f(p) More...
 
static const bool isochoric = false
 Is the equation of state is isochoric i.e. rho = const. More...
 

Friends

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

Detailed Description

template<class Specie>
class Foam::PengRobinsonGas< Specie >

PengRobinsonGas cubic equation of state for gases.

Coefficient mixing is very inaccurate and not supported, so this equation of state can only be applied to mixtures by using a thermophysical properties model which mixes specie property value.

Usage
Property Description
Tc Critical temperature [K]
Vc Critical volume [m^3/kmol]
Pc Critical pressure [Pa]
omega Acentric factor [-]

Example specification of the PengRobinsonGas equation of state for methane:

    equationOfState
    {
        Tc        190.55;
        Vc        0.0285;
        Pc        4.595e6;
        omega     0.0115;

    }
Source files

Definition at line 124 of file PengRobinsonGas.H.

Constructor & Destructor Documentation

◆ PengRobinsonGas() [1/3]

PengRobinsonGas ( const Specie &  sp,
const scalar &  Tc,
const scalar &  Vc,
const scalar &  Zc,
const scalar &  Pc,
const scalar &  omega 
)
inline

Construct from components.

Definition at line 32 of file PengRobinsonGasI.H.

◆ PengRobinsonGas() [2/3]

PengRobinsonGas ( const word name,
const dictionary dict 
)

Construct from name and dictionary.

Definition at line 32 of file PengRobinsonGas.C.

References Foam::constant::physicoChemical::RR.

◆ PengRobinsonGas() [3/3]

PengRobinsonGas ( const word name,
const PengRobinsonGas< Specie > &  pg 
)
inline

Construct as named copy.

Definition at line 52 of file PengRobinsonGasI.H.

Member Function Documentation

◆ clone()

Foam::autoPtr< Foam::PengRobinsonGas< Specie > > clone
inline

Construct and return a clone.

Definition at line 69 of file PengRobinsonGasI.H.

◆ typeName()

static word typeName ( )
inlinestatic

Return the instantiated type name.

Definition at line 174 of file PengRobinsonGas.H.

◆ rho()

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

Return density [kg/m^3].

Definition at line 81 of file PengRobinsonGasI.H.

References p, Foam::R(), and Foam::T().

Here is the call graph for this function:

◆ H()

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

Return enthalpy contribution [J/kg].

Definition at line 93 of file PengRobinsonGasI.H.

References alpha(), B, Foam::constant::electromagnetic::kappa, Foam::log(), p, Foam::R(), Foam::sqr(), Foam::sqrt(), and Foam::T().

Here is the call graph for this function:

◆ Cp()

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

Return Cp contribution [J/(kg K].

Definition at line 115 of file PengRobinsonGasI.H.

References A, alpha(), b, B, Foam::constant::electromagnetic::kappa, Foam::log(), M, p, Foam::pow3(), Foam::constant::physicoChemical::RR, Foam::sqr(), Foam::sqrt(), Foam::T(), and Foam::W().

Here is the call graph for this function:

◆ E()

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

Return internal energy contribution [J/kg].

Definition at line 146 of file PengRobinsonGasI.H.

References alpha(), B, Foam::constant::electromagnetic::kappa, Foam::log(), p, Foam::R(), Foam::sqr(), Foam::sqrt(), and Foam::T().

Here is the call graph for this function:

◆ Cv()

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

Return Cv contribution [J/(kg K].

Definition at line 167 of file PengRobinsonGasI.H.

References b, B, Foam::constant::electromagnetic::kappa, Foam::log(), p, Foam::pow3(), Foam::constant::physicoChemical::RR, Foam::sqr(), Foam::sqrt(), Foam::T(), and Foam::W().

Here is the call graph for this function:

◆ Sp()

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

Return entropy contribution to the integral of Cp/T [J/kg/K].

Definition at line 190 of file PengRobinsonGasI.H.

References B, Foam::constant::electromagnetic::kappa, Foam::log(), p, Foam::constant::standard::Pstd, Foam::R(), Foam::sqr(), Foam::sqrt(), and Foam::T().

Here is the call graph for this function:

◆ Sv()

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

Return entropy contribution to the integral of Cv/T [J/kg/K].

Definition at line 217 of file PengRobinsonGasI.H.

References NotImplemented.

◆ psi()

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

Return compressibility [s^2/m^2].

Definition at line 229 of file PengRobinsonGasI.H.

References p, Foam::R(), and Foam::T().

Here is the call graph for this function:

◆ Z()

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

◆ CpMCv()

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

Return (Cp - Cv) [J/(kg K].

Definition at line 304 of file PengRobinsonGasI.H.

References A, alpha(), b, B, Foam::constant::electromagnetic::kappa, M, p, Foam::R(), Foam::constant::physicoChemical::RR, Foam::sqr(), Foam::sqrt(), and Foam::T().

Here is the call graph for this function:

◆ alphav()

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

Return volumetric coefficient of thermal expansion [1/T].

Definition at line 330 of file PengRobinsonGasI.H.

References NotImplemented.

◆ write()

void write ( Ostream os) const

Write to Ostream.

Definition at line 53 of file PengRobinsonGas.C.

References Foam::vtkWriteOps::write().

Here is the call graph for this function:

◆ operator+=()

void operator+= ( const PengRobinsonGas< Specie > &  )
inline

Definition at line 344 of file PengRobinsonGasI.H.

References Foam::mag(), Foam::constant::physicoChemical::RR, Foam::W(), and Y.

Here is the call graph for this function:

◆ operator*=()

void operator*= ( const scalar  s)
inline

Definition at line 367 of file PengRobinsonGasI.H.

References s().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator+

PengRobinsonGas operator+ ( const PengRobinsonGas< Specie > &  ,
const PengRobinsonGas< Specie > &   
)
friend

◆ operator*

PengRobinsonGas operator* ( const scalar  s,
const PengRobinsonGas< Specie > &   
)
friend

◆ operator==

PengRobinsonGas operator== ( const PengRobinsonGas< Specie > &  ,
const PengRobinsonGas< Specie > &   
)
friend

◆ operator

Ostream& operator ( Ostream ,
const PengRobinsonGas< Specie > &   
)
friend

Member Data Documentation

◆ incompressible

const bool incompressible = false
static

Is the equation of state is incompressible i.e. rho != f(p)

Definition at line 183 of file PengRobinsonGas.H.

◆ isochoric

const bool isochoric = false
static

Is the equation of state is isochoric i.e. rho = const.

Definition at line 186 of file PengRobinsonGas.H.


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