1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend 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 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
28 Constant properties thermodynamics package derived from the basic
29 thermo package data type specieThermo.
35 \*---------------------------------------------------------------------------*/
37 #ifndef eConstThermo_H
38 #define eConstThermo_H
40 #include "specieThermo.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 // Forward declaration of friend functions and operators
49 template<class equationOfState> class eConstThermo;
51 template<class equationOfState>
52 inline eConstThermo<equationOfState> operator+
54 const eConstThermo<equationOfState>&,
55 const eConstThermo<equationOfState>&
58 template<class equationOfState>
59 inline eConstThermo<equationOfState> operator-
61 const eConstThermo<equationOfState>&,
62 const eConstThermo<equationOfState>&
65 template<class equationOfState>
66 inline eConstThermo<equationOfState> operator*
69 const eConstThermo<equationOfState>&
72 template<class equationOfState>
73 inline eConstThermo<equationOfState> operator==
75 const eConstThermo<equationOfState>&,
76 const eConstThermo<equationOfState>&
79 template<class equationOfState>
83 const eConstThermo<equationOfState>&
87 /*---------------------------------------------------------------------------*\
88 Class eConstThermo Declaration
89 \*---------------------------------------------------------------------------*/
91 template<class equationOfState>
94 public equationOfState
102 // Private member functions
104 //- Construct from components
107 const equationOfState& st,
117 //- Construct from Istream
118 eConstThermo(Istream&);
120 //- Construct as named copy
121 inline eConstThermo(const word&, const eConstThermo&);
123 //- Construct and return a clone
124 inline autoPtr<eConstThermo> clone() const;
126 // Selector from Istream
127 inline static autoPtr<eConstThermo> New(Istream& is);
132 // Fundamaental properties
134 //- Heat capacity at constant pressure [J/(kmol K)]
135 inline scalar cp(const scalar T) const;
137 //- Enthalpy [J/kmol]
138 inline scalar h(const scalar T) const;
140 //- Sensible Enthalpy [J/kmol]
141 inline scalar hs(const scalar T) const;
143 //- Chemical enthalpy [J/kmol]
144 inline scalar hc() const;
146 //- Entropy [J/(kmol K)]
147 inline scalar s(const scalar T) const;
152 inline void operator+=(const eConstThermo&);
153 inline void operator-=(const eConstThermo&);
158 friend eConstThermo operator+ <equationOfState>
164 friend eConstThermo operator- <equationOfState>
170 friend eConstThermo operator* <equationOfState>
176 friend eConstThermo operator== <equationOfState>
183 // IOstream Operators
185 friend Ostream& operator<< <equationOfState>
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 } // End namespace Foam
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 #include "eConstThermoI.H"
202 # include "eConstThermo.C"
205 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 // ************************************************************************* //