1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Perfect gas equation of state.
35 \*---------------------------------------------------------------------------*/
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class perfectGas Declaration
50 \*---------------------------------------------------------------------------*/
61 //- Construct from components
62 inline perfectGas(const specie& sp);
64 //- Construct from Istream
67 //- Construct as named copy
68 inline perfectGas(const word& name, const perfectGas&);
70 //- Construct and return a clone
71 inline autoPtr<perfectGas> clone() const;
73 // Selector from Istream
74 inline static autoPtr<perfectGas> New(Istream& is);
79 //- Return density [kg/m^3]
80 inline scalar rho(scalar p, scalar T) const;
82 //- Return compressibility rho/p [s^2/m^2]
83 inline scalar psi(scalar p, scalar T) const;
85 //- Return compression factor []
86 inline scalar Z(scalar p, scalar T) const;
91 inline void operator+=(const perfectGas&);
92 inline void operator-=(const perfectGas&);
94 inline void operator*=(const scalar);
99 inline friend perfectGas operator+
105 inline friend perfectGas operator-
111 inline friend perfectGas operator*
117 inline friend perfectGas operator==
126 friend Ostream& operator<<(Ostream&, const perfectGas&);
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 } // End namespace Foam
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 #include "perfectGasI.H"
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 // ************************************************************************* //