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

# IRockyParticleScalars Struct Reference

`#include <rocky_particle_scalars.hpp>`

Inherits EntityScalars\< rocky20::ParticleScalars >.

## Public Member Functions

| Type | Name |
| - | - |
| ROCKY\_FUNCTIONS double | [get\_temperature](#a4a64868ea5dae08ca841701423268d24) () const |
| ROCKY\_FUNCTIONS double | [get\_mass\_increment](#a228debc629b2c74943a35a6411e85e34) () const |
| ROCKY\_FUNCTIONS double | [get\_volume\_increment](#a07d6c5c74fe0291617efe4f1c5c0b530) () const |
| ROCKY\_FUNCTIONS void | [set\_temperature](#a52baa075b4469ce9c99fb3598b1e3495) (const double value) |
| ROCKY\_FUNCTIONS void | [set\_mass\_increment](#add3b52baa679fb29168078afd6f414c4) (const double value) |
| ROCKY\_FUNCTIONS void | [set\_volume\_increment](#a1cf60c38b7d56949f4bd938a71139b3a) (const double value) |
| ROCKY\_FUNCTIONS void | [add\_temperature](#aae018069db36996a8d86fd9f6c18a0cf) (const double value) |
| ROCKY\_FUNCTIONS void | [add\_explicit\_fluid\_momentum](#ad8f1693fb8d2e2f901791f0d55ffafd9) (const double3 value) |
| ROCKY\_FUNCTIONS void | [add\_implicit\_fluid\_momentum](#a4ec6b9153716ae4de2399ce1cb148a35) (const double value) |
| ROCKY\_FUNCTIONS void | [add\_explicit\_fluid\_heat\_transfer\_rate](#a879d37039a8dac11578b008f69510232) (const double value) |
| ROCKY\_FUNCTIONS void | [add\_implicit\_fluid\_heat\_transfer\_rate](#afc8afe09fcf6cbbc037884a382f40386) (const double value) |
| ROCKY\_FUNCTIONS void | [add\_mass\_increment](#ae7c53f46ae9e8420e3546939841cb267) (const double value) |
| ROCKY\_FUNCTIONS void | [add\_volume\_increment](#a76d6d6d09083736d7e40bb09710bfa37) (const double value) |
| ROCKY\_FUNCTIONS double | [get\_thermal\_conductivity](#a3c656901b88bf6938e16f0559e1f8554) () const |
| ROCKY\_FUNCTIONS void | [set\_thermal\_conductivity](#a2e9ff5092bd888f58d2441f26503717b) (const double value) |
| ROCKY\_FUNCTIONS double | [get\_specific\_heat](#a2e527a39101f66c5b8107634655f7ac0) () const |
| ROCKY\_FUNCTIONS void | [set\_specific\_heat](#a161b925c5cb9660521995eae19230b98) (const double value) |
| ROCKY\_FUNCTIONS double | [get\_poisson\_ratio](#aa2e33b5ad44cf4487e8c28f69bab1bbc) () const |
| ROCKY\_FUNCTIONS void | [set\_poisson\_ratio](#a575c4ba7f23f9b8b0344964a5ddf4e01) (const double value) |
| ROCKY\_FUNCTIONS double | [get\_scalar](#a22cb79d50006e74ccc257c1b7b7c65ce) (int scalar\_index) const |
| ROCKY\_FUNCTIONS void | [set\_scalar](#a18a2bdf028e0356b59e5c7bfa7d35a05) (int scalar\_index, double value) const |
| ROCKY\_FUNCTIONS void | [add\_scalar](#a7583200a98dabab00cb51f19e90356a4) (int scalar\_index, double value) const |
| ROCKY\_FUNCTIONS void | [max\_scalar](#a83a4b26c94d203d6b02708fa7ec52c65) (int scalar\_index, double value) const |

## Detailed Description

When running a simulation, an [`IRockyParticleScalars`](https://developer.synopsys.com/docs/rocky/rocky-solver-sdk/2025-r1/structIRockyParticleScalars) gives access to all particle scalars defined in the project. These particle scalars can be built-in scalars defined in the Rocky solver, or custom particle scalars defined by the current module or other active modules.

## Member Function Documentation

### add\_explicit\_fluid\_heat\_transfer\_rate()

```cpp theme={null}
ROCKY_FUNCTIONS void IRockyParticleScalars::add_explicit_fluid_heat_transfer_rate(
    const double value
)
```

**This method adds the particle's implicit contribution into the CFD thermal energy equation**

associated to the cell where the particle centroid is located. This operation is valid only for thermal-enabled two-way DEM-CFD coupling (please refer to the DEM-CFD Coupling Technical Manual for more details).

**Parameters**

| Name | Description |
| - | - |
| value | The particle's explicit heat transfer rate contribution. |

### add\_explicit\_fluid\_momentum()

```cpp theme={null}
ROCKY_FUNCTIONS void IRockyParticleScalars::add_explicit_fluid_momentum(
    const double3 value
)
```

**This method adds the particle's explicit contribution into the CFD momentum equation**

associated to the cell where the particle centroid is located. This operation is valid only for two-way DEM-CFD coupling (please refer to the DEM-CFD Coupling Technical Manual for more details).

**Parameters**

| Name | Description |
| - | - |
| value | The particle's explicit momentum contribution. |

### add\_implicit\_fluid\_heat\_transfer\_rate()

```cpp theme={null}
ROCKY_FUNCTIONS void IRockyParticleScalars::add_implicit_fluid_heat_transfer_rate(
    const double value
)
```

**// This method adds the particle's implicit contribution into the CFD thermal energy equation**

associated to the cell where the particle centroid is located. This operation is valid only for thermal-enabled two-way DEM-CFD coupling (please refer to the DEM-CFD Coupling Technical Manual for more details).

**Parameters**

| Name | Description |
| - | - |
| value | The particle's implicit heat transfer rate contribution. |

### add\_implicit\_fluid\_momentum()

```cpp theme={null}
ROCKY_FUNCTIONS void IRockyParticleScalars::add_implicit_fluid_momentum(const double value)
```

**This method adds the particle's implicit contribution into the CFD momentum equation**

associated to the cell where the particle centroid is located. This operation is valid only for two-way DEM-CFD coupling (please refer to the DEM-CFD Coupling Technical Manual for more details).

**Parameters**

| Name | Description |
| - | - |
| value | The coefficient associated to particle's implicit momentum contribution. |

### add\_mass\_increment()

```cpp theme={null}
ROCKY_FUNCTIONS void IRockyParticleScalars::add_mass_increment(const double value)
```

**This method sums a value to the current mass increment of the particle.**

**Parameters**

| Name | Description |
| - | - |
| value | The value summed to the mass increment. |

### add\_scalar()

```cpp theme={null}
ROCKY_FUNCTIONS void IRockyParticleScalars::add_scalar(
    int scalar_index,
    double value
) const
```

**If a custom scalar variable was defined during the setup of the module,**

this method can be used to sum a value to the current one stored in it.

**Parameters**

| Name | Description |
| - | - |
| scalar\_index | The integer index that was associated to the scalar variable during the setup of the module. |
| value | The value that must be summed to the current stored value. |

### add\_temperature()

```cpp theme={null}
ROCKY_FUNCTIONS void IRockyParticleScalars::add_temperature(const double value)
```

**This method sums a value to the current temperature of the particle.**

**Parameters**

| Name | Description |
| - | - |
| value | The value summed to the temperature. |

### add\_volume\_increment()

```cpp theme={null}
ROCKY_FUNCTIONS void IRockyParticleScalars::add_volume_increment(const double value)
```

**This method sums a value to the current volume increment of the particle.**

**Parameters**

| Name | Description |
| - | - |
| value | The value summed to the volume increment. |

### get\_mass\_increment()

```cpp theme={null}
ROCKY_FUNCTIONS double IRockyParticleScalars::get_mass_increment() const
```

**Returns**

The value of the mass increment of the particle in relation to the initial mass at the time of entrance. Different physical processes can cause this mass increment. The mass increment is a built-in particle scalar defined in the solver.

### get\_poisson\_ratio()

```cpp theme={null}
ROCKY_FUNCTIONS double IRockyParticleScalars::get_poisson_ratio() const
```

**Returns**

The value of the Poisson's ratio assigned to the particle. The Rocky solver has a built-in particle scalar that once enabled allow particles to have a variable Poisson's ratio, which overrides the constant value specified for the particle's material.

### get\_scalar()

```cpp theme={null}
ROCKY_FUNCTIONS double IRockyParticleScalars::get_scalar(int scalar_index) const
```

**If a custom scalar variable was defined during the setup of the module,**

the value currently stored can be accessed with this method.

**Parameters**

| Name | Description |
| - | - |
| scalar\_index | The integer index that was associated to the scalar variable during the setup of the module. |

**Returns**

The value currently stored in the scalar variable.

### get\_specific\_heat()

```cpp theme={null}
ROCKY_FUNCTIONS double IRockyParticleScalars::get_specific_heat() const
```

**Returns**

The value of the specific heat of the particle. The Rocky solver has a built-in particle scalar that once enabled allow particles to have a variable specific heat, which overrides the constant value specified for the particle's material.

### get\_temperature()

```cpp theme={null}
ROCKY_FUNCTIONS double IRockyParticleScalars::get_temperature() const
```

**Returns**

The value of the current particle's temperature. Temperature is a built-in particle scalar defined in the solver, enabled whenever a thermal model is active in the project.

### get\_thermal\_conductivity()

```cpp theme={null}
ROCKY_FUNCTIONS double IRockyParticleScalars::get_thermal_conductivity() const
```

**Returns**

The value of the thermal conductivity of the particle. The Rocky solver has a built-in particle scalar that once enabled allow particles to have a variable thermal conductivity, which overrides the constant value specified for the particle's material.

### get\_volume\_increment()

```cpp theme={null}
ROCKY_FUNCTIONS double IRockyParticleScalars::get_volume_increment() const
```

**Returns**

The value of the volume increment of the particle in relation to the initial volume at the time of entrance. Different physical processes can cause this volume increment. The volume increment is a built-in particle scalar defined in the solver.

### max\_scalar()

```cpp theme={null}
ROCKY_FUNCTIONS void IRockyParticleScalars::max_scalar(
    int scalar_index,
    double value
) const
```

**If a custom scalar variable was defined during the setup of the module,**

this method can be used to make the scalar store the maximum of a set of values. A common use of this method is, for instance, to find the maximum among a set of values associated to the contacts of a particle.

**Parameters**

| Name | Description |
| - | - |
| scalar\_index | The integer index that was associated to the scalar variable during the setup of the module. |
| value | A value that must be checked if it is greater than the current stored value. |

### set\_mass\_increment()

```cpp theme={null}
ROCKY_FUNCTIONS void IRockyParticleScalars::set_mass_increment(const double value)
```

**This method sets the value of the mass increment of the particle in relation**

to the initial mass at the time of entrance.

**Parameters**

| Name | Description |
| - | - |
| value | The value of the mass increment. |

### set\_poisson\_ratio()

```cpp theme={null}
ROCKY_FUNCTIONS void IRockyParticleScalars::set_poisson_ratio(const double value)
```

**This method sets the value of the Poisson's ratio for the associated particle, if**

the corresponding built-in particle scalar was enabled. Otherwise, a segmentation fault will occur.

**Parameters**

| Name | Description |
| - | - |
| value | The value of the Poisson's ratio for the particle. |

### set\_scalar()

```cpp theme={null}
ROCKY_FUNCTIONS void IRockyParticleScalars::set_scalar(
    int scalar_index,
    double value
) const
```

**If a custom scalar variable was defined during the setup of the module,**

this method can be used to store a value on it.

**Parameters**

| Name | Description |
| - | - |
| scalar\_index | The integer index that was associated to the scalar variable during the setup of the module. |
| value | The value that must be stored. |

### set\_specific\_heat()

```cpp theme={null}
ROCKY_FUNCTIONS void IRockyParticleScalars::set_specific_heat(const double value)
```

**This method sets the value of the specific heat for the associated particle, if**

the corresponding built-in particle scalar was enabled. Otherwise, a segmentation fault will occur.

**Parameters**

| Name | Description |
| - | - |
| value | The value of the particle's specific heat. |

### set\_temperature()

```cpp theme={null}
ROCKY_FUNCTIONS void IRockyParticleScalars::set_temperature(const double value)
```

**This method sets the value of the temperature of the particle.**

**Parameters**

| Name | Description |
| - | - |
| value | The value of the temperature. |

### set\_thermal\_conductivity()

```cpp theme={null}
ROCKY_FUNCTIONS void IRockyParticleScalars::set_thermal_conductivity(const double value)
```

**This method sets the value of the thermal conductivity for the associated particle, if**

the corresponding built-in particle scalar was enabled. Otherwise, a segmentation fault will occur.

**Parameters**

| Name | Description |
| - | - |
| value | The value of the particle's thermal conductivity. |

### set\_volume\_increment()

```cpp theme={null}
ROCKY_FUNCTIONS void IRockyParticleScalars::set_volume_increment(const double value)
```

**This method sets the value of the volume increment of the particle in relation**

to the initial volume at the time of entrance.

**Parameters**

| Name | Description |
| - | - |
| value | The value of the volume increment. |
