RASizeDistributionList#
- class ansys.rocky.app.ra_size_distribution.RASizeDistributionList(id: str, model_id: str | None = None)#
Bases:
ansys.rocky.app.ra_list.RAList[RASizeDistribution]Rocky PrePost Scripting wrapper to manipulate the size properties in a single Particle.
To get the
RASizeDistributionListfrom aRAParticle, use:size_distribution_list = particle.GetSizeDistributionList()
RASizeDistributionListcontains methods to set the size type and add, remove and retrieve individual size distribution entries. It corresponds to the items on a Particle’s “Size” tab on the Rocky UI.The following examples add, remove and access individual entries in the size distribution list:
# Add new items size_distribution = size_distribution_list.New() # Access and modify items size_distribution = size_distribution_list[0] size_distribution.SetSize(1.0, 'm') # Remove items size_distribution_list.Remove(size_distribution) del size_distribution_list[0] size_distribution_list.Clear()
Note that this list is used even if the configured particle only has a single size, such as when it is composed of Multiple Elements. In these cases, the single size refers to the first item on the list (and no other items are used).
The
RASizeDistributionListis a list ofRASizeDistribution.
Overview#
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”. |
Import detail#
from ansys.rocky.app.ra_size_distribution import RASizeDistributionList
Method detail#
- classmethod RASizeDistributionList.GetWrappedClass()#
- classmethod RASizeDistributionList.GetClassName()#
- RASizeDistributionList.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.
- RASizeDistributionList.GetSizeType() str#
Get “Size Type” as a string.
- Returns:
The returned value will be one of [‘sieve’, ‘equivalent_diameter’, ‘original_size_scale’].
- RASizeDistributionList.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.