Description
Trigger an event each time a particle flows into a rectangle.
Rectangle is defined with a coordinate system, in the center, and two X Y sizes. This is triggered only if the particle is flowing from positive Z to negative Z. Note! there is a 'margin' parameter that must be greater than zero: only particles that in the neighborhood of the rectangle (less distant than the margin) are considered, to save computational time. Too small margin might miss some fast-travelin particles, so margin should be at least 'max particle speed' * dt.
#include <ChParticleEventTrigger.h>
Public Member Functions | |
ChParticleEventFlowInRectangle (double mXsize=1, double mYsize=1) | |
virtual bool | TriggerEvent (std::shared_ptr< ChBody > mbody, ChSystem &msystem) |
This function triggers the a particle event according to the fact the the particle is crossing a rectangle. | |
virtual void | SetupPostProcess (ChSystem &msystem) |
Children classes might optionally implement this. More... | |
Public Member Functions inherited from chrono::particlefactory::ChParticleEventTrigger | |
virtual void | SetupPreProcess (ChSystem &msystem) |
Children classes might optionally implement this. More... | |
Public Attributes | |
double | Xsize |
double | Ysize |
double | margin |
ChCoordsys | rectangle_csys |
ChVector3d | last_intersectionUV |
Protected Attributes | |
std::unordered_map< size_t, _particle_last_pos > | last_positions |
Member Function Documentation
◆ SetupPostProcess()
|
inlinevirtual |
Children classes might optionally implement this.
The ChParticleProcessor will call this once, after each ProcessParticles()
Reimplemented from chrono::particlefactory::ChParticleEventTrigger.
The documentation for this class was generated from the following file:
- /builds/uwsbel/chrono/src/chrono/particlefactory/ChParticleEventTrigger.h