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);
140 fac = rnd.GaussNormal<scalar>();
144 fac =
mag(rnd.GaussNormal<scalar>());
The velocity is perturbed in the direction of -grad(k), with a Gaussian random number distribution wi...
virtual ~GradientDispersionRAS()
Destructor.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Calculate the second temporal derivative.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
dimensionedScalar sqrt(const dimensionedScalar &ds)
bool ownGradK_
Take ownership of the grad(k)
label k
Boltzmann constant.
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)
virtual void cacheFields(const bool store)
Cache carrier fields.
Calculate the gradient of the given field.
Random & rndGen()
Return reference to the random object.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
label nSolutionD() const
Return the number of valid solved-for dimensions in the mesh.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const fvMesh & mesh() const
Return reference to the mesh.
Template functions to aid in the implementation of demand driven data.
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)
Base class for particle dispersion models based on RAS turbulence.
void deleteDemandDrivenData(DataPtr &dataPtr)
Templated base class for dsmc cloud.
virtual void cacheFields(const bool store)
Cache carrier fields.
static constexpr const zero Zero
Global zero (0)