34template<
class CloudType>
47template<
class CloudType>
54 gradkPtr_(dm.gradkPtr_),
55 ownGradK_(dm.ownGradK_)
63template<
class CloudType>
72template<
class CloudType>
79 gradkPtr_ =
fvc::grad(*this->kPtr_).ptr();
94template<
class CloudType>
105 Random& rnd = this->owner().rndGen();
107 const scalar cps = 0.16432;
109 const scalar
k = this->kPtr_->primitiveField()[celli];
111 this->epsilonPtr_->primitiveField()[celli] + ROOTVSMALL;
112 const vector& gradk = this->gradkPtr_->primitiveField()[celli];
114 const scalar UrelMag =
mag(
U - Uc - UTurb);
116 const scalar tTurbLoc =
125 if (tTurb > tTurbLoc)
129 const scalar sigma =
sqrt(2.0*
k/3.0);
130 const vector dir = -gradk/(
mag(gradk) + SMALL);
138 if (this->owner().mesh().nSolutionD() == 2)
147 UTurb = sigma*
fac*dir;
Templated base class for dsmc cloud.
Base class for particle dispersion models based on RAS turbulence.
virtual void cacheFields(const bool store)
Cache carrier fields.
The velocity is perturbed in the direction of -grad(k), with a Gaussian random number distribution wi...
virtual ~GradientDispersionRAS()
Destructor.
virtual void cacheFields(const bool store)
Cache carrier fields.
bool ownGradK_
Take ownership of the grad(k)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool update()
Update the mesh for both mesh motion and topology change.
Template functions to aid in the implementation of demand driven data.
Calculate the gradient of the given field.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
static constexpr const zero Zero
Global zero (0)
void deleteDemandDrivenData(DataPtr &dataPtr)
Calculate the second temporal derivative.