    

 ## On this page

  

 

 # IRockyParticleBreakageScalarsModel Struct Reference

 Last update: 16.07.2025 

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

Inherits ScalarsModel&lt; rocky20::ParticleBreakageScalarsController &gt;.

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

void [enable\_t10](#a360827c2e0c1a676e3a8c6be6ed26362) () int [find](#a00666ca9d343b8d3284975687ce4d087) (const char \*name) int [add](#a7dbaee843fb6e694d1b9a4940c9eeaa2) (const char \*name, const char \*unit, bool output=true) void [reset](#aed6f4019176f0d14ff941493d3e4dcb0) (int scalar\_index) void [set\_dimension](#aa084abe67dcb26bd2e050a39061ce0e0) (int scalar\_index, double dimension\_factor) <a id="details" name="details"></a>## Detailed Description

An `<a class="el" href="structIRockyParticleBreakageScalarsModel.xhtml">IRockyParticleBreakageScalarsModel</a>` allows users to add new particle breakage scalars, find particle breakage scalars created in other modules or activate particle breakage scalars known to Rocky, during the setup stage of a module. 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). A typical use is to store the value of the \\(t\_{10}\\) parameter, which is calculated at the moment a particle breaks and is used for calculating the resulting fragment size distribution. However, users can employ these scalars to store whichever parameter that links the breakage criterion with the fragment size distribution in their models.



## Member Function Documentation

<a id="a7dbaee843fb6e694d1b9a4940c9eeaa2" name="a7dbaee843fb6e694d1b9a4940c9eeaa2"></a>## [◆ ](#a7dbaee843fb6e694d1b9a4940c9eeaa2)add()

 int IRockyParticleBreakageScalarsModel::add  ( const char \* *name*,    const char \* *unit*,    bool *output* = true )

This method creates a new scalar variable of type `double`for storing custom values during a simulation, preserving them between time iterations.Parameters nameThe name given to the scalar variable. The purpose of this name is twofold. First, it enables to find this scalar variable from other module, in order to share their values. Second, if the scalar variable can be displayed in a 3D window as a property, this name will identify it in the Rocky UI.unitA string specifying the unit in S.I. associated to the scalar variable.outputEnables/disables the storage in disk at output times, for the visualization and post-processing of the scalar values.ReturnsThe index that will uniquely identify the scalar variable during the execution of the simulation. 



<a id="a360827c2e0c1a676e3a8c6be6ed26362" name="a360827c2e0c1a676e3a8c6be6ed26362"></a>## [◆ ](#a360827c2e0c1a676e3a8c6be6ed26362)enable\_t10()

 void IRockyParticleBreakageScalarsModel::enable\_t10  ( ) 

Enables a scalar known to Rocky that stores the t10 parameter value. A custom instantaneousbreakage model that is intended to work along with built-in fragment size distribution models in Rocky must enable and calculate this scalar variable. 



<a id="a00666ca9d343b8d3284975687ce4d087" name="a00666ca9d343b8d3284975687ce4d087"></a>## [◆ ](#a00666ca9d343b8d3284975687ce4d087)find()

 int IRockyParticleBreakageScalarsModel::find  ( const char \* *name*) 

This method searches for a scalar variable already created by other modules,in order to allow access to its values, or store new values on it, during the execution of the simulation.Parameters nameThe name given to the scalar at the moment of its creation.ReturnsThe index that uniquely identifies the wanted scalar if it was actually found. It returns -1 otherwise. 



<a id="aed6f4019176f0d14ff941493d3e4dcb0" name="aed6f4019176f0d14ff941493d3e4dcb0"></a>## [◆ ](#aed6f4019176f0d14ff941493d3e4dcb0)reset()

 void IRockyParticleBreakageScalarsModel::reset  ( int *scalar\_index*) 

This method resets to zero all values stored in a scalar variable.Parameters scalar\_indexThe index attributed to the scalar variable at the moment of its creation. 



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

 void IRockyParticleBreakageScalarsModel::set\_dimension  ( int *scalar\_index*,    double *dimension\_factor* )

The purpose of this method is to associate a dimensional factorto a scalar variable. This factor will be used to nondimensionalize their values. For instance, if the scalar represents a force, a force dimensional factor must be associated through this method. Dimensional factors for the fundamental magnitudes are provided by functions of a `<a class="el" href="structIRockyModel.xhtml">IRockyModel</a>` object.Parameters scalar\_indexThe index attributed to the scalar variable at the moment of its creation.dimension\_factorThe appropriate dimensional factor for the scalar variable.