Skip to main content

Rocky Solver SDK 2026 R1

Structure IRockySPHTriangleInteraction

Last update: 09.03.2026

#include

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.

Members

Public functions

Function get_home_element

![][const]

ROCKY_FUNCTIONS IRockySPHElement IRockySPHTriangleInteraction::get_home_element() const

Returns:

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

Return type: ROCKY_FUNCTIONS IRockySPHElement

Function get_near_triangle

![][const]

ROCKY_FUNCTIONS IRockyGeometryTriangle IRockySPHTriangleInteraction::get_near_triangle() const

Returns:

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

Return type: ROCKY_FUNCTIONS IRockyGeometryTriangle

Function calculate_element_triangle_distance

![][const]

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.

Return type: ROCKY_FUNCTIONS float

Function get_orthogonal_projection

![][const]

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.

Return type: ROCKY_FUNCTIONS float3

Function get_unit_vector

![][const]

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.

Return type: ROCKY_FUNCTIONS float3

Function get_home_element_velocity

![][const]

ROCKY_FUNCTIONS float3 IRockySPHTriangleInteraction::get_home_element_velocity() const

Returns:

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

Return type: ROCKY_FUNCTIONS float3

Function get_boundary_velocity

![][const]

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.

Return type: ROCKY_FUNCTIONS float3

Function get_normal_relative_velocity

![][const]

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.

Return type: ROCKY_FUNCTIONS real_sph

Function get_tangential_relative_velocity

![][const]

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.

Return type: ROCKY_FUNCTIONS real_sph

Function get_wall_turbulent_thermal_conductance

![][const]

ROCKY_FUNCTIONS float IRockySPHTriangleInteraction::get_wall_turbulent_thermal_conductance(const float &v_tang, const float &dst_wall) const

Returns:

The thermal conductance between a SPH element and a geometry triangle, calculated using the thermal turbulent wall function. The corresponding heat transfer rate can be obtained by multiplying the thermal conductance by the temperature difference between the SPH element and the geometry triangle.

Parameters:

  • velocity: The tangential component of the velocity of the SPH element relative to the nearest point on the geometry triangle.
  • distance: The distance of the SPH element to the nearest point on the geometry triangle.

Parameters:

  • const float & v_tang
  • const float & dst_wall

Return type: ROCKY_FUNCTIONS float

Function 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:

  • force: The force to be applied to the SPH element in the SPH triangle interaction, and its triangle counterpart, expressed in Cartesian coordinates.

Parameters:

  • float3 force

Return type: ROCKY_FUNCTIONS void

Function 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:

  • acceleration: The acceleration to be added to the SPH element in the SPH triangle interaction, and its triangle counterpart, expressed in Cartesian coordinates.

Parameters:

  • float3 acceleration

Return type: ROCKY_FUNCTIONS void

[const]: https://img.shields.io/badge/-const-lightblue (const)

Connect with Ansys