Page 1 of 1

get material name from *MatNum

Posted: Sat Mar 12, 2016 1:18 am
by kstn
Hello

Is there a way to get the material name from *MatNum in *loop material ?

Consider the loop

Code: Select all

*loop materials
        Material *MatNum is assigned DENSITY = *MatProp(Density,real)
        Material *MatNum has name ???
*end materials
The problem is that the model has many materials and each portion is given a material name (which is copied from an existing one). With the somehow random *MatNum assigned, it's not possible to know which material number is assigned to which name in the simulation script.

Giang

Re: get material name from *MatNum

Posted: Mon Mar 14, 2016 11:57 am
by escolano
the 0-index field return the material's name

*MatProp(0)