    

 ## On this page

  

 

 # IRockyParticleScalars Struct Reference

 Last update: 16.07.2025 

`#include <<a class="el" href="rocky__particle__scalars_8hpp_source.xhtml">rocky_particle_scalars.hpp</a>>`

Inherits EntityScalars&lt; rocky20::ParticleScalars &gt;.

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

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 <a id="details" name="details"></a>## Detailed Description

When running a simulation, an `<a class="el" href="structIRockyParticleScalars.xhtml">IRockyParticleScalars</a>` 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

<a id="a879d37039a8dac11578b008f69510232" name="a879d37039a8dac11578b008f69510232"></a>## [◆ ](#a879d37039a8dac11578b008f69510232)add\_explicit\_fluid\_heat\_transfer\_rate()

 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 equationassociated 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 valueThe particle's explicit heat transfer rate contribution. 



<a id="ad8f1693fb8d2e2f901791f0d55ffafd9" name="ad8f1693fb8d2e2f901791f0d55ffafd9"></a>## [◆ ](#ad8f1693fb8d2e2f901791f0d55ffafd9)add\_explicit\_fluid\_momentum()

 ROCKY\_FUNCTIONS void IRockyParticleScalars::add\_explicit\_fluid\_momentum  ( const double3 *value*) 

This method adds the particle's explicit contribution into the CFD momentum equationassociated 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 valueThe particle's explicit momentum contribution. 



<a id="afc8afe09fcf6cbbc037884a382f40386" name="afc8afe09fcf6cbbc037884a382f40386"></a>## [◆ ](#afc8afe09fcf6cbbc037884a382f40386)add\_implicit\_fluid\_heat\_transfer\_rate()

 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 equationassociated 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 valueThe particle's implicit heat transfer rate contribution. 



<a id="a4ec6b9153716ae4de2399ce1cb148a35" name="a4ec6b9153716ae4de2399ce1cb148a35"></a>## [◆ ](#a4ec6b9153716ae4de2399ce1cb148a35)add\_implicit\_fluid\_momentum()

 ROCKY\_FUNCTIONS void IRockyParticleScalars::add\_implicit\_fluid\_momentum  ( const double *value*) 

This method adds the particle's implicit contribution into the CFD momentum equationassociated 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 valueThe coefficient associated to particle's implicit momentum contribution. 



<a id="ae7c53f46ae9e8420e3546939841cb267" name="ae7c53f46ae9e8420e3546939841cb267"></a>## [◆ ](#ae7c53f46ae9e8420e3546939841cb267)add\_mass\_increment()

 ROCKY\_FUNCTIONS void IRockyParticleScalars::add\_mass\_increment  ( const double *value*) 

This method sums a value to the current mass increment of the particle.Parameters valueThe value summed to the mass increment. 



<a id="a7583200a98dabab00cb51f19e90356a4" name="a7583200a98dabab00cb51f19e90356a4"></a>## [◆ ](#a7583200a98dabab00cb51f19e90356a4)add\_scalar()

 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 scalar\_indexThe integer index that was associated to the scalar variable during the setup of the module.valueThe value that must be summed to the current stored value.  




<a id="aae018069db36996a8d86fd9f6c18a0cf" name="aae018069db36996a8d86fd9f6c18a0cf"></a>## [◆ ](#aae018069db36996a8d86fd9f6c18a0cf)add\_temperature()

 ROCKY\_FUNCTIONS void IRockyParticleScalars::add\_temperature  ( const double *value*) 

This method sums a value to the current temperature of the particle.Parameters valueThe value summed to the temperature. 



<a id="a76d6d6d09083736d7e40bb09710bfa37" name="a76d6d6d09083736d7e40bb09710bfa37"></a>## [◆ ](#a76d6d6d09083736d7e40bb09710bfa37)add\_volume\_increment()

 ROCKY\_FUNCTIONS void IRockyParticleScalars::add\_volume\_increment  ( const double *value*) 

This method sums a value to the current volume increment of the particle.Parameters valueThe value summed to the volume increment. 



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

 ROCKY\_FUNCTIONS double IRockyParticleScalars::get\_mass\_increment  ( )  const

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



<a id="aa2e33b5ad44cf4487e8c28f69bab1bbc" name="aa2e33b5ad44cf4487e8c28f69bab1bbc"></a>## [◆ ](#aa2e33b5ad44cf4487e8c28f69bab1bbc)get\_poisson\_ratio()

 ROCKY\_FUNCTIONS double IRockyParticleScalars::get\_poisson\_ratio  ( )  const

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



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

 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 scalar\_indexThe integer index that was associated to the scalar variable during the setup of the module.ReturnsThe value currently stored in the scalar variable. 



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

 ROCKY\_FUNCTIONS double IRockyParticleScalars::get\_specific\_heat  ( )  const

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



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

 ROCKY\_FUNCTIONS double IRockyParticleScalars::get\_temperature  ( )  const

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



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

 ROCKY\_FUNCTIONS double IRockyParticleScalars::get\_thermal\_conductivity  ( )  const

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



<a id="a07d6c5c74fe0291617efe4f1c5c0b530" name="a07d6c5c74fe0291617efe4f1c5c0b530"></a>## [◆ ](#a07d6c5c74fe0291617efe4f1c5c0b530)get\_volume\_increment()

 ROCKY\_FUNCTIONS double IRockyParticleScalars::get\_volume\_increment  ( )  const

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



<a id="a83a4b26c94d203d6b02708fa7ec52c65" name="a83a4b26c94d203d6b02708fa7ec52c65"></a>## [◆ ](#a83a4b26c94d203d6b02708fa7ec52c65)max\_scalar()

 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 scalar\_indexThe integer index that was associated to the scalar variable during the setup of the module.valueA value that must be checked if it is greater than the current stored value. 



<a id="add3b52baa679fb29168078afd6f414c4" name="add3b52baa679fb29168078afd6f414c4"></a>## [◆ ](#add3b52baa679fb29168078afd6f414c4)set\_mass\_increment()

 ROCKY\_FUNCTIONS void IRockyParticleScalars::set\_mass\_increment  ( const double *value*) 

This method sets the value of the mass increment of the particle in relationto the initial mass at the time of entrance.Parameters valueThe value of the mass increment. 



<a id="a575c4ba7f23f9b8b0344964a5ddf4e01" name="a575c4ba7f23f9b8b0344964a5ddf4e01"></a>## [◆ ](#a575c4ba7f23f9b8b0344964a5ddf4e01)set\_poisson\_ratio()

 ROCKY\_FUNCTIONS void IRockyParticleScalars::set\_poisson\_ratio  ( const double *value*) 

This method sets the value of the Poisson's ratio for the associated particle, ifthe corresponding built-in particle scalar was enabled. Otherwise, a segmentation fault will occur.Parameters valueThe value of the Poisson's ratio for the particle. 



<a id="a18a2bdf028e0356b59e5c7bfa7d35a05" name="a18a2bdf028e0356b59e5c7bfa7d35a05"></a>## [◆ ](#a18a2bdf028e0356b59e5c7bfa7d35a05)set\_scalar()

 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 scalar\_indexThe integer index that was associated to the scalar variable during the setup of the module.valueThe value that must be stored. 



<a id="a161b925c5cb9660521995eae19230b98" name="a161b925c5cb9660521995eae19230b98"></a>## [◆ ](#a161b925c5cb9660521995eae19230b98)set\_specific\_heat()

 ROCKY\_FUNCTIONS void IRockyParticleScalars::set\_specific\_heat  ( const double *value*) 

This method sets the value of the specific heat for the associated particle, ifthe corresponding built-in particle scalar was enabled. Otherwise, a segmentation fault will occur.Parameters valueThe value of the particle's specific heat. 



<a id="a52baa075b4469ce9c99fb3598b1e3495" name="a52baa075b4469ce9c99fb3598b1e3495"></a>## [◆ ](#a52baa075b4469ce9c99fb3598b1e3495)set\_temperature()

 ROCKY\_FUNCTIONS void IRockyParticleScalars::set\_temperature  ( const double *value*) 

This method sets the value of the temperature of the particle.Parameters valueThe value of the temperature. 



<a id="a2e9ff5092bd888f58d2441f26503717b" name="a2e9ff5092bd888f58d2441f26503717b"></a>## [◆ ](#a2e9ff5092bd888f58d2441f26503717b)set\_thermal\_conductivity()

 ROCKY\_FUNCTIONS void IRockyParticleScalars::set\_thermal\_conductivity  ( const double *value*) 

This method sets the value of the thermal conductivity for the associated particle, ifthe corresponding built-in particle scalar was enabled. Otherwise, a segmentation fault will occur.Parameters valueThe value of the particle's thermal conductivity. 



<a id="a1cf60c38b7d56949f4bd938a71139b3a" name="a1cf60c38b7d56949f4bd938a71139b3a"></a>## [◆ ](#a1cf60c38b7d56949f4bd938a71139b3a)set\_volume\_increment()

 ROCKY\_FUNCTIONS void IRockyParticleScalars::set\_volume\_increment  ( const double *value*) 

This method sets the value of the volume increment of the particle in relationto the initial volume at the time of entrance.Parameters valueThe value of the volume increment.