32 template<
class CloudType>
40 diffuseFraction_(this->coeffDict().getScalar(
"diffuseFraction"))
46 template<
class CloudType>
53 template<
class CloudType>
63 label typeId =
p.typeId();
65 const label wppIndex =
p.patch();
67 const polyPatch& wpp =
p.mesh().boundaryMesh()[wppIndex];
74 scalar U_dot_nw =
U & nw;
80 if (diffuseFraction_ >
rndGen.sample01<scalar>())
87 while (
mag(Ut) < SMALL)
94 U.x()*(0.8 + 0.2*
rndGen.sample01<scalar>()),
95 U.y()*(0.8 + 0.2*
rndGen.sample01<scalar>()),
96 U.z()*(0.8 + 0.2*
rndGen.sample01<scalar>())
101 Ut =
U - U_dot_nw*nw;
110 scalar
T = cloud.boundaryT().boundaryField()[wppIndex][wppLocalFace];
112 scalar mass = cloud.constProps(typeId).mass();
114 direction iDof = cloud.constProps(typeId).internalDegreesOfFreedom();
119 rndGen.GaussNormal<scalar>()*tw1
120 +
rndGen.GaussNormal<scalar>()*tw2
124 U += cloud.boundaryU().boundaryField()[wppIndex][wppLocalFace];
126 Ei = cloud.equipartitionInternalEnergy(
T, iDof);
134 U -= 2.0*U_dot_nw*nw;
label whichFace(const label facei) const noexcept
Return label of face in patch from global face label.
dimensionedScalar log(const dimensionedScalar &ds)
virtual void correct(typename CloudType::parcelType &p)
Apply wall correction.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedScalar sqrt(const dimensionedScalar &ds)
label k
Boltzmann constant.
virtual ~MixedDiffuseSpecular()
Destructor.
A cloud is a registry collection of lagrangian particles.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
Templated wall interaction model class.
A patch is a list of labels that address the faces in the global face list.
Templated base class for dsmc cloud.
MixedDiffuseSpecular(const dictionary &dict, CloudType &cloud)
Construct from dictionary.