IRockyParticle 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. Values of particle scalars can be displayed in a 3D window as any other built-in particle property in Rocky. All property and variable values made available through IRockyParticle are dimensionless.
This method activates the conditional disabling of particle-to-particle contacts detection.A given particle-to-particle contact will be ignored during the detection stage only if this method has been applied to both particles.
ReturnsAn 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.
ReturnsThe current value of the particle’s mass. This value will be different from the original particle’s mass only if the mass increment particle scalar is enabled in the simulation.
ReturnsAn IRockyMaterial object that gives access to the values of physical properties associated to the material from which the particle is made.
Invoking this method on assembly particles results on undefined behavior, as assembly particles may have multiple materials. Prefer to use IRockyParticle::get_assembly_part_material instead.
get_material_index()
ROCKY_FUNCTIONS int IRockyParticle::get_material_index() const
ReturnsThe material index associated to that particle
ReturnsA tuple whose two components define the axis-angle particle orientation. The first one is a three dimensional vector representing the orientation axis, the second one is a single value representing the angle.
ReturnsThe particle’s Poisson’s ratio value. If this property was defined as variable in the module’s specification file, the method will return the value specifically assigned to the particle. Otherwise, it will return the value specified in the Rocky UI for the particle’s associated material.
ReturnsThe resultant force vector acting on the particle, in Cartesian coordinates. This force is a combination of the forces calculated during the current time iteration that are applied on the particle, including contact forces, joint forces, fluid forces, and other forces coming from custom modules. If this method is called before the force calculation stage it will return a zero vector.
The force of gravity acting on the particle is not included in this resultant force.
ReturnsThe resultant moment vector applied to the particle, in Cartesian coordinates. The resultant moment is the combination of all moments caused by the forces acting upon the particle, including contact forces, joint forces, fluid forces, and other forces coming from custom modules. If this method is called before the force calculation stage it will return a zero vector.
ReturnsThe current value of the particle’s solid volume. If the particle is porous (porosity > 0), the solid volume is the volume of the solid matrix. Otherwise, the volume returned by this function will coincide with the one returned by the get_volume function.
ReturnsThe particle’s specific heat value. If this property was defined as variable in the module’s specification file, the method will return the value specifically assigned to the particle. Otherwise, it will return the value specified in the Rocky UI for the particle’s associated material.
ReturnsThe particle’s sphericity value, which is defined as the ratio of As to Ap, where As is the surface area of a sphere with the same volume as the particle, whereas Ap is the surface area of the particle itself. In general terms, the sphericity measures how closely the particle’s actual shape resembles the shape of a perfect sphere.
ReturnsA random value between 0 and 1 assigned to a particle at the time of generation. This value can be related to the breakage probability in a custom instantaneous breakage model.
ReturnsThe current value of the particle’s surface area.
get_tag()
ROCKY_FUNCTIONS int IRockyParticle::get_tag() const
ReturnsThe tag value inherited from the tags assigned to the segments of a custom fiber, if the IRockyParticle 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.
ReturnsThe particle’s thermal conductivity. If this property was defined as variable in the module’s specification file, the method will return the value specifically assigned to the particle. Otherwise, it will return the value specified in the Rocky UI for the particle’s associated material.
ReturnsThe current value of the particle’s volume. If the particle is porous (porosity > 0), the volume returned is the particle’s total or bulk volume, that is the volume obtained by summing the solid volume and the pore volume.
This method sets the frozen state of a particle. When the frozen state of a particleis set to true, the solution of the motion equations for this particle are skipped afterwards.Parameters
Name
Description
frozen
True if the particle should be frozen, false otherwise.
This method sets the Poisson’s ratio value for the particle. This operation willbe allowed only if Poisson’s ratio was defined as a variable property for particles in the module’s specification file. Otherwise, a segmentation fault will occur.Parameters
This method sets the specific heat value for the particle. This operation willbe allowed only if Poisson’s ratio was defined as a variable property for particles in the module’s specification file. Otherwise, a segmentation fault will occur.Parameters
This method sets the thermal conductivity value for the particle. This operation willbe allowed only if thermal conductivity was defined as a variable property for particles in the module’s specification file. Otherwise, a segmentation fault will occur.Parameters
Name
Description
value
The thermal conductivity to be set.
Was this page helpful?
Assistant
Responses are generated using AI and may contain mistakes.