rPolynomial< Specie > Class Template Reference

Reciprocal polynomial equation of state for liquids and solids. More...

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

Public Member Functions

 rPolynomial (const Specie &sp, const coeffList &coeffs)
 Construct from components. More...
 
 rPolynomial (const word &name, const dictionary &dict)
 Construct from name and dictionary. More...
 
 rPolynomial (const word &name, const rPolynomial &)
 Construct as named copy. More...
 
autoPtr< rPolynomialclone () 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 rPolynomial &)
 
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

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

Detailed Description

template<class Specie>
class Foam::rPolynomial< Specie >

Reciprocal polynomial equation of state for liquids and solids.

    1/rho = C[0] + C[1]*T + C[2]*sqr(T) - C[3]*p - C[4]*p*T

This polynomial for the reciprocal of the density provides a much better fit than the equivalent polynomial for the density and has the advantage that it support coefficient mixing to support liquid and solid mixtures in an efficient manner.

Usage
Property Description
C Density polynomial coefficients

Example specification of the rPolynomial equation of state for pure water:

    equationOfState
    {
        C (0.001278 -2.1055e-06 3.9689e-09 4.3772e-13 -2.0225e-16);
    }

Note: This fit is based on the small amount of data which is freely available for the range 20-65degC and 1-100bar.

Source files

Definition at line 115 of file rPolynomial.H.

Constructor & Destructor Documentation

◆ rPolynomial() [1/3]

rPolynomial ( const Specie &  sp,
const coeffList &  coeffs 
)
inline

Construct from components.

Definition at line 31 of file rPolynomialI.H.

◆ rPolynomial() [2/3]

rPolynomial ( const word name,
const dictionary dict 
)

Construct from name and dictionary.

Definition at line 32 of file rPolynomial.C.

◆ rPolynomial() [3/3]

rPolynomial ( const word name,
const rPolynomial< Specie > &   
)
inline

Construct as named copy.

Member Function Documentation

◆ clone()

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

Construct and return a clone.

Definition at line 56 of file rPolynomialI.H.

◆ typeName()

static word typeName ( )
inlinestatic

Return the instantiated type name.

Definition at line 168 of file rPolynomial.H.

◆ rho()

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

Return density [kg/m^3].

Definition at line 65 of file rPolynomialI.H.

References p, 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 72 of file rPolynomialI.H.

◆ Cp()

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

Return Cp contribution [J/(kg K].

Definition at line 79 of file rPolynomialI.H.

◆ E()

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

Return internal energy contribution [J/kg].

Definition at line 86 of file rPolynomialI.H.

◆ Cv()

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

Return Cv contribution [J/(kg K].

Definition at line 93 of file rPolynomialI.H.

◆ 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 100 of file rPolynomialI.H.

◆ 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 107 of file rPolynomialI.H.

References NotImplemented.

◆ psi()

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

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

Definition at line 115 of file rPolynomialI.H.

References p, rho, Foam::sqr(), and Foam::T().

Here is the call graph for this function:

◆ Z()

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

Return compression factor [].

Definition at line 122 of file rPolynomialI.H.

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

Here is the call graph for this function:

◆ CpMCv()

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

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

Definition at line 129 of file rPolynomialI.H.

◆ alphav()

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

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

Definition at line 136 of file rPolynomialI.H.

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

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const

Write to Ostream.

Definition at line 46 of file rPolynomial.C.

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

Here is the call graph for this function:

◆ operator+=()

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

Definition at line 145 of file rPolynomialI.H.

References Foam::mag(), and Y.

Here is the call graph for this function:

◆ operator*=()

void operator*= ( const scalar  s)
inline

Definition at line 161 of file rPolynomialI.H.

References s().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator+

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

◆ operator*

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

◆ operator==

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

◆ operator

Ostream& operator ( Ostream ,
const rPolynomial< 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 177 of file rPolynomial.H.

◆ isochoric

const bool isochoric = false
static

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

Definition at line 180 of file rPolynomial.H.


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