RAMaterialCollection#
- class ansys.rocky.app.ra_materials_collection.RAMaterialCollection(id: str, model_id: str | None = None)#
Bases:
ansys.rocky.app.ra_list.RAListRocky 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 the
RAMaterialCollectionfrom aRAStudyvia:material_collection = study.GetMaterialCollection()
Instances of the
RAMaterialCollectionclass act as regular Python lists and can be iterated on, individual materials accessed and deleted via index, etc:material_1 = material_collection.AddSolidMaterial() material_2 = material_collection.AddFluidMaterial() material_2 = material_collection[3] del material_collection[2]
Items in this list are of type
RASolidMaterialandRAFluidMaterial.
Overview#
Remove an item from the list. |
|
Remove all items from the list. |
|
Deprecated: Use |
|
Get a list with the default solid materials, in order of Particle, Belt and Boundary. |
|
Get the solid material with the given name. |
|
Get the fluid material with the given name. |
|
Get the study’s Materials Interaction Collection. |
|
Get the value of “Bulk Solid Fraction”. |
|
Set the value of “Bulk Solid Fraction”. |
Import detail#
from ansys.rocky.app.ra_materials_collection import RAMaterialCollection
Method detail#
- classmethod RAMaterialCollection.GetWrappedClass() type[rocky30.models.material.material.MaterialCollection]#
- RAMaterialCollection.Remove(item: ansys.rocky.app.api_element_item.ApiElementItem) None#
Remove an item from the list.
- RAMaterialCollection.__iter__() ansys.rocky.app.api_element_item.ApiElementItem#
- RAMaterialCollection.__getitem__(index: int) ansys.rocky.app.api_element_item.ApiElementItem#
- RAMaterialCollection.New() ansys.rocky.app.ra_solid_material.RASolidMaterial#
Deprecated: Use
Add{Solid, Fluid}Material()instead.
- RAMaterialCollection.AddSolidMaterial(name: str | None = None) ansys.rocky.app.ra_solid_material.RASolidMaterial#
- RAMaterialCollection.AddFluidMaterial(name: str | None = None) ansys.rocky.app.ra_fluid_material.RAFluidMaterial#
- RAMaterialCollection.GetDefaultSolidMaterials() list[ansys.rocky.app.ra_solid_material.RASolidMaterial]#
Get a list with the default solid materials, in order of Particle, Belt and Boundary.
- RAMaterialCollection.GetDefaultParticleMaterial() ansys.rocky.app.ra_solid_material.RASolidMaterial#
- RAMaterialCollection.GetDefaultBeltMaterial() ansys.rocky.app.ra_solid_material.RASolidMaterial#
- RAMaterialCollection.GetDefaultBoundaryMaterial() ansys.rocky.app.ra_solid_material.RASolidMaterial#
- RAMaterialCollection.GetSolidMaterial(material_name: str) ansys.rocky.app.ra_solid_material.RASolidMaterial#
Get the solid material with the given name.
- RAMaterialCollection.GetDefaultFluidMaterial() ansys.rocky.app.ra_fluid_material.RAFluidMaterial#
- RAMaterialCollection.GetFluidMaterial(material_name: str) ansys.rocky.app.ra_fluid_material.RAFluidMaterial#
Get the fluid material with the given name.
- RAMaterialCollection.GetMaterialsInteractionCollection() ansys.rocky.app.ra_materials_interaction_collection.RAMaterialsInteractionCollection#
Get the study’s Materials Interaction Collection.