IRockyParticleBreakageScalars Struct Reference
Last update: 08.07.2024
IRockyParticleBreakageScalars Struct Reference
#include <rocky_particle_scalars.hpp>
Inherits EntityScalars< rocky20::ParticleBreakageScalars >.
Public Member Functions | |
ROCKY_FUNCTIONS double | get_t10 () const |
ROCKY_FUNCTIONS void | set_t10 (const double value) |
ROCKY_FUNCTIONS double | get_scalar (int scalar_index) const |
ROCKY_FUNCTIONS void | set_scalar (int scalar_index, double value) const |
ROCKY_FUNCTIONS void | add_scalar (int scalar_index, double value) const |
ROCKY_FUNCTIONS void | max_scalar (int scalar_index, double value) const |
Detailed Description
When running a simulation, an IRockyParticleBreakageScalars
gives access to all particle breakage scalars defined in the project. Particle breakage scalars are special particle scalars which can be used to transfer data from the point where the instantaneous breakage criterion is evaluated (at the ROCKY_PLUGIN_COMPUTE_INSTANTANEOUS_BREAKAGE
hook) to the point where the fragment size distribution is calculated (at the ROCKY_PLUGIN_COMPUTE_FRAGMENTS_SIZE_DISTRIBUTION
hook).
Member Function Documentation
◆ add_scalar()
ROCKY_FUNCTIONS void IRockyParticleBreakageScalars::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_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.
◆ get_scalar()
ROCKY_FUNCTIONS double IRockyParticleBreakageScalars::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_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_t10()
ROCKY_FUNCTIONS double IRockyParticleBreakageScalars::get_t10 | ( | ) | const |
- Returns
- The value of the \(t_{10}\) parameter set at an instantaneous breakage event. Please refer to the DEM Technical Manual for the definition of this parameter.
◆ max_scalar()
ROCKY_FUNCTIONS void IRockyParticleBreakageScalars::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_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_scalar()
ROCKY_FUNCTIONS void IRockyParticleBreakageScalars::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_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_t10()
ROCKY_FUNCTIONS void IRockyParticleBreakageScalars::set_t10 | ( | const double | value | ) |
- This method sets the value of the t10 parameter calculated at an instantaneous
- breakage event. Please refer to the DEM Technical Manual for the definition of this parameter.
- Parameters
-
value The value of the \(t_{10}\) parameter just calculated.