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 #ifndef basicThermo_H
00037 #define basicThermo_H
00038
00039 #include "volFields.H"
00040 #include "typeInfo.H"
00041 #include "IOdictionary.H"
00042 #include "autoPtr.H"
00043 #include "runTimeSelectionTables.H"
00044
00045
00046
00047 namespace Foam
00048 {
00049
00050
00051
00052
00053
00054 class basicThermo
00055 :
00056 public IOdictionary
00057 {
00058
00059 protected:
00060
00061
00062
00063 volScalarField p_;
00064 volScalarField T_;
00065 volScalarField psi_;
00066
00067 volScalarField mu_;
00068 volScalarField alpha_;
00069
00070
00071
00072
00073 wordList hBoundaryTypes();
00074 void hBoundaryCorrection(volScalarField& h);
00075
00076
00077 basicThermo(const basicThermo&);
00078
00079
00080 public:
00081
00082
00083 TypeName("basicThermo");
00084
00085
00086
00087
00088 declareRunTimeSelectionTable
00089 (
00090 autoPtr,
00091 basicThermo,
00092 fvMesh,
00093 (const fvMesh& mesh),
00094 (mesh)
00095 );
00096
00097
00098
00099
00100
00101 basicThermo(const fvMesh&);
00102
00103
00104
00105
00106 static autoPtr<basicThermo> New(const fvMesh&);
00107
00108
00109
00110
00111 virtual ~basicThermo();
00112
00113
00114
00115
00116
00117 virtual void correct() = 0;
00118
00119
00120
00121
00122
00123
00124 volScalarField& p()
00125 {
00126 return p_;
00127 }
00128
00129
00130 const volScalarField& p() const
00131 {
00132 return p_;
00133 }
00134
00135
00136
00137 virtual volScalarField& h()
00138 {
00139 notImplemented("basicThermo::h()");
00140 return volScalarField::null();
00141 }
00142
00143
00144 virtual const volScalarField& h() const
00145 {
00146 notImplemented("basicThermo::h() const");
00147 return volScalarField::null();
00148 }
00149
00150
00151 virtual tmp<scalarField> h
00152 (
00153 const scalarField& T,
00154 const labelList& cells
00155 ) const
00156 {
00157 notImplemented
00158 (
00159 "basicThermo::h"
00160 "(const scalarField& T, const labelList& cells) const"
00161 );
00162 return tmp<scalarField>(NULL);
00163 }
00164
00165
00166 virtual tmp<scalarField> h
00167 (
00168 const scalarField& T,
00169 const label patchi
00170 ) const
00171 {
00172 notImplemented
00173 (
00174 "basicThermo::h"
00175 "(const scalarField& T, const label patchi) const"
00176 );
00177 return tmp<scalarField>(NULL);
00178 }
00179
00180
00181
00182 virtual volScalarField& e()
00183 {
00184 notImplemented("basicThermo::e()");
00185 return volScalarField::null();
00186 }
00187
00188
00189 virtual const volScalarField& e() const
00190 {
00191 notImplemented("basicThermo::e()");
00192 return volScalarField::null();
00193 }
00194
00195
00196
00197
00198
00199 const volScalarField& T() const
00200 {
00201 return T_;
00202 }
00203
00204
00205 tmp<volScalarField> rho() const
00206 {
00207 return p_*psi();
00208 }
00209
00210
00211 const volScalarField& psi() const
00212 {
00213 return psi_;
00214 }
00215
00216
00217 virtual tmp<scalarField> Cp
00218 (
00219 const scalarField& T,
00220 const label patchi
00221 ) const
00222 {
00223 notImplemented
00224 (
00225 "basicThermo::Cp"
00226 "(const scalarField& T, const label patchi) const"
00227 );
00228 return tmp<scalarField>(NULL);
00229 }
00230
00231
00232 virtual tmp<volScalarField> Cp() const
00233 {
00234 notImplemented("basicThermo::Cp() const");
00235 return volScalarField::null();
00236 }
00237
00238
00239 virtual tmp<volScalarField> Cv() const
00240 {
00241 notImplemented("basicThermo::Cv() const");
00242 return volScalarField::null();
00243 }
00244
00245
00246
00247
00248
00249 const volScalarField& mu() const
00250 {
00251 return mu_;
00252 }
00253
00254
00255 const volScalarField& alpha() const
00256 {
00257 return alpha_;
00258 }
00259
00260
00261
00262 virtual bool read() = 0;
00263 };
00264
00265
00266
00267
00268 }
00269
00270
00271
00272 #endif
00273
00274