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 bool move(trackData&);
00168
00169
00170
00171 void hitProcessorPatch
00172 (
00173 const processorPolyPatch&,
00174 solidParticle::trackData& td
00175 );
00176
00177
00178
00179 void hitProcessorPatch
00180 (
00181 const processorPolyPatch&,
00182 int&
00183 );
00184
00185
00186 void hitWallPatch
00187 (
00188 const wallPolyPatch&,
00189 solidParticle::trackData& td
00190 );
00191
00192
00193
00194 void hitWallPatch
00195 (
00196 const wallPolyPatch&,
00197 int&
00198 );
00199
00200
00201 void hitPatch
00202 (
00203 const polyPatch&,
00204 solidParticle::trackData& td
00205 );
00206
00207
00208
00209 void hitPatch
00210 (
00211 const polyPatch&,
00212 int&
00213 );
00214
00215
00216
00217
00218 friend Ostream& operator<<(Ostream&, const solidParticle&);
00219 };
00220
00221
00222 template<>
00223 inline bool contiguous<solidParticle>()
00224 {
00225 return true;
00226 }
00227
00228 template<>
00229 void Cloud<solidParticle>::readFields();
00230
00231 template<>
00232 void Cloud<solidParticle>::writeFields() const;
00233
00234
00235
00236
00237 }
00238
00239
00240
00241 #include "solidParticleI.H"
00242
00243
00244
00245 #endif
00246
00247
Copyright © 2000-2007 OpenCFD Ltd