32 template<
class CloudType>
45 template<
class CloudType>
61 template<
class CloudType>
70 template<
class CloudType>
77 gradkPtr_ =
fvc::grad(*this->kPtr_).ptr();
92 template<
class CloudType>
105 const scalar cps = 0.16432;
107 const scalar
k = this->kPtr_->primitiveField()[celli];
109 this->epsilonPtr_->primitiveField()[celli] + ROOTVSMALL;
110 const vector& gradk = this->gradkPtr_->primitiveField()[celli];
112 const scalar UrelMag =
mag(U - Uc - UTurb);
114 const scalar tTurbLoc =
115 min(k/epsilon, cps*
pow(k, 1.5)/epsilon/(UrelMag + SMALL));
123 if (tTurb > tTurbLoc)
128 const vector dir = -gradk/(
mag(gradk) + SMALL);
145 UTurb = sigma*fac*dir;
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)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensionedScalar sqrt(const dimensionedScalar &ds)
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m2/K4].
bool ownGradK_
Take ownership of the grad(k)
label nSolutionD() const
Return the number of valid solved-for dimensions in the mesh.
label k
Boltzmann constant.
Type GaussNormal()
Return a sample whose components are normally distributed.
Calculate the gradient of the given field.
Random & rndGen()
Return refernce to the random object.
const volVectorField * gradkPtr_
Gradient of k.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Template functions to aid in the implementation of demand driven data.
const fvMesh & mesh() const
Return refernce to the mesh.
GradientDispersionRAS(const dictionary &dict, CloudType &owner)
Construct from components.
dimensioned< scalar > mag(const dimensioned< Type > &)
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.