31 template<
class ParcelType>
32 template<
class TrackData>
35 typename TrackData::cloudType::parcelType&
p =
36 static_cast<typename TrackData::cloudType::parcelType&
>(*this);
38 td.switchProcessor =
false;
39 td.keepParticle =
true;
50 while (td.keepParticle && !td.switchProcessor && p.stepFraction() < 1)
53 p.constrainToMeshCentre();
61 const scalar
f = 1 - p.stepFraction();
62 p.trackToFace(f*trackTime*Utracking, f, td);
64 if (p.onBoundaryFace() && td.keepParticle)
66 if (isA<processorPolyPatch>(pbMesh[p.patch()]))
68 td.switchProcessor =
true;
73 return td.keepParticle;
77 template<
class ParcelType>
78 template<
class TrackData>
92 template<
class ParcelType>
93 template<
class TrackData>
100 td.switchProcessor =
true;
104 template<
class ParcelType>
105 template<
class TrackData>
119 const scalar deltaT = td.cloud().pMesh().time().deltaTValue();
123 scalar m = constProps.
mass();
128 scalar U_dot_nw = U_ &
nw;
132 scalar invMagUnfA = 1/
max(
mag(U_dot_nw)*fA, VSMALL);
134 td.cloud().rhoNBF()[wppIndex][wppLocalFace] += invMagUnfA;
136 td.cloud().rhoMBF()[wppIndex][wppLocalFace] += m*invMagUnfA;
138 td.cloud().linearKEBF()[wppIndex][wppLocalFace] +=
139 0.5*m*(U_ & U_)*invMagUnfA;
141 td.cloud().internalEBF()[wppIndex][wppLocalFace] += Ei_*invMagUnfA;
143 td.cloud().iDofBF()[wppIndex][wppLocalFace] +=
144 constProps.internalDegreesOfFreedom()*invMagUnfA;
146 td.cloud().momentumBF()[wppIndex][wppLocalFace] += m*Ut*invMagUnfA;
149 scalar preIE = 0.5*m*(U_ & U_) + Ei_;
154 td.cloud().wallInteraction().correct
162 Ut = U_ - U_dot_nw*
nw;
164 invMagUnfA = 1/
max(
mag(U_dot_nw)*fA, VSMALL);
166 td.cloud().rhoNBF()[wppIndex][wppLocalFace] += invMagUnfA;
168 td.cloud().rhoMBF()[wppIndex][wppLocalFace] += m*invMagUnfA;
170 td.cloud().linearKEBF()[wppIndex][wppLocalFace] +=
171 0.5*m*(U_ & U_)*invMagUnfA;
173 td.cloud().internalEBF()[wppIndex][wppLocalFace] += Ei_*invMagUnfA;
175 td.cloud().iDofBF()[wppIndex][wppLocalFace] +=
176 constProps.internalDegreesOfFreedom()*invMagUnfA;
178 td.cloud().momentumBF()[wppIndex][wppLocalFace] += m*Ut*invMagUnfA;
181 scalar postIE = 0.5*m*(U_ & U_) + Ei_;
186 scalar deltaQ = td.cloud().nParticle()*(preIE - postIE)/(deltaT*fA);
188 vector deltaFD = td.cloud().nParticle()*(preIMom - postIMom)/(deltaT*fA);
190 td.cloud().qBF()[wppIndex][wppLocalFace] += deltaQ;
192 td.cloud().fDBF()[wppIndex][wppLocalFace] += deltaFD;
197 template<
class ParcelType>
198 template<
class TrackData>
201 td.keepParticle =
false;
205 template<
class ParcelType>
208 ParcelType::transformProperties(T);
213 template<
class ParcelType>
219 ParcelType::transformProperties(separation);
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
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 face is a list of labels corresponding to mesh vertices.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
void hitWallPatch(const wallPolyPatch &, TrackData &td, const tetIndices &)
Overridable function to handle the particle hitting a wallPatch.
const Vector< label > & solutionD() const
Return the vector of solved-for directions in mesh.
bool move(TrackData &td, const scalar trackTime)
Move the parcel.
void hitProcessorPatch(const processorPolyPatch &, TrackData &td)
Overridable function to handle the particle hitting a.
bool hitPatch(const polyPatch &, TrackData &td, const label patchi, const scalar trackFraction, const tetIndices &tetIs)
Overridable function to handle the particle hitting a patch.
Neighbour processor patch.
Class to hold DSMC particle constant properties.
scalar mass() const
Return const access to the particle mass [kg].
Storage and named access for the indices of a tet which is part of the decomposition of a cell...
const vectorField::subField faceAreas() const
Return face normals.
virtual void transformProperties(const tensor &T)
Transform the physical properties of the particle.
label index() const
Return the index of this patch in the boundaryMesh.
dimensioned< scalar > mag(const dimensioned< Type > &)
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
dimensionSet transform(const dimensionSet &)
label whichFace(const label l) const
Return label of face in patch from global face label.