Skip to main content
#include <rocky_sph_element_scalars.hpp> Inherits EntityScalars< rocky20::SPHParticleScalars >.

Public Member Functions

Detailed Description

When running a simulation, an IRockySPHElementScalars object gives access to all SPH element scalars defined in the project. These SPH element scalars can be built-in scalars defined within the Rocky solver, or custom SPH element scalars defined by the current module or other active modules.

Member Function Documentation

add_heat_transfer()

This method can be used for accumulating the heat transfer rate values that a SPH element interchanges with the surrounding SPH elements, DEM elements and geometries. Parameters

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

add_temperature()

This method sums a value to the current temperature of a SPH element. Parameters

add_turbulent_viscosity()

This method sums a value to the current turbulent viscosity stored for the SPH element. Parameters

get_heat_transfer()

Returns The value of the total heat transfer rate towards/from the SPH element. Heat transfer rate is a built-in SPH element scalar defined by the Rocky solver, which is activated when a thermal model is enabled in a project.

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 Returns The value currently stored in the scalar variable.

get_temperature()

Returns The value of the temperature of the SPH element. Temperature is a built-in SPH element scalar defined by the Rocky solver, which is activated when a thermal model is enabled in a project.

get_turbulent_viscosity()

Returns The value of the turbulent viscosity. Turbulent viscosity is a built-in SPH element scalar defined in the Rocky solver, whose values can be calculated either by a built-in model or by a custom module.

get_velocity_gradient_x()

Returns The gradient of the component of the SPH element velocity along the X-axis. Velocity gradients are built-in SPH element scalars defined by the Rocky solver, which is activated manually when a module calls IRockySPHElementScalarsModel::enable_gradient_velocity() at setup hook.

get_velocity_gradient_y()

Returns The gradient of the component of the SPH element velocity along the Y-axis. Velocity gradients are built-in SPH element scalars defined by the Rocky solver, which is activated manually when a module calls IRockySPHElementScalarsModel::enable_gradient_velocity() at setup hook.

get_velocity_gradient_z()

Returns The gradient of the component of the SPH element velocity along the Z-axis. Velocity gradients are built-in SPH element scalars defined by the Rocky solver, which is activated manually when a module calls IRockySPHElementScalarsModel::enable_gradient_velocity() at setup hook.

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

set_heat_transfer()

This method can be used by a custom module implementing a thermal model in order to set the calculated value of the total heat transfer towards/from a SPH element. Parameters

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

set_temperature()

This method can be used by a custom module implementing a thermal model in order to set the value of the temperature of a SPH element. Parameters

set_turbulent_viscosity()

This method can be used by a custom module implementing a turbulent model in order to set the value of the turbulent viscosity for later use in the flow equations. Parameters