33 template<
class ParcelType>
34 template<
class TrackCloudType>
37 const TrackCloudType&
cloud,
174 template<
class ParcelType>
182 template<
class ParcelType>
190 template<
class ParcelType>
198 template<
class ParcelType>
206 template<
class ParcelType>
214 template<
class ParcelType>
221 template<
class ParcelType>
229 template<
class ParcelType>
236 template<
class ParcelType>
243 template<
class ParcelType>
250 template<
class ParcelType>
258 template<
class ParcelType>
266 template<
class ParcelType>
267 template<
class TrackCloudType>
271 const TrackCloudType&
cloud 275 volumeAverage_() = 0;
276 radiusAverage_() = 0;
280 frequencyAverage_() = 0;
294 cloud.solution().dict(),
301 for (
const typename TrackCloudType::parcelType&
p :
cloud)
305 const scalar m =
p.nParticle()*
p.mass();
307 volumeAverage_->add(
p.coordinates(), tetIs,
p.nParticle()*
p.volume());
308 rhoAverage_->add(
p.coordinates(), tetIs, m*
p.rho());
309 uAverage_->add(
p.coordinates(), tetIs, m*
p.U());
310 massAverage_->add(
p.coordinates(), tetIs, m);
312 volumeAverage_->average();
313 massAverage_->average();
314 rhoAverage_->average(*massAverage_);
315 uAverage_->average(*massAverage_);
318 for (
const typename TrackCloudType::parcelType&
p :
cloud)
322 const vector u = uAverage_->interpolate(
p.coordinates(), tetIs);
331 uSqrAverage_->average(*massAverage_);
334 radiusAverage_() = volumeAverage_();
336 for (
const typename TrackCloudType::parcelType&
p : cloud)
338 const tetIndices tetIs =
p.currentTetIndices();
344 p.nParticle()*
pow(
p.volume(), 2.0/3.0)
348 radiusAverage_->average(weightAverage);
352 for (
const typename TrackCloudType::parcelType&
p : cloud)
354 const tetIndices tetIs =
p.currentTetIndices();
356 const scalar a = volumeAverage_->interpolate(
p.coordinates(), tetIs);
357 const scalar r = radiusAverage_->interpolate(
p.coordinates(), tetIs);
358 const vector u = uAverage_->interpolate(
p.coordinates(), tetIs);
360 const scalar
f = 0.75*a/
pow3(r)*
sqr(0.5*
p.d() + r)*
mag(
p.U() - u);
362 frequencyAverage_->add(
p.coordinates(), tetIs,
p.nParticle()*
f*
f);
364 weightAverage.
add(
p.coordinates(), tetIs,
p.nParticle()*
f);
366 frequencyAverage_->average(weightAverage);
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.
const interpolation< vector > & UInterp() const
Return const access to the interpolator for continuous phase velocity field.
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.
trackPart part() const
Return the part of the tracking operation taking place.
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...
const uniformDimensionedVectorField & g
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.
scalar rhoc() const
Return the continuous phase density.
scalar muc() const
Return the continuous phase viscosity.
trackingData(const TrackCloudType &cloud, trackPart part=tpLinearTrack)
Construct from components.
const dimensionedScalar mu
Atomic mass unit.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar pow3(const dimensionedScalar &ds)
virtual void average()
Calculate the average.
const interpolation< scalar > & rhoInterp() const
Return const access to the interpolator for continuous phase density field.
Abstract base class for volume field interpolation.
const interpolation< scalar > & muInterp() const
Return const access to the interpolator for continuous phase dynamic viscosity field.
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...
const vector & Uc() const
Return the continuous phase velocity.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)
void updateAverages(const TrackCloudType &cloud)
Update the MPPIC averages.