IRockyContactOutputData is an interface to define some property values related to a contact, which are needed during the calculation steps of a custom contact model. The values defined through this interface can include normal and tangential forces, and impact energy.
Each set method present in this interface is intended to be used at a different calculation step of the contact model:
-
Normal contact force calculation within the code associated to the
ROCKY_PLUGIN_NORMAL_FORCE_ON_CONTACTShook: -
IRockyContactOutputData::set_normal_force -
Tangential contact force calculation within the code associated to the
ROCKY_PLUGIN_TANGENTIAL_FORCE_ON_CONTACTShook: -
IRockyContactOutputData::set_tangential_force -
IRockyContactOutputData::set_sliding -
Impact energy calculation within the code associated to the
ROCKY_PLUGIN_IMPACT_ENERGY_ON_CONTACTShook: -
IRockyContactOutputData::set_home_impact_energy -
IRockyContactOutputData::set_near_impact_energy
Members
- get_normal_force
- get_normal_relative_velocity
- get_tangential_force
- get_tangential_relative_velocity
- set_home_impact_energy
- set_home_moment
- set_near_impact_energy
- set_near_moment
- set_normal_force
- set_rolling_dissipated_power
- set_sliding
- set_tangential_force
Public functions
Function set_normal_force
ROCKY_PLUGIN_NORMAL_FORCE_ON_CONTACTS, since this hook is meant to be used to calculate and set the normal force component for the contact. Using it outside this hook can lead to undefined behavior.
Parameters:
- value: The normal component of the contact force just calculated using a custom model.
- double value
Function set_tangential_force
ROCKY_PLUGIN_TANGENTIAL_FORCE_ON_CONTACTS, since this hook is meant to be used to calculate and set the tangential force component for the contact. Using it outside this hook can lead to undefined behavior.
Parameters:
- value: The tangential component of the contact force just calculated using a custom model.
- double3 value
Function set_home_impact_energy
ROCKY_PLUGIN_IMPACT_ENERGY_ON_CONTACTS, since this hook is the one designed for calculating and setting the impact energy values. Using it outside this hook can lead to undefined behavior.
Parameters:
- value: The impact energy for the home particle just calculated using a custom model.
- double value
Function set_near_impact_energy
ROCKY_PLUGIN_IMPACT_ENERGY_ON_CONTACTS, since this hook is the one designed for calculating and setting the impact energy values. Using it outside this hook can lead to undefined behavior.
Parameters:
- value: The impact energy for the near particle just calculated using a custom model.
- double value
Function set_sliding
ROCKY_PLUGIN_TANGENTIAL_FORCE_ON_CONTACTS, since this hook is meant to be used to calculate and set the tangential force component for the contact. Using it outside this hook can lead to undefined behavior. Not defining the sliding status of the contact inside the hook can also lead to unexpected results.
Parameters:
- value: The sliding status of the contact just calculated using a custom contact model.
- bool value
Function set_home_moment
ROCKY_PLUGIN_ROLLING_RESISTANCE_ON_CONTACTS, as this hook is designed specifically to be used by a module implementing a custom rolling resistance model, to calculate and set the rolling resistance moments acting on the particles at a contact. Using this method outside that hook can lead to undefined behavior.
Parameters:
- value: The rolling resistance moment vector acting over the home particle.
- double3 value
Function set_near_moment
ROCKY_PLUGIN_ROLLING_RESISTANCE_ON_CONTACTS, as this hook is designed specifically to be used by a module implementing a custom rolling resistance model, to calculate and set the rolling resistance moments acting on the particles at a contact. Using this method outside that hook can lead to undefined behavior.
Parameters:
- value: The rolling resistance moment vector acting over the near particle.
- double3 value
Function set_rolling_dissipated_power
- value: The instantaneous power dissipated at a contact by rolling resistance.
- double value
Function get_normal_force
ROCKY_PLUGIN_NORMAL_FORCE_ON_CONTACTS in a custom implementation). If called before the moment when the normal force is set for the current contact in the current iteration, the value returned is undetermined.
!> Attention Note that the value returned by this method may differ from the value returned by
IRockyContact::get_normal_contact_force, as the latter returns the current normal force value in memory, which is usually zero (for new contacts) or the value calculated in the last normal force step for this contact.
Return type: ROCKY_FUNCTIONS double
Function get_tangential_force
ROCKY_PLUGIN_TANGENTIAL_FORCE_ON_CONTACTS in a custom implementation). If called before the moment when the tangential force is set for the current contact in the current iteration, the value returned is undetermined.
!> Attention Note that the value returned from this method may differ from the value returned by
IRockyContact::get_tangential_contact_force, as the latter returns the current tangential force vector in memory, which is usually zero (for new contacts) or the value calculated in the last tangential force step for this contact.
Return type: ROCKY_FUNCTIONS double3