# 2.2.7 Specify Materials

Materials can be defined either by manually setting their mechanical properties or by selecting from a library of predefined materials (see Fig. 2.2.7.1, item 3). Materials attach to cross-sections. There are two options for assigning materials:

![Fig. 2.2.7.1: Definition of materials via element names.](https://2671626451-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MCkDlhlZpqUmakSqOrp%2Fsync%2F4add2d8732d3d616c4cdfc7de50a03766eb3a9bf.png?generation=1595316046299970\&alt=media)

* **Assignment via the “Assemble” Component:** Use the **“Elem|Id”** input plug to specify the names of the elements to which the material should be attached. Alternatively, a regular expression can be used to select elements. Leaving **“Elem|Id”** empty sets the material for all elements. Materials are not attached directly to elements but to the element’s cross-section.
* **Direct Input at the “Cross Section” Component:** As shown in Fig. 2.2.7.2.

<figure><img src="https://2671626451-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6rkhS8IteqWJRfUuJlL5%2Fuploads%2FHH1FH7nr0driZtbtLaBJ%2Fmaterialassignmenttocrosecs.png?alt=media&#x26;token=39cc992d-085f-4233-a76a-ee17e8db9c28" alt=""><figcaption><p>Fig. 2.2.7.2: Definition of a material directly at the "Element" component.</p></figcaption></figure>

Figure 2.2.7.1 illustrates how materials can be defined by element names **“Elem|Id”**:

1. Definition of an isotropic custom material.
2. Definition of an orthotropic custom material.
3. Selection of a material from the material library.

{% hint style="info" %}
Assignment via the **“Assemble”**-component overrides direct assignment in the cross section.
{% endhint %}

{% hint style="info" %}
Should you not assign a material to your beam or shell elements, the [default material ](https://manual.karamba3d.com/2-getting-started/karamba3d-entities#default-settings)will be used.
{% endhint %}
