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

# IRockySPHModel Struct Reference

`#include <rocky_sph_model_api.hpp>`

## Public Member Functions

| Type | Name |
| - | - |
| [IRockySPHElementScalarsModel](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r1/structIRockySPHElementScalarsModel.md) | [get\_sph\_element\_scalars](#a60758ee9b344fcc7c76b500c0ac8f1cc) () const |
| int | [get\_number\_of\_sph\_elements](#a5a3c1e8c7b54f79f6803fb25799cbd6d) () const |
| int | [get\_number\_of\_active\_sph\_elements](#a53aabea7b2fb880bf83924a036badac7) () const |
| int | [get\_number\_of\_active\_free\_sph\_elements](#a5f6419ca48c0e300e03e6820934a1718) () const |
| int | [get\_number\_of\_active\_linked\_sph\_elements](#a832524def72a3d2da3bd449d5fb74368) () const |
| ESPHKernelType | [get\_kernel\_type](#a513d780295b0089e4d2814cc660f5c78) () const |
| float | [get\_initial\_element\_spacing](#a212b6dd01fb2421258372058df86ccd6) () const |
| float | [get\_smoothing\_length](#a245fc38b2db35e544f3b78642f11aff7) () const |
| float | [get\_element\_mass](#afafa8461838c8fa9ca237437c074facd) () const |
| ROCKY\_FUNCTIONS float | [get\_fluid\_viscosity](#aa34cbdb0bbe713f76a24718369445b90) () const |
| ROCKY\_FUNCTIONS float | [get\_fluid\_density](#a053a3b3c9bd14e5051f38a0024ab4536) () const |
| ROCKY\_FUNCTIONS float | [get\_fluid\_thermal\_conductivity](#ab09538e62b2731ab25ee664d6eb08319) () const |
| ROCKY\_FUNCTIONS float | [get\_fluid\_specific\_heat](#acaf7cc9d7b268d36a2f739cfc3c3f7ca) () const |
| ROCKY\_FUNCTIONS float | [get\_speed\_of\_sound](#a223390925c0c7a8d4c0a8ceaef043fe4) () const |
| ROCKY\_FUNCTIONS float | [get\_surface\_tension](#adae7b4a0340c884eb80e14d54a1b22f5) () const |
| bool | [is\_enabled](#ab104c8f250896d3528cbe2eb045b4c69) () const |

## Detailed Description

[`IRockySPHModel`](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r1/structIRockySPHModel) includes some methods that provide basic information about the SPH model. The data associated to an [`IRockySPHModel`](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r1/structIRockySPHModel) object resides entirely on host memory, consequently, it can be accessed only within hooks executed host-side.

## Member Function Documentation

### get\_element\_mass()

```cpp theme={null}
float IRockySPHModel::get_element_mass() const
```

**Returns**

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

### get\_fluid\_density()

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

**Returns**

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

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

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

**Returns**

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

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

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

**Returns**

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

### get\_fluid\_viscosity()

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

**Returns**

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

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

```cpp theme={null}
float IRockySPHModel::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\_type()

```cpp theme={null}
ESPHKernelType IRockySPHModel::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\_number\_of\_active\_free\_sph\_elements()

```cpp theme={null}
int IRockySPHModel::get_number_of_active_free_sph_elements() const
```

**Returns**

The number of free SPH elements that are currently active in the simulation. Free SPH elements are the ones that represent the fluid in the simulation.

### get\_number\_of\_active\_linked\_sph\_elements()

```cpp theme={null}
int IRockySPHModel::get_number_of_active_linked_sph_elements() const
```

**Returns**

The number of linked SPH elements that are currently active in the simulation. Linked or DEM-coupled SPH elements are the ones inside the DEM particles, used to model the interaction between fluid and DEM particles.

### get\_number\_of\_active\_sph\_elements()

```cpp theme={null}
int IRockySPHModel::get_number_of_active_sph_elements() const
```

**Returns**

The number of SPH elements that are currently active in the simulation. This number includes both free and DEM-coupled SPH elements.

### get\_number\_of\_sph\_elements()

```cpp theme={null}
int IRockySPHModel::get_number_of_sph_elements() const
```

**Returns**

The total number of SPH elements generated during the preprocessing phase of the simulation.

### get\_smoothing\_length()

```cpp theme={null}
float IRockySPHModel::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}
float IRockySPHModel::get_speed_of_sound() const
```

**Returns**

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

### get\_sph\_element\_scalars()

```cpp theme={null}
IRockySPHElementScalarsModel IRockySPHModel::get_sph_element_scalars() const
```

**Returns**

An [`IRockySPHElementScalarsModel`](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r1/structIRockySPHElementScalarsModel) object, that allows users to add new SPH element scalars or activate SPH element scalars known to Rocky during the setup of a module. SPH element scalars are special variables attached to SPH elements that are able to store values per element that are preserved between time iterations.

### get\_surface\_tension()

```cpp theme={null}
float IRockySPHModel::get_surface_tension() const
```

**Returns**

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

### is\_enabled()

```cpp theme={null}
bool IRockySPHModel::is_enabled() const
```

**Returns**

A boolean value indicating whether the SPH model is enabled on the simulation or not.
