1

Previous: Specie Up: Structure and compilation Next: Thermodynamical model

This is an automatically generated documentation by LaTeX2HTML utility. In case of any issue, please, contact us at info@cfdsupport.com.

Equation of state

  • Classes representing an equation of state are derived from the class specie.
  • In our example, classperfectGas is used. Their inheritance structure is in the picture crossref 3.
  • As one can see, the perfectGas is template class and inherits from its template parameter. This construction is discussed in crossref 3. It enables replacing specie as a base class of perfectGas, should the need arise in future, for example if an alternative to class specie is developed.
  • There are also other classes representing equation of state. They are following:

    rhoConst
    perfectGas
    incompressiblePerfectGas
    perfectFluid
    linear
    adiabaticPerfectFluid
    PengRobinsonGas
    icoPolynomial

  • Physical meaning and additional parameters needed for given equation of state are explained in OpenFOAM User Guide, which is distributed along with OpenFoam and can be found on-line at https://www.openfoam.org or in pdf in

    1 3$WM_PROJECT_DIR/doc/Guides-a4/UserGuide.png

  • Generally speaking, the equation of state handles relation between pressure, temperature and density of the fluid.

Source code for all classes representing different equations of state can be found found in

$FOAM_SRC/thermophysicalModels/specie/equationOfState

in subdirectories named after respective equation of state, e.g. for perfect gas, source code is in files

perfectGas/perfectGas.C
perfectGas/perfectGas.H
perfectGas/perfectGasI.H

CFDsupport programming training perfectGas inheritance diagram

Figure: Input geometry, three letters – C.stl, F.stl and D.stl.