IRockyContact is an interface for the internal contact object in Rocky. A contact object is the code representation of the relationship between two particles or between a particle and a geometry triangle that have a force interaction at a given time. In the first case, it will be a particle-to-particle contact (sometimes abbreviated to particle-contact), whereas in the latter case, it will be a particle-to-triangle contact (sometimes abbreviated to triangle-contact).
A contact in which there exists an actual overlap between the entities is referred to as a frictional contact. If an adhesive model is active, an adhesive force might exist even if the entities are not physically touching each other. In that case, an adhesive contact will be established between those entities.
In a particle-to-particle contact, one of the particles is identified as home particle, whereas the other is identified as near particle. There is no special rule for labeling particles in this type of contacts, any of the two particles can be labeled as home or near. On the other hand, in a particle-to-triangle contact, the particle is always referred to as home particle, while the triangle is referred to as near triangle. Whenever it is necessary to distinguish between two contacting entities, the prefixes home and near are used in the associated method names. The normal unit vector associated to a contact is always constructed pointing to the home particle.
Contact scalars are special variables that store values per contact that are preserved between time iterations. The preservation of those values is guaranteed during the whole lifetime of a contact. Internally, contact scalars are stored separately for particle-to-particle contacts and for particle-to-triangle contacts. In order to differentiate them, the former are named particle contact scalars, whereas the latter are named triangle contact scalars
Members
- calculate_relative_velocity
- get_contact_position
- get_current_time
- get_dynamic_friction_coefficient
- get_equivalent_mass
- get_equivalent_radius
- get_equivalent_stiffness
- get_home_material
- get_home_particle
- get_home_particle_group_index
- get_home_stiffness
- get_home_stiffness_fraction
- get_is_sliding_marker
- get_material_interaction
- get_material_interaction_index
- get_near_geometry_index
- get_near_material
- get_near_particle
- get_near_particle_group_index
- get_near_stiffness
- get_near_triangle
- get_normal_adhesion_force
- get_normal_contact_force
- get_normal_relative_velocity
- get_normal_unit_vector
- get_overlap
- get_particle_contact_scalars
- get_previous_moment_vector
- get_previous_normal_vector
- get_previous_overlap
- get_reduced_young_modulus
- get_restitution_coefficient
- get_scale_factor
- get_sliding_distance
- get_static_friction_coefficient
- get_tangential_adhesion_force
- get_tangential_contact_force
- get_tangential_relative_velocity
- get_timestep
- get_triangle_contact_scalars
- is_adhesive
- is_frictional
- is_loading
- is_particle_particle_contact
- is_particle_triangle_contact
- is_positive_oriented
- is_unloading
- just_finished_adhesive
- just_finished_frictional
- just_started_adhesive
- just_started_frictional
- set_dynamic_friction_coefficient
- set_previous_moment_vector
- set_restitution_coefficient
- set_static_friction_coefficient
Public functions
Function get_home_material
IRockyMaterial object that gives access to the values of physical properties associated to the material from which particle labeled as home is made.
Return type: ROCKY_FUNCTIONS IRockyMaterial
Function get_near_material
IRockyMaterial object that gives access to the values of physical properties associated to the material from which the near particle or triangle is made.
Return type: ROCKY_FUNCTIONS IRockyMaterial
Function get_material_interaction
IRockyMaterialInteraction object that gives access to the values of physical properties associated to the material interaction that corresponds to the contact.
Return type: ROCKY_FUNCTIONS IRockyMaterialInteraction
Function get_material_interaction_index
Function get_home_particle
IRockyParticle object representing the home particle. This object gives access to several instantaneous properties associated to that particle.
Return type: ROCKY_FUNCTIONS IRockyParticle
Function get_home_particle_group_index
Function get_near_particle
IRockyParticle object representing the near particle in a particle-to-triangle contact. This object gives access to several instantaneous properties associated to that particle.
Return type: ROCKY_FUNCTIONS IRockyParticle
Function get_near_particle_group_index
Function get_near_triangle
IRockyGeometryTriangle object representing the near geometry triangle in a particle-to-triangle contact. This object gives access to some geometric properties associated to that triangle.
Return type: ROCKY_FUNCTIONS IRockyGeometryTriangle
Function get_near_geometry_index
Function is_particle_particle_contact
Function is_particle_triangle_contact
Function is_frictional
Function is_adhesive
Function get_previous_overlap
Function get_overlap
Function get_normal_unit_vector
Function get_contact_position
Function get_scale_factor
Function just_started_frictional
Function just_started_adhesive
Function just_finished_frictional
This method will work properly only if called within the
ROCKY_PLUGIN_POST_FORCE_ON_FINISHED_CONTACTS hook.
Return type: ROCKY_FUNCTIONS bool
Function just_finished_adhesive
This method will work properly only if called within the
ROCKY_PLUGIN_POST_FORCE_ON_FINISHED_CONTACTS hook.
Return type: ROCKY_FUNCTIONS bool
Function is_loading
Function is_unloading
Function is_positive_oriented
Function get_current_time
Function get_timestep
Function get_particle_contact_scalars
IRockyContactScalars object that gives access to all particle-to-particle contact scalars defined in the project.
Return type: ROCKY_FUNCTIONS IRockyContactScalars
Function get_triangle_contact_scalars
IRockyContactScalars object that gives access to all particle-to-triangle contact scalars defined in the project.
Return type: ROCKY_FUNCTIONS IRockyContactScalars
Function get_home_stiffness
Function get_near_stiffness
Function get_equivalent_stiffness
Function get_home_stiffness_fraction
Function get_reduced_young_modulus
Function get_equivalent_mass
Function get_equivalent_radius
Function get_normal_contact_force
ROCKY_PLUGIN_PRE_FORCE_ON_CONTACTS, the returned value will correspond to the normal force component calculated during the previous timestep. On the other hand, if called from ROCKY_PLUGIN_POST_FORCE_ON_CONTACTS, the value will be the recently calculated normal force component for the current timestep. Moreover, this function is not supposed to be called from 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.
Return type: ROCKY_FUNCTIONS double
Function get_tangential_contact_force
If called from
ROCKY_PLUGIN_PRE_FORCE_ON_CONTACTS, the returned value will correspond to the tangential force component calculated during the previous timestep. On the other hand, if called from ROCKY_PLUGIN_POST_FORCE_ON_CONTACTS or from other hooks executed after that point, the value will be the recently calculated tangential force component for the current timestep. Moreover, this function is not supposed to be called from 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. For tangential force models other than the Linear Spring Coulomb Limit and Mindlin-Deresiewicz models, the storage of this force must be enabled explicitly by using the IRockyContactScalarsModel::enable_storage_tangential_contact_force method.
Return type: ROCKY_FUNCTIONS double3
Function calculate_relative_velocity
Since this calculation can be costly, modules that need values of this relative velocity may alternatively enable the storage of its normal and tangential components. These components are calculated internally by Rocky during the contact force calculation stage, but discarded afterwards. However, by using the
IRockyContactScalarsModel::enable_storage_normal_relative_velocity and IRockyContactScalarsModel::enable_storage_tangential_relative_velocity methods, a module can activate the storage of those components in order to make them available at any point during a time iteration. Returns: The current relative velocity vector between two contacting particles or a particle and a geometry, at the contact point.
Return type: ROCKY_FUNCTIONS double3
Function get_restitution_coefficient
Function set_restitution_coefficient
- value: The value of the coefficient of restitution that must be used in the contact.
- double value
Function get_dynamic_friction_coefficient
Function set_dynamic_friction_coefficient
- value: The value of the coefficient of dynamic friction that must be used in the contact.
- double value
Function get_static_friction_coefficient
Function set_static_friction_coefficient
- value: The value of the coefficient of static friction that must be used in the contact.
- double value
Function get_sliding_distance
IRockyContactScalarsModel::enable_storage_sliding_distance method. A segmentation fault will occur otherwise.
Return type: ROCKY_FUNCTIONS double
Function get_is_sliding_marker
IRockyContactScalarsModel::enable_storage_is_sliding_marker method. A segmentation fault will occur otherwise.
Return type: ROCKY_FUNCTIONS bool
Function get_normal_relative_velocity
IRockyContactScalarsModel::enable_storage_normal_relative_velocity method. A segmentation fault will occur otherwise.
Return type: ROCKY_FUNCTIONS double
Function get_tangential_relative_velocity
IRockyContactScalarsModel::enable_storage_tangential_relative_velocity method. A segmentation fault will occur otherwise.
Return type: ROCKY_FUNCTIONS double3
Function get_normal_adhesion_force
IRockyContactScalarsModel::enable_storage_normal_adhesion_force method. A segmentation fault will occur otherwise.
Return type: ROCKY_FUNCTIONS double
Function get_tangential_adhesion_force
IRockyContactScalarsModel::enable_storage_tangential_adhesion_force method. A segmentation fault will occur otherwise.
Return type: ROCKY_FUNCTIONS double3
Function get_previous_normal_vector
IRockyContactScalarsModel::enable_storage_previous_normal_vector method. A segmentation fault will occur otherwise.
Return type: ROCKY_FUNCTIONS double3
Function get_previous_moment_vector
IRockyContactScalarsModel::enable_previous_moment_vector method and the module explicitly stored its value in the previous iteration, by using the IRockyContact::set_previous_moment_vector method.
Return type: ROCKY_FUNCTIONS double3
Function set_previous_moment_vector
IRockyContactScalarsModel::enable_previous_moment_vector method. The difference of the contact scalar that stores this moment in relation to a regular contact scalar is that the orientation of the stored vector is always preserved, regardless of possible internal changes in the topology of the contact.
Parameters:
- value: The value of the rolling resistance moment just calculated.
- double3 value