Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef hPolynomialThermo_H
00040 #define hPolynomialThermo_H
00041
00042 #include <OpenFOAM/scalar.H>
00043 #include <OpenFOAM/Polynomial.H>
00044
00045
00046
00047 namespace Foam
00048 {
00049
00050
00051
00052 template<class EquationOfState, int PolySize>
00053 class hPolynomialThermo;
00054
00055 template<class EquationOfState, int PolySize>
00056 inline hPolynomialThermo<EquationOfState, PolySize> operator+
00057 (
00058 const hPolynomialThermo<EquationOfState, PolySize>&,
00059 const hPolynomialThermo<EquationOfState, PolySize>&
00060 );
00061
00062 template<class EquationOfState, int PolySize>
00063 inline hPolynomialThermo<EquationOfState, PolySize> operator-
00064 (
00065 const hPolynomialThermo<EquationOfState, PolySize>&,
00066 const hPolynomialThermo<EquationOfState, PolySize>&
00067 );
00068
00069 template<class EquationOfState, int PolySize>
00070 inline hPolynomialThermo<EquationOfState, PolySize> operator*
00071 (
00072 const scalar,
00073 const hPolynomialThermo<EquationOfState, PolySize>&
00074 );
00075
00076 template<class EquationOfState, int PolySize>
00077 inline hPolynomialThermo<EquationOfState, PolySize> operator==
00078 (
00079 const hPolynomialThermo<EquationOfState, PolySize>&,
00080 const hPolynomialThermo<EquationOfState, PolySize>&
00081 );
00082
00083 template<class EquationOfState, int PolySize>
00084 Ostream& operator<<
00085 (
00086 Ostream&,
00087 const hPolynomialThermo<EquationOfState, PolySize>&
00088 );
00089
00090
00091
00092
00093
00094
00095 template<class EquationOfState, int PolySize>
00096 class hPolynomialThermo
00097 :
00098 public EquationOfState
00099 {
00100
00101
00102
00103
00104 scalar Hf_;
00105
00106
00107
00108 scalar Sf_;
00109
00110
00111 Polynomial<PolySize> CpPolynomial_;
00112
00113
00114 typename Polynomial<PolySize>::intPolyType hPolynomial_;
00115
00116
00117 Polynomial<PolySize> sPolynomial_;
00118
00119
00120
00121
00122
00123 inline hPolynomialThermo
00124 (
00125 const EquationOfState& pt,
00126 const scalar Hf,
00127 const scalar Sf,
00128 const Polynomial<PolySize>& cpPoly,
00129 const typename Polynomial<PolySize>::intPolyType& hPoly,
00130 const Polynomial<PolySize>& sPoly
00131 );
00132
00133
00134 public:
00135
00136
00137
00138
00139 hPolynomialThermo(Istream& is);
00140
00141
00142 inline hPolynomialThermo(const hPolynomialThermo&);
00143
00144
00145 inline hPolynomialThermo(const word&, const hPolynomialThermo&);
00146
00147
00148
00149
00150
00151 inline scalar cp(const scalar T) const;
00152
00153
00154 inline scalar h(const scalar T) const;
00155
00156
00157 inline scalar hs(const scalar T) const;
00158
00159
00160 inline scalar hc() const;
00161
00162
00163 inline scalar s(const scalar T) const;
00164
00165
00166
00167
00168 inline hPolynomialThermo& operator=(const hPolynomialThermo&);
00169 inline void operator+=(const hPolynomialThermo&);
00170 inline void operator-=(const hPolynomialThermo&);
00171 inline void operator*=(const scalar);
00172
00173
00174
00175
00176 friend hPolynomialThermo operator+ <EquationOfState, PolySize>
00177 (
00178 const hPolynomialThermo&,
00179 const hPolynomialThermo&
00180 );
00181
00182 friend hPolynomialThermo operator- <EquationOfState, PolySize>
00183 (
00184 const hPolynomialThermo&,
00185 const hPolynomialThermo&
00186 );
00187
00188 friend hPolynomialThermo operator* <EquationOfState, PolySize>
00189 (
00190 const scalar,
00191 const hPolynomialThermo&
00192 );
00193
00194 friend hPolynomialThermo operator== <EquationOfState, PolySize>
00195 (
00196 const hPolynomialThermo&,
00197 const hPolynomialThermo&
00198 );
00199
00200
00201
00202
00203 friend Ostream& operator<< <EquationOfState, PolySize>
00204 (
00205 Ostream&,
00206 const hPolynomialThermo&
00207 );
00208 };
00209
00210
00211
00212
00213 }
00214
00215
00216
00217 #include "hPolynomialThermoI.H"
00218
00219 #ifdef NoRepository
00220 # include "hPolynomialThermo.C"
00221 #endif
00222
00223
00224
00225 #endif
00226
00227