Special version of Particle to do tracking on non-convex cells. More...
#include <autoMesh/ExactParticle.H>
Special version of Particle to do tracking on non-convex cells.
Definition at line 64 of file ExactParticle.H.
Classes | |
class | iNew |
Factory class to read-construct particles used for parallel transfer. More... |
Public Member Functions | |
ExactParticle (const Cloud< ParticleType > &cloud, const vector &position, const label celli) | |
Construct from components. | |
ExactParticle (const Cloud< ParticleType > &cloud, Istream &is, bool readFields=true) | |
Construct from Istream. | |
virtual | ~ExactParticle () |
template<class TrackingData > | |
label | track (const vector &endPosition, TrackingData &td) |
Track particle to end of trajectory. | |
label | track (const vector &endPosition) |
Calls the templated track with dummy TrackingData. | |
template<class TrackingData > | |
scalar | trackToFace (const vector &endPosition, TrackingData &td) |
Track particle to a given position and returns 1.0 if the. | |
scalar | trackToFace (const vector &endPosition) |
Calls the templated trackToFace with dummy TrackingData. | |
![]() | |
TypeName ("Particle") | |
Runtime type information. | |
Particle (const Cloud< ParticleType > &, const vector &position, const label celli) | |
Construct from components. | |
Particle (const Cloud< ParticleType > &, Istream &, bool readFields=true) | |
Construct from Istream. | |
Particle (const Particle &p) | |
Construct as a copy. | |
autoPtr< ParticleType > | clone () const |
Construct a clone. | |
virtual | ~Particle () |
Destructor. | |
bool | inCell () const |
Return true if particle is in cell. | |
bool | inCell (const vector &position, const label celli, const scalar stepFraction) const |
Return true if position is in cell i. | |
const vector & | position () const |
Return current particle position. | |
vector & | position () |
Return current particle position. | |
label & | cell () |
Return current cell particle is in. | |
label | cell () const |
Return current cell particle is in. | |
label | face () const |
Return current face particle is on otherwise -1. | |
const Cloud< ParticleType > & | cloud () const |
Return reference to the particle cloud. | |
bool | softImpact () const |
Return the impact model to be used, soft or hard (default). | |
scalar | currentTime () const |
Return the particle current time. | |
bool | onBoundary () const |
Is the particle on the boundary/(or outside the domain)? | |
label | patch (const label facei) const |
Which patch is particle on. | |
label | patchFace (const label patchi, const label facei) const |
Which face of this patch is this particle on. | |
scalar | wallImpactDistance (const vector &n) const |
The nearest distance to a wall that. | |
scalar & | stepFraction () |
Return the fraction of time-step completed. | |
scalar | stepFraction () const |
Return the fraction of time-step completed. | |
label | origProc () const |
Return the originating processor id. | |
label | origId () const |
Return the particle id on originating processor. | |
template<class TrackData > | |
label | track (const vector &endPosition, TrackData &td) |
Track particle to end of trajectory. | |
template<class TrackData > | |
scalar | trackToFace (const vector &endPosition, TrackData &td) |
Track particle to a given position and returns 1.0 if the. | |
label | faceInterpolation () const |
Return the index of the face to be used in the interpolation. | |
void | write (Ostream &os, bool writeFields) const |
Write the particle data. |
Friends | |
class | Cloud< ParticleType > |
Ostream & | operator (Ostream &, const ExactParticle< ParticleType > &) |
Additional Inherited Members | |
![]() | |
static void | readFields (Cloud< ParticleType > &c) |
Read the fields associated with the owner cloud. | |
static void | writeFields (const Cloud< ParticleType > &c) |
Write the fields associated with the owner cloud. | |
![]() | |
static string | propHeader = "(Px Py Pz) cellI origProc origId" |
String representation of properties. | |
![]() | |
scalar | lambda (const vector &from, const vector &to, const label facei, const scalar stepFraction) const |
Return the 'lambda' value for the position, p, on the face,. | |
scalar | lambda (const vector &from, const vector &to, const label facei) const |
Return the 'lambda' value for the position, p, on the face,. | |
void | findFaces (const vector &position, DynamicList< label > &faceList) const |
Find the faces between position and cell centre. | |
void | findFaces (const vector &position, const label celli, const scalar stepFraction, DynamicList< label > &faceList) const |
Find the faces between position and cell centre. | |
template<class TrackData > | |
bool | hitPatch (const polyPatch &, TrackData &td, const label patchI) |
Overridable function to handle the particle hitting a patch. | |
template<class TrackData > | |
void | hitWedgePatch (const wedgePolyPatch &, TrackData &td) |
Overridable function to handle the particle hitting a wedgePatch. | |
template<class TrackData > | |
void | hitSymmetryPatch (const symmetryPolyPatch &, TrackData &td) |
Overridable function to handle the particle hitting a. | |
template<class TrackData > | |
void | hitCyclicPatch (const cyclicPolyPatch &, TrackData &td) |
Overridable function to handle the particle hitting a cyclicPatch. | |
template<class TrackData > | |
void | hitProcessorPatch (const processorPolyPatch &, TrackData &td) |
Overridable function to handle the particle hitting a. | |
template<class TrackData > | |
void | hitWallPatch (const wallPolyPatch &, TrackData &td) |
Overridable function to handle the particle hitting a wallPatch. | |
template<class TrackData > | |
void | hitPatch (const polyPatch &, TrackData &td) |
Overridable function to handle the particle hitting a. | |
virtual void | transformPosition (const tensor &T) |
Transform the position the particle. | |
virtual void | transformProperties (const tensor &T) |
Transform the physical properties of the particle. | |
virtual void | transformProperties (const vector &separation) |
Transform the physical properties of the particle. | |
template<class TrackData > | |
void | prepareForParallelTransfer (const label patchi, TrackData &td) |
Convert global addressing to the processor patch. | |
template<class TrackData > | |
void | correctAfterParallelTransfer (const label patchi, TrackData &td) |
Convert processor patch addressing to the global equivalents. | |
![]() | |
const Cloud< ParticleType > & | cloud_ |
Reference to the particle cloud. | |
vector | position_ |
Position of particle. | |
label | celli_ |
Index of the cell it is in. | |
label | facei_ |
Face index if the particle is on a face otherwise -1. | |
scalar | stepFraction_ |
Fraction of time-step completed. | |
label | origProc_ |
Originating processor id. | |
label | origId_ |
Local particle id on originating processor. |
|
inline |
Construct from components.
Definition at line 78 of file ExactParticle.H.
|
inline |
Construct from Istream.
Definition at line 90 of file ExactParticle.H.
|
inlinevirtual |
Definition at line 128 of file ExactParticle.H.
Foam::label track | ( | const vector & | endPosition, |
TrackingData & | td | ||
) |
Track particle to end of trajectory.
or until it hits the boundary. On entry 'stepFraction()' should be set to the fraction of the time-step at which the tracking starts and on exit it contains the fraction of the time-step completed. Returns the boundary face index if the track stops at the boundary, -1 otherwise.
Definition at line 33 of file ExactParticle.C.
Foam::label track | ( | const vector & | endPosition | ) |
Calls the templated track with dummy TrackingData.
Reimplemented from Particle< ParticleType >.
Definition at line 54 of file ExactParticle.C.
Foam::scalar trackToFace | ( | const vector & | endPosition, |
TrackingData & | td | ||
) |
Track particle to a given position and returns 1.0 if the.
trajectory is completed without hitting a face otherwise stops at the face and returns the fraction of the trajectory completed. on entry 'stepFraction()' should be set to the fraction of the time-step at which the tracking starts.
Definition at line 66 of file ExactParticle.C.
References Foam::abort(), polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), primitiveMesh::cells(), PointHit< Point >::distance(), primitiveMesh::faceCentres(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), Foam::FatalError, FatalErrorIn, forAll, PointHit< Point >::hit(), PointHit< Point >::hitPoint(), mesh, Foam::nl, p, patchi, and polyMesh::points().
Foam::scalar trackToFace | ( | const vector & | endPosition | ) |
Calls the templated trackToFace with dummy TrackingData.
Reimplemented from Particle< ParticleType >.
Definition at line 241 of file ExactParticle.C.
|
friend |
Reimplemented from Particle< ParticleType >.
Definition at line 71 of file ExactParticle.H.
|
friend |