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)
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...
dimensionedScalar sqrt(const dimensionedScalar &ds)
bool ownGradK_
Take ownership of the grad(k)
label k
Boltzmann constant.
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m^2/K^4].
Calculate the gradient of the given field.
Random & rndGen()
Return references to the random object.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
const volVectorField * gradkPtr_
Gradient of k.
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 references to the mesh.
Template functions to aid in the implementation of demand driven data.
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.