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>
109 const scalar cps = 0.16432;
111 const scalar
k = this->kPtr_->primitiveField()[celli];
113 this->epsilonPtr_->primitiveField()[celli] + rootVSmall;
114 const vector& gradk = this->gradkPtr_->primitiveField()[celli];
116 const scalar UrelMag =
mag(
U - Uc - UTurb);
118 const scalar tTurbLoc =
127 if (tTurb > tTurbLoc)
132 const vector dir = -gradk/(
mag(gradk) + small);
140 if (this->owner().mesh().nSolutionD() == 2)
149 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)
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Standard normal distribution. Not selectable.
virtual scalar sample() const
Sample the distribution.
const polyMesh & mesh() const
Return reference to polyMesh.
Mesh consisting of general polyhedral cells.
const Vector< label > & solutionD() const
Return the vector of solved-for directions in mesh.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
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(DataType *&dataPtr)
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
void pow(LagrangianPatchField< typename powProduct< Type, r >::type > &f, const LagrangianPatchField< Type > &f1)
void sqrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)