33template<
class ParcelType>
34template<
class TrackCloudType>
37 const TrackCloudType&
cloud,
144template<
class ParcelType>
145template<
class TrackCloudType>
148 const TrackCloudType&
cloud
152 volumeAverage_() = 0;
153 radiusAverage_() = 0;
157 frequencyAverage_() = 0;
171 cloud.solution().dict(),
178 for (
const typename TrackCloudType::parcelType&
p :
cloud)
182 const scalar m =
p.nParticle()*
p.mass();
184 volumeAverage_->add(
p.coordinates(), tetIs,
p.nParticle()*
p.volume());
185 rhoAverage_->add(
p.coordinates(), tetIs, m*
p.rho());
186 uAverage_->add(
p.coordinates(), tetIs, m*
p.U());
187 massAverage_->add(
p.coordinates(), tetIs, m);
190 massAverage_->average();
191 rhoAverage_->average(*massAverage_);
192 uAverage_->average(*massAverage_);
195 for (
const typename TrackCloudType::parcelType&
p :
cloud)
199 const vector u = uAverage_->interpolate(
p.coordinates(), tetIs);
208 uSqrAverage_->average(*massAverage_);
211 radiusAverage_() = volumeAverage_();
213 for (
const typename TrackCloudType::parcelType&
p :
cloud)
221 p.nParticle()*
pow(
p.volume(), 2.0/3.0)
225 radiusAverage_->average(weightAverage);
229 for (
const typename TrackCloudType::parcelType&
p :
cloud)
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);
247template<
class ParcelType>
255template<
class ParcelType>
Base class for lagrangian averaging methods.
virtual void add(const barycentric &coordinates, const tetIndices &tetIs, const Type &value)=0
Member Functions.
virtual void average()
Calculate the average.
dimensioned< Type > average() const
Calculate and return arithmetic average.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
const objectRegistry & db() const noexcept
Return the local objectRegistry.
trackPart part() const
Access.
void updateAverages(const TrackCloudType &cloud)
Update the MPPIC averages.
static word timeName(const scalar t, const int precision=precision_)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A cloud is a registry collection of lagrangian particles.
Class used to pass data into container.
const Time & time() const noexcept
Return time registry.
Selector class for relaxation factors, solver type and solution.
Storage and named access for the indices of a tet which is part of the decomposition of a cell.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)