1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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 Incompressible gas/liquid equation of state.
34 \*---------------------------------------------------------------------------*/
36 #ifndef incompressible_H
37 #define incompressible_H
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class incompressible Declaration
49 \*---------------------------------------------------------------------------*/
65 //- Construct from components
66 inline incompressible(const specie& sp, const scalar rho);
68 //- Construct from Istream
69 incompressible(Istream&);
71 //- Construct from dictionary
72 incompressible(const dictionary& dict);
74 //- Construct as named copy
75 inline incompressible(const word& name, const incompressible&);
77 //- Construct and return a clone
78 inline autoPtr<incompressible> clone() const;
80 // Selector from Istream
81 inline static autoPtr<incompressible> New(Istream& is);
86 // Fundamental properties
88 //- Return density [kg/m^3]
89 inline scalar rho(scalar p, scalar T) const;
91 //- Return compressibility rho/p [s^2/m^2]
92 inline scalar psi(scalar p, scalar T) const;
94 //- Return compression factor []
95 inline scalar Z(scalar p, scalar T) const;
101 void write(Ostream& os) const;
106 inline void operator+=(const incompressible&);
107 inline void operator-=(const incompressible&);
109 inline void operator*=(const scalar);
114 inline friend incompressible operator+
116 const incompressible&,
117 const incompressible&
120 inline friend incompressible operator-
122 const incompressible&,
123 const incompressible&
126 inline friend incompressible operator*
129 const incompressible&
132 inline friend incompressible operator==
134 const incompressible&,
135 const incompressible&
141 friend Ostream& operator<<(Ostream&, const incompressible&);
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 } // End namespace Foam
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 #include "incompressibleI.H"
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 // ************************************************************************* //