32 template<
class CloudType>
45 template<
class CloudType>
52 gradkPtr_(dm.gradkPtr_),
53 ownGradK_(dm.ownGradK_)
61 template<
class CloudType>
70 template<
class CloudType>
77 gradkPtr_ =
fvc::grad(*this->kPtr_).ptr();
92 template<
class CloudType>
103 Random& rnd = this->owner().rndGen();
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 =
123 if (tTurb > tTurbLoc)
128 const vector dir = -gradk/(
mag(gradk) + small);
136 if (this->owner().mesh().nSolutionD() == 2)
145 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.
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)
scalar scalarNormal()
Advance the state and return a scalar sample from a normal.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Template functions to aid in the implementation of demand driven data.
Calculate the gradient of the given field.
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m^2/K^4].
tmp< VolField< typename outerProduct< vector, Type >::type > > grad(const SurfaceField< Type > &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.
void deleteDemandDrivenData(DataPtr &dataPtr)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< scalar > mag(const dimensioned< Type > &)