solidParticle.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 solidParticle_H
00040 #define solidParticle_H
00041
00042 #include "Particle.H"
00043 #include "IOstream.H"
00044 #include "autoPtr.H"
00045 #include "interpolationCellPoint.H"
00046 #include "contiguous.H"
00047
00048
00049
00050 namespace Foam
00051 {
00052
00053 class solidParticleCloud;
00054
00055
00056
00057
00058
00059 class solidParticle
00060 :
00061 public Particle<solidParticle>
00062 {
00063
00064
00065
00066 scalar d_;
00067
00068
00069 vector U_;
00070
00071
00072 public:
00073
00074 friend class Cloud<solidParticle>;
00075
00076
00077 class trackData
00078 {
00079
00080 solidParticleCloud& spc_;
00081
00082
00083
00084 const interpolationCellPoint<scalar>& rhoInterp_;
00085 const interpolationCellPoint<vector>& UInterp_;
00086 const interpolationCellPoint<scalar>& nuInterp_;
00087
00088
00089 const vector& g_;
00090
00091
00092 public:
00093
00094 bool switchProcessor;
00095 bool keepParticle;
00096
00097
00098
00099
00100 inline trackData
00101 (
00102 solidParticleCloud& spc,
00103 const interpolationCellPoint<scalar>& rhoInterp,
00104 const interpolationCellPoint<vector>& UInterp,
00105 const interpolationCellPoint<scalar>& nuInterp,
00106 const vector& g
00107 );
00108
00109
00110
00111
00112 inline solidParticleCloud& spc();
00113
00114 inline const interpolationCellPoint<scalar>& rhoInterp() const;
00115
00116 inline const interpolationCellPoint<vector>& UInterp() const;
00117
00118 inline const interpolationCellPoint<scalar>& nuInterp() const;
00119
00120 inline const vector& g() const;
00121 };
00122
00123
00124
00125
00126
00127 inline solidParticle
00128 (
00129 const Cloud<solidParticle>& c,
00130 const vector& position,
00131 const label celli,
00132 const scalar m,
00133 const vector& U
00134 );
00135
00136
00137 solidParticle
00138 (
00139 const Cloud<solidParticle>& c,
00140 Istream& is,
00141 bool readFields = true
00142 );
00143
00144
00145 autoPtr<solidParticle> clone() const
00146 {
00147 return autoPtr<solidParticle>(new solidParticle(*this));
00148 }
00149
00150
00151
00152
00153
00154
00155
00156 inline scalar d() const;
00157
00158
00159 inline const vector& U() const;
00160
00161
00162
00163 inline scalar wallImpactDistance(const vector& n) const;
00164
00165
00166
00167
00168
00169 bool move(trackData&);
00170
00171
00172
00173
00174
00175
00176 bool hitPatch
00177 (
00178 const polyPatch&,
00179 solidParticle::trackData& td,
00180 const label patchI
00181 );
00182
00183
00184
00185 bool hitPatch
00186 (
00187 const polyPatch& p,
00188 int& td,
00189 const label patchI
00190 );
00191
00192
00193
00194 void hitProcessorPatch
00195 (
00196 const processorPolyPatch&,
00197 solidParticle::trackData& td
00198 );
00199
00200
00201
00202 void hitProcessorPatch
00203 (
00204 const processorPolyPatch&,
00205 int&
00206 );
00207
00208
00209 void hitWallPatch
00210 (
00211 const wallPolyPatch&,
00212 solidParticle::trackData& td
00213 );
00214
00215
00216
00217 void hitWallPatch
00218 (
00219 const wallPolyPatch&,
00220 int&
00221 );
00222
00223
00224 void hitPatch
00225 (
00226 const polyPatch&,
00227 solidParticle::trackData& td
00228 );
00229
00230
00231
00232 void hitPatch
00233 (
00234 const polyPatch&,
00235 int&
00236 );
00237
00238
00239
00240 void transformProperties
00241 (
00242 const tensor& T
00243 );
00244
00245
00246
00247 void transformProperties
00248 (
00249 const vector& separation
00250 );
00251
00252
00253
00254
00255 static void readFields(Cloud<solidParticle>& c);
00256
00257 static void writeFields(const Cloud<solidParticle>& c);
00258
00259
00260
00261
00262 friend Ostream& operator<<(Ostream&, const solidParticle&);
00263 };
00264
00265
00266 template<>
00267 inline bool contiguous<solidParticle>()
00268 {
00269 return true;
00270 }
00271
00272
00273
00274
00275 }
00276
00277
00278
00279 #include "solidParticleI.H"
00280
00281
00282
00283 #endif
00284
00285
Copyright © 2000-2009 OpenCFD Ltd