33template<
class ParcelType>
34template<
class TrackCloudType>
37 TrackCloudType&
cloud,
39 const scalar trackTime
42 typename TrackCloudType::parcelType&
p =
43 static_cast<typename TrackCloudType::parcelType&
>(*this);
45 td.switchProcessor =
false;
46 td.keepParticle =
true;
56 while (td.keepParticle && !td.switchProcessor &&
p.stepFraction() < 1)
62 meshTools::constrainDirection(
mesh,
mesh.solutionD(), Utracking);
65 const vector d =
p.deviationFromMeshCentre();
67 const scalar
f = 1 -
p.stepFraction();
68 p.trackToAndHitFace(
f*trackTime*Utracking - d,
f,
cloud, td);
71 return td.keepParticle;
75template<
class ParcelType>
76template<
class TrackCloudType>
83template<
class ParcelType>
84template<
class TrackCloudType>
91 td.switchProcessor =
true;
95template<
class ParcelType>
96template<
class TrackCloudType>
99 TrackCloudType&
cloud,
103 const label wppIndex = this->patch();
108 this->
mesh().boundaryMesh()[wppIndex]
119 scalar m = constProps.
mass();
123 scalar U_dot_nw = U_ & nw;
125 vector Ut = U_ - U_dot_nw*nw;
127 scalar invMagUnfA = 1/
max(
mag(U_dot_nw)*fA, VSMALL);
129 cloud.rhoNBF()[wppIndex][wppLocalFace] += invMagUnfA;
131 cloud.rhoMBF()[wppIndex][wppLocalFace] += m*invMagUnfA;
133 cloud.linearKEBF()[wppIndex][wppLocalFace] +=
134 0.5*m*(U_ & U_)*invMagUnfA;
136 cloud.internalEBF()[wppIndex][wppLocalFace] += Ei_*invMagUnfA;
138 cloud.iDofBF()[wppIndex][wppLocalFace] +=
141 cloud.momentumBF()[wppIndex][wppLocalFace] += m*Ut*invMagUnfA;
144 scalar preIE = 0.5*m*(U_ & U_) + Ei_;
149 cloud.wallInteraction().correct(*
this);
153 Ut = U_ - U_dot_nw*nw;
155 invMagUnfA = 1/
max(
mag(U_dot_nw)*fA, VSMALL);
157 cloud.rhoNBF()[wppIndex][wppLocalFace] += invMagUnfA;
159 cloud.rhoMBF()[wppIndex][wppLocalFace] += m*invMagUnfA;
161 cloud.linearKEBF()[wppIndex][wppLocalFace] +=
162 0.5*m*(U_ & U_)*invMagUnfA;
164 cloud.internalEBF()[wppIndex][wppLocalFace] += Ei_*invMagUnfA;
166 cloud.iDofBF()[wppIndex][wppLocalFace] +=
169 cloud.momentumBF()[wppIndex][wppLocalFace] += m*Ut*invMagUnfA;
172 scalar postIE = 0.5*m*(U_ & U_) + Ei_;
177 scalar deltaQ =
cloud.nParticle()*(preIE - postIE)/(deltaT*fA);
179 vector deltaFD =
cloud.nParticle()*(preIMom - postIMom)/(deltaT*fA);
181 cloud.qBF()[wppIndex][wppLocalFace] += deltaQ;
183 cloud.fDBF()[wppIndex][wppLocalFace] += deltaFD;
187template<
class ParcelType>
195template<
class ParcelType>
Class to hold DSMC particle constant properties.
scalar mass() const
Return const access to the particle mass [kg].
direction internalDegreesOfFreedom() const
Return the internalDegreesOfFreedom.
virtual void transformProperties(const tensor &T)
Transform the physical properties of the particle.
void hitProcessorPatch(TrackCloudType &, trackingData &)
Overridable function to handle the particle hitting a.
bool hitPatch(TrackCloudType &, trackingData &)
Overridable function to handle the particle hitting a patch.
void hitWallPatch(TrackCloudType &, trackingData &)
Overridable function to handle the particle hitting a wallPatch.
scalar deltaTValue() const noexcept
Return time step value.
A cloud is a registry collection of lagrangian particles.
Class used to pass data into container.
A face is a list of labels corresponding to mesh vertices.
const Time & time() const noexcept
Return time registry.
virtual void transformProperties(const tensor &T)
Transform the physical properties of the particle.
Mesh consisting of general polyhedral cells.
label whichFace(const label l) const
Return label of face in patch from global face label.
const vectorField::subField faceAreas() const
Return face normals.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
quaternion normalised(const quaternion &q)
Return the normalised (unit) quaternion of the given quaternion.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)