Skip to main content
#include <rocky_sph_interaction_api.hpp>

Public Member Functions

Detailed Description

IRockySPHTriangleInteraction is a code representation of a pair of neighbor SPH element / geometry triangle with a force interaction. Within Rocky, this pair is usually called SPH triangle interaction.

Member Function Documentation

add_acceleration()

By using this method, a SPH module can pass custom calculated accelerations to the Rocky solver, so they are added to the SPH element and the geometry triangle in the referred SPH triangle interaction. Parameters

add_force()

By using this method, a SPH module can pass custom calculated forces to the Rocky solver, so they are applied to the SPH element and the geometry triangle in the referred SPH triangle interaction. Parameters

calculate_element_triangle_distance()

Returns The distance between the SPH element and the near geometry triangle, measured in the normal direction to the triangle’s plane.

get_boundary_velocity()

Returns The instantaneous velocity of the point that coincides with the orthogonal projection of the SPH element position onto the near geometry triangle, expressed in Cartesian coordinates.

get_home_element()

Returns An IRockySPHElement object representing the SPH element labeled as home in the SPH interaction.

get_home_element_velocity()

Returns The velocity vector of the SPH element labeled as home in the SPH interaction.

get_near_triangle()

Returns An IRockyGeometryTriangle object representing the geometry triangle labeled as near in the SPH triangle interaction.

get_normal_relative_velocity()

Returns The normal component of the SPH element’s velocity relative to the the velocity of the nearest point on that triangle.

get_orthogonal_projection()

Returns The Cartesian coordinates of the orthogonal projection of the home SPH element position onto the near geometry triangle.

get_tangential_relative_velocity()

Returns The tangential component of the SPH element’s velocity relative to the the velocity of the nearest point on that triangle.

get_unit_vector()

Returns The unit vector normal to the near geometry triangle. This vector always points to the position of the home SPH element.