> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# RAMaterialCollection

### *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 the
[`RAMaterialCollection`](#generated.RAMaterialCollection) from a [`RAStudy`](https://developer.synopsys.com/docs/rocky/rocky-prepost-scripting/2025-r1/RAStudy#generated.RAStudy) via:

```python theme={null}
material_collection = study.GetMaterialCollection()
```

Instances of the [`RAMaterialCollection`](#generated.RAMaterialCollection) class act as regular Python lists and can be
iterated on, individual materials accessed and deleted via index, etc:

```python theme={null}
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 [`RASolidMaterial`](https://developer.synopsys.com/docs/rocky/rocky-prepost-scripting/2025-r1/RASolidMaterial#generated.RASolidMaterial) and [`RAFluidMaterial`](https://developer.synopsys.com/docs/rocky/rocky-prepost-scripting/2025-r1/RAFluidMaterial#generated.RAFluidMaterial).

**Methods:**

| Name | Description |
| - | - |
| [`Clear`](#generated.RAMaterialCollection.Clear)() | Remove all items from the list. |
| [`GetBulkSolidFraction`](#generated.RAMaterialCollection.GetBulkSolidFraction)() | Get the value of "Bulk Solid Fraction". |
| [`GetDefaultMaterials`](#generated.RAMaterialCollection.GetDefaultMaterials)() | Deprecated: Use [`GetDefaultSolidMaterials()`](#generated.RAMaterialCollection.GetDefaultSolidMaterials) instead. |
| [`GetDefaultSolidMaterials`](#generated.RAMaterialCollection.GetDefaultSolidMaterials)() | Get a list with the default solid materials, in order of Particle, Belt and Boundary. |
| [`GetFluidMaterial`](#generated.RAMaterialCollection.GetFluidMaterial)(material\_name) | Get the fluid material with the given name. |
| [`GetMaterial`](#generated.RAMaterialCollection.GetMaterial)(material\_name) | Deprecated: Use [`GetSolidMaterial()`](#generated.RAMaterialCollection.GetSolidMaterial) instead. |
| [`GetMaterialsInteractionCollection`](#generated.RAMaterialCollection.GetMaterialsInteractionCollection)() | Get the study's Materials Interaction Collection. |
| [`GetSolidMaterial`](#generated.RAMaterialCollection.GetSolidMaterial)(material\_name) | Get the solid material with the given name. |
| [`New`](#generated.RAMaterialCollection.New)() | Deprecated: Use `Add{Solid, Fluid}Material()` instead. |
| [`Remove`](#generated.RAMaterialCollection.Remove)(item) | Remove an item from the list. |
| [`SetBulkSolidFraction`](#generated.RAMaterialCollection.SetBulkSolidFraction)(value) | Set the value of "Bulk Solid Fraction". |

#### Clear()

Remove all items from the list.

#### GetBulkSolidFraction()

Get the value of “Bulk Solid Fraction”.

#### GetDefaultMaterials()

Deprecated: Use [`GetDefaultSolidMaterials()`](#generated.RAMaterialCollection.GetDefaultSolidMaterials) instead.

#### 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.

#### GetMaterial(material\_name: str)

Deprecated: Use [`GetSolidMaterial()`](#generated.RAMaterialCollection.GetSolidMaterial) instead.

#### GetMaterialsInteractionCollection()

Get the study’s Materials Interaction Collection.

#### GetSolidMaterial(material\_name: str)

Get the solid material with the given name.

#### New()

Deprecated: Use `Add{Solid, Fluid}Material()` instead.

#### Remove(item: T)

Remove an item from the list.

#### SetBulkSolidFraction(value: Union\[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.
