30 template<
class CloudType>
41 template<
class CloudType>
53 template<
class CloudType>
60 template<
class CloudType>
63 static bool isCached =
true;
64 static scalar xCached;
80 x = 2.0*
rndGen.sample01<scalar>() - 1.0;
81 y = 2.0*
rndGen.sample01<scalar>() - 1.0;
83 }
while (m >= 1.0 || m == 0.0);
96 template<
class CloudType>
100 const scalar deltaT(this->owner().db().time().deltaTValue());
103 const scalar oneBySqrtThree =
sqrt(1.0/3.0);
108 this->owner().name() +
":volumeAverage"
113 this->owner().name() +
":radiusAverage"
118 this->owner().name() +
":uAverage"
123 this->owner().name() +
":uSqrAverage"
128 this->owner().name() +
":frequencyAverage"
133 this->owner().name() +
":massAverage"
143 this->owner().
name() +
":exponentAverage",
144 this->owner().db().time().
name(),
156 *this->timeScaleModel_->oneByTau
171 const scalar
x = exponentAverage.
interpolate(
p.coordinates(), tetIs);
173 if (
x <
rndGen.sample01<scalar>())
175 const vector r(sampleGauss(), sampleGauss(), sampleGauss());
181 p.U() = u + r*uRms*oneBySqrtThree;
192 this->owner().
name() +
":uTildeAverage",
193 this->owner().db().time().
name(),
205 uTildeAverage.
add(
p.coordinates(), tetIs,
p.nParticle()*
p.mass()*
p.U());
207 uTildeAverage.
average(massAverage);
215 this->owner().
name() +
":uTildeSqrAverage",
216 this->owner().db().time().
name(),
233 p.nParticle()*
p.mass()*
magSqr(
p.U() - uTilde)
236 uTildeSqrAverage.
average(massAverage);
249 const scalar uTildeRms =
255 p.U() = u + (
p.U() - uTilde)*uRms/
max(uTildeRms, small);
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
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.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Base class for collisional return-to-isotropy models.
Stochastic return-to-isotropy model.
virtual ~Stochastic()
Destructor.
Stochastic(const dictionary &dict, CloudType &owner)
Construct from components.
virtual void calculate()
Member Functions.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A list of keyword definitions, which are a keyword followed by any number of values (e....
Mesh data needed to do the Finite Volume discretisation.
const polyMesh & mesh() const
Return reference to polyMesh.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
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.
dimensionedScalar exp(const dimensionedScalar &ds)
word name(const bool)
Return a word representation of a bool.
dimensionedScalar log(const dimensionedScalar &ds)
dimensionedScalar sqrt(const dimensionedScalar &ds)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
randomGenerator rndGen(653213)