CompositionModel.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
00039 #ifndef CompositionModel_H
00040 #define CompositionModel_H
00041
00042 #include "IOdictionary.H"
00043 #include "autoPtr.H"
00044 #include "runTimeSelectionTables.H"
00045
00046 #include "PtrList.H"
00047 #include "multiComponentMixture.H"
00048
00049 #include "liquidMixture.H"
00050 #include "solidMixture.H"
00051
00052 #include "phasePropertiesList.H"
00053
00054
00055
00056 namespace Foam
00057 {
00058
00059
00060
00061
00062
00063 template<class CloudType>
00064 class CompositionModel
00065 {
00066
00067
00068
00069 const dictionary& dict_;
00070
00071
00072 CloudType& owner_;
00073
00074
00075 const dictionary& coeffDict_;
00076
00077
00078 multiComponentMixture<typename CloudType::thermoType>& mcCarrierThermo_;
00079
00080
00081 autoPtr<liquidMixture> liquids_;
00082
00083
00084 autoPtr<solidMixture> solids_;
00085
00086
00087 phasePropertiesList phaseProps_;
00088
00089
00090 public:
00091
00092
00093 TypeName("CompositionModel");
00094
00095
00096 declareRunTimeSelectionTable
00097 (
00098 autoPtr,
00099 CompositionModel,
00100 dictionary,
00101 (
00102 const dictionary& dict,
00103 CloudType& owner
00104 ),
00105 (dict, owner)
00106 );
00107
00108
00109
00110
00111
00112 CompositionModel
00113 (
00114 const dictionary& dict,
00115 CloudType& owner,
00116 const word& type
00117 );
00118
00119
00120
00121 virtual ~CompositionModel();
00122
00123
00124
00125 static autoPtr<CompositionModel<CloudType> > New
00126 (
00127 const dictionary& dict,
00128 CloudType& owner
00129 );
00130
00131
00132
00133
00134
00135
00136
00137 const CloudType& owner() const;
00138
00139
00140 const dictionary& dict() const;
00141
00142
00143 const dictionary& coeffDict() const;
00144
00145
00146 const multiComponentMixture<typename CloudType::thermoType>&
00147 mcCarrierThermo() const;
00148
00149
00150
00151
00152
00153 const liquidMixture& liquids() const;
00154
00155
00156 const solidMixture& solids() const;
00157
00158
00159 const phasePropertiesList& phaseProps() const;
00160
00161
00162 label nPhase() const;
00163
00164
00165
00166
00167
00168
00169 const wordList& phaseTypes() const;
00170
00171
00172 const wordList& stateLabels() const;
00173
00174
00175 const wordList& componentNames(const label phaseI) const;
00176
00177
00178 label globalCarrierId(const word& cmptName) const;
00179
00180
00181 label globalId(const label phaseI, const word& cmptName) const;
00182
00183
00184 const labelList& globalIds(const label phaseI) const;
00185
00186
00187 label localId(const label phaseI, const word& cmptName) const;
00188
00189
00190 label localToGlobalCarrierId
00191 (
00192 const label phaseI,
00193 const label id
00194 ) const;
00195
00196
00197 const scalarField& Y0(const label phaseI) const;
00198
00199
00200
00201 scalarField X
00202 (
00203 const label phaseI,
00204 const scalarField& Y
00205 ) const;
00206
00207
00208
00209
00210
00211
00212 virtual const scalarField& YMixture0() const = 0;
00213
00214
00215
00216
00217
00218 virtual label idGas() const = 0;
00219
00220
00221 virtual label idLiquid() const = 0;
00222
00223
00224 virtual label idSolid() const = 0;
00225
00226
00227
00228
00229
00230 virtual scalar H
00231 (
00232 const label phaseI,
00233 const scalarField& Y,
00234 const scalar p,
00235 const scalar T
00236 ) const;
00237
00238
00239 virtual scalar cp
00240 (
00241 const label phaseI,
00242 const scalarField& Y,
00243 const scalar p,
00244 const scalar T
00245 ) const;
00246
00247
00248 virtual scalar L
00249 (
00250 const label phaseI,
00251 const scalarField& Y,
00252 const scalar p,
00253 const scalar T
00254 ) const;
00255 };
00256
00257
00258
00259
00260 }
00261
00262
00263
00264 #define makeCompositionModel(CloudType) \
00265 \
00266 defineNamedTemplateTypeNameAndDebug \
00267 ( \
00268 CompositionModel<CloudType>, \
00269 0 \
00270 ); \
00271 \
00272 defineTemplateRunTimeSelectionTable \
00273 ( \
00274 CompositionModel<CloudType>, \
00275 dictionary \
00276 );
00277
00278
00279 #define makeCompositionModelThermoType(SS, CloudType, ParcelType, ThermoType) \
00280 \
00281 defineNamedTemplateTypeNameAndDebug \
00282 ( \
00283 SS<CloudType<ParcelType<ThermoType> > >, \
00284 0 \
00285 ); \
00286 \
00287 CompositionModel<CloudType<ParcelType<ThermoType> > >:: \
00288 adddictionaryConstructorToTable \
00289 <SS<CloudType<ParcelType<ThermoType> > > > \
00290 add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_;
00291
00292
00293
00294
00295 #ifdef NoRepository
00296 # include "CompositionModel.C"
00297 #endif
00298
00299
00300
00301 #endif
00302
00303
Copyright © 2000-2009 OpenCFD Ltd