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
169 const tetIndices tetIs(p.currentTetIndices());
171 const scalar
x = exponentAverage.
interpolate(p.coordinates(), 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(),
204 const tetIndices tetIs(p.currentTetIndices());
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().
timeName(),
227 const tetIndices tetIs(p.currentTetIndices());
233 p.nParticle()*p.mass()*
magSqr(p.U() - uTilde)
236 uTildeSqrAverage.
average(massAverage);
242 const tetIndices tetIs(p.currentTetIndices());
249 const scalar uTildeRms =
255 p.U() = u + (p.U() - uTilde)*uRms/
max(uTildeRms, small);
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar log(const dimensionedScalar &ds)
A list of keyword definitions, which are a keyword followed by any number of values (e...
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 barycentric &coordinates, 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()
Advance the state and return a sample of a given type from a.
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 Type interpolate(const barycentric &coordinates, const tetIndices &tetIs) const =0
Interpolate.
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.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Templated base class for dsmc cloud.