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 #include <finiteVolume/fvmSup.H>
00027
00028
00029
00030 template<class ParcelType>
00031 inline Foam::label Foam::KinematicCloud<ParcelType>::parcelTypeId() const
00032 {
00033 return parcelTypeId_;
00034 }
00035
00036
00037 template<class ParcelType>
00038 inline const Foam::fvMesh& Foam::KinematicCloud<ParcelType>::mesh() const
00039 {
00040 return mesh_;
00041 }
00042
00043
00044 template<class ParcelType>
00045 inline const Foam::IOdictionary&
00046 Foam::KinematicCloud<ParcelType>::particleProperties() const
00047 {
00048 return particleProperties_;
00049 }
00050
00051
00052 template<class ParcelType>
00053 inline const typename ParcelType::constantProperties&
00054 Foam::KinematicCloud<ParcelType>::constProps() const
00055 {
00056 return constProps_;
00057 }
00058
00059
00060 template<class ParcelType>
00061 inline const Foam::Switch Foam::KinematicCloud<ParcelType>::active() const
00062 {
00063 return active_;
00064 }
00065
00066
00067 template<class ParcelType>
00068 inline const Foam::Switch Foam::KinematicCloud<ParcelType>::coupled() const
00069 {
00070 return coupled_;
00071 }
00072
00073
00074 template <class ParcelType>
00075 inline const Foam::Switch
00076 Foam::KinematicCloud<ParcelType>::cellValueSourceCorrection() const
00077 {
00078 return cellValueSourceCorrection_;
00079 }
00080
00081
00082 template<class ParcelType>
00083 inline const Foam::volScalarField&
00084 Foam::KinematicCloud<ParcelType>::rho() const
00085 {
00086 return rho_;
00087 }
00088
00089
00090 template<class ParcelType>
00091 inline const Foam::volVectorField& Foam::KinematicCloud<ParcelType>::U() const
00092 {
00093 return U_;
00094 }
00095
00096
00097 template<class ParcelType>
00098 inline const Foam::volScalarField& Foam::KinematicCloud<ParcelType>::mu() const
00099 {
00100 return mu_;
00101 }
00102
00103
00104 template<class ParcelType>
00105 inline const Foam::dimensionedVector&
00106 Foam::KinematicCloud<ParcelType>::g() const
00107 {
00108 return g_;
00109 }
00110
00111
00112 template<class ParcelType>
00113 inline const Foam::particleForces&
00114 Foam::KinematicCloud<ParcelType>::forces() const
00115 {
00116 return forces_;
00117 }
00118
00119
00120 template<class ParcelType>
00121 inline const Foam::dictionary&
00122 Foam::KinematicCloud<ParcelType>::interpolationSchemes() const
00123 {
00124 return interpolationSchemes_;
00125 }
00126
00127
00128 template<class ParcelType>
00129 inline const Foam::DispersionModel<Foam::KinematicCloud<ParcelType> >&
00130 Foam::KinematicCloud<ParcelType>::dispersion() const
00131 {
00132 return dispersionModel_;
00133 }
00134
00135
00136 template<class ParcelType>
00137 inline Foam::DispersionModel<Foam::KinematicCloud<ParcelType> >&
00138 Foam::KinematicCloud<ParcelType>::dispersion()
00139 {
00140 return dispersionModel_();
00141 }
00142
00143
00144 template<class ParcelType>
00145 inline const Foam::DragModel<Foam::KinematicCloud<ParcelType> >&
00146 Foam::KinematicCloud<ParcelType>::drag() const
00147 {
00148 return dragModel_;
00149 }
00150
00151
00152 template<class ParcelType>
00153 inline const Foam::InjectionModel<Foam::KinematicCloud<ParcelType> >&
00154 Foam::KinematicCloud<ParcelType>::injection() const
00155 {
00156 return injectionModel_;
00157 }
00158
00159
00160 template<class ParcelType>
00161 inline const Foam::PatchInteractionModel<Foam::KinematicCloud<ParcelType> >&
00162 Foam::KinematicCloud<ParcelType>::patchInteraction() const
00163 {
00164 return patchInteractionModel_;
00165 }
00166
00167
00168 template<class ParcelType>
00169 inline Foam::InjectionModel<Foam::KinematicCloud<ParcelType> >&
00170 Foam::KinematicCloud<ParcelType>::injection()
00171 {
00172 return injectionModel_();
00173 }
00174
00175
00176 template<class ParcelType>
00177 inline Foam::PostProcessingModel<Foam::KinematicCloud<ParcelType> >&
00178 Foam::KinematicCloud<ParcelType>::postProcessing()
00179 {
00180 return postProcessingModel_();
00181 }
00182
00183
00184 template<class ParcelType>
00185 inline const Foam::vectorIntegrationScheme&
00186 Foam::KinematicCloud<ParcelType>::UIntegrator() const
00187 {
00188 return UIntegrator_;
00189 }
00190
00191
00192 template<class ParcelType>
00193 inline Foam::scalar Foam::KinematicCloud<ParcelType>::massInSystem() const
00194 {
00195 scalar sysMass = 0.0;
00196 forAllConstIter(typename KinematicCloud<ParcelType>, *this, iter)
00197 {
00198 const ParcelType& p = iter();
00199 sysMass += p.mass()*p.nParticle();
00200 }
00201
00202 return sysMass;
00203 }
00204
00205
00206 template<class ParcelType>
00207 inline Foam::Random& Foam::KinematicCloud<ParcelType>::rndGen()
00208 {
00209 return rndGen_;
00210 }
00211
00212
00213 template<class ParcelType>
00214 inline Foam::DimensionedField<Foam::vector, Foam::volMesh>&
00215 Foam::KinematicCloud<ParcelType>::UTrans()
00216 {
00217 return UTrans_;
00218 }
00219
00220
00221 template<class ParcelType>
00222 inline Foam::tmp<Foam::DimensionedField<Foam::vector, Foam::volMesh> >
00223 Foam::KinematicCloud<ParcelType>::SU() const
00224 {
00225 tmp<DimensionedField<vector, volMesh> > tSU
00226 (
00227 new DimensionedField<vector, volMesh>
00228 (
00229 IOobject
00230 (
00231 this->name() + "SU",
00232 this->db().time().timeName(),
00233 this->mesh(),
00234 IOobject::NO_READ,
00235 IOobject::AUTO_WRITE
00236 ),
00237 this->mesh(),
00238 dimensionedVector
00239 (
00240 "zero",
00241 dimDensity*dimVelocity/dimTime,
00242 vector::zero
00243 )
00244 )
00245 );
00246
00247 vectorField& SU = tSU().field();
00248 SU = UTrans_/(mesh_.V()*this->db().time().deltaT());
00249
00250 return tSU;
00251 }
00252
00253
00254 template<class ParcelType>
00255 inline const Foam::tmp<Foam::volScalarField>
00256 Foam::KinematicCloud<ParcelType>::theta() const
00257 {
00258 tmp<volScalarField> ttheta
00259 (
00260 new volScalarField
00261 (
00262 IOobject
00263 (
00264 this->name() + "Theta",
00265 this->db().time().timeName(),
00266 this->db(),
00267 IOobject::NO_READ,
00268 IOobject::NO_WRITE,
00269 false
00270 ),
00271 mesh_,
00272 dimensionedScalar("zero", dimless, 0.0)
00273 )
00274 );
00275
00276 scalarField& theta = ttheta().internalField();
00277 forAllConstIter(typename KinematicCloud<ParcelType>, *this, iter)
00278 {
00279 const ParcelType& p = iter();
00280 const label cellI = p.cell();
00281
00282 theta[cellI] += p.nParticle()*p.volume();
00283 }
00284
00285 theta /= mesh().V();
00286
00287 return ttheta;
00288 }
00289
00290
00291 template<class ParcelType>
00292 inline const Foam::tmp<Foam::volScalarField>
00293 Foam::KinematicCloud<ParcelType>::alpha() const
00294 {
00295 tmp<volScalarField> talpha
00296 (
00297 new volScalarField
00298 (
00299 IOobject
00300 (
00301 this->name() + "Alpha",
00302 this->db().time().timeName(),
00303 this->db(),
00304 IOobject::NO_READ,
00305 IOobject::NO_WRITE,
00306 false
00307 ),
00308 mesh_,
00309 dimensionedScalar("zero", dimless, 0.0)
00310 )
00311 );
00312
00313 scalarField& alpha = talpha().internalField();
00314 forAllConstIter(typename KinematicCloud<ParcelType>, *this, iter)
00315 {
00316 const ParcelType& p = iter();
00317 const label cellI = p.cell();
00318
00319 alpha[cellI] += p.nParticle()*p.mass();
00320 }
00321
00322 alpha /= (mesh().V()*rho_);
00323
00324 return talpha;
00325 }
00326
00327
00328 template<class ParcelType>
00329 inline const Foam::tmp<Foam::volScalarField>
00330 Foam::KinematicCloud<ParcelType>::rhoEff() const
00331 {
00332 tmp<volScalarField> trhoEff
00333 (
00334 new volScalarField
00335 (
00336 IOobject
00337 (
00338 this->name() + "RhoEff",
00339 this->db().time().timeName(),
00340 this->db(),
00341 IOobject::NO_READ,
00342 IOobject::NO_WRITE,
00343 false
00344 ),
00345 mesh_,
00346 dimensionedScalar("zero", dimDensity, 0.0)
00347 )
00348 );
00349
00350 scalarField& rhoEff = trhoEff().internalField();
00351 forAllConstIter(typename KinematicCloud<ParcelType>, *this, iter)
00352 {
00353 const ParcelType& p = iter();
00354 const label cellI = p.cell();
00355
00356 rhoEff[cellI] += p.nParticle()*p.mass();
00357 }
00358
00359 rhoEff /= mesh().V();
00360
00361 return trhoEff;
00362 }
00363
00364
00365