Skip to main content

Rocky Solver SDK 2026 R1

Structure IRockySPHDeviceModel

Last update: 09.03.2026

#include

IRockySPHDeviceModel implements methods that provide general configuration parameters of the SPH model. The data associated to an IRockySPHDeviceModel object resides entirely on device memory, consequently, it can be accessed only within hooks executed on devices.

Members

Public functions

Function get_sph_timestep

![][const]

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_sph_timestep() const

Returns:

The timestep value used for the integration of all SPH model equations.

Return type: ROCKY_FUNCTIONS float

Function get_element_mass

![][const]

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_element_mass() const

Returns:

The mass associated to each one of the SPH elements in the simulation.

Return type: ROCKY_FUNCTIONS float

Function get_initial_element_spacing

![][const]

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_initial_element_spacing() const

Returns:

The spacing between SPH elements when they enter into the simulation. This is a characteristic length considered in several expressions in the SPH model.

Return type: ROCKY_FUNCTIONS float

Function get_kernel_weight

![][const]

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_kernel_weight(float distance) const

Returns:

The value of the kernel function evaluated at a point located at a given distance of the kernel's support region.

Parameters:

  • distance: The distance from the kernel's support region at which the kernel function will be evaluated.

Parameters:

  • float distance

Return type: ROCKY_FUNCTIONS float

Function get_kernel_derivative

![][const]

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_kernel_derivative(float distance) const

Returns:

The value of the derivative of the kernel function evaluated at a point located at a given distance of the kernel's support region.

Parameters:

  • distance: The distance from the kernel's support region at which the derivative of kernel function will be evaluated.

Parameters:

  • float distance

Return type: ROCKY_FUNCTIONS float

Function get_smoothing_length

![][const]

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_smoothing_length() const

Returns:

The value of the smoothing length considered in the SPH discretization. The radius of the support region of the kernel function is normally an integer multiple of the smoothing length.

Return type: ROCKY_FUNCTIONS float

Function get_minimum_distance

![][const]

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_minimum_distance() const

Returns:

The value of the minimum distance between any two neighbor SPH elements in a simulation.

Return type: ROCKY_FUNCTIONS float

Function get_minimum_distance_squared

![][const]

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_minimum_distance_squared() const

Returns:

The squared value of the minimum distance between any two neighbor SPH elements in a simulation.

Return type: ROCKY_FUNCTIONS float

Function get_fluid_viscosity

![][const]

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_fluid_viscosity() const

Returns:

The user-prescribed value of the fluid's dynamic viscosity. Not suitable when variable molecular viscosity is enabled.

Return type: ROCKY_FUNCTIONS float

Function get_fluid_density

![][const]

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_fluid_density() const

Returns:

The user-prescribed value of the fluid's density.

Return type: ROCKY_FUNCTIONS float

Function get_fluid_thermal_conductivity

![][const]

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_fluid_thermal_conductivity() const

Returns:

The user-prescribed value of the fluid's thermal conductivity.

Return type: ROCKY_FUNCTIONS float

Function get_fluid_specific_heat

![][const]

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_fluid_specific_heat() const

Returns:

The user-prescribed value of the fluid's specific heat.

Return type: ROCKY_FUNCTIONS float

Function get_turbulent_prandtl_number

![][const]

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_turbulent_prandtl_number() const

Returns:

The user-prescribed value of the turbulent Prandtl number, which is the ratio between the momentum and the heat transfer diffusivities due turbulence.

Return type: ROCKY_FUNCTIONS float

Function get_speed_of_sound

![][const]

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_speed_of_sound() const

Returns:

The user-prescribed value of the speed of sound in the fluid.

Return type: ROCKY_FUNCTIONS float

Function get_surface_tension

![][const]

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_surface_tension() const

Returns:

The user-prescribed value of the surface tension at a free surface.

Return type: ROCKY_FUNCTIONS float

Function get_stiffness

![][const]

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_stiffness() const

Returns:

The value of the stiffness used when modeling the repulsive normal force at boundaries.

Return type: ROCKY_FUNCTIONS float

Function get_damping_coefficient

![][const]

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_damping_coefficient() const

Returns:

The value of the damping coefficient used when modeling the dissipative force at boundaries.

Return type: ROCKY_FUNCTIONS float

Function get_wall_turbulent_thermal_conductance

![][const]

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_wall_turbulent_thermal_conductance(float velocity, float distance) 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:

  • float velocity
  • float distance

Return type: ROCKY_FUNCTIONS float

Function get_element_cloud_point

ROCKY_FUNCTIONS IRockyCloudPoint IRockySPHDeviceModel::get_element_cloud_point(int point_cloud_index, const IRockySPHElement &element)

This function gets an auxiliary object that gives access:

to cloud point values of the nearest point to a given SPH element.

Parameters:

  • point_cloud_index: The index that uniquely identifies a point cloud dataset.
  • element: A IRockySPHElement whose position is used to determine the nearest cloud point.

Returns:

An IRockySPHElementCloudPoint object, which can be used to get cloud point values of the nearest point to the element passed as argument. For more information about point clouds, please refer to the Rocky User Manual.

Parameters:

Return type: ROCKY_FUNCTIONS IRockyCloudPoint

Function has_turbulence_modeling

![][const]

ROCKY_FUNCTIONS bool IRockySPHDeviceModel::has_turbulence_modeling() const

Returns:

True if some turbulence model is active, false otherwise.

Return type: ROCKY_FUNCTIONS bool

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

Connect with Ansys