Go to the documentation of this file.
33 template<
class CloudType>
44 template<
class CloudType>
56 template<
class CloudType>
63 template<
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);
99 template<
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);
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Selector class for relaxation factors, solver type and solution.
dimensionedScalar exp(const dimensionedScalar &ds)
Random & rndGen()
Return reference to the random object.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
const fvMesh & mesh() const
Return reference to the mesh.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Templated base class for dsmc cloud.
virtual void add(const barycentric &coordinates, const tetIndices &tetIs, const Type &value)=0
Member Functions.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
dimensionedScalar log(const dimensionedScalar &ds)
Mesh data needed to do the Finite Volume discretisation.
virtual Type interpolate(const barycentric &coordinates, const tetIndices &tetIs) const =0
Interpolate.
Storage and named access for the indices of a tet which is part of the decomposition of a cell.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Stochastic(const dictionary &dict, CloudType &owner)
Construct from components.
dimensionedScalar sqrt(const dimensionedScalar &ds)
virtual void calculate()
Member Functions.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Base class for collisional return-to-isotropy models.
virtual void average()
Calculate the average.
virtual ~Stochastic()
Destructor.
Stochastic return-to-isotropy model.