IRockySPHElementScalarsModel object allows users to add new SPH element scalars, find SPH element scalars created in other modules or activate SPH element scalars defined into the Rocky solver, during the setup stage of a module. SPH element scalars are special variables attached to SPH elements, which are able to store values per SPH element that are preserved between time iterations during a simulation.
Inherits from:
- ScalarsModel< rocky20::SPHParticleScalarsController >
Members
- add
- enable_variable_molecular_viscosity
- enable_velocity_gradient
- find
- reset
- set_dimension
- set_operation
Public functions
Function set_operation
ROCKY_PLUGIN_PRE_MOVE_ON_SPH_PARTICLE_INTERACTIONS. Moreover, after performing the accumulation of individual heat flow rates, for multi-GPU simulations it will be needed to sum the values stored in halo regions before using them for solving the thermal balance equation for the SPH elements, and then update back those values across devices. The operations currently available and the points at which they can be performed are listed below.
Parameters:
- scalar_index: The index of the SPH element scalar over which the operation will be made.
- operation: The operation that will be performed. There are defined currently the following operations:
sphotReset: reset to zero all stored values. This operation takes place at the beginning of the SPH hooks iteration.
sphotSum: sum values stored in halo regions, in a multi-GPU scenario. This operation takes place after SPH Interactions hooks.
sphotUpdate: update the summed values back to the halo regions, in a multi-GPU scenario. This operation takes place after SPH Particles hooks. - place: The point within the iterative loop where the operation will be performed. Each possible place is associated to one of the SPH hooks described in previously in section \techref{s:sph_hooks}. The corresponding enumerate keys that can be used to define those places are the following:
sphopPreForce
sphopPreForce1
sphopPreForce2
sphopPreForce3
sphopPreForce4
sphopForce
sphopPostForce
sphopPostForce1
sphopPostForce2
sphopPostForce3
sphopPostForce4
sphopPreMove
sphopPreMove1
sphopPreMove2
sphopPreMove3
sphopPreMove4
sphopPostMove
sphopPostMove1
sphopPostMove2
sphopPostMove3
sphopPostMove4
sphopHeatTransfer
- int scalar_index
- ESPHOperationType operation
- ESPHOperationPlace place
Function enable_velocity_gradient
Function enable_variable_molecular_viscosity
Function find
- name: The name given to the scalar at the moment of its creation.
- const char * name
Function reset
- scalar_index: The index attributed to the scalar variable at the moment of its creation.
- int scalar_index
Function set_dimension
IRockyModel object.
Parameters:
- scalar_index: The index attributed to the scalar variable at the moment of its creation.
- dimension_factor: The appropriate dimensional factor for the scalar variable.
- int scalar_index
- double dimension_factor
Function add
double:
for storing custom values during a simulation, preserving them between time iterations.
Parameters:
- name: The 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.
- unit: A string specifying the unit in S.I. associated to the scalar variable.
- output: Enables/disables the storage in disk at output times, for the visualization and post-processing of the scalar values.
- const char * name
- const char * unit
- bool output = true