Skip to main content
#include <rocky_sph_model_api.hpp> 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

Returns: The timestep value used for the integration of all SPH model equations. Return type: ROCKY_FUNCTIONS float

Function get_element_mass

Returns: The mass associated to each one of the SPH elements in the simulation. Return type: ROCKY_FUNCTIONS float

Function get_initial_element_spacing

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

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

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

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

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

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

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

Returns: The user-prescribed value of the fluid’s density. Return type: ROCKY_FUNCTIONS float

Function get_fluid_thermal_conductivity

Returns: The user-prescribed value of the fluid’s thermal conductivity. Return type: ROCKY_FUNCTIONS float

Function get_fluid_specific_heat

Returns: The user-prescribed value of the fluid’s specific heat. Return type: ROCKY_FUNCTIONS float

Function get_turbulent_prandtl_number

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

Returns: The user-prescribed value of the speed of sound in the fluid. Return type: ROCKY_FUNCTIONS float

Function get_surface_tension

Returns: The user-prescribed value of the surface tension at a free surface. Return type: ROCKY_FUNCTIONS float

Function get_stiffness

Returns: The value of the stiffness used when modeling the repulsive normal force at boundaries. Return type: ROCKY_FUNCTIONS float

Function get_damping_coefficient

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

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

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

Returns: True if some turbulence model is active, false otherwise. Return type: ROCKY_FUNCTIONS bool