39 template<
class CloudType>
43 const objectRegistry& obr = this->owner().
mesh();
59 <<
"Turbulence model not found in mesh database" <<
nl 60 <<
"Database objects include: " << obr.sortedToc()
69 template<
class CloudType>
79 lambda_(this->coeffs().getScalar(
"lambda")),
81 turbulence_(this->coeffs().getBool(
"turbulence")),
83 useSpherical_(this->coeffs().getOrDefault(
"spherical", true))
87 template<
class CloudType>
97 turbulence_(bmf.turbulence_),
99 useSpherical_(bmf.useSpherical_)
105 template<
class CloudType>
118 template<
class CloudType>
125 tmp<volScalarField> tk = kModel();
150 template<
class CloudType>
154 const typename CloudType::parcelType::trackingData&
td,
161 forceSuSp value(
Zero);
163 const scalar dp =
p.d();
164 const scalar Tc =
td.Tc();
166 const scalar
alpha = 2.0*lambda_/dp;
175 const label celli =
p.cell();
177 const scalar kc =
k[celli];
188 Random& rnd = this->owner().rndGen();
193 const scalar theta = rnd.sample01<scalar>()*
twoPi;
194 const scalar u = 2*rnd.sample01<scalar>() - 1;
196 const scalar a =
sqrt(1 -
sqr(u));
199 value.Su() =
f*
mag(rnd.GaussNormal<scalar>())*dir;
204 value.Su() =
f*rnd.GaussNormal<
vector>();
Different types of constants.
const Type & value() const noexcept
Return const reference to value.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
constexpr char nl
The newline '\n' character (0x0a)
compressible::turbulenceModel & turb
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
dimensionedScalar sqrt(const dimensionedScalar &ds)
Abstract base class for particle forces.
label k
Boltzmann constant.
dimensionedScalar pow5(const dimensionedScalar &ds)
Fundamental dimensioned constants.
constexpr const char *const group
Group name for atomic constants.
Helper container for force Su and Sp terms.
const fvMesh & mesh() const noexcept
Return the mesh database.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar exp(const dimensionedScalar &ds)
virtual forceSuSp calcCoupled(const typename CloudType::parcelType &p, const typename CloudType::parcelType::trackingData &td, const scalar dt, const scalar mass, const scalar Re, const scalar muc) const
Calculate the coupled force.
static const word propertiesName
Default name of the turbulence properties dictionary.
constexpr scalar twoPi(2 *M_PI)
constexpr scalar pi(M_PI)
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.
dimensionedScalar sin(const dimensionedScalar &ds)
virtual void cacheFields(const bool store)
Cache fields.
scalarField Re(const UList< complex > &cmplx)
Extract real component.
const dimensionedScalar k
Boltzmann constant.
Template functions to aid in the implementation of demand driven data.
Mesh data needed to do the Finite Volume discretisation.
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.
static constexpr const zero Zero
Global zero (0)