31 template<
class ParcelType>
32 template<
class TrackCloudType>
35 TrackCloudType& cloud,
37 const scalar trackTime
40 typename TrackCloudType::parcelType&
p =
41 static_cast<typename TrackCloudType::parcelType&
>(*this);
43 td.keepParticle =
true;
54 while (td.keepParticle && td.sendToProc == -1 && p.stepFraction() < 1)
63 const vector d = p.deviationFromMeshCentre();
65 const scalar
f = 1 - p.stepFraction();
66 p.trackToAndHitFace(f*trackTime*Utracking - d, f, cloud, td);
69 return td.keepParticle;
73 template<
class ParcelType>
74 template<
class TrackCloudType>
77 TrackCloudType& cloud,
81 const label wppIndex = this->patch();
86 this->
mesh().boundaryMesh()[wppIndex]
93 const scalar deltaT = cloud.pMesh().time().deltaTValue();
97 scalar m = constProps.
mass();
102 scalar U_dot_nw = U_ &
nw;
106 scalar invMagUnfA = 1/
max(
mag(U_dot_nw)*fA, vSmall);
108 cloud.rhoNBF()[wppIndex][wppLocalFace] += invMagUnfA;
110 cloud.rhoMBF()[wppIndex][wppLocalFace] += m*invMagUnfA;
112 cloud.linearKEBF()[wppIndex][wppLocalFace] +=
113 0.5*m*(U_ & U_)*invMagUnfA;
115 cloud.internalEBF()[wppIndex][wppLocalFace] += Ei_*invMagUnfA;
117 cloud.iDofBF()[wppIndex][wppLocalFace] +=
118 constProps.internalDegreesOfFreedom()*invMagUnfA;
120 cloud.momentumBF()[wppIndex][wppLocalFace] += m*Ut*invMagUnfA;
123 scalar preIE = 0.5*m*(U_ & U_) + Ei_;
128 cloud.wallInteraction().correct(*
this);
132 Ut = U_ - U_dot_nw*
nw;
134 invMagUnfA = 1/
max(
mag(U_dot_nw)*fA, vSmall);
136 cloud.rhoNBF()[wppIndex][wppLocalFace] += invMagUnfA;
138 cloud.rhoMBF()[wppIndex][wppLocalFace] += m*invMagUnfA;
140 cloud.linearKEBF()[wppIndex][wppLocalFace] +=
141 0.5*m*(U_ & U_)*invMagUnfA;
143 cloud.internalEBF()[wppIndex][wppLocalFace] += Ei_*invMagUnfA;
145 cloud.iDofBF()[wppIndex][wppLocalFace] +=
146 constProps.internalDegreesOfFreedom()*invMagUnfA;
148 cloud.momentumBF()[wppIndex][wppLocalFace] += m*Ut*invMagUnfA;
151 scalar postIE = 0.5*m*(U_ & U_) + Ei_;
156 scalar deltaQ = cloud.nParticle()*(preIE - postIE)/(deltaT*fA);
158 vector deltaFD = cloud.nParticle()*(preIMom - postIMom)/(deltaT*fA);
160 cloud.qBF()[wppIndex][wppLocalFace] += deltaQ;
162 cloud.fDBF()[wppIndex][wppLocalFace] += deltaFD;
166 template<
class ParcelType>
172 ParcelType::transformProperties(transform);
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
A face is a list of labels corresponding to mesh vertices.
const Vector< label > & solutionD() const
Return the vector of solved-for directions in mesh.
void hitWallPatch(TrackCloudType &, trackingData &)
Overridable function to handle the particle hitting a wallPatch.
Class to hold DSMC particle constant properties.
scalar mass() const
Return const access to the particle mass [kg].
const vectorField::subField faceAreas() const
Return face areas.
bool move(TrackCloudType &cloud, trackingData &td, const scalar trackTime)
Move the parcel.
const scalarField::subField magFaceAreas() const
Return face area magnitudes.
virtual void transformProperties(const transformer &)
Transform the physical properties of the particle.
ParcelType::trackingData trackingData
Use base tracking data.
dimensioned< scalar > mag(const dimensioned< Type > &)
Mesh consisting of general polyhedral cells.
label whichFace(const label l) const
Return label of face in patch from global face label.