DragModel.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 #ifndef DragModel_H
00038 #define DragModel_H
00039
00040 #include "IOdictionary.H"
00041 #include "autoPtr.H"
00042 #include "runTimeSelectionTables.H"
00043
00044
00045
00046 namespace Foam
00047 {
00048
00049
00050
00051
00052
00053 template<class CloudType>
00054 class DragModel
00055 {
00056
00057
00058
00059 const dictionary& dict_;
00060
00061
00062 CloudType& owner_;
00063
00064
00065 public:
00066
00067
00068 TypeName("DragModel");
00069
00070
00071 declareRunTimeSelectionTable
00072 (
00073 autoPtr,
00074 DragModel,
00075 dictionary,
00076 (
00077 const dictionary& dict,
00078 CloudType& owner
00079 ),
00080 (dict, owner)
00081 );
00082
00083
00084
00085
00086
00087 DragModel
00088 (
00089 const dictionary& dict,
00090 CloudType& owner
00091 );
00092
00093
00094
00095 virtual ~DragModel();
00096
00097
00098
00099 static autoPtr<DragModel<CloudType> > New
00100 (
00101 const dictionary& dict,
00102 CloudType& cloud
00103 );
00104
00105
00106
00107
00108
00109 const CloudType& owner() const;
00110
00111
00112 const dictionary& dict() const;
00113
00114
00115
00116
00117
00118 virtual bool active() const = 0;
00119
00120
00121 virtual scalar Cd(const scalar Re) const = 0;
00122
00123
00124
00125 scalar utc
00126 (
00127 const vector& Ur,
00128 const scalar d,
00129 const scalar rhoc,
00130 const scalar mu
00131 ) const;
00132 };
00133
00134
00135
00136
00137 }
00138
00139
00140
00141 #define makeDragModel(CloudType) \
00142 \
00143 defineNamedTemplateTypeNameAndDebug(DragModel<CloudType>, 0); \
00144 \
00145 defineTemplateRunTimeSelectionTable(DragModel<CloudType>, dictionary);
00146
00147
00148 #define makeDragModelType(SS, CloudType, ParcelType) \
00149 \
00150 defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
00151 \
00152 DragModel<CloudType<ParcelType> >:: \
00153 adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
00154 add##SS##CloudType##ParcelType##ConstructorToTable_;
00155
00156
00157 #define makeDragModelThermoType(SS, CloudType, ParcelType, ThermoType) \
00158 \
00159 defineNamedTemplateTypeNameAndDebug \
00160 ( \
00161 SS<CloudType<ParcelType<ThermoType> > >, \
00162 0 \
00163 ); \
00164 \
00165 DragModel<CloudType<ParcelType<ThermoType> > >:: \
00166 adddictionaryConstructorToTable \
00167 <SS<CloudType<ParcelType<ThermoType> > > > \
00168 add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_;
00169
00170
00171
00172
00173 #ifdef NoRepository
00174 # include "DragModel.C"
00175 #endif
00176
00177
00178
00179 #endif
00180
00181
Copyright © 2000-2009 OpenCFD Ltd