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

Members

Public functions

Function get_temperature

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

Function get_mass_increment

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

Function get_volume_increment

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

Function set_temperature

This method sets the value of the temperature of the particle.: Parameters:
  • value: The value of the temperature.
Parameters:
  • const double value
Return type: ROCKY_FUNCTIONS void

Function set_mass_increment

This method sets the value of the mass increment of the particle in relation: to the initial mass at the time of entrance. Parameters:
  • value: The value of the mass increment.
Parameters:
  • const double value
Return type: ROCKY_FUNCTIONS void

Function set_volume_increment

This method sets the value of the volume increment of the particle in relation: to the initial volume at the time of entrance. Parameters:
  • value: The value of the volume increment.
Parameters:
  • const double value
Return type: ROCKY_FUNCTIONS void

Function add_temperature

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

Function add_explicit_fluid_momentum

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:
  • value: The particle’s explicit momentum contribution.
Parameters:
  • const double3 value
Return type: ROCKY_FUNCTIONS void

Function add_implicit_fluid_momentum

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:
  • value: The coefficient associated to particle’s implicit momentum contribution.
Parameters:
  • const double value
Return type: ROCKY_FUNCTIONS void

Function add_explicit_fluid_heat_transfer_rate

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:
  • value: The particle’s explicit heat transfer rate contribution.
Parameters:
  • const double value
Return type: ROCKY_FUNCTIONS void

Function add_implicit_fluid_heat_transfer_rate

// 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:
  • value: The particle’s implicit heat transfer rate contribution.
Parameters:
  • const double value
Return type: ROCKY_FUNCTIONS void

Function add_mass_increment

This method sums a value to the current mass increment of the particle.: Parameters:
  • value: The value summed to the mass increment.
Parameters:
  • const double value
Return type: ROCKY_FUNCTIONS void

Function add_volume_increment

This method sums a value to the current volume increment of the particle.: Parameters:
  • value: The value summed to the volume increment.
Parameters:
  • const double value
Return type: ROCKY_FUNCTIONS void

Function get_thermal_conductivity

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

Function set_thermal_conductivity

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:
  • value: The value of the particle’s thermal conductivity.
Parameters:
  • const double value
Return type: ROCKY_FUNCTIONS void

Function get_specific_heat

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

Function set_specific_heat

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:
  • value: The value of the particle’s specific heat.
Parameters:
  • const double value
Return type: ROCKY_FUNCTIONS void

Function get_poisson_ratio

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

Function set_poisson_ratio

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:
  • value: The value of the Poisson’s ratio for 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