35 template<
class CloudType>
38 const scalar a = 0.147;
40 scalar h =
log(1.0 - y*y)/a;
54 template<
class CloudType>
58 const objectRegistry& obr = this->owner().
mesh();
76 "Foam::tmp<Foam::volScalarField>" 77 "Foam::DispersionRASModel<CloudType>::kModel() const" 79 <<
"Turbulence model not found in mesh database" <<
nl 80 <<
"Database objects include: " << obr.sortedToc()
83 return tmp<volScalarField>(NULL);
90 template<
class CloudType>
99 rndGen_(owner.rndGen()),
107 template<
class CloudType>
114 rndGen_(bmf.rndGen_),
115 lambda_(bmf.lambda_),
116 turbulence_(bmf.turbulence_),
124 template<
class CloudType>
131 template<
class CloudType>
146 kPtr_ = tk.operator->();
162 template<
class CloudType>
174 const scalar dp = p.d();
175 const scalar Tc = p.Tc();
177 const scalar eta = rndGen_.sample01<scalar>();
178 const scalar
alpha = 2.0*lambda_/dp;
179 const scalar cc = 1.0 + alpha*(1.257 + 0.4*
exp(-1.1/alpha));
186 const label cellI = p.cell();
188 const scalar kc = k[cellI];
190 f = eta/mass*
sqrt(2.0*
sqr(kc)*
sqr(Tc)/(Dp*dt));
194 const scalar rhoRatio = p.rho()/p.rhoc();
200 const scalar sqrt2 =
sqrt(2.0);
201 for (
label i = 0; i < 3; i++)
203 const scalar x = rndGen_.sample01<scalar>();
204 const scalar eta = sqrt2*erfInv(2*x - 1.0);
205 value.
Su()[i] = mass*f*eta;
dimensionedScalar sqrt(const dimensionedScalar &ds)
T * ptr() const
Return tmp pointer for reuse.
Mesh data needed to do the Finite Volume discretisation.
BrownianMotionForce(CloudType &owner, const fvMesh &mesh, const dictionary &dict)
Construct from mesh.
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m2/K4].
const char *const group
Group name for atomic constants.
bool isTmp() const
Return true if this is really a temporary object.
void deleteDemandDrivenData(DataPtr &dataPtr)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedScalar exp(const dimensionedScalar &ds)
A list of keyword definitions, which are a keyword followed by any number of values (e...
ParcelType parcelType
Type of parcel the cloud was instantiated for.
static word groupName(Name name, const word &group)
const vector & Su() const
Return const access to the explicit contribution [kg.m/s2].
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
Calculates particle Brownian motion force.
dimensionedScalar log(const dimensionedScalar &ds)
virtual forceSuSp calcCoupled(const typename CloudType::parcelType &p, const scalar dt, const scalar mass, const scalar Re, const scalar muc) const
Calculate the non-coupled force.
stressControl lookup("compactNormalStress") >> compactNormalStress
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
virtual ~BrownianMotionForce()
Destructor.
Template functions to aid in the implementation of demand driven data.
errorManip< error > abort(error &err)
virtual void cacheFields(const bool store)
Cache fields.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
const fvMesh & mesh() const
Return the mesh database.
Abstract base class for particle forces.
dimensionedScalar pow5(const dimensionedScalar &ds)
static const word propertiesName
Default name of the turbulence properties dictionary.
Templated base class for dsmc cloud.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
A class for managing temporary objects.
const Type & value() const
Return const reference to value.
Helper container for force Su and Sp terms.