34 template<
class CloudType>
47 template<
class CloudType>
54 gradkPtr_(dm.gradkPtr_),
55 ownGradK_(dm.ownGradK_)
63 template<
class CloudType>
72 template<
class CloudType>
79 gradkPtr_ =
fvc::grad(*this->kPtr_).ptr();
94 template<
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)
130 const vector dir = -gradk/(
mag(gradk) + SMALL);
138 if (this->owner().mesh().nSolutionD() == 2)
140 fac = rnd.GaussNormal<scalar>();
144 fac =
mag(rnd.GaussNormal<scalar>());
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.
GradientDispersionRAS(const dictionary &dict, CloudType &owner)
Construct from components.
virtual vector update(const scalar dt, const label celli, const vector &U, const vector &Uc, vector &UTurb, scalar &tTurb)
Update (disperse particles)
bool ownGradK_
Take ownership of the grad(k)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
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)
void deleteDemandDrivenData(DataPtr &dataPtr)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
dimensionedScalar sqrt(const dimensionedScalar &ds)
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)
Calculate the second temporal derivative.
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)