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();
75 <<
"Turbulence model not found in mesh database" <<
nl 76 <<
"Database objects include: " << obr.sortedToc()
79 return tmp<volScalarField>(NULL);
86 template<
class CloudType>
95 rndGen_(owner.rndGen()),
103 template<
class CloudType>
110 rndGen_(bmf.rndGen_),
111 lambda_(bmf.lambda_),
112 turbulence_(bmf.turbulence_),
120 template<
class CloudType>
127 template<
class CloudType>
158 template<
class CloudType>
170 const scalar dp = p.d();
171 const scalar Tc = p.Tc();
173 const scalar eta = rndGen_.sample01<scalar>();
174 const scalar
alpha = 2.0*lambda_/dp;
175 const scalar cc = 1.0 + alpha*(1.257 + 0.4*
exp(-1.1/alpha));
182 const label celli = p.cell();
184 const scalar kc = k[celli];
186 f = eta/mass*
sqrt(2.0*
sqr(kc)*
sqr(Tc)/(Dp*dt));
195 const scalar sqrt2 =
sqrt(2.0);
196 for (
label i = 0; i < 3; i++)
198 const scalar x = rndGen_.sample01<scalar>();
199 const scalar eta = sqrt2*erfInv(2*x - 1.0);
200 value.
Su()[i] = mass*f*eta;
const char *const group
Group name for atomic constants.
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 log(const dimensionedScalar &ds)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
dimensionedScalar sqrt(const dimensionedScalar &ds)
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m2/K4].
Abstract base class for particle forces.
const vector & Su() const
Return const access to the explicit contribution [kg.m/s2].
const Type & value() const
Return const reference to value.
const fvMesh & mesh() const
Return the mesh database.
dimensionedScalar pow5(const dimensionedScalar &ds)
Helper container for force Su and Sp terms.
stressControl lookup("compactNormalStress") >> compactNormalStress
dimensionedScalar exp(const dimensionedScalar &ds)
static const word propertiesName
Default name of the turbulence properties dictionary.
static word groupName(Name name, const word &group)
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
errorManip< error > abort(error &err)
BrownianMotionForce(CloudType &owner, const fvMesh &mesh, const dictionary &dict)
Construct from mesh.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
T * ptr() const
Return tmp pointer for reuse.
virtual void cacheFields(const bool store)
Cache fields.
Template functions to aid in the implementation of demand driven data.
virtual forceSuSp calcCoupled(const typename CloudType::parcelType &p, const scalar dt, const scalar mass, const scalar Re, const scalar muc) const
Calculate the coupled force.
Mesh data needed to do the Finite Volume discretisation.
bool isTmp() const
Return true if this is really a temporary object.
virtual ~BrownianMotionForce()
Destructor.
A class for managing temporary objects.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
void deleteDemandDrivenData(DataPtr &dataPtr)
Templated base class for dsmc cloud.
Calculates particle Brownian motion force.