33 template<
class ParcelType>
34 template<
class TrackCloudType>
37 const TrackCloudType&
cloud,
144 template<
class ParcelType>
145 template<
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);
189 volumeAverage_->average();
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)
215 const tetIndices tetIs =
p.currentTetIndices();
221 p.nParticle()*
pow(
p.volume(), 2.0/3.0)
225 radiusAverage_->average(weightAverage);
229 for (
const typename TrackCloudType::parcelType&
p : cloud)
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>
trackingData(const TrackCloudType &cloud, trackPart part=tpLinearTrack)
Constructors.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const word & name() const noexcept
Return the object name.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
trackPart part() const
Access.
virtual void add(const barycentric &coordinates, const tetIndices &tetIs, const Type &value)=0
Member Functions.
static word scopedName(const std::string &scope, const word &name)
Create scope:name or scope_name string.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
const Time & time() const noexcept
Return time registry.
A cloud is a registry collection of lagrangian particles.
Base class for lagrangian averaging methods.
const objectRegistry & db() const noexcept
Return the local objectRegistry.
Storage and named access for the indices of a tet which is part of the decomposition of a cell...
void updateAverages(const TrackCloudType &cloud)
Update the MPPIC averages.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar pow3(const dimensionedScalar &ds)
virtual void average()
Calculate the average.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Selector class for relaxation factors, solver type and solution.
Defines the attributes of an object for which implicit objectRegistry management is supported...
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)