1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
28 Perfect gas equation of state.
34 \*---------------------------------------------------------------------------*/
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class perfectGas Declaration
49 \*---------------------------------------------------------------------------*/
60 //- Construct from components
61 inline perfectGas(const specie& sp);
63 //- Construct from Istream
66 //- Construct from dictionary
67 perfectGas(const dictionary& dict);
69 //- Construct as named copy
70 inline perfectGas(const word& name, const perfectGas&);
72 //- Construct and return a clone
73 inline autoPtr<perfectGas> clone() const;
75 // Selector from Istream
76 inline static autoPtr<perfectGas> New(Istream& is);
78 // Selector from dictionary
79 inline static autoPtr<perfectGas> New(const dictionary& dict);
84 // Fundamental properties
86 //- Return density [kg/m^3]
87 inline scalar rho(scalar p, scalar T) const;
89 //- Return compressibility rho/p [s^2/m^2]
90 inline scalar psi(scalar p, scalar T) const;
92 //- Return compression factor []
93 inline scalar Z(scalar p, scalar T) const;
99 void write(Ostream& os) const;
104 inline void operator+=(const perfectGas&);
105 inline void operator-=(const perfectGas&);
107 inline void operator*=(const scalar);
112 inline friend perfectGas operator+
118 inline friend perfectGas operator-
124 inline friend perfectGas operator*
130 inline friend perfectGas operator==
139 friend Ostream& operator<<(Ostream&, const perfectGas&);
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 } // End namespace Foam
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 #include "perfectGasI.H"
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 // ************************************************************************* //