class RAMaterialCollection
Rocky PrePost Scripting wrapper for the collection of materials in a project. This wrapper corresponds to the “Materials” item on the project’s data tree. Retrieve theRAMaterialCollection from a RAStudy via:
RAMaterialCollection class act as regular Python lists and can be
iterated on, individual materials accessed and deleted via index, etc:
RASolidMaterial and RAFluidMaterial.
Methods:
Clear()
Remove all items from the list.GetBulkSolidFraction()
Get the value of “Bulk Solid Fraction”.GetDefaultSolidMaterials()
Get a list with the default solid materials, in order of Particle, Belt and Boundary.GetFluidMaterial(material_name: str)
Get the fluid material with the given name.GetMaterialsInteractionCollection()
Get the study’s Materials Interaction Collection.GetSolidMaterial(material_name: str)
Get the solid material with the given name.New()
Deprecated: UseAdd{Solid, Fluid}Material() instead.
Remove(item: ApiElementItem)
Remove an item from the list.SetBulkSolidFraction(value: str | float)
Set the value of “Bulk Solid Fraction”.- Parameters: value – The value to set. This value can be an expression with input variables or float type.