Skip to main content
#include <rocky_particle_scalars.hpp> When running a simulation, an IRockyParticleTransferScalars 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. Inherits from:
  • EntityScalars< rocky20::ParticleTransferScalars >

Members

Public functions

Function get_heat_transfer

Returns: The 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. Return type: ROCKY_FUNCTIONS double

Function set_heat_transfer

This method sets the value of the heat transfer rate to the particle. This value: will be used in the thermal energy balance equation of the particle in order to update its temperature at the following timestep. Parameters:
  • value: The value of the heat transfer rate.
Parameters:
  • const double value
Return type: ROCKY_FUNCTIONS void

Function add_heat_transfer

This method sums a value to the current heat transfer rate to the particle.: Parameters:
  • value: The value summed to the heat transfer rate.
Parameters:
  • const double value
Return type: ROCKY_FUNCTIONS void

Function add_heat_source

This method adds a value to the source term to the thermal energy balance: equation of a particle. The added value can be positive (heat is generated) or negative (heat is removed). Parameters:
  • value: The value of the thermal energy per unit time generated in or removed from the particle.
Parameters:
  • const double value
Return type: ROCKY_FUNCTIONS void

Function get_scalar

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_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. Parameters:
  • int scalar_index
Return type: ROCKY_FUNCTIONS double

Function set_scalar

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_index: The integer index that was associated to the scalar variable during the setup of the module.
  • value: The value that must be stored.
Parameters:
  • int scalar_index
  • double value
Return type: ROCKY_FUNCTIONS void

Function add_scalar

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_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.
Parameters:
  • int scalar_index
  • double value
Return type: ROCKY_FUNCTIONS void

Function max_scalar

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_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.
Parameters:
  • int scalar_index
  • double value
Return type: ROCKY_FUNCTIONS void