IRockyContactDataRecorder Struct Reference
Last update: 08.07.2024
IRockyContactDataRecorder Struct Reference
#include <rocky_contact_data_recorder_api.h>
Public Member Functions | |
void | enable_contact_scalar (ContactScalar scalar, RecordingScope scope) |
int | get_contact_scalar_index (ContactScalar scalar, RecordingScope scope) |
Detailed Description
IRockyContactDataRecorder
is an interface to the internal entity that records relevant collision data during the contact calculations. The data is stored in contact scalars in order to make it available to collision statistics modules for later processing. The methods in IRockyContactDataRecorder
allows a custom module to enable the physical magnitudes that must be recorded and to retrieve the indices of the contact scalars in which they will be stored.
Member Function Documentation
◆ enable_contact_scalar()
void IRockyContactDataRecorder::enable_contact_scalar | ( | ContactScalar | scalar, |
RecordingScope | scope | ||
) |
- This method allows a module to select which physical magnitudes associated to a
- collision must be recorded into contact scalars. The magnitudes available for recording are listed below. For a description of how these magnitudes are computed internally, please refer to the DEM Technical Manual.
- Parameters
-
scalar An enum key indicating the physical magnitude that must be recorded. The currently available magnitudes are: csDuration
: The duration of a collision.csImpactVelocityNormal
: The normal component of the impact velocity, i.e. the contact relative velocity at the moment a collision starts.csImpactVelocityTangential
: The tangential component of the impact velocity, i.e. the contact relative velocity at the moment a collision starts.csWorkDissipation
: The energy dissipated during an entire collision.csWorkImpact
: The work made by the normal contact force during the loading phase of a collision.csWorkShear
: The work made by the tangential contact force during an entire collision.csEnergyTransfer
: The energy transferred to a particle by a moving boundary during a collision at a particle-to-boundary contact.csImpulseNormal
: The impulse of the normal contact force during an entire collision.csImpulseTangential
: The impulse of the tangential contact force during an entire collision.csImpulseX
: The impulse of the x-component of the contact force.csImpulseY
: The impulse of the y-component of the contact force.csImpulseZ
: The impulse of the z-component of the contact force.csSlindingDistance
: The sliding distance during an entire collision.scope An enum key indicating if the collision data will be recorded at particle-to-particle contacts, particle-to-geometry-triangle contacts or both. The valid keys are: rsParticleParticle
Record data only at particle-to-particle contacts.rsParticleTriangle
Record data only at particle-to-geometry-triangle contacts.rsBoth
Record data at both particle-to-particle and particle-to-geometry-triangle contacts.
◆ get_contact_scalar_index()
int IRockyContactDataRecorder::get_contact_scalar_index | ( | ContactScalar | scalar, |
RecordingScope | scope | ||
) |
- Returns
- The index that identifies a specific contact scalar where collision data will be stored. This index will be available only after the setup phase has concluded.
- Parameters
-
scalar See description on enable_contact_scalar
scope An enum key indicating the index of which contact type will be returned. The valid keys are: rsParticleParticle
Return the index of a particle contact scalar.rsParticleTriangle
Return the index of a triangle contact scalar.