30 template<
class ParcelType>
31 template<
class TrackCloudType>
34 const TrackCloudType& cloud
37 ParcelType::trackingData(cloud),
44 cloud.name() +
":volumeAverage",
45 cloud.db().time().timeName(),
48 cloud.solution().dict(),
58 cloud.name() +
":radiusAverage",
59 cloud.db().time().timeName(),
62 cloud.solution().dict(),
72 cloud.name() +
":rhoAverage",
73 cloud.db().time().timeName(),
76 cloud.solution().dict(),
86 cloud.name() +
":uAverage",
87 cloud.db().time().timeName(),
90 cloud.solution().dict(),
100 cloud.name() +
":uSqrAverage",
101 cloud.db().time().timeName(),
104 cloud.solution().dict(),
114 cloud.name() +
":frequencyAverage",
115 cloud.db().time().timeName(),
118 cloud.solution().dict(),
128 cloud.name() +
":massAverage",
129 cloud.db().time().timeName(),
132 cloud.solution().dict(),
136 part_(tpPredictTrack)
140 template<
class ParcelType>
141 template<
class TrackCloudType>
144 const TrackCloudType& cloud
148 volumeAverage_() = 0;
149 radiusAverage_() = 0;
153 frequencyAverage_() = 0;
163 cloud.name() +
":weightAverage",
164 cloud.db().time().timeName(),
167 cloud.solution().dict(),
176 const typename TrackCloudType::parcelType&
p = iter();
177 const tetIndices tetIs = p.currentTetIndices();
179 const scalar m = p.nParticle()*p.mass();
181 volumeAverage_->add(p.coordinates(), tetIs, p.nParticle()*p.volume());
182 rhoAverage_->add(p.coordinates(), tetIs, m*p.rho());
183 uAverage_->add(p.coordinates(), tetIs, m*p.U());
184 massAverage_->add(p.coordinates(), tetIs, m);
186 volumeAverage_->average();
187 massAverage_->average();
188 rhoAverage_->average(massAverage_);
189 uAverage_->average(massAverage_);
194 const typename TrackCloudType::parcelType&
p = iter();
195 const tetIndices tetIs = p.currentTetIndices();
197 const vector u = uAverage_->interpolate(p.coordinates(), tetIs);
203 p.nParticle()*p.mass()*
magSqr(p.U() - u)
206 uSqrAverage_->average(massAverage_);
209 radiusAverage_() = volumeAverage_();
213 const typename TrackCloudType::parcelType&
p = iter();
214 const tetIndices tetIs = p.currentTetIndices();
220 p.nParticle()*
pow(p.volume(), 2.0/3.0)
224 radiusAverage_->average(weightAverage);
230 const typename TrackCloudType::parcelType&
p = iter();
231 const tetIndices tetIs = p.currentTetIndices();
233 const scalar a = volumeAverage_->interpolate(p.coordinates(), tetIs);
234 const scalar r = radiusAverage_->interpolate(p.coordinates(), tetIs);
235 const vector u = uAverage_->interpolate(p.coordinates(), tetIs);
237 const scalar
f = 0.75*a/
pow3(r)*
sqr(0.5*p.d() + r)*
mag(p.U() - u);
239 frequencyAverage_->add(p.coordinates(), tetIs, p.nParticle()*f*
f);
241 weightAverage.
add(p.coordinates(), tetIs, p.nParticle()*
f);
243 frequencyAverage_->average(weightAverage);
247 template<
class ParcelType>
255 template<
class ParcelType>
dimensionedSymmTensor sqr(const dimensionedVector &dv)
trackPart part() const
Access.
virtual void add(const barycentric &coordinates, const tetIndices &tetIs, const Type &value)=0
Member Functions.
Base class for lagrangian averaging methods.
Storage and named access for the indices of a tet which is part of the decomposition of a cell...
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
void updateAverages(const TrackCloudType &cloud)
Update the MPPIC averages.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
trackingData(const TrackCloudType &cloud)
Constructors.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar pow3(const dimensionedScalar &ds)
virtual void average()
Calculate the average.
dimensioned< scalar > mag(const dimensioned< Type > &)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...