    

 ## On this page

  

 

 # IRockySPHDeviceModel Struct Reference

 Last update: 17.07.2025 

`#include <<a class="el" href="rocky__sph__model__api_8hpp_source.xhtml">rocky_sph_model_api.hpp</a>>`

## <a id="pub-methods" name="pub-methods"></a>Public Member Functions

ROCKY\_FUNCTIONS float [get\_sph\_timestep](structIRockySPHDeviceModel.xhtml#a1b3b0ad0b9b4e4f723fed8cd6d859ff1) () const ROCKY\_FUNCTIONS float [get\_element\_mass](structIRockySPHDeviceModel.xhtml#a2e07d8b951637326aa17c3869fa75f6f) () const ROCKY\_FUNCTIONS float [get\_initial\_element\_spacing](structIRockySPHDeviceModel.xhtml#aa0dda18957c28775ae86803575275db2) () const ROCKY\_FUNCTIONS ESPHKernelType [get\_kernel\_type](structIRockySPHDeviceModel.xhtml#a1c804b61e8d38f22cc1df2960b94e5e5) () const ROCKY\_FUNCTIONS float [get\_kernel\_weight](structIRockySPHDeviceModel.xhtml#ac0f6dab31e47087f957b9c5f921044ca) (float distance) const ROCKY\_FUNCTIONS float [get\_kernel\_derivative](structIRockySPHDeviceModel.xhtml#a878401756bbf4517bd2dbf7c0b6f53b5) (float distance) const ROCKY\_FUNCTIONS float [get\_smoothing\_length](structIRockySPHDeviceModel.xhtml#a08276af5f02f29358b677c6c5c4eb623) () const ROCKY\_FUNCTIONS float [get\_minimum\_distance](structIRockySPHDeviceModel.xhtml#a11adf37fd1989526607c500a68f5a190) () const ROCKY\_FUNCTIONS float [get\_minimum\_distance\_squared](structIRockySPHDeviceModel.xhtml#a02751c7624b5eebe898fd497fd368f7e) () const ROCKY\_FUNCTIONS float [get\_fluid\_viscosity](structIRockySPHDeviceModel.xhtml#a0e7d219d00a03afa23f4340f966f274f) () const ROCKY\_FUNCTIONS float [get\_fluid\_density](structIRockySPHDeviceModel.xhtml#a30c701000a588378110aa2a163a07847) () const ROCKY\_FUNCTIONS float [get\_fluid\_thermal\_conductivity](structIRockySPHDeviceModel.xhtml#a53bf5a5c5dc38bed487a0ff75b4f881e) () const ROCKY\_FUNCTIONS float [get\_fluid\_specific\_heat](structIRockySPHDeviceModel.xhtml#a3f511dafb251e18d7dfc8a8f7c9cfcf1) () const ROCKY\_FUNCTIONS float [get\_turbulent\_prandtl\_number](structIRockySPHDeviceModel.xhtml#a085435fa6f49074b90d50686b5b6dd6c) () const ROCKY\_FUNCTIONS float [get\_speed\_of\_sound](structIRockySPHDeviceModel.xhtml#a53367cb9b7f97cb102cb9e1703a95131) () const ROCKY\_FUNCTIONS float [get\_surface\_tension](structIRockySPHDeviceModel.xhtml#ad52e0f31256e039c7043a7de165fadf7) () const ROCKY\_FUNCTIONS float [get\_stiffness](structIRockySPHDeviceModel.xhtml#aa0fa9e6fb5e51db54a99a4bc45949409) () const ROCKY\_FUNCTIONS float [get\_damping\_coefficient](structIRockySPHDeviceModel.xhtml#a7a1b280f7d23137f75cafb3eb29cf2bd) () const ROCKY\_FUNCTIONS ESPHBoundaryType [get\_boundary\_condition\_type](structIRockySPHDeviceModel.xhtml#a9a4ab5e39105ea7398fb0b3b15b2763c) (int geometry\_index) const ROCKY\_FUNCTIONS float [get\_wall\_turbulent\_thermal\_conductance](structIRockySPHDeviceModel.xhtml#a98a93eadf944d6ad89416d384e1476c3) (float velocity, float distance) const ROCKY\_FUNCTIONS [IRockyCloudPoint](structIRockyCloudPoint.xhtml) [get\_element\_cloud\_point](structIRockySPHDeviceModel.xhtml#a707d2c43244e0a2db08047ba86dbfd78) (int point\_cloud\_index, const [IRockySPHElement](structIRockySPHElement.xhtml) &amp;element) ROCKY\_FUNCTIONS bool [has\_turbulence\_modeling](structIRockySPHDeviceModel.xhtml#aeafb1df061969bc91b4912460cebedb5) () const <a id="details" name="details"></a>## Detailed Description

`<a class="el" href="structIRockySPHDeviceModel.xhtml">IRockySPHDeviceModel</a>` implements methods that provide general configuration parameters of the SPH model. The data associated to an `<a class="el" href="structIRockySPHDeviceModel.xhtml">IRockySPHDeviceModel</a>` object resides entirely on device memory, consequently, it can be accessed only within hooks executed on devices.



## Member Function Documentation

<a id="a9a4ab5e39105ea7398fb0b3b15b2763c" name="a9a4ab5e39105ea7398fb0b3b15b2763c"></a>## [◆ ](#a9a4ab5e39105ea7398fb0b3b15b2763c)get\_boundary\_condition\_type()

 ROCKY\_FUNCTIONS ESPHBoundaryType IRockySPHDeviceModel::get\_boundary\_condition\_type  ( int  *geometry\_index*)  const

ReturnsAn `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. 



<a id="a7a1b280f7d23137f75cafb3eb29cf2bd" name="a7a1b280f7d23137f75cafb3eb29cf2bd"></a>## [◆ ](#a7a1b280f7d23137f75cafb3eb29cf2bd)get\_damping\_coefficient()

 ROCKY\_FUNCTIONS float IRockySPHDeviceModel::get\_damping\_coefficient  ( )  const

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



<a id="a707d2c43244e0a2db08047ba86dbfd78" name="a707d2c43244e0a2db08047ba86dbfd78"></a>## [◆ ](#a707d2c43244e0a2db08047ba86dbfd78)get\_element\_cloud\_point()

 ROCKY\_FUNCTIONS [IRockyCloudPoint](structIRockyCloudPoint.xhtml) IRockySPHDeviceModel::get\_element\_cloud\_point  ( int  *point\_cloud\_index*,    const [IRockySPHElement](structIRockySPHElement.xhtml) &amp;  *element*   ) 

This function gets an auxiliary object that gives accessto 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 `<a class="el" href="structIRockySPHElement.xhtml">IRockySPHElement</a>` whose position is used to determine the nearest cloud point.ReturnsAn `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. 



<a id="a2e07d8b951637326aa17c3869fa75f6f" name="a2e07d8b951637326aa17c3869fa75f6f"></a>## [◆ ](#a2e07d8b951637326aa17c3869fa75f6f)get\_element\_mass()

 ROCKY\_FUNCTIONS float IRockySPHDeviceModel::get\_element\_mass  ( )  const

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



<a id="a30c701000a588378110aa2a163a07847" name="a30c701000a588378110aa2a163a07847"></a>## [◆ ](#a30c701000a588378110aa2a163a07847)get\_fluid\_density()

 ROCKY\_FUNCTIONS float IRockySPHDeviceModel::get\_fluid\_density  ( )  const

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



<a id="a3f511dafb251e18d7dfc8a8f7c9cfcf1" name="a3f511dafb251e18d7dfc8a8f7c9cfcf1"></a>## [◆ ](#a3f511dafb251e18d7dfc8a8f7c9cfcf1)get\_fluid\_specific\_heat()

 ROCKY\_FUNCTIONS float IRockySPHDeviceModel::get\_fluid\_specific\_heat  ( )  const

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



<a id="a53bf5a5c5dc38bed487a0ff75b4f881e" name="a53bf5a5c5dc38bed487a0ff75b4f881e"></a>## [◆ ](#a53bf5a5c5dc38bed487a0ff75b4f881e)get\_fluid\_thermal\_conductivity()

 ROCKY\_FUNCTIONS float IRockySPHDeviceModel::get\_fluid\_thermal\_conductivity  ( )  const

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



<a id="a0e7d219d00a03afa23f4340f966f274f" name="a0e7d219d00a03afa23f4340f966f274f"></a>## [◆ ](#a0e7d219d00a03afa23f4340f966f274f)get\_fluid\_viscosity()

 ROCKY\_FUNCTIONS float IRockySPHDeviceModel::get\_fluid\_viscosity  ( )  const

ReturnsThe user-prescribed value of the fluid's dynamic viscosity. 



<a id="aa0dda18957c28775ae86803575275db2" name="aa0dda18957c28775ae86803575275db2"></a>## [◆ ](#aa0dda18957c28775ae86803575275db2)get\_initial\_element\_spacing()

 ROCKY\_FUNCTIONS float IRockySPHDeviceModel::get\_initial\_element\_spacing  ( )  const

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



<a id="a878401756bbf4517bd2dbf7c0b6f53b5" name="a878401756bbf4517bd2dbf7c0b6f53b5"></a>## [◆ ](#a878401756bbf4517bd2dbf7c0b6f53b5)get\_kernel\_derivative()

 ROCKY\_FUNCTIONS float IRockySPHDeviceModel::get\_kernel\_derivative  ( float  *distance*)  const

ReturnsThe 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. 



<a id="a1c804b61e8d38f22cc1df2960b94e5e5" name="a1c804b61e8d38f22cc1df2960b94e5e5"></a>## [◆ ](#a1c804b61e8d38f22cc1df2960b94e5e5)get\_kernel\_type()

 ROCKY\_FUNCTIONS ESPHKernelType IRockySPHDeviceModel::get\_kernel\_type  ( )  const

ReturnsAn `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`  




<a id="ac0f6dab31e47087f957b9c5f921044ca" name="ac0f6dab31e47087f957b9c5f921044ca"></a>## [◆ ](#ac0f6dab31e47087f957b9c5f921044ca)get\_kernel\_weight()

 ROCKY\_FUNCTIONS float IRockySPHDeviceModel::get\_kernel\_weight  ( float  *distance*)  const

ReturnsThe 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. 



<a id="a11adf37fd1989526607c500a68f5a190" name="a11adf37fd1989526607c500a68f5a190"></a>## [◆ ](#a11adf37fd1989526607c500a68f5a190)get\_minimum\_distance()

 ROCKY\_FUNCTIONS float IRockySPHDeviceModel::get\_minimum\_distance  ( )  const

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



<a id="a02751c7624b5eebe898fd497fd368f7e" name="a02751c7624b5eebe898fd497fd368f7e"></a>## [◆ ](#a02751c7624b5eebe898fd497fd368f7e)get\_minimum\_distance\_squared()

 ROCKY\_FUNCTIONS float IRockySPHDeviceModel::get\_minimum\_distance\_squared  ( )  const

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



<a id="a08276af5f02f29358b677c6c5c4eb623" name="a08276af5f02f29358b677c6c5c4eb623"></a>## [◆ ](#a08276af5f02f29358b677c6c5c4eb623)get\_smoothing\_length()

 ROCKY\_FUNCTIONS float IRockySPHDeviceModel::get\_smoothing\_length  ( )  const

ReturnsThe 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. 



<a id="a53367cb9b7f97cb102cb9e1703a95131" name="a53367cb9b7f97cb102cb9e1703a95131"></a>## [◆ ](#a53367cb9b7f97cb102cb9e1703a95131)get\_speed\_of\_sound()

 ROCKY\_FUNCTIONS float IRockySPHDeviceModel::get\_speed\_of\_sound  ( )  const

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



<a id="a1b3b0ad0b9b4e4f723fed8cd6d859ff1" name="a1b3b0ad0b9b4e4f723fed8cd6d859ff1"></a>## [◆ ](#a1b3b0ad0b9b4e4f723fed8cd6d859ff1)get\_sph\_timestep()

 ROCKY\_FUNCTIONS float IRockySPHDeviceModel::get\_sph\_timestep  ( )  const

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



<a id="aa0fa9e6fb5e51db54a99a4bc45949409" name="aa0fa9e6fb5e51db54a99a4bc45949409"></a>## [◆ ](#aa0fa9e6fb5e51db54a99a4bc45949409)get\_stiffness()

 ROCKY\_FUNCTIONS float IRockySPHDeviceModel::get\_stiffness  ( )  const

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



<a id="ad52e0f31256e039c7043a7de165fadf7" name="ad52e0f31256e039c7043a7de165fadf7"></a>## [◆ ](#ad52e0f31256e039c7043a7de165fadf7)get\_surface\_tension()

 ROCKY\_FUNCTIONS float IRockySPHDeviceModel::get\_surface\_tension  ( )  const

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



<a id="a085435fa6f49074b90d50686b5b6dd6c" name="a085435fa6f49074b90d50686b5b6dd6c"></a>## [◆ ](#a085435fa6f49074b90d50686b5b6dd6c)get\_turbulent\_prandtl\_number()

 ROCKY\_FUNCTIONS float IRockySPHDeviceModel::get\_turbulent\_prandtl\_number  ( )  const

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



<a id="a98a93eadf944d6ad89416d384e1476c3" name="a98a93eadf944d6ad89416d384e1476c3"></a>## [◆ ](#a98a93eadf944d6ad89416d384e1476c3)get\_wall\_turbulent\_thermal\_conductance()

 ROCKY\_FUNCTIONS float IRockySPHDeviceModel::get\_wall\_turbulent\_thermal\_conductance  ( float  *velocity*,    float  *distance*   )  const

ReturnsThe 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. 



<a id="aeafb1df061969bc91b4912460cebedb5" name="aeafb1df061969bc91b4912460cebedb5"></a>## [◆ ](#aeafb1df061969bc91b4912460cebedb5)has\_turbulence\_modeling()

 ROCKY\_FUNCTIONS bool IRockySPHDeviceModel::has\_turbulence\_modeling  ( )  const

ReturnsTrue if some turbulence model is active, false otherwise.