    

 ## On this page

  

 

 # IRockyParticleTransferScalars 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::ParticleTransferScalars &gt;.

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

ROCKY\_FUNCTIONS double [get\_heat\_transfer](#adb482691a11732335076edd8113087cd) () const ROCKY\_FUNCTIONS void [set\_heat\_transfer](#a3990cc0e8e9d91d57cb4dd5edfebc8c1) (const double value) ROCKY\_FUNCTIONS void [add\_heat\_transfer](#a698d33f0f3ed82cf1a62ff21c881fb74) (const double value) ROCKY\_FUNCTIONS void [add\_heat\_source](#a8f0eeb9e7c46b0a82b746c80f7bcc3c2) (const double value) ROCKY\_FUNCTIONS double [get\_scalar](#aa840c5918e86e974c13e7d630251c5b4) (int scalar\_index) const ROCKY\_FUNCTIONS void [set\_scalar](#a32a00ee4ca40287266b284214e8a2c9c) (int scalar\_index, double value) const ROCKY\_FUNCTIONS void [add\_scalar](#a20599ee8283e5adcb2af659ca7b60985) (int scalar\_index, double value) const ROCKY\_FUNCTIONS void [max\_scalar](#a9cef39b6f42cca4284f2bd733ee4d173) (int scalar\_index, double value) const <a id="details" name="details"></a>## Detailed Description

When running a simulation, an `<a class="el" href="structIRockyParticleTransferScalars.xhtml">IRockyParticleTransferScalars</a>` gives access to all particle transfer scalars defined in the project. Particle transfer scalars are special particle scalars whose values are reset automatically to zero at the beginning of a new time iteration.



## Member Function Documentation

<a id="a8f0eeb9e7c46b0a82b746c80f7bcc3c2" name="a8f0eeb9e7c46b0a82b746c80f7bcc3c2"></a>## [◆ ](#a8f0eeb9e7c46b0a82b746c80f7bcc3c2)add\_heat\_source()

 ROCKY\_FUNCTIONS void IRockyParticleTransferScalars::add\_heat\_source  ( const double *value*) 

This method adds a value to the source term to the thermal energy balanceequation of a particle. The added value can be positive (heat is generated) or negative (heat is removed).Parameters valueThe value of the thermal energy per unit time generated in or removed from the particle. 



<a id="a698d33f0f3ed82cf1a62ff21c881fb74" name="a698d33f0f3ed82cf1a62ff21c881fb74"></a>## [◆ ](#a698d33f0f3ed82cf1a62ff21c881fb74)add\_heat\_transfer()

 ROCKY\_FUNCTIONS void IRockyParticleTransferScalars::add\_heat\_transfer  ( const double *value*) 

This method sums a value to the current heat transfer rate to the particle.Parameters valueThe value summed to the heat transfer rate. 



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

 ROCKY\_FUNCTIONS void IRockyParticleTransferScalars::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="adb482691a11732335076edd8113087cd" name="adb482691a11732335076edd8113087cd"></a>## [◆ ](#adb482691a11732335076edd8113087cd)get\_heat\_transfer()

 ROCKY\_FUNCTIONS double IRockyParticleTransferScalars::get\_heat\_transfer  ( )  const

ReturnsThe value of the total heat transfer rate to the particle at a given time. This is a built-in particle scalar defined inside the solver, enabled whenever a thermal model is active in the project. 



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

 ROCKY\_FUNCTIONS double IRockyParticleTransferScalars::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="a9cef39b6f42cca4284f2bd733ee4d173" name="a9cef39b6f42cca4284f2bd733ee4d173"></a>## [◆ ](#a9cef39b6f42cca4284f2bd733ee4d173)max\_scalar()

 ROCKY\_FUNCTIONS void IRockyParticleTransferScalars::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="a3990cc0e8e9d91d57cb4dd5edfebc8c1" name="a3990cc0e8e9d91d57cb4dd5edfebc8c1"></a>## [◆ ](#a3990cc0e8e9d91d57cb4dd5edfebc8c1)set\_heat\_transfer()

 ROCKY\_FUNCTIONS void IRockyParticleTransferScalars::set\_heat\_transfer  ( const double *value*) 

This method sets the value of the heat transfer rate to the particle. This valuewill be used in the thermal energy balance equation of the particle in order to update its temperature at the following timestep.Parameters valueThe value of the heat transfer rate. 



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

 ROCKY\_FUNCTIONS void IRockyParticleTransferScalars::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.