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().
timeName(),
156 *this->timeScaleModel_->oneByTau
171 const scalar
x = exponentAverage.
interpolate(p.position(), tetIs);
175 const vector r(sampleGauss(), sampleGauss(), sampleGauss());
181 p.U() = u + r*uRms*oneBySqrtThree;
192 this->owner().
name() +
":uTildeAverage",
193 this->owner().db().time().
timeName(),
205 uTildeAverage.
add(p.position(), tetIs, p.nParticle()*p.mass()*p.U());
207 uTildeAverage.
average(massAverage);
215 this->owner().
name() +
":uTildeSqrAverage",
216 this->owner().db().time().
timeName(),
233 p.nParticle()*p.mass()*
magSqr(p.U() - uTilde)
236 uTildeSqrAverage.
average(massAverage);
249 const scalar uTildeRms =
252 p.U() = u + (p.U() - uTilde)*uRms/
max(uTildeRms, SMALL);
cachedRandom rndGen(label(0),-1)
dimensionedScalar log(const dimensionedScalar &ds)
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
Stochastic return-to-isotropy model.
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
dimensionedScalar sqrt(const dimensionedScalar &ds)
virtual void add(const point position, const tetIndices &tetIs, const Type &value)=0
Member Functions.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
Type sample01()
Return a sample whose components lie in the range 0-1.
dimensionedScalar exp(const dimensionedScalar &ds)
Storage and named access for the indices of a tet which is part of the decomposition of a cell...
Stochastic(const dictionary &dict, CloudType &owner)
Construct from components.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
word name(const complex &)
Return a string representation of a complex.
Base class for collisional return-to-isotropy models.
virtual ~Stochastic()
Destructor.
virtual void calculate()
Member Functions.
virtual void average()
Calculate the average.
Mesh data needed to do the Finite Volume discretisation.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Selector class for relaxation factors, solver type and solution.
virtual Type interpolate(const point position, const tetIndices &tetIs) const =0
Interpolate.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Templated base class for dsmc cloud.