32template<
class CloudType>
40 diffuseFraction_(this->
coeffDict().getScalar(
"diffuseFraction"))
46template<
class CloudType>
53template<
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();
117 sqrt(physicoChemical::k.value()*
T/mass)
119 rndGen.GaussNormal<scalar>()*tw1
120 +
rndGen.GaussNormal<scalar>()*tw2
121 - sqrt(-2.0*log(max(1 -
rndGen.sample01<scalar>(), VSMALL)))*nw
124 U += cloud.boundaryU().boundaryField()[wppIndex][wppLocalFace];
126 Ei = cloud.equipartitionInternalEnergy(
T, iDof);
134 U -= 2.0*U_dot_nw*nw;
virtual ~MixedDiffuseSpecular()
Destructor.
virtual void correct(typename CloudType::parcelType &p)
Apply wall correction.
MixedDiffuseSpecular(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
const dictionary & coeffDict() const
Return the coefficients dictionary.
WallInteractionModel(CloudType &owner)
Construct null from owner.
const dictionary & dict() const
Return the dictionary.
const CloudType & owner() const
Return the owner cloud object.
A cloud is a registry collection of lagrangian particles.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A patch is a list of labels that address the faces in the global face list.
label whichFace(const label facei) const noexcept
Return label of face in patch from global face label.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
DSMCCloud< dsmcParcel > CloudType
dimensionedScalar log(const dimensionedScalar &ds)
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)