33 template<
class CloudType>
47 template<
class CloudType>
54 template<
class CloudType>
61 template<
class CloudType>
70 label typeIdP = pP.typeId();
71 label typeIdQ = pQ.typeId();
87 scalar cR =
mag(pP.U() - pQ.U());
98 scalar mR = mP*mQ/(mP + mQ);
110 template<
class CloudType>
119 label typeIdP = pP.typeId();
120 label typeIdQ = pQ.typeId();
130 vector Ucm = (mP*UP + mQ*UQ)/(mP + mQ);
132 scalar cR =
mag(UP - UQ);
134 scalar cosTheta = 2.0*
rndGen.scalar01() - 1.0;
136 scalar sinTheta =
sqrt(1.0 - cosTheta*cosTheta);
140 vector postCollisionRelU =
149 UP = Ucm + postCollisionRelU*mQ/(mP + mQ);
151 UQ = Ucm - postCollisionRelU*mP/(mP + mQ);
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Templated DSMC particle collision class.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Vector< scalar > vector
A scalar version of the templated Vector.
stressControl lookup("compactNormalStress") >> compactNormalStress
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar exp(const dimensionedScalar &ds)
Random & rndGen()
Return refernce to the random object.
VariableHardSphere(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
cachedRandom rndGen(label(0), -1)
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
Simple random number generator.
const scalar twoPi(2 *pi)
ParcelType parcelType
Type of parcel the cloud was instantiated for.
dimensionedScalar sin(const dimensionedScalar &ds)
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.
dimensioned< scalar > mag(const dimensioned< Type > &)
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.
const List< typename ParcelType::constantProperties > & constProps() const
Return all of the constant properties.