30 template<
class CloudType>
33 typename CloudType::parcelType::trackingData& td
40 template<
class CloudType>
50 bool coalescence =
false;
52 const point pos1 = p1.position(this->owner().mesh());
53 const point pos2 = p2.position(this->owner().mesh());
63 scalar vAlign = URel & (d/(magd + rootVSmall));
67 const scalar d1 = p1.d();
68 const scalar d2 = p2.d();
70 scalar sumD = d1 + d2;
72 if (vAlign*dt > magd - 0.5*sumD)
74 scalar magU1 =
mag(U1) + rootVSmall;
75 scalar magU2 =
mag(U2) + rootVSmall;
79 scalar n1n2 = n1 & n2;
83 scalar
det = 1.0 -
sqr(n1n2);
90 beta = -(n2d - n1n2*n1d)/
det;
91 alpha = n1d + n1n2*beta;
98 if ((
alpha > 0) && (
alpha < 1.0) && (beta > 0) && (beta < 1.0))
101 vector p2c = pos2 + beta*U2*dt;
103 scalar closestDist =
mag(p1c - p2c);
106 pow(0.5*sumD/
max(0.5*sumD, closestDist), cSpace_)
109 scalar xx = this->owner().rndGen().template sample01<scalar>();
116 coalescence = this->collideSorted(dt, p1, p2, m1, m2);
120 coalescence = this->collideSorted(dt, p2, p1, m2, m1);
133 template<
class CloudType>
141 cSpace_(this->coeffDict().template lookup<scalar>(
"cSpace")),
142 cTime_(this->coeffDict().template lookup<scalar>(
"cTime"))
146 template<
class CloudType>
160 template<
class CloudType>
Templated base class for dsmc cloud.
Collision model by P.J. O'Rourke.
CloudType::parcelType parcelType
Convenience typedef to the cloud's parcel type.
Trajectory collision model by N. Nordin, based on O'Rourke's collision model.
virtual void collide(typename CloudType::parcelType::trackingData &td)
Main collision routine.
virtual ~TrajectoryCollision()
Destructor.
virtual bool collideParcels(const scalar dt, parcelType &p1, parcelType &p2, scalar &m1, scalar &m2)
Collide parcels and return true if mass has changed.
TrajectoryCollision(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
A list of keyword definitions, which are a keyword followed by any number of values (e....
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
dimensionedScalar det(const dimensionedSphericalTensor &dt)
dimensionedScalar exp(const dimensionedScalar &ds)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensioned< scalar > mag(const dimensioned< Type > &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)