Skip to main content
#include <rocky_particle_scalars.hpp> Inherits ScalarsModel< rocky20::ParticleScalarsController >.

Public Member Functions

Detailed Description

An IRockyParticleScalarsModel allows users to add new particle scalars, find particle scalars created in other modules or activate particle scalars known to Rocky, during the setup stage of a module. Particle scalars are special variables attached to particles, which are able to store values per particle that are preserved between time iterations during a simulation.

Member Function Documentation

add()

This method creates a new scalar variable of type double for storing custom values during a simulation, preserving them between time iterations. Parameters Returns The index that will uniquely identify the scalar variable during the execution of the simulation.

enable_mass_increment()

Enables a known-scalar that associates a mass increment value to each particle in a simulation. When this scalar is enabled, the instantaneous mass of a particle is equal to the original mass defined at the beginning of a simulation plus the value of that mass increment.

enable_variable_poisson_ratio()

Enables a known-scalar defining Poisson’s ratio value to each particle in a simulation. When this scalar is enabled, the instantaneous Poisson’s ratio is defined as a variable property, with possibly a different value and used everywhere in the simulation, instead of the constant value of particle’s material

enable_variable_specific_heat()

Enables a known-scalar defining specific heat value to each particle in a simulation. When this scalar is enabled, the instantaneous specific heat is defined as a variable property, with possibly a different value and used everywhere in the simulation, instead of the constant value of particle’s material

enable_variable_thermal_conductivity()

Enables a known-scalar that defines the thermal conductivity as a variable property between particles. When this scalar is enabled, a different value of thermal conductivity can be specified for each particle in a simulation, and this value will be used everywhere in the Rocky solver instead of the constant value specified for the particle’s material in the Rocky UI.

enable_volume_increment()

Enables a known-scalar that associates a volume increment value to each particle in a simulation. When this scalar is enabled, the instantaneous volume of a particle is equal to the original volume defined at the beginning of a simulation plus the value of that volume increment.

find()

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 Returns The index that uniquely identifies the wanted scalar if it was actually found. It returns -1 otherwise.

reset()

This method resets to zero all values stored in a scalar variable. Parameters

set_dimension()

The purpose of this method is to associate a dimensional factor to 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 IRockyModel object. Parameters