30 template<
class ParcelType>
31 template<
class TrackCloudType>
34 const TrackCloudType& cloud,
38 ParcelType::trackingData(cloud),
45 cloud.name() +
":volumeAverage",
46 cloud.db().time().timeName(),
49 cloud.solution().dict(),
59 cloud.name() +
":radiusAverage",
60 cloud.db().time().timeName(),
63 cloud.solution().dict(),
73 cloud.name() +
":rhoAverage",
74 cloud.db().time().timeName(),
77 cloud.solution().dict(),
87 cloud.name() +
":uAverage",
88 cloud.db().time().timeName(),
91 cloud.solution().dict(),
101 cloud.name() +
":uSqrAverage",
102 cloud.db().time().timeName(),
105 cloud.solution().dict(),
115 cloud.name() +
":frequencyAverage",
116 cloud.db().time().timeName(),
119 cloud.solution().dict(),
129 cloud.name() +
":massAverage",
130 cloud.db().time().timeName(),
133 cloud.solution().dict(),
141 template<
class ParcelType>
142 template<
class TrackCloudType>
145 const TrackCloudType& cloud
149 volumeAverage_() = 0;
150 radiusAverage_() = 0;
154 frequencyAverage_() = 0;
164 cloud.name() +
":weightAverage",
165 cloud.db().time().timeName(),
168 cloud.solution().dict(),
177 const typename TrackCloudType::parcelType&
p = iter();
178 const tetIndices tetIs = p.currentTetIndices();
180 const scalar m = p.nParticle()*p.mass();
182 volumeAverage_->add(p.coordinates(), tetIs, p.nParticle()*p.volume());
183 rhoAverage_->add(p.coordinates(), tetIs, m*p.rho());
184 uAverage_->add(p.coordinates(), tetIs, m*p.U());
185 massAverage_->add(p.coordinates(), tetIs, m);
187 volumeAverage_->average();
188 massAverage_->average();
189 rhoAverage_->average(massAverage_);
190 uAverage_->average(massAverage_);
195 const typename TrackCloudType::parcelType&
p = iter();
196 const tetIndices tetIs = p.currentTetIndices();
198 const vector u = uAverage_->interpolate(p.coordinates(), tetIs);
204 p.nParticle()*p.mass()*
magSqr(p.U() - u)
207 uSqrAverage_->average(massAverage_);
210 radiusAverage_() = volumeAverage_();
214 const typename TrackCloudType::parcelType&
p = iter();
215 const tetIndices tetIs = p.currentTetIndices();
221 p.nParticle()*
pow(p.volume(), 2.0/3.0)
225 radiusAverage_->average(weightAverage);
231 const typename TrackCloudType::parcelType&
p = iter();
232 const tetIndices tetIs = p.currentTetIndices();
234 const scalar a = volumeAverage_->interpolate(p.coordinates(), tetIs);
235 const scalar r = radiusAverage_->interpolate(p.coordinates(), tetIs);
236 const vector u = uAverage_->interpolate(p.coordinates(), tetIs);
238 const scalar
f = 0.75*a/
pow3(r)*
sqr(0.5*p.d() + r)*
mag(p.U() - u);
240 frequencyAverage_->add(p.coordinates(), tetIs, p.nParticle()*f*
f);
242 weightAverage.
add(p.coordinates(), tetIs, p.nParticle()*
f);
244 frequencyAverage_->average(weightAverage);
248 template<
class ParcelType>
256 template<
class ParcelType>
trackingData(const TrackCloudType &cloud, trackPart part=tpLinearTrack)
Constructors.
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 > &)
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...