> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IRockySPHDeviceModel Struct Reference

`#include <rocky_sph_model_api.hpp>`

## Public Member Functions

| Type | Name |
| - | - |
| ROCKY\_FUNCTIONS float | [get\_sph\_timestep](#a1b3b0ad0b9b4e4f723fed8cd6d859ff1) () const |
| ROCKY\_FUNCTIONS float | [get\_element\_mass](#a2e07d8b951637326aa17c3869fa75f6f) () const |
| ROCKY\_FUNCTIONS float | [get\_initial\_element\_spacing](#aa0dda18957c28775ae86803575275db2) () const |
| ROCKY\_FUNCTIONS ESPHKernelType | [get\_kernel\_type](#a1c804b61e8d38f22cc1df2960b94e5e5) () const |
| ROCKY\_FUNCTIONS float | [get\_kernel\_weight](#ac0f6dab31e47087f957b9c5f921044ca) (float distance) const |
| ROCKY\_FUNCTIONS float | [get\_kernel\_derivative](#a878401756bbf4517bd2dbf7c0b6f53b5) (float distance) const |
| ROCKY\_FUNCTIONS float | [get\_smoothing\_length](#a08276af5f02f29358b677c6c5c4eb623) () const |
| ROCKY\_FUNCTIONS float | [get\_minimum\_distance](#a11adf37fd1989526607c500a68f5a190) () const |
| ROCKY\_FUNCTIONS float | [get\_minimum\_distance\_squared](#a02751c7624b5eebe898fd497fd368f7e) () const |
| ROCKY\_FUNCTIONS float | [get\_fluid\_viscosity](#a0e7d219d00a03afa23f4340f966f274f) () const |
| ROCKY\_FUNCTIONS float | [get\_fluid\_density](#a30c701000a588378110aa2a163a07847) () const |
| ROCKY\_FUNCTIONS float | [get\_fluid\_thermal\_conductivity](#a53bf5a5c5dc38bed487a0ff75b4f881e) () const |
| ROCKY\_FUNCTIONS float | [get\_fluid\_specific\_heat](#a3f511dafb251e18d7dfc8a8f7c9cfcf1) () const |
| ROCKY\_FUNCTIONS float | [get\_turbulent\_prandtl\_number](#a085435fa6f49074b90d50686b5b6dd6c) () const |
| ROCKY\_FUNCTIONS float | [get\_speed\_of\_sound](#a53367cb9b7f97cb102cb9e1703a95131) () const |
| ROCKY\_FUNCTIONS float | [get\_surface\_tension](#ad52e0f31256e039c7043a7de165fadf7) () const |
| ROCKY\_FUNCTIONS float | [get\_stiffness](#aa0fa9e6fb5e51db54a99a4bc45949409) () const |
| ROCKY\_FUNCTIONS float | [get\_damping\_coefficient](#a7a1b280f7d23137f75cafb3eb29cf2bd) () const |
| ROCKY\_FUNCTIONS ESPHBoundaryType | [get\_boundary\_condition\_type](#a9a4ab5e39105ea7398fb0b3b15b2763c) (int geometry\_index) const |
| ROCKY\_FUNCTIONS float | [get\_wall\_turbulent\_thermal\_conductance](#a98a93eadf944d6ad89416d384e1476c3) (float velocity, float distance) const |
| ROCKY\_FUNCTIONS [IRockyCloudPoint](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r1/structIRockyCloudPoint.md) | [get\_element\_cloud\_point](#a707d2c43244e0a2db08047ba86dbfd78) (int point\_cloud\_index, const [IRockySPHElement](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r1/structIRockySPHElement.md) \&element) |
| ROCKY\_FUNCTIONS bool | [has\_turbulence\_modeling](#aeafb1df061969bc91b4912460cebedb5) () const |

## Detailed Description

[`IRockySPHDeviceModel`](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r1/structIRockySPHDeviceModel) implements methods that provide general configuration parameters of the SPH model. The data associated to an [`IRockySPHDeviceModel`](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r1/structIRockySPHDeviceModel) object resides entirely on device memory, consequently, it can be accessed only within hooks executed on devices.

## Member Function Documentation

### get\_boundary\_condition\_type()

```cpp theme={null}
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:\
&#x20;`btFreeSlip = 0`\
&#x20;`btNoSlipLaminar = 1`\
&#x20;`btNoSlipTurbulent = 2`\


**Parameters**

| Name | Description |
| - | - |
| geometry\_index | The index of the wall to get the boundary type from. |

### get\_damping\_coefficient()

```cpp theme={null}
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()

```cpp theme={null}
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**

| Name | Description |
| - | - |
| point\_cloud\_index | The index that uniquely identifies a point cloud dataset. |
| element | A [`IRockySPHElement`](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r1/structIRockySPHElement) 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()

```cpp theme={null}
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()

```cpp theme={null}
ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_fluid_density() const
```

**Returns**

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

### get\_fluid\_specific\_heat()

```cpp theme={null}
ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_fluid_specific_heat() const
```

**Returns**

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

### get\_fluid\_thermal\_conductivity()

```cpp theme={null}
ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_fluid_thermal_conductivity() const
```

**Returns**

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

### get\_fluid\_viscosity()

```cpp theme={null}
ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_fluid_viscosity() const
```

**Returns**

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

### get\_initial\_element\_spacing()

```cpp theme={null}
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()

```cpp theme={null}
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**

| Name | Description |
| - | - |
| distance | The distance from the kernel's support region at which the derivative of kernel function will be evaluated. |

### get\_kernel\_type()

```cpp theme={null}
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:\
&#x20;`ktCubic = 0`\
&#x20;`ktQuintic = 1`\
&#x20;`ktWendland = 2`\


### get\_kernel\_weight()

```cpp theme={null}
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**

| Name | Description |
| - | - |
| distance | The distance from the kernel's support region at which the kernel function will be evaluated. |

### get\_minimum\_distance()

```cpp theme={null}
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()

```cpp theme={null}
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()

```cpp theme={null}
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()

```cpp theme={null}
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()

```cpp theme={null}
ROCKY_FUNCTIONS float IRockySPHDeviceModel::get_sph_timestep() const
```

**Returns**

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

### get\_stiffness()

```cpp theme={null}
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()

```cpp theme={null}
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()

```cpp theme={null}
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()

```cpp theme={null}
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**

| Name | Description |
| - | - |
| 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. |

### has\_turbulence\_modeling()

```cpp theme={null}
ROCKY_FUNCTIONS bool IRockySPHDeviceModel::has_turbulence_modeling() const
```

**Returns**

True if some turbulence model is active, false otherwise.
