Go to the documentation of this file.
32 template<
class CloudType>
35 template<
class CloudType>
42 template<
class CloudType>
52 p.torque() = vector::zero;
57 template<
class CloudType>
62 label startOfRequests = Pstream::nRequests();
66 realRealInteraction();
68 il_.receiveReferredData(pBufs, startOfRequests);
70 realReferredInteraction();
74 template<
class CloudType>
93 forAll(dil[realCellI], interactingCells)
101 pB_ptr = cellBParcels[
b];
103 evaluatePair(*pA_ptr, *pB_ptr);
116 evaluatePair(*pA_ptr, *pB_ptr);
124 template<
class CloudType>
131 il_.referredParticles();
140 referredParticles[refCellI];
142 const labelList& realCells = ril[refCellI];
156 forAll(realCells, realCellI)
161 forAll(realCellParcels, realParcelI)
165 *realCellParcels[realParcelI],
175 template<
class CloudType>
205 const labelList& realWallFaces = directWallFaces[realCellI];
210 flatSitePoints.
clear();
211 flatSiteExclusionDistancesSqr.
clear();
212 flatSiteData.
clear();
213 otherSitePoints.
clear();
214 otherSiteDistances.
clear();
215 otherSiteData.
clear();
216 sharpSitePoints.
clear();
217 sharpSiteExclusionDistancesSqr.
clear();
218 sharpSiteData.
clear();
225 scalar r = wallModel_->pREff(
p);
229 forAll(realWallFaces, realWallFaceI)
231 label realFaceI = realWallFaces[realWallFaceI];
249 scalar normalAlignment =
normal & pW/
mag(pW);
252 label patchI = patchID[realFaceI -
mesh.nInternalFaces()];
255 realFaceI -
mesh.boundaryMesh()[patchI].start();
260 U.boundaryField()[patchI][patchFaceI]
263 bool particleHit =
false;
264 if (normalAlignment > cosPhiMinFlatWall)
272 !duplicatePointInList
276 sqr(r*flatWallDuplicateExclusion)
280 flatSitePoints.
append(nearPt);
282 flatSiteExclusionDistancesSqr.
append
294 otherSitePoints.
append(nearPt);
298 otherSiteData.
append(wSD);
306 this->owner().functions().postFace(
p, realFaceI, keep);
307 this->owner().functions().postPatch
310 mesh.boundaryMesh()[patchI],
312 p.currentTetIndices(),
322 const labelList& cellRefWallFaces = il_.rwfilInverse()[realCellI];
324 forAll(cellRefWallFaces, rWFI)
326 label refWallFaceI = cellRefWallFaces[rWFI];
329 il_.referredWallFaces()[refWallFaceI];
345 scalar normalAlignment =
normal & pW/
mag(pW);
352 il_.referredWallData()[refWallFaceI]
355 bool particleHit =
false;
356 if (normalAlignment > cosPhiMinFlatWall)
364 !duplicatePointInList
368 sqr(r*flatWallDuplicateExclusion)
372 flatSitePoints.
append(nearPt);
374 flatSiteExclusionDistancesSqr.
append
386 otherSitePoints.
append(nearPt);
390 otherSiteData.
append(wSD);
414 sortedOrder(otherSiteDistances, sortedOtherSiteIndices);
416 forAll(sortedOtherSiteIndices, siteI)
418 label orderedIndex = sortedOtherSiteIndices[siteI];
420 const point& otherPt = otherSitePoints[orderedIndex];
424 !duplicatePointInList
428 flatSiteExclusionDistancesSqr
437 !duplicatePointInList
441 sharpSiteExclusionDistancesSqr
445 sharpSitePoints.
append(otherPt);
447 sharpSiteExclusionDistancesSqr.
append
449 sqr(r) -
sqr(otherSiteDistances[orderedIndex])
452 sharpSiteData.
append(otherSiteData[orderedIndex]);
470 template<
class CloudType>
474 const point& pointToTest,
475 scalar duplicateRangeSqr
480 if (
magSqr(existingPoints[i] - pointToTest) < duplicateRangeSqr)
490 template<
class CloudType>
494 const point& pointToTest,
500 if (
magSqr(existingPoints[i] - pointToTest) < duplicateRangeSqr[i])
510 template<
class CloudType>
519 p.collisionRecords().update();
524 template<
class CloudType>
531 pairModel_->evaluatePair(pA, pB);
535 template<
class CloudType>
545 wallModel_->evaluateWall
558 template<
class CloudType>
588 this->coeffDict().lookupOrDefault
590 "writeReferredParticleCloud",
594 this->coeffDict().lookupOrDefault(
"UName",
word(
"U"))
599 template<
class CloudType>
608 il_(cm.owner().mesh())
617 template<
class CloudType>
624 template<
class CloudType>
627 label nSubCycles = 1;
629 if (pairModel_->controlsTimestep())
636 nSubCycles =
max(nSubCycles, nPairSubCycles);
639 if (wallModel_->controlsTimestep())
646 nSubCycles =
max(nSubCycles, nWallSubCycles);
653 template<
class CloudType>
660 template<
class CloudType>
void wallInteraction()
Interactions with walls.
vector normal(const pointField &) const
Vector normal; magnitude is equal to area of face.
void postInteraction()
Post collision tasks.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
A class for handling words, derived from string.
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
#define forAll(list, i)
Loop across all elements in list.
This class describes the interaction of a face and a point. It carries the info of a successful hit a...
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void realRealInteraction()
Interactions between real (on-processor) particles.
virtual label nSubCycles() const
Return the number of times to subcycle the current.
const Point & rawPoint() const
Return point with no checking.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
void parcelInteraction()
Interactions between parcels.
dimensioned< scalar > mag(const dimensioned< Type > &)
Mesh consisting of general polyhedral cells.
void sortedOrder(const UList< T > &, labelList &order)
Generate the (stable) sort order for the list.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
scalar distance() const
Return distance to hit.
label patchIndex() const
Return access to the patch index.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Intrusive doubly-linked list.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Pre-declare SubField and related Field type.
const List< DynamicList< molecule * > > & cellOccupancy
const fvMesh & mesh() const
Return refernce to the mesh.
void clear()
Clear the addressed list, i.e. set the size to zero.
void realReferredInteraction()
Interactions between real and referred (off processor) particles.
void evaluateWall(typename CloudType::parcelType &p, const List< point > &flatSitePoints, const List< WallSiteData< vector > > &flatSiteData, const List< point > &sharpSitePoints, const List< WallSiteData< vector > > &sharpSiteData) const
Calculate the wall forces on a parcel.
Storage for referred wall faces. Stores patch index, face and associated points.
Templated base class for dsmc cloud.
const List< DynamicList< ParcelType * > > & cellOccupancy() const
Return the cell occupancy addressing.
virtual ~PairCollision()
Destructor.
A list of keyword definitions, which are a keyword followed by any number of values (e....
virtual bool controlsWallInteraction() const
Indicates whether model determines wall collisions or not,.
Templated wall interaction class.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
Stores the patch ID and templated data to represent a collision with a wall to be passed to the wall ...
void preInteraction()
Pre collision tasks.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
pointHit nearestPoint(const point &p, const pointField &) const
Return nearest point to face.
const pointField & points() const
Return access to the stored points.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
void evaluatePair(typename CloudType::parcelType &pA, typename CloudType::parcelType &pB) const
Calculate the pair force between parcels.
PairCollision(const dictionary &dict, CloudType &owner)
Construct from components.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensionedScalar sqrt(const dimensionedScalar &ds)
Templated pair interaction class.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Generic GeometricField class.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
bool duplicatePointInList(const DynamicList< point > &existingPoints, const point &pointToTest, scalar duplicateRangeSqr) const
A normal distribution model.
stressControl lookup("compactNormalStress") >> compactNormalStress
dimensionedScalar pos(const dimensionedScalar &ds)