Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | Friends
perfectFluid Class Reference

Perfect gas equation of state. More...

Public Member Functions

 perfectFluid (const Specie &sp, const scalar R, const scalar rho0)
 Construct from components. More...
 
 perfectFluid (Istream &)
 Construct from Istream. More...
 
 perfectFluid (const dictionary &dict)
 Construct from dictionary. More...
 
 perfectFluid (const word &name, const perfectFluid &)
 Construct as named copy. More...
 
autoPtr< perfectFluidclone () const
 Construct and return a clone. More...
 
scalar R () const
 Return fluid constant [J/(kg K)]. More...
 
scalar rho (scalar p, scalar T) const
 Return density [kg/m^3]. More...
 
scalar s (const scalar p, const scalar T) const
 Return entropy [J/(kmol K)]. More...
 
scalar psi (scalar p, scalar T) const
 Return compressibility rho/p [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/(kmol K]. More...
 
void write (Ostream &os) const
 Write to Ostream. More...
 
void operator+= (const perfectFluid &)
 
void operator-= (const perfectFluid &)
 
void operator*= (const scalar)
 

Static Public Member Functions

static autoPtr< perfectFluidNew (Istream &is)
 
static autoPtr< perfectFluidNew (const dictionary &dict)
 
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...
 

Private Attributes

scalar R_
 Fluid constant. More...
 
scalar rho0_
 The reference density. More...
 

Friends

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

Detailed Description

Perfect gas equation of state.

Source files

Definition at line 47 of file perfectFluid.H.

Constructor & Destructor Documentation

◆ perfectFluid() [1/4]

perfectFluid ( const Specie &  sp,
const scalar  R,
const scalar  rho0 
)
inline

Construct from components.

Definition at line 33 of file perfectFluidI.H.

◆ perfectFluid() [2/4]

Construct from Istream.

◆ perfectFluid() [3/4]

perfectFluid ( const dictionary dict)

Construct from dictionary.

Definition at line 43 of file perfectFluid.C.

◆ perfectFluid() [4/4]

perfectFluid ( const word name,
const perfectFluid  
)
inline

Construct as named copy.

Member Function Documentation

◆ clone()

Foam::autoPtr< Foam::perfectFluid< Specie > > clone ( ) const
inline

Construct and return a clone.

Definition at line 62 of file perfectFluidI.H.

◆ New() [1/2]

Foam::autoPtr< Foam::perfectFluid< Specie > > New ( Istream is)
inlinestatic

Definition at line 70 of file perfectFluidI.H.

◆ New() [2/2]

Foam::autoPtr< Foam::perfectFluid< Specie > > New ( const dictionary dict)
inlinestatic

Definition at line 79 of file perfectFluidI.H.

References dict.

◆ typeName()

static word typeName ( )
inlinestatic

Return the instantiated type name.

Definition at line 137 of file perfectFluid.H.

◆ R()

Foam::scalar R ( ) const
inline

Return fluid constant [J/(kg K)].

Definition at line 90 of file perfectFluidI.H.

◆ rho()

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

Return density [kg/m^3].

Definition at line 97 of file perfectFluidI.H.

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

Here is the call graph for this function:

◆ s()

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

Return entropy [J/(kmol K)].

Definition at line 104 of file perfectFluidI.H.

References Foam::log(), p, Foam::constant::standard::Pstd, and Foam::constant::thermodynamic::RR.

Here is the call graph for this function:

◆ psi()

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

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

Definition at line 111 of file perfectFluidI.H.

References R, 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 118 of file perfectFluidI.H.

◆ cpMcv()

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

Return (cp - cv) [J/(kmol K].

Definition at line 125 of file perfectFluidI.H.

◆ write()

void write ( Ostream os) const

Write to Ostream.

Definition at line 54 of file perfectFluid.C.

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

Here is the call graph for this function:

◆ operator+=()

void operator+= ( const perfectFluid )
inline

Definition at line 135 of file perfectFluidI.H.

◆ operator-=()

void operator-= ( const perfectFluid )
inline

Definition at line 153 of file perfectFluidI.H.

◆ operator*=()

void operator*= ( const scalar  s)
inline

Definition at line 170 of file perfectFluidI.H.

References s().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator+

perfectFluid operator+ ( const perfectFluid ,
const perfectFluid  
)
friend

◆ operator-

perfectFluid operator- ( const perfectFluid ,
const perfectFluid  
)
friend

◆ operator*

perfectFluid operator* ( const scalar  s,
const perfectFluid  
)
friend

◆ operator==

perfectFluid operator== ( const perfectFluid ,
const perfectFluid  
)
friend

◆ operator

Ostream& operator ( Ostream ,
const perfectFluid  
)
friend

Field Documentation

◆ R_

scalar R_
private

Fluid constant.

Definition at line 97 of file perfectFluid.H.

◆ rho0_

scalar rho0_
private

The reference density.

Definition at line 100 of file perfectFluid.H.

◆ incompressible

const bool incompressible = false
static

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

Definition at line 146 of file perfectFluid.H.

◆ isochoric

const bool isochoric = false
static

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

Definition at line 149 of file perfectFluid.H.


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