janafThermo.H
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 #ifndef janafThermo_H
00039 #define janafThermo_H
00040
00041 #include "scalar.H"
00042
00043
00044
00045 namespace Foam
00046 {
00047
00048
00049
00050 template<class equationOfState> class janafThermo;
00051
00052 template<class equationOfState>
00053 inline janafThermo<equationOfState> operator+
00054 (
00055 const janafThermo<equationOfState>&,
00056 const janafThermo<equationOfState>&
00057 );
00058
00059 template<class equationOfState>
00060 inline janafThermo<equationOfState> operator-
00061 (
00062 const janafThermo<equationOfState>&,
00063 const janafThermo<equationOfState>&
00064 );
00065
00066 template<class equationOfState>
00067 inline janafThermo<equationOfState> operator*
00068 (
00069 const scalar,
00070 const janafThermo<equationOfState>&
00071 );
00072
00073 template<class equationOfState>
00074 inline janafThermo<equationOfState> operator==
00075 (
00076 const janafThermo<equationOfState>&,
00077 const janafThermo<equationOfState>&
00078 );
00079
00080 template<class equationOfState>
00081 Ostream& operator<<
00082 (
00083 Ostream&,
00084 const janafThermo<equationOfState>&
00085 );
00086
00087
00088
00089
00090
00091
00092 template<class equationOfState>
00093 class janafThermo
00094 :
00095 public equationOfState
00096 {
00097
00098 public:
00099
00100 static const int nCoeffs_ = 7;
00101 typedef scalar coeffArray[7];
00102
00103 private:
00104
00105
00106
00107
00108 scalar Tlow_, Thigh_, Tcommon_;
00109
00110 coeffArray highCpCoeffs_;
00111 coeffArray lowCpCoeffs_;
00112
00113
00114
00115
00116
00117 inline void checkT(const scalar T) const;
00118
00119
00120 inline const coeffArray& coeffs(const scalar T) const;
00121
00122
00123 public:
00124
00125
00126
00127
00128 inline janafThermo
00129 (
00130 const equationOfState& st,
00131 const scalar Tlow,
00132 const scalar Thigh,
00133 const scalar Tcommon,
00134 const coeffArray& highCpCoeffs,
00135 const coeffArray& lowCpCoeffs
00136 );
00137
00138
00139 janafThermo(Istream&);
00140
00141
00142 inline janafThermo(const word&, const janafThermo&);
00143
00144
00145
00146
00147
00148 inline scalar cp(const scalar T) const;
00149
00150
00151 inline scalar h(const scalar T) const;
00152
00153
00154 inline scalar hs(const scalar T) const;
00155
00156
00157 inline scalar hc() const;
00158
00159
00160 inline scalar s(const scalar T) const;
00161
00162
00163
00164
00165 inline void operator+=(const janafThermo&);
00166 inline void operator-=(const janafThermo&);
00167
00168
00169
00170
00171 friend janafThermo operator+ <equationOfState>
00172 (
00173 const janafThermo&,
00174 const janafThermo&
00175 );
00176
00177 friend janafThermo operator- <equationOfState>
00178 (
00179 const janafThermo&,
00180 const janafThermo&
00181 );
00182
00183 friend janafThermo operator* <equationOfState>
00184 (
00185 const scalar,
00186 const janafThermo&
00187 );
00188
00189 friend janafThermo operator== <equationOfState>
00190 (
00191 const janafThermo&,
00192 const janafThermo&
00193 );
00194
00195
00196
00197
00198 friend Ostream& operator<< <equationOfState>
00199 (
00200 Ostream&,
00201 const janafThermo&
00202 );
00203 };
00204
00205
00206
00207
00208 }
00209
00210
00211
00212 #include "janafThermoI.H"
00213
00214 #ifdef NoRepository
00215 # include "janafThermo.C"
00216 #endif
00217
00218
00219
00220 #endif
00221
00222
Copyright © 2000-2009 OpenCFD Ltd