Skip to main content

Rocky Solver SDK 2024 R2

IRockyParticleHost Struct Reference

Last update: 08.07.2024

#include <rocky_particle_api.hpp>

Public Member Functions

double get_original_volume () const
 
double get_original_solid_volume () const
 
int get_material_index () const
 
double get_equivalent_diameter () const
 
IRockyMaterial get_material () const
 
double3 get_centroid_position () const
 
double get_original_mass () const
 
double get_size () const
 
double get_release_time () const
 
double get_cgm_scale_factor () const
 
int get_tag () const
 
bool is_released () const
 
bool is_element () const
 
bool is_assembly () const
 
size_t get_number_of_assembly_parts () const
 
IRockyMaterial get_assembly_part_material (size_t part_id) const
 
IRockyParticleScalars get_scalars ()
 

Detailed Description

IRockyParticleHost is an interface for the internal particle object in Rocky. A particle object is the code representation of an individual particle in a Rocky simulation. It has several access methods to particle-related properties, as well as particle scalars, which are special variables that store values per particle that are preserved between time iterations. The main difference in relation to IRockyParticle is that all IRockyParticleHost's property and variable values have their original dimensions as defined within the project, and its data resides within host memory (DRAM).

Member Function Documentation

◆ get_assembly_part_material()

IRockyMaterial IRockyParticleHost::get_assembly_part_material ( size_t  part_id) const
Parameters
part_idThe index of an assembly part.
Returns
An IRockyMaterial object that gives access to the values of physical properties associated to the material from which the assembly part referent to part_id is made.

◆ get_centroid_position()

double3 IRockyParticleHost::get_centroid_position ( ) const
Returns
The Cartesian coordinates of the current position of the particle's centroid.

◆ get_cgm_scale_factor()

double IRockyParticleHost::get_cgm_scale_factor ( ) const
Returns
The particle's Coarse-grain Modeling (CGM) scale factor.

◆ get_equivalent_diameter()

double IRockyParticleHost::get_equivalent_diameter ( ) const
Returns
The equivalent diameter of the particle, which is defined as the diameter of a sphere of volume equal to the particle's volume.

◆ get_material()

IRockyMaterial IRockyParticleHost::get_material ( ) const
Returns
An IRockyMaterial object that gives access to the values of physical properties associated to the material from which the particle is made.

◆ get_material_index()

int IRockyParticleHost::get_material_index ( ) const
Returns
The material index associated to the particle

◆ get_number_of_assembly_parts()

size_t IRockyParticleHost::get_number_of_assembly_parts ( ) const
Returns
The number of parts that compose the assembly.

◆ get_original_mass()

double IRockyParticleHost::get_original_mass ( ) const
Returns
The original value of the particle's mass.

◆ get_original_solid_volume()

double IRockyParticleHost::get_original_solid_volume ( ) const
Returns
The original value of the particle's solid volume, which is the volume of the solid matrix if the particle is porous. Otherwise, this function will return the same value that the get_original_volume function.

◆ get_original_volume()

double IRockyParticleHost::get_original_volume ( ) const
Returns
The original value of the particle's volume. If the particle is porous, this function will return the original total volume of the particle, that is, the sum of the volumes of the solid matrix and the porous space.

◆ get_release_time()

double IRockyParticleHost::get_release_time ( ) const
Returns
The time particle was released.

◆ get_scalars()

IRockyParticleScalars IRockyParticleHost::get_scalars ( )
Returns
An IRockyParticleScalars object, that gives access to all particle scalars variables defined in the project.

◆ get_size()

double IRockyParticleHost::get_size ( ) const
Returns
The current value of the particle's size.

◆ get_tag()

int IRockyParticleHost::get_tag ( ) const
Returns
The tag value inherited from the tags assigned to the segments of a custom fiber, if the IRockyParticleHost object represents an element of a custom fiber. The values of those tags must be specified in the column labeled "tag" in the csv file that defines the geometry of a custom fiber. All elements that arise from the subdivision of a given segment inherit the tag value assigned to that segment. If tags are not defined for a custom fiber or if this function is used with particles which are not elements of a custom fiber, this function will return -1.

◆ is_assembly()

bool IRockyParticleHost::is_assembly ( ) const
Returns
True if the given particle is an assembly, false otherwise.

◆ is_element()

bool IRockyParticleHost::is_element ( ) const
Returns
True if the given particle is an element within a flexible particle, false otherwise.

◆ is_released()

bool IRockyParticleHost::is_released ( ) const
Returns
A true value if the particle was released into the simulation domain, false otherwise.