RAParticle#
- class ansys.rocky.app.ra_particle.RAParticle#
Bases:
ansys.rocky.app.ra_grid_process_element.RAGridProcessElementItem,ansys.rocky.app.ra_addins.ElementWithAddins,ansys.rocky.app._ra_orientation_mixin._RAOrientationMixinRocky PrePost Scripting wrapper for a particle in the project.
The wrapper corresponds to an individual Particle entry in the project’s data tree, below the “Particles” item. Particles can be retrieved from the
RAStudyor theRAParticleCollectionvia:particle_1 = study.GetElement('Particle 1') particle_2 = particle_collection[1] particle_3 = particle_collection.GetParticle('Particle 3')
Most particle properties, such as name, shape, aspect ratios, etc can be set directly via methods in this wrapper class. An exception is size-related methods, which must be configured via the
RASizeDistributionListreturned inGetSizeDistributionList().
Overview#
Import a custom shape from the given stl filename into this particle. |
|
Import a custom fiber shape from the given filename into this particle. |
|
Get a list of size distribution entries |
|
Whether the particle’s Composition is “Multiple Elements”. |
|
Set the particle’s Composition to “Multiple Elements” (True) or “Single Elements” (False). |
|
Returns True if the particle is a concave custom polyhedron, and False otherwise. |
|
This docstring is overridden by the _GetBreakageModel’s at the end of the file. |
|
This docstring is overridden by the _GetValidBreakageModelValues’s at the end of the file. |
|
Set the value of “Breakage Model”. |
|
Deprecated: Use |
|
Get the value of “Abt10 Maximum T10 Value”. |
|
Set the value of “Abt10 Maximum T10 Value”. |
|
Get the value of “Abt10 Reference Minimum Specific Energy”. |
|
Set the value of “Abt10 Reference Minimum Specific Energy”. |
|
Deprecated: Use |
|
Deprecated: Use |
|
Get the value of “Abt10 Reference Size”. |
|
Set the value of “Abt10 Reference Size”. |
|
Get the value of “Abt10 Select Function Coefficient”. |
|
Set the value of “Abt10 Select Function Coefficient”. |
|
Get “Distribution Model” as a string. |
|
Set the value of “Distribution Model”. |
|
Get a list of all possible values for “Distribution Model”. |
|
Get the value of “Surface Energy”. |
|
Set the value of “Surface Energy”. |
|
Get the value of “Include Rotational Deformations”. |
|
Set the value of “Include Rotational Deformations”. |
|
Set the value of “Include Rotational Deformations” to True. |
|
Set the value of “Include Rotational Deformations” to False. |
|
Check if the “Include Rotational Deformations” is enabled. |
|
Get the value of “Minimum Size”. |
|
Set the value of “Minimum Size”. |
|
Get the value of “Minimum Size Ratio”. |
|
Set the value of “Minimum Size Ratio”. |
|
Get the value of “Minimum Volume Fraction For Fragment Disabling”. |
|
Set the value of “Minimum Volume Fraction For Fragment Disabling”. |
|
Get the value of “Tavares A”. |
|
Set the value of “Tavares A”. |
|
Get the value of “Tavares B”. |
|
Set the value of “Tavares B”. |
|
Get the value of “Tavares D0”. |
|
Set the value of “Tavares D0”. |
|
Get the value of “Tavares E Inf”. |
|
Set the value of “Tavares E Inf”. |
|
Get the value of “Tavares Gamma”. |
|
Set the value of “Tavares Gamma”. |
|
Get the value of “Tavares Minimum Energy”. |
|
Set the value of “Tavares Minimum Energy”. |
|
Get the value of “Tavares Phi”. |
|
Set the value of “Tavares Phi”. |
|
Get the value of “Tavares Ratio Emax”. |
|
Set the value of “Tavares Ratio Emax”. |
|
Get the value of “Ratio Energy After Breakage”. |
|
Set the value of “Ratio Energy After Breakage”. |
|
Get the value of “Tavares Sigma Squared”. |
|
Set the value of “Tavares Sigma Squared”. |
|
Get “T10 Formula” as a string. |
|
Set the value of “T10 Formula”. |
|
Get a list of all possible values for “T10 Formula”. |
|
Get the value of “Shear Stress Limit”. |
|
Set the value of “Shear Stress Limit”. |
|
Get the value of “Tensile Stress Limit”. |
|
Set the value of “Tensile Stress Limit”. |
|
Get the value of “Enable Breakage”. |
|
Set the value of “Enable Breakage”. |
|
Set the value of “Breakage” to True. |
|
Set the value of “Breakage” to False. |
|
Check if the “Breakage” is enabled. |
|
Get the value of “Von Mises Stress Limit”. |
|
Set the value of “Von Mises Stress Limit”. |
|
Get the value of “Allow Self Contacts”. |
|
Set the value of “Allow Self Contacts”. |
|
Get “Deformation Model” as a string. |
|
Set the value of “Deformation Model”. |
|
Get a list of all possible values for “Deformation Model”. |
|
Get the value of “Internal Friction”. |
|
Set the value of “Internal Friction”. |
|
Get the value of “Plastic Limit”. |
|
Set the value of “Plastic Limit”. |
|
Get the value of “Flexible”. |
|
Set the value of “Flexible”. |
|
Get the value of “Center of Mass Offset”. |
|
Set the values of “Center of Mass Offset”. |
|
Get the value of “Change Mass Properties”. |
|
Set the value of “Change Mass Properties”. |
|
Get the value of “Enable Rotations”. |
|
Set the value of “Enable Rotations”. |
|
Get the value of “Horizontal Aspect Ratio”. |
|
Set the value of “Horizontal Aspect Ratio”. |
|
Get the value of “Principal Moment of Inertia”. |
|
Set the values of “Principal Moment of Inertia”. |
|
Get the value of “Number of Corners”. |
|
Set the value of “Number of Corners”. |
|
Get the value of “X Direction”. |
|
Set the values of “X Direction”. |
|
Get the value of “Y Direction”. |
|
Set the values of “Y Direction”. |
|
Get the value of “Z Direction”. |
|
Set the values of “Z Direction”. |
|
Get the value of “Rolling Resistance”. |
|
Set the value of “Rolling Resistance”. |
|
Get the value of “Side Angle”. |
|
Set the value of “Side Angle”. |
|
Get the value of “Smoothness”. |
|
Set the value of “Smoothness”. |
|
Get the value of “Superquadric Degree”. |
|
Set the value of “Superquadric Degree”. |
|
Get the value of “Thickness”. |
|
Set the value of “Thickness”. |
|
Get the value of “Vertical Aspect Ratio”. |
|
Set the value of “Vertical Aspect Ratio”. |
|
Get the value of “Bending Angle Limit”. |
|
Set the value of “Bending Angle Limit”. |
|
Get the value of “With Failure”. |
|
Set the value of “With Failure”. |
|
Get the value of “Edge Angle”. |
|
Set the value of “Edge Angle”. |
|
Get the value of “Elastic Ratio Bending”. |
|
Set the value of “Elastic Ratio Bending”. |
|
Get the value of “Elastic Ratio Normal”. |
|
Set the value of “Elastic Ratio Normal”. |
|
Get the value of “Elastic Ratio Tangential”. |
|
Set the value of “Elastic Ratio Tangential”. |
|
Get the value of “Elastic Ratio Torsion”. |
|
Set the value of “Elastic Ratio Torsion”. |
|
Get “Elasticity” as a string. |
|
Set the value of “Elasticity”. |
|
Get a list of all possible values for “Elasticity”. |
|
Get the value of “Target Number of Elements”. |
|
Set the value of “Target Number of Elements”. |
|
Get the value of “Element Damping Ratio”. |
|
Set the value of “Element Damping Ratio”. |
|
Get the value of “Failure Ratio”. |
|
Set the value of “Failure Ratio”. |
|
Get the value of “Joint Damping Ratio”. |
|
Set the value of “Joint Damping Ratio”. |
|
Get the value of “Joint Elastic Ratio”. |
|
Set the value of “Joint Elastic Ratio”. |
|
Get the value of “Joint Thermal Ratio”. |
|
Set the value of “Joint Thermal Ratio”. |
|
Get the value of “Plastic Ratio”. |
|
Set the value of “Plastic Ratio”. |
|
Get “Plasticity Model” as a string. |
|
Set the value of “Plasticity Model”. |
|
Get a list of all possible values for “Plasticity Model”. |
|
Get the value of “Remesh To Target”. |
|
Set the value of “Remesh To Target”. |
|
Get the value of “Second Bending Angle Limit”. |
|
Set the value of “Second Bending Angle Limit”. |
|
Get the value of “Torsion Angle Limit”. |
|
Set the value of “Torsion Angle Limit”. |
|
Get the value of “Name”. |
|
Set the value of “Name”. |
|
Get the value of “Porosity”. |
|
Set the value of “Porosity”. |
|
Get the value of “Random Angles Half Range”. |
|
Set the values of “Random Angles Half Range”. |
|
Get “Shape” as a string. |
|
Set the value of “Shape”. |
|
Get a list of all possible values for “Shape”. |
|
Get the value of “Cgm Scale Factor”. |
|
Set the value of “Cgm Scale Factor”. |
|
Get “Size Type” as a string. |
|
Set the value of “Size Type”. |
|
Get a list of all possible values for “Size Type”. |
|
Get the value of “Enable Random Angle”. |
|
Set the value of “Enable Random Angle”. |
|
Set the value of “Random Orientation” to True. |
|
Set the value of “Random Orientation” to False. |
|
Check if the “Random Orientation” is enabled. |
|
Get the “Material”. |
|
Set the “Material”. |
|
Get all available Materials. |
|
Deprecated: Use |
|
Set the value of “Anisotropic”. |
Import detail#
from ansys.rocky.app.ra_particle import RAParticle
Method detail#
- classmethod RAParticle.GetWrappedClass()#
- RAParticle.ImportFromSTL(stl_filename: str, as_concave: bool, is_open: bool = False) bool#
Import a custom shape from the given stl filename into this particle.
- Parameters:
stl_filename – The full path to the STL file.
as_concave – True whether the particle should be treated as Concave, or False otherwise
is_open – True whether the stl is an open one
- Returns:
Possible return values: * True if everything went fine with the import process. * False if the import process failed.
- RAParticle.ImportCustomFiber(filename: str) bool#
Import a custom fiber shape from the given filename into this particle.
- Parameters:
filename – The full path to the TXT/CSV/Excel file.
- Returns:
Whether it was possible to import the particle
- RAParticle.GetSizeDistributionList() ansys.rocky.app.ra_size_distribution.RASizeDistributionList#
Get a list of size distribution entries
- RAParticle.GetUseMultipleElements() bool#
Whether the particle’s Composition is “Multiple Elements”.
- RAParticle.SetUseMultipleElements(value) None#
Set the particle’s Composition to “Multiple Elements” (True) or “Single Elements” (False).
- Parameters:
value (bool)
- RAParticle.IsConcave()#
Returns True if the particle is a concave custom polyhedron, and False otherwise.
- Return type:
- RAParticle.GetBreakageModel() str#
This docstring is overridden by the _GetBreakageModel’s at the end of the file.
- RAParticle.GetValidBreakageModelValues() list[str]#
This docstring is overridden by the _GetValidBreakageModelValues’s at the end of the file.
- RAParticle.SetBreakageModel(value: str) None#
Set the value of “Breakage Model”. If the particle is not flexible, setting the model to any value other than “none” also enables breakage.
- Parameters:
value (str) – The value to set. Must be one of [‘none’, ‘ab_t10’, ‘professor_tavares’, ‘instantaneous_custom’, ‘griffith_surface_energy’, ‘shear_stress_criterion’, ‘tensile_stress_criterion’, ‘tensile_or_shear_criterion’, ‘von_mises_stress_criterion’, ‘discrete_custom’].
- Raises:
RockyApiError – If value is not a valid “Breakage Model” option.
- RAParticle.GetAssemblyParts() ansys.rocky.app.ra_particle_assembly.RAParticleAssemblyPartList#
- RAParticle.GetAssemblyCustom() ansys.rocky.app.ra_particle_assembly.RAParticleAssemblyCustom#
Deprecated: Use
GetCustomProperties()instead.
- RAParticle.GetCustomProperties() ansys.rocky.app.ra_particle_assembly.RAParticleAssemblyCustom#
- RAParticle.GetAbt10MaximumT10Value(unit: str | None = None) float#
Get the value of “Abt10 Maximum T10 Value”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “%”.
- RAParticle.SetAbt10MaximumT10Value(value: str | float, unit: str | None = None) None#
Set the value of “Abt10 Maximum T10 Value”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “%”.
- RAParticle.GetAbt10ReferenceMinimumSpecificEnergy(unit: str | None = None) float#
Get the value of “Abt10 Reference Minimum Specific Energy”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “J/kg”.
- RAParticle.SetAbt10ReferenceMinimumSpecificEnergy(value: str | float, unit: str | None = None) None#
Set the value of “Abt10 Reference Minimum Specific Energy”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “J/kg”.
- RAParticle.GetAbt10MinimumSpecificEnergy(unit: str | None = None) float#
Deprecated: Use
GetAbt10ReferenceMinimumSpecificEnergy()instead.- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “J/kg”.
- RAParticle.SetAbt10MinimumSpecificEnergy(value: float, unit: str | None = None) None#
Deprecated: Use
SetAbt10ReferenceMinimumSpecificEnergy()instead.- Parameters:
value – The value to set.
unit – The unit for value. If no unit is provided, value is assumed to be in “J/kg”.
- RAParticle.GetAbt10ReferenceSize(unit: str | None = None) float#
Get the value of “Abt10 Reference Size”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “m”.
- RAParticle.SetAbt10ReferenceSize(value: str | float, unit: str | None = None) None#
Set the value of “Abt10 Reference Size”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “m”.
- RAParticle.GetAbt10SelectFunctionCoefficient(unit: str | None = None) float#
Get the value of “Abt10 Select Function Coefficient”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “kg/J”.
- RAParticle.SetAbt10SelectFunctionCoefficient(value: str | float, unit: str | None = None) None#
Set the value of “Abt10 Select Function Coefficient”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “kg/J”.
- RAParticle.GetDistributionModel() str#
Get “Distribution Model” as a string.
- Returns:
The returned value will be one of [‘gaudin_schumann’, ‘incomplete_beta’, ‘custom’].
- RAParticle.SetDistributionModel(value: str) None#
Set the value of “Distribution Model”.
- Parameters:
value – The value to set. Must be one of [‘gaudin_schumann’, ‘incomplete_beta’, ‘custom’].
- Raises:
RockyApiError – If value is not a valid “Distribution Model” option.
- RAParticle.GetValidDistributionModelValues() list[str]#
Get a list of all possible values for “Distribution Model”.
- Returns:
The returned list is [‘gaudin_schumann’, ‘incomplete_beta’, ‘custom’].
- RAParticle.GetSurfaceEnergy(unit: str | None = None) float#
Get the value of “Surface Energy”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “J/m2”.
- RAParticle.SetSurfaceEnergy(value: str | float, unit: str | None = None) None#
Set the value of “Surface Energy”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “J/m2”.
- RAParticle.GetIncludeRotationalDeformations() bool#
Get the value of “Include Rotational Deformations”.
- RAParticle.SetIncludeRotationalDeformations(value: bool) None#
Set the value of “Include Rotational Deformations”.
- Parameters:
value – The value to set.
- RAParticle.EnableIncludeRotationalDeformations() None#
Set the value of “Include Rotational Deformations” to True.
- RAParticle.DisableIncludeRotationalDeformations() None#
Set the value of “Include Rotational Deformations” to False.
- RAParticle.IsIncludeRotationalDeformationsEnabled() bool#
Check if the “Include Rotational Deformations” is enabled.
- RAParticle.GetMinimumSize(unit: str | None = None) float#
Get the value of “Minimum Size”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “m”.
- RAParticle.SetMinimumSize(value: str | float, unit: str | None = None) None#
Set the value of “Minimum Size”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “m”.
- RAParticle.SetMinimumSizeRatio(value: str | float) None#
Set the value of “Minimum Size Ratio”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
- RAParticle.GetMinimumVolumeFractionForFragmentDisabling() float#
Get the value of “Minimum Volume Fraction For Fragment Disabling”.
- RAParticle.SetMinimumVolumeFractionForFragmentDisabling(value: str | float) None#
Set the value of “Minimum Volume Fraction For Fragment Disabling”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
- RAParticle.GetTavaresA(unit: str | None = None) float#
Get the value of “Tavares A”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “%”.
- RAParticle.SetTavaresA(value: str | float, unit: str | None = None) None#
Set the value of “Tavares A”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “%”.
- RAParticle.GetTavaresB(unit: str | None = None) float#
Get the value of “Tavares B”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “-“.
- RAParticle.SetTavaresB(value: str | float, unit: str | None = None) None#
Set the value of “Tavares B”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “-“.
- RAParticle.GetTavaresD0(unit: str | None = None) float#
Get the value of “Tavares D0”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “m”.
- RAParticle.SetTavaresD0(value: str | float, unit: str | None = None) None#
Set the value of “Tavares D0”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “m”.
- RAParticle.GetTavaresEInf(unit: str | None = None) float#
Get the value of “Tavares E Inf”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “J/kg”.
- RAParticle.SetTavaresEInf(value: str | float, unit: str | None = None) None#
Set the value of “Tavares E Inf”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “J/kg”.
- RAParticle.GetTavaresGamma(unit: str | None = None) float#
Get the value of “Tavares Gamma”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “-“.
- RAParticle.SetTavaresGamma(value: str | float, unit: str | None = None) None#
Set the value of “Tavares Gamma”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “-“.
- RAParticle.GetTavaresMinimumEnergy(unit: str | None = None) float#
Get the value of “Tavares Minimum Energy”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “J/kg”.
- RAParticle.SetTavaresMinimumEnergy(value: str | float, unit: str | None = None) None#
Set the value of “Tavares Minimum Energy”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “J/kg”.
- RAParticle.GetTavaresPhi(unit: str | None = None) float#
Get the value of “Tavares Phi”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “-“.
- RAParticle.SetTavaresPhi(value: str | float, unit: str | None = None) None#
Set the value of “Tavares Phi”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “-“.
- RAParticle.GetTavaresRatioEmax(unit: str | None = None) float#
Get the value of “Tavares Ratio Emax”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “-“.
- RAParticle.SetTavaresRatioEmax(value: str | float, unit: str | None = None) None#
Set the value of “Tavares Ratio Emax”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “-“.
- RAParticle.GetRatioEnergyAfterBreakage(unit: str | None = None) float#
Get the value of “Ratio Energy After Breakage”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “-“.
- RAParticle.SetRatioEnergyAfterBreakage(value: str | float, unit: str | None = None) None#
Set the value of “Ratio Energy After Breakage”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “-“.
- RAParticle.GetTavaresSigmaSquared(unit: str | None = None) float#
Get the value of “Tavares Sigma Squared”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “-“.
- RAParticle.SetTavaresSigmaSquared(value: str | float, unit: str | None = None) None#
Set the value of “Tavares Sigma Squared”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “-“.
- RAParticle.GetT10Formula() str#
Get “T10 Formula” as a string.
- Returns:
The returned value will be one of [‘it10E_50b’, ‘it10E_fract’].
- RAParticle.SetT10Formula(value: str) None#
Set the value of “T10 Formula”.
- Parameters:
value – The value to set. Must be one of [‘it10E_50b’, ‘it10E_fract’].
- Raises:
RockyApiError – If value is not a valid “T10 Formula” option.
- RAParticle.GetValidT10FormulaValues() list[str]#
Get a list of all possible values for “T10 Formula”.
- Returns:
The returned list is [‘it10E_50b’, ‘it10E_fract’].
- RAParticle.GetShearStressLimit(unit: str | None = None) float#
Get the value of “Shear Stress Limit”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “N/m2”.
- RAParticle.SetShearStressLimit(value: str | float, unit: str | None = None) None#
Set the value of “Shear Stress Limit”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “N/m2”.
- RAParticle.GetTensileStressLimit(unit: str | None = None) float#
Get the value of “Tensile Stress Limit”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “N/m2”.
- RAParticle.SetTensileStressLimit(value: str | float, unit: str | None = None) None#
Set the value of “Tensile Stress Limit”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “N/m2”.
- RAParticle.SetEnableBreakage(value: bool) None#
Set the value of “Enable Breakage”.
- Parameters:
value – The value to set.
- RAParticle.GetVonMisesStressLimit(unit: str | None = None) float#
Get the value of “Von Mises Stress Limit”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “N/m2”.
- RAParticle.SetVonMisesStressLimit(value: str | float, unit: str | None = None) None#
Set the value of “Von Mises Stress Limit”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “N/m2”.
- RAParticle.SetAllowSelfContacts(value: bool) None#
Set the value of “Allow Self Contacts”.
- Parameters:
value – The value to set.
- RAParticle.GetDeformationModel() str#
Get “Deformation Model” as a string.
- Returns:
The returned value will be one of [‘none’, ‘elastic’, ‘plastic’].
- RAParticle.SetDeformationModel(value: str) None#
Set the value of “Deformation Model”.
- Parameters:
value – The value to set. Must be one of [‘none’, ‘elastic’, ‘plastic’].
- Raises:
RockyApiError – If value is not a valid “Deformation Model” option.
- RAParticle.GetValidDeformationModelValues() list[str]#
Get a list of all possible values for “Deformation Model”.
- Returns:
The returned list is [‘none’, ‘elastic’, ‘plastic’].
- RAParticle.SetInternalFriction(value: str | float) None#
Set the value of “Internal Friction”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
- RAParticle.GetPlasticLimit(unit: str | None = None) float#
Get the value of “Plastic Limit”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “Pa”.
- RAParticle.SetPlasticLimit(value: str | float, unit: str | None = None) None#
Set the value of “Plastic Limit”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “Pa”.
- RAParticle.SetFlexible(value: bool) None#
Set the value of “Flexible”.
- Parameters:
value – The value to set.
- RAParticle.GetCenterOfMassOffset(unit: str | None = None) list[float]#
Get the value of “Center of Mass Offset”.
- Parameters:
unit – The unit for the returned values. If no unit is provided, the returned values will be in “%”.
- RAParticle.SetCenterOfMassOffset(values: collections.abc.Sequence[str | float], unit: str | None = None) None#
Set the values of “Center of Mass Offset”.
- Parameters:
values – The values to set. The values can be heterogeneous, the element of values can be an expression with input variables or a float. Must have exactly 3 elements.
unit – The unit for values. If no unit is provided, values is assumed to be in “%”.
- Raises:
RockyApiError – If values doesn’t have exactly 3 elements.
- RAParticle.SetChangeMassProperties(value: bool) None#
Set the value of “Change Mass Properties”.
- Parameters:
value – The value to set.
- RAParticle.SetEnableRotations(value: bool) None#
Set the value of “Enable Rotations”.
- Parameters:
value – The value to set.
- RAParticle.SetHorizontalAspectRatio(value: str | float) None#
Set the value of “Horizontal Aspect Ratio”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
- RAParticle.GetPrincipalMomentOfInertia(unit: str | None = None) list[float]#
Get the value of “Principal Moment of Inertia”.
- Parameters:
unit – The unit for the returned values. If no unit is provided, the returned values will be in “m5”.
- RAParticle.SetPrincipalMomentOfInertia(values: collections.abc.Sequence[str | float], unit: str | None = None) None#
Set the values of “Principal Moment of Inertia”.
- Parameters:
values – The values to set. The values can be heterogeneous, the element of values can be an expression with input variables or a float. Must have exactly 3 elements.
unit – The unit for values. If no unit is provided, values is assumed to be in “m5”.
- Raises:
RockyApiError – If values doesn’t have exactly 3 elements.
- RAParticle.SetNumberOfCorners(value: str | int) None#
Set the value of “Number of Corners”.
- Parameters:
value – The value to set. This value can be an expression with input variables or int type.
- RAParticle.GetXDirection(unit: str | None = None) list[float]#
Get the value of “X Direction”.
- Parameters:
unit – The unit for the returned values. If no unit is provided, the returned values will be in “-“.
- RAParticle.SetXDirection(values: collections.abc.Sequence[str | float], unit: str | None = None) None#
Set the values of “X Direction”.
- Parameters:
values – The values to set. The values can be heterogeneous, the element of values can be an expression with input variables or a float. Must have exactly 3 elements.
unit – The unit for values. If no unit is provided, values is assumed to be in “-“.
- Raises:
RockyApiError – If values doesn’t have exactly 3 elements.
- RAParticle.GetYDirection(unit: str | None = None) list[float]#
Get the value of “Y Direction”.
- Parameters:
unit – The unit for the returned values. If no unit is provided, the returned values will be in “-“.
- RAParticle.SetYDirection(values: collections.abc.Sequence[str | float], unit: str | None = None) None#
Set the values of “Y Direction”.
- Parameters:
values – The values to set. The values can be heterogeneous, the element of values can be an expression with input variables or a float. Must have exactly 3 elements.
unit – The unit for values. If no unit is provided, values is assumed to be in “-“.
- Raises:
RockyApiError – If values doesn’t have exactly 3 elements.
- RAParticle.GetZDirection(unit: str | None = None) list[float]#
Get the value of “Z Direction”.
- Parameters:
unit – The unit for the returned values. If no unit is provided, the returned values will be in “-“.
- RAParticle.SetZDirection(values: collections.abc.Sequence[str | float], unit: str | None = None) None#
Set the values of “Z Direction”.
- Parameters:
values – The values to set. The values can be heterogeneous, the element of values can be an expression with input variables or a float. Must have exactly 3 elements.
unit – The unit for values. If no unit is provided, values is assumed to be in “-“.
- Raises:
RockyApiError – If values doesn’t have exactly 3 elements.
- RAParticle.SetRollingResistance(value: str | float) None#
Set the value of “Rolling Resistance”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
- RAParticle.SetSideAngle(value: str | float) None#
Set the value of “Side Angle”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
- RAParticle.SetSmoothness(value: str | float) None#
Set the value of “Smoothness”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
- RAParticle.SetSuperquadricDegree(value: str | float) None#
Set the value of “Superquadric Degree”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
- RAParticle.GetThickness(unit: str | None = None) float#
Get the value of “Thickness”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “m”.
- RAParticle.SetThickness(value: str | float, unit: str | None = None) None#
Set the value of “Thickness”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “m”.
- RAParticle.SetVerticalAspectRatio(value: str | float) None#
Set the value of “Vertical Aspect Ratio”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
- RAParticle.GetBendingAngleLimit(unit: str | None = None) float#
Get the value of “Bending Angle Limit”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “dega”.
- RAParticle.SetBendingAngleLimit(value: str | float, unit: str | None = None) None#
Set the value of “Bending Angle Limit”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “dega”.
- RAParticle.SetWithFailure(value: bool) None#
Set the value of “With Failure”.
- Parameters:
value – The value to set.
- RAParticle.GetEdgeAngle(unit: str | None = None) float#
Get the value of “Edge Angle”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “dega”.
- RAParticle.SetEdgeAngle(value: str | float, unit: str | None = None) None#
Set the value of “Edge Angle”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “dega”.
- RAParticle.SetElasticRatioBending(value: str | float) None#
Set the value of “Elastic Ratio Bending”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
- RAParticle.SetElasticRatioNormal(value: str | float) None#
Set the value of “Elastic Ratio Normal”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
- RAParticle.SetElasticRatioTangential(value: str | float) None#
Set the value of “Elastic Ratio Tangential”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
- RAParticle.SetElasticRatioTorsion(value: str | float) None#
Set the value of “Elastic Ratio Torsion”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
- RAParticle.GetElasticity() str#
Get “Elasticity” as a string.
- Returns:
The returned value will be one of [‘isotropic’, ‘anisotropic’].
- RAParticle.SetElasticity(value: str) None#
Set the value of “Elasticity”.
- Parameters:
value – The value to set. Must be one of [‘isotropic’, ‘anisotropic’].
- Raises:
RockyApiError – If value is not a valid “Elasticity” option.
- RAParticle.GetValidElasticityValues() list[str]#
Get a list of all possible values for “Elasticity”.
- Returns:
The returned list is [‘isotropic’, ‘anisotropic’].
- RAParticle.SetTargetNumberOfElements(value: str | int) None#
Set the value of “Target Number of Elements”.
- Parameters:
value – The value to set. This value can be an expression with input variables or int type.
- RAParticle.SetElementDampingRatio(value: str | float) None#
Set the value of “Element Damping Ratio”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
- RAParticle.SetFailureRatio(value: str | float) None#
Set the value of “Failure Ratio”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
- RAParticle.SetJointDampingRatio(value: str | float) None#
Set the value of “Joint Damping Ratio”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
- RAParticle.SetJointElasticRatio(value: str | float) None#
Set the value of “Joint Elastic Ratio”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
- RAParticle.SetJointThermalRatio(value: str | float) None#
Set the value of “Joint Thermal Ratio”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
- RAParticle.SetPlasticRatio(value: str | float) None#
Set the value of “Plastic Ratio”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
- RAParticle.GetPlasticityModel() str#
Get “Plasticity Model” as a string.
- Returns:
The returned value will be one of [‘LinearElastic’, ‘BilinearElastoplastic’, ‘Custom’].
- RAParticle.SetPlasticityModel(value: str) None#
Set the value of “Plasticity Model”.
- Parameters:
value – The value to set. Must be one of [‘LinearElastic’, ‘BilinearElastoplastic’, ‘Custom’].
- Raises:
RockyApiError – If value is not a valid “Plasticity Model” option.
- RAParticle.GetValidPlasticityModelValues() list[str]#
Get a list of all possible values for “Plasticity Model”.
- Returns:
The returned list is [‘LinearElastic’, ‘BilinearElastoplastic’, ‘Custom’].
- RAParticle.SetRemeshToTarget(value: bool) None#
Set the value of “Remesh To Target”.
- Parameters:
value – The value to set.
- RAParticle.GetSecondBendingAngleLimit(unit: str | None = None) float#
Get the value of “Second Bending Angle Limit”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “dega”.
- RAParticle.SetSecondBendingAngleLimit(value: str | float, unit: str | None = None) None#
Set the value of “Second Bending Angle Limit”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “dega”.
- RAParticle.GetTorsionAngleLimit(unit: str | None = None) float#
Get the value of “Torsion Angle Limit”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “dega”.
- RAParticle.SetTorsionAngleLimit(value: str | float, unit: str | None = None) None#
Set the value of “Torsion Angle Limit”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “dega”.
- RAParticle.GetPorosity(unit: str | None = None) float#
Get the value of “Porosity”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “
”.
- RAParticle.SetPorosity(value: str | float, unit: str | None = None) None#
Set the value of “Porosity”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “
”.
- RAParticle.GetRandomAnglesHalfRange(unit: str | None = None) list[float]#
Get the value of “Random Angles Half Range”.
- Parameters:
unit – The unit for the returned values. If no unit is provided, the returned values will be in “rad”.
- RAParticle.SetRandomAnglesHalfRange(values: collections.abc.Sequence[str | float], unit: str | None = None) None#
Set the values of “Random Angles Half Range”.
- Parameters:
values – The values to set. The values can be heterogeneous, the element of values can be an expression with input variables or a float. Must have exactly 3 elements.
unit – The unit for values. If no unit is provided, values is assumed to be in “rad”.
- Raises:
RockyApiError – If values doesn’t have exactly 3 elements.
- RAParticle.GetShape() str#
Get “Shape” as a string.
- Returns:
The returned value will be one of [‘sphere’, ‘polyhedron’, ‘sphero_cylinder’, ‘sphero_polygon’, ‘sphero_polyhedron’, ‘briquete’, ‘faceted_cylinder’, ‘assembly’, ‘straight_fiber’, ‘custom_fiber’, ‘custom_shell’, ‘custom_polyhedron’].
- RAParticle.SetShape(value: str) None#
Set the value of “Shape”.
- Parameters:
value – The value to set. Must be one of [‘sphere’, ‘polyhedron’, ‘sphero_cylinder’, ‘sphero_polygon’, ‘sphero_polyhedron’, ‘briquete’, ‘faceted_cylinder’, ‘assembly’, ‘straight_fiber’, ‘custom_fiber’, ‘custom_shell’, ‘custom_polyhedron’].
- Raises:
RockyApiError – If value is not a valid “Shape” option.
- RAParticle.GetValidShapeValues() list[str]#
Get a list of all possible values for “Shape”.
- Returns:
The returned list is [‘sphere’, ‘polyhedron’, ‘sphero_cylinder’, ‘sphero_polygon’, ‘sphero_polyhedron’, ‘briquete’, ‘faceted_cylinder’, ‘assembly’, ‘straight_fiber’, ‘custom_fiber’, ‘custom_shell’, ‘custom_polyhedron’].
- RAParticle.SetCgmScaleFactor(value: str | float) None#
Set the value of “Cgm Scale Factor”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
- RAParticle.GetSizeType() str#
Get “Size Type” as a string.
- Returns:
The returned value will be one of [‘sieve’, ‘equivalent_diameter’, ‘original_size_scale’].
- RAParticle.SetSizeType(value: str) None#
Set the value of “Size Type”.
- Parameters:
value – The value to set. Must be one of [‘sieve’, ‘equivalent_diameter’, ‘original_size_scale’].
- Raises:
RockyApiError – If value is not a valid “Size Type” option.
- RAParticle.GetValidSizeTypeValues() list[str]#
Get a list of all possible values for “Size Type”.
- Returns:
The returned list is [‘sieve’, ‘equivalent_diameter’, ‘original_size_scale’].
- RAParticle.SetEnableRandomAngle(value: bool) None#
Set the value of “Enable Random Angle”.
- Parameters:
value – The value to set.
- RAParticle.GetMaterial()#
Get the “Material”.
- Return type:
RASolidMaterial
- RAParticle.SetMaterial(value) None#
Set the “Material”.
- :param unicode,
RASolidMaterialvalue: Either the API object wrapping the desired entity or its name.
- :param unicode,
- RAParticle.GetAvailableMaterials()#
Get all available Materials.
- Return type:
List[
RASolidMaterial] A list ofRASolidMaterial.
- RAParticle.GetAnisotropic() bool#
Deprecated: Use
GetElasticity()instead.- Return type: