35 template<
class CloudType>
43 Tref_(this->coeffDict().getScalar(
"Tref"))
49 template<
class CloudType>
56 template<
class CloudType>
63 template<
class CloudType>
72 label typeIdP = pP.typeId();
73 label typeIdQ = pQ.typeId();
78 cloud.constProps(typeIdP).d()
79 +
cloud.constProps(typeIdQ).d()
85 cloud.constProps(typeIdP).omega()
86 +
cloud.constProps(typeIdQ).omega()
89 scalar cR =
mag(pP.U() - pQ.U());
96 scalar mP = cloud.constProps(typeIdP).mass();
98 scalar mQ = cloud.constProps(typeIdQ).mass();
100 scalar mR = mP*mQ/(mP + mQ);
112 template<
class CloudType>
121 label typeIdP = pP.typeId();
122 label typeIdQ = pQ.typeId();
128 scalar mP =
cloud.constProps(typeIdP).mass();
130 scalar mQ =
cloud.constProps(typeIdQ).mass();
132 vector Ucm = (mP*UP + mQ*UQ)/(mP + mQ);
134 scalar cR =
mag(UP - UQ);
136 scalar cosTheta = 2.0*
rndGen.sample01<scalar>() - 1.0;
138 scalar sinTheta =
sqrt(1.0 - cosTheta*cosTheta);
142 vector postCollisionRelU =
151 UP = Ucm + postCollisionRelU*mQ/(mP + mQ);
153 UQ = Ucm - postCollisionRelU*mP/(mP + mQ);
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...
Templated DSMC particle collision class.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar exp(const dimensionedScalar &ds)
constexpr scalar twoPi(2 *M_PI)
VariableHardSphere(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
A cloud is a registry collection of lagrangian particles.
constexpr scalar pi(M_PI)
ParcelType parcelType
Type of parcel the cloud was instantiated for.
dimensionedScalar sin(const dimensionedScalar &ds)
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
virtual bool active() const
Flag to indicate whether model activates collision model.
virtual void collide(typename CloudType::parcelType &pP, typename CloudType::parcelType &pQ)
Apply collision.
dimensionedScalar lgamma(const dimensionedScalar &ds)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const dimensionedScalar k
Boltzmann constant.
virtual ~VariableHardSphere()
Destructor.
Templated base class for dsmc cloud.
virtual scalar sigmaTcR(const typename CloudType::parcelType &pP, const typename CloudType::parcelType &pQ) const
Return the collision cross section * relative velocity product.