Go to the documentation of this file.
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;
A patch is a list of labels that address the faces in the global face list.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Templated base class for dsmc cloud.
Templated wall interaction model class.
virtual void correct(typename CloudType::parcelType &p)
Apply wall correction.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
dimensionedScalar log(const dimensionedScalar &ds)
virtual ~MixedDiffuseSpecular()
Destructor.
Vector< scalar > vector
A scalar version of the templated Vector.
A cloud is a registry collection of lagrangian particles.
label whichFace(const label l) const
Return label of face in patch from global face label.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label k
Boltzmann constant.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
MixedDiffuseSpecular(const dictionary &dict, CloudType &cloud)
Construct from dictionary.