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
00040
00041
00042
00043
00044
00045
00046
00047
00048 #ifndef porousZone_H
00049 #define porousZone_H
00050
00051 #include "dictionary.H"
00052 #include "wordList.H"
00053 #include "labelList.H"
00054 #include "dimensionedScalar.H"
00055 #include "dimensionedTensor.H"
00056 #include "primitiveFieldsFwd.H"
00057 #include "volFieldsFwd.H"
00058 #include "fvMatricesFwd.H"
00059
00060
00061
00062 namespace Foam
00063 {
00064
00065 class fvMesh;
00066
00067
00068
00069
00070
00071 class porousZone
00072 {
00073
00074
00075
00076 const fvMesh& mesh_;
00077
00078
00079 word name_;
00080
00081
00082 dictionary dict_;
00083
00084
00085 label cellZoneID_;
00086
00087
00088 dimensionedScalar C0_;
00089
00090
00091 dimensionedScalar C1_;
00092
00093
00094 dimensionedTensor D_;
00095
00096
00097 dimensionedTensor F_;
00098
00099
00100
00101
00102
00103 template<class RhoFieldType>
00104 void addPowerLawResistance
00105 (
00106 scalarField& Udiag,
00107 const labelList& cells,
00108 const scalarField& V,
00109 const RhoFieldType& rho,
00110 const vectorField& U
00111 ) const;
00112
00113
00114 template<class RhoFieldType>
00115 void addViscousInertialResistance
00116 (
00117 scalarField& Udiag,
00118 vectorField& Usource,
00119 const labelList& cells,
00120 const scalarField& V,
00121 const RhoFieldType& rho,
00122 const scalarField& mu,
00123 const vectorField& U
00124 ) const;
00125
00126
00127
00128 template<class RhoFieldType>
00129 void addPowerLawResistance
00130 (
00131 tensorField& AU,
00132 const labelList& cells,
00133 const RhoFieldType& rho,
00134 const vectorField& U
00135 ) const;
00136
00137
00138 template<class RhoFieldType>
00139 void addViscousInertialResistance
00140 (
00141 tensorField& AU,
00142 const labelList& cells,
00143 const RhoFieldType& rho,
00144 const scalarField& mu,
00145 const vectorField& U
00146 ) const;
00147
00148
00149
00150 porousZone(const porousZone&);
00151
00152
00153 void operator=(const porousZone&);
00154
00155
00156 public:
00157
00158
00159
00160
00161 porousZone(const fvMesh& mesh, Istream& is);
00162
00163
00164 autoPtr<porousZone> clone() const
00165 {
00166 notImplemented("autoPtr<porousZone> clone() const");
00167 return autoPtr<porousZone>(NULL);
00168 }
00169
00170
00171
00172 class iNew
00173 {
00174 const fvMesh& mesh_;
00175
00176 public:
00177
00178 iNew(const fvMesh& mesh)
00179 :
00180 mesh_(mesh)
00181 {}
00182
00183 autoPtr<porousZone> operator()(Istream& is) const
00184 {
00185 return autoPtr<porousZone>(new porousZone(mesh_, is));
00186 }
00187 };
00188
00189
00190
00191
00192
00193
00194 const word& zoneName() const
00195 {
00196 return name_;
00197 }
00198
00199 label zoneId() const
00200 {
00201 return cellZoneID_;
00202 }
00203
00204 const dictionary& dict() const
00205 {
00206 return dict_;
00207 }
00208
00209
00210
00211
00212 void addResistance(fvVectorMatrix& UEqn) const;
00213
00214
00215
00216
00217 void addResistance
00218 (
00219 const fvVectorMatrix& UEqn,
00220 volTensorField& AU,
00221 bool correctAUpBC = true
00222 ) const;
00223
00224
00225 void writeDict(Ostream&, bool subDict = true) const;
00226
00227
00228
00229
00230 friend Ostream& operator<<(Ostream&, const porousZone&);
00231 };
00232
00233
00234
00235
00236 }
00237
00238
00239
00240 #ifdef NoRepository
00241 # include "porousZoneTemplates.C"
00242 #endif
00243
00244
00245
00246 #endif
00247
00248
Copyright © 2000-2007 OpenCFD Ltd