Skip to main content

Rocky Solver SDK 2024 R2

IRockySPHDeviceModel Struct Reference

Last update: 08.07.2024

#include <rocky_sph_model_api.hpp>

Public Member Functions

ROCKY_FUNCTIONS float get_sph_timestep () const
 
ROCKY_FUNCTIONS float get_element_mass () const
 
ROCKY_FUNCTIONS float get_initial_element_spacing () const
 
ROCKY_FUNCTIONS ESPHKernelType get_kernel_type () const
 
ROCKY_FUNCTIONS float get_kernel_weight (float distance) const
 
ROCKY_FUNCTIONS float get_kernel_derivative (float distance) const
 
ROCKY_FUNCTIONS float get_smoothing_length () const
 
ROCKY_FUNCTIONS float get_minimum_distance () const
 
ROCKY_FUNCTIONS float get_minimum_distance_squared () const
 
ROCKY_FUNCTIONS float get_fluid_viscosity () const
 
ROCKY_FUNCTIONS float get_fluid_density () const
 
ROCKY_FUNCTIONS float get_fluid_thermal_conductivity () const
 
ROCKY_FUNCTIONS float get_fluid_specific_heat () const
 
ROCKY_FUNCTIONS float get_turbulent_prandtl_number () const
 
ROCKY_FUNCTIONS float get_speed_of_sound () const
 
ROCKY_FUNCTIONS float get_surface_tension () const
 
ROCKY_FUNCTIONS float get_stiffness () const
 
ROCKY_FUNCTIONS float get_damping_coefficient () const
 
ROCKY_FUNCTIONS ESPHBoundaryType get_boundary_condition_type (int geometry_index) const
 
ROCKY_FUNCTIONS float get_wall_turbulent_thermal_conductance (float velocity, float distance) const
 
ROCKY_FUNCTIONS IRockyCloudPoint get_element_cloud_point (int point_cloud_index, const IRockySPHElement &element)
 
ROCKY_FUNCTIONS bool has_turbulence_modeling () const
 

Detailed Description

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.

Member Function Documentation

◆ get_boundary_condition_type()

ROCKY_FUNCTIONS ESPHBoundaryType IRockySPHDeviceModel::get_boundary_condition_type ( int  geometry_index) const
Returns
An ESPHBoundaryType enum indicating the type of boundary condition applied at a given wall identified by geometry_index. Currently there are 3 boundary conditions types implemented in Rocky:
btFreeSlip = 0
btNoSlipLaminar = 1
btNoSlipTurbulent = 2
Parameters
geometry_indexThe index of the wall to get the boundary type from.

◆ get_damping_coefficient()

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_damping_coefficient ( ) const
Returns
The value of the damping coefficient used when modeling the dissipative force at boundaries.

◆ 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_indexThe index that uniquely identifies a point cloud dataset.
elementA 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.

◆ get_element_mass()

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_element_mass ( ) const
Returns
The mass associated to each one of the SPH elements in the simulation.

◆ get_fluid_density()

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_fluid_density ( ) const
Returns
The user-prescribed value of the fluid's density.

◆ get_fluid_specific_heat()

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_fluid_specific_heat ( ) const
Returns
The user-prescribed value of the fluid's specific heat.

◆ get_fluid_thermal_conductivity()

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_fluid_thermal_conductivity ( ) const
Returns
The user-prescribed value of the fluid's thermal conductivity.

◆ get_fluid_viscosity()

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_fluid_viscosity ( ) const
Returns
The user-prescribed value of the fluid's dynamic viscosity.

◆ get_initial_element_spacing()

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.

◆ get_kernel_derivative()

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
distanceThe distance from the kernel's support region at which the derivative of kernel function will be evaluated.

◆ get_kernel_type()

ROCKY_FUNCTIONS ESPHKernelType IRockySPHDeviceModel::get_kernel_type ( ) const
Returns
An ESPHKernelType enum indicating the kernel type used in the SPH model. Currently there are 3 kernel types implemented in Rocky:
ktCubic = 0
ktQuintic = 1
ktWendland = 2

◆ get_kernel_weight()

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
distanceThe distance from the kernel's support region at which the kernel function will be evaluated.

◆ get_minimum_distance()

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_minimum_distance ( ) const
Returns
The value of the minimum distance between any two neighbor SPH elements in a simulation.

◆ get_minimum_distance_squared()

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.

◆ get_smoothing_length()

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.

◆ get_speed_of_sound()

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_speed_of_sound ( ) const
Returns
The user-prescribed value of the speed of sound in the fluid.

◆ get_sph_timestep()

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_sph_timestep ( ) const
Returns
The timestep value used for the integration of all SPH model equations.

◆ get_stiffness()

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_stiffness ( ) const
Returns
The value of the stiffness used when modeling the repulsive normal force at boundaries.

◆ get_surface_tension()

ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_surface_tension ( ) const
Returns
The user-prescribed value of the surface tension at a free surface.

◆ get_turbulent_prandtl_number()

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.

◆ get_wall_turbulent_thermal_conductance()

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
velocityThe tangential component of the velocity of the SPH element relative to the nearest point on the geometry triangle.
distanceThe distance of the SPH element to the nearest point on the geometry triangle.

◆ has_turbulence_modeling()

ROCKY_FUNCTIONS bool IRockySPHDeviceModel::has_turbulence_modeling ( ) const
Returns
True if some turbulence model is active, false otherwise.