Skip to main content

Rocky Solver SDK 2024 R2

IRockySPHTriangleInteraction Struct Reference

Last update: 08.07.2024

#include <rocky_sph_interaction_api.hpp>

Public Member Functions

ROCKY_FUNCTIONS IRockySPHElement get_home_element () const
 
ROCKY_FUNCTIONS IRockyGeometryTriangle get_near_triangle () const
 
ROCKY_FUNCTIONS float calculate_element_triangle_distance () const
 
ROCKY_FUNCTIONS float3 get_orthogonal_projection () const
 
ROCKY_FUNCTIONS float3 get_unit_vector () const
 
ROCKY_FUNCTIONS float3 get_home_element_velocity () const
 
ROCKY_FUNCTIONS float3 get_boundary_velocity () const
 
ROCKY_FUNCTIONS real_sph get_normal_relative_velocity () const
 
ROCKY_FUNCTIONS real_sph get_tangential_relative_velocity () const
 
ROCKY_FUNCTIONS void add_force (float3 force)
 
ROCKY_FUNCTIONS void add_acceleration (float3 acceleration)
 

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()

ROCKY_FUNCTIONS void IRockySPHTriangleInteraction::add_acceleration ( float3  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
accelerationThe acceleration to be added to the SPH element in the SPH triangle interaction, and its triangle counterpart, expressed in Cartesian coordinates.

◆ add_force()

ROCKY_FUNCTIONS void IRockySPHTriangleInteraction::add_force ( float3  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
forceThe force to be applied to the SPH element in the SPH triangle interaction, and its triangle counterpart, expressed in Cartesian coordinates.

◆ calculate_element_triangle_distance()

ROCKY_FUNCTIONS float IRockySPHTriangleInteraction::calculate_element_triangle_distance ( ) const
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()

ROCKY_FUNCTIONS float3 IRockySPHTriangleInteraction::get_boundary_velocity ( ) const
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()

ROCKY_FUNCTIONS IRockySPHElement IRockySPHTriangleInteraction::get_home_element ( ) const
Returns
An IRockySPHElement object representing the SPH element labeled as home in the SPH interaction.

◆ get_home_element_velocity()

ROCKY_FUNCTIONS float3 IRockySPHTriangleInteraction::get_home_element_velocity ( ) const
Returns
The velocity vector of the SPH element labeled as home in the SPH interaction.

◆ get_near_triangle()

ROCKY_FUNCTIONS IRockyGeometryTriangle IRockySPHTriangleInteraction::get_near_triangle ( ) const
Returns
An IRockyGeometryTriangle object representing the geometry triangle labeled as near in the SPH triangle interaction.

◆ get_normal_relative_velocity()

ROCKY_FUNCTIONS real_sph IRockySPHTriangleInteraction::get_normal_relative_velocity ( ) const
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()

ROCKY_FUNCTIONS float3 IRockySPHTriangleInteraction::get_orthogonal_projection ( ) const
Returns
The Cartesian coordinates of the orthogonal projection of the home SPH element position onto the near geometry triangle.

◆ get_tangential_relative_velocity()

ROCKY_FUNCTIONS real_sph IRockySPHTriangleInteraction::get_tangential_relative_velocity ( ) const
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()

ROCKY_FUNCTIONS float3 IRockySPHTriangleInteraction::get_unit_vector ( ) const
Returns
The unit vector normal to the near geometry triangle. This vector always points to the position of the home SPH element.