Skip to main content

Rocky Solver SDK 2024 R2

IRockySPHElementInteraction Struct Reference

Last update: 08.07.2024

#include <rocky_sph_interaction_api.hpp>

Public Member Functions

ROCKY_FUNCTIONS float3 calculate_elements_distance () const
 
ROCKY_FUNCTIONS float3 calculate_elements_relative_velocity () const
 
ROCKY_FUNCTIONS float3 get_home_element_velocity () const
 
ROCKY_FUNCTIONS float3 get_near_element_velocity () const
 
ROCKY_FUNCTIONS IRockySPHElement get_home_element () const
 
ROCKY_FUNCTIONS IRockySPHElement get_near_element () const
 
ROCKY_FUNCTIONS void add_force (float3 force)
 
ROCKY_FUNCTIONS void add_acceleration (float3 acceleration)
 

Detailed Description

IRockySPHElementInteraction is a code representation of a pair of neighbor SPH elements within the support region of each other, i.e. they have a force interaction between them. Within Rocky, this pair is usually called SPH element interaction.

Member Function Documentation

◆ add_acceleration()

ROCKY_FUNCTIONS void IRockySPHElementInteraction::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 elements associated in the referred SPH element interaction.
Parameters
accelerationThe acceleration to be added to the SPH elements, expressed in Cartesian coordinates.

◆ add_force()

ROCKY_FUNCTIONS void IRockySPHElementInteraction::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 elements associated to the referred SPH element interaction.
Parameters
forceThe force to be applied to the SPH elements, expressed in Cartesian coordinates.

◆ calculate_elements_distance()

ROCKY_FUNCTIONS float3 IRockySPHElementInteraction::calculate_elements_distance ( ) const
Returns
The vector that joins the points at which the two neighbor SPH elements are located.

◆ calculate_elements_relative_velocity()

ROCKY_FUNCTIONS float3 IRockySPHElementInteraction::calculate_elements_relative_velocity ( ) const
Returns
The relative velocity vector between the two neighbor SPH elements.

◆ get_home_element()

ROCKY_FUNCTIONS IRockySPHElement IRockySPHElementInteraction::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 IRockySPHElementInteraction::get_home_element_velocity ( ) const
Returns
The velocity vector of the SPH element labeled as home in the SPH interaction.

◆ get_near_element()

ROCKY_FUNCTIONS IRockySPHElement IRockySPHElementInteraction::get_near_element ( ) const
Returns
An IRockySPHElement object representing the SPH element labeled as near in the SPH element interaction.

◆ get_near_element_velocity()

ROCKY_FUNCTIONS float3 IRockySPHElementInteraction::get_near_element_velocity ( ) const
Returns
The velocity vector of the SPH element labeled as near in the SPH interaction.