Skip to main content

Rocky Solver SDK 2024 R2

IRockyParticleScalars Struct Reference

Last update: 08.07.2024

#include <rocky_particle_scalars.hpp>

Inherits EntityScalars< rocky20::ParticleScalars >.

Public Member Functions

ROCKY_FUNCTIONS double get_temperature () const
 
ROCKY_FUNCTIONS double get_mass_increment () const
 
ROCKY_FUNCTIONS double get_volume_increment () const
 
ROCKY_FUNCTIONS void set_temperature (const double value)
 
ROCKY_FUNCTIONS void set_mass_increment (const double value)
 
ROCKY_FUNCTIONS void set_volume_increment (const double value)
 
ROCKY_FUNCTIONS void add_temperature (const double value)
 
ROCKY_FUNCTIONS void add_explicit_fluid_momentum (const double3 value)
 
ROCKY_FUNCTIONS void add_implicit_fluid_momentum (const double value)
 
ROCKY_FUNCTIONS void add_explicit_fluid_heat_transfer_rate (const double value)
 
ROCKY_FUNCTIONS void add_implicit_fluid_heat_transfer_rate (const double value)
 
ROCKY_FUNCTIONS void add_mass_increment (const double value)
 
ROCKY_FUNCTIONS void add_volume_increment (const double value)
 
ROCKY_FUNCTIONS double get_thermal_conductivity () const
 
ROCKY_FUNCTIONS void set_thermal_conductivity (const double value)
 
ROCKY_FUNCTIONS double get_specific_heat () const
 
ROCKY_FUNCTIONS void set_specific_heat (const double value)
 
ROCKY_FUNCTIONS double get_poisson_ratio () const
 
ROCKY_FUNCTIONS void set_poisson_ratio (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 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.

Member Function Documentation

◆ add_explicit_fluid_heat_transfer_rate()

ROCKY_FUNCTIONS void IRockyParticleScalars::add_explicit_fluid_heat_transfer_rate ( const double  value)
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
valueThe particle's explicit heat transfer rate contribution.

◆ add_explicit_fluid_momentum()

ROCKY_FUNCTIONS void IRockyParticleScalars::add_explicit_fluid_momentum ( const double3  value)
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
valueThe particle's explicit momentum contribution.

◆ add_implicit_fluid_heat_transfer_rate()

ROCKY_FUNCTIONS void IRockyParticleScalars::add_implicit_fluid_heat_transfer_rate ( const double  value)
// 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
valueThe particle's implicit heat transfer rate contribution.

◆ add_implicit_fluid_momentum()

ROCKY_FUNCTIONS void IRockyParticleScalars::add_implicit_fluid_momentum ( const double  value)
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
valueThe coefficient associated to particle's implicit momentum contribution.

◆ add_mass_increment()

ROCKY_FUNCTIONS void IRockyParticleScalars::add_mass_increment ( const double  value)
This method sums a value to the current mass increment of the particle.
Parameters
valueThe value summed to the mass increment.

◆ add_scalar()

ROCKY_FUNCTIONS void IRockyParticleScalars::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_indexThe integer index that was associated to the scalar variable during the setup of the module.
valueThe value that must be summed to the current stored value.

◆ add_temperature()

ROCKY_FUNCTIONS void IRockyParticleScalars::add_temperature ( const double  value)
This method sums a value to the current temperature of the particle.
Parameters
valueThe value summed to the temperature.

◆ add_volume_increment()

ROCKY_FUNCTIONS void IRockyParticleScalars::add_volume_increment ( const double  value)
This method sums a value to the current volume increment of the particle.
Parameters
valueThe value summed to the volume increment.

◆ get_mass_increment()

ROCKY_FUNCTIONS double IRockyParticleScalars::get_mass_increment ( ) const
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.

◆ get_poisson_ratio()

ROCKY_FUNCTIONS double IRockyParticleScalars::get_poisson_ratio ( ) const
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.

◆ get_scalar()

ROCKY_FUNCTIONS double IRockyParticleScalars::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_indexThe 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_specific_heat()

ROCKY_FUNCTIONS double IRockyParticleScalars::get_specific_heat ( ) const
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.

◆ get_temperature()

ROCKY_FUNCTIONS double IRockyParticleScalars::get_temperature ( ) const
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.

◆ get_thermal_conductivity()

ROCKY_FUNCTIONS double IRockyParticleScalars::get_thermal_conductivity ( ) const
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.

◆ get_volume_increment()

ROCKY_FUNCTIONS double IRockyParticleScalars::get_volume_increment ( ) const
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.

◆ max_scalar()

ROCKY_FUNCTIONS void IRockyParticleScalars::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_indexThe integer index that was associated to the scalar variable during the setup of the module.
valueA value that must be checked if it is greater than the current stored value.

◆ set_mass_increment()

ROCKY_FUNCTIONS void IRockyParticleScalars::set_mass_increment ( const double  value)
This method sets the value of the mass increment of the particle in relation
to the initial mass at the time of entrance.
Parameters
valueThe value of the mass increment.

◆ set_poisson_ratio()

ROCKY_FUNCTIONS void IRockyParticleScalars::set_poisson_ratio ( const double  value)
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
valueThe value of the Poisson's ratio for the particle.

◆ set_scalar()

ROCKY_FUNCTIONS void IRockyParticleScalars::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_indexThe integer index that was associated to the scalar variable during the setup of the module.
valueThe value that must be stored.

◆ set_specific_heat()

ROCKY_FUNCTIONS void IRockyParticleScalars::set_specific_heat ( const double  value)
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
valueThe value of the particle's specific heat.

◆ set_temperature()

ROCKY_FUNCTIONS void IRockyParticleScalars::set_temperature ( const double  value)
This method sets the value of the temperature of the particle.
Parameters
valueThe value of the temperature.

◆ set_thermal_conductivity()

ROCKY_FUNCTIONS void IRockyParticleScalars::set_thermal_conductivity ( const double  value)
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
valueThe value of the particle's thermal conductivity.

◆ set_volume_increment()

ROCKY_FUNCTIONS void IRockyParticleScalars::set_volume_increment ( const double  value)
This method sets the value of the volume increment of the particle in relation
to the initial volume at the time of entrance.
Parameters
valueThe value of the volume increment.