33template<
class CloudType>
44template<
class CloudType>
56template<
class CloudType>
63template<
class CloudType>
66 static bool isCached =
true;
67 static scalar xCached;
83 x = 2.0*
rndGen.sample01<scalar>() - 1.0;
84 y = 2.0*
rndGen.sample01<scalar>() - 1.0;
86 }
while (m >= 1.0 || m == 0.0);
99template<
class CloudType>
103 const scalar deltaT(this->owner().db().time().deltaTValue());
106 const scalar oneBySqrtThree =
sqrt(1.0/3.0);
111 this->owner().name() +
":volumeAverage"
116 this->owner().name() +
":radiusAverage"
121 this->owner().name() +
":uAverage"
126 this->owner().name() +
":uSqrAverage"
131 this->owner().name() +
":frequencyAverage"
136 this->owner().name() +
":massAverage"
146 this->owner().
name() +
":exponentAverage",
147 this->owner().db().time().
timeName(),
159 *this->timeScaleModel_->oneByTau
173 const scalar
x = exponentAverage.
interpolate(
p.coordinates(), tetIs);
175 if (
x <
rndGen.sample01<scalar>())
177 const vector r(sampleGauss(), sampleGauss(), sampleGauss());
183 p.U() = u + r*uRms*oneBySqrtThree;
194 this->owner().
name() +
":uTildeAverage",
195 this->owner().db().time().
timeName(),
206 uTildeAverage.
add(
p.coordinates(), tetIs,
p.nParticle()*
p.mass()*
p.U());
208 uTildeAverage.
average(massAverage);
216 this->owner().
name() +
":uTildeSqrAverage",
217 this->owner().db().time().
timeName(),
233 p.nParticle()*
p.mass()*
magSqr(
p.U() - uTilde)
236 uTildeSqrAverage.
average(massAverage);
248 const scalar uTildeRms =
254 p.U() = u + (
p.U() - uTilde)*uRms/
max(uTildeRms, SMALL);
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.
virtual Type interpolate(const barycentric &coordinates, const tetIndices &tetIs) const =0
Interpolate.
Templated base class for dsmc cloud.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Base class for collisional return-to-isotropy models.
Stochastic return-to-isotropy model.
virtual ~Stochastic()
Destructor.
virtual void calculate()
Member Functions.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh data needed to do the Finite Volume discretisation.
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.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedScalar exp(const dimensionedScalar &ds)
dimensionedScalar log(const dimensionedScalar &ds)
dimensionedScalar sqrt(const dimensionedScalar &ds)
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)