Page 1 of 1

Assign multiple materials to an element (for different modules)

Posted: Thu Jun 13, 2019 9:42 am
by jbaiges
Hi,
We are using the old problemtype and we have two modules running on the same mesh (temperature and mechanics). The info for each of the modules materials is entered in different books in the .mat file (we have one book for temperature and one book for mechanics in the .mat file).
We would like to be able to assign a temperature material and a mechanics material to the elements of the mesh.
How can we do that? How do we then retrieve the information for the temperature material or the mechanics material?

Thank you for your help,
Joan

Re: Assign multiple materials to an element (for different modules)

Posted: Thu Jun 13, 2019 10:44 am
by escolano
About materials (of a 'classic problemtype')
You cannot assign two materials to a geometry or mesh entity.
The entity object has a pointer, and only one, to a material

what you can do is to define other kind of 'composed material' that could have for example to questions that store two, or more, material names of your current two books.
Really the question field is a string, but this string could be used like it was a pointer to a material.
As a trick, you can append to the question name #MAT#(a_book_name),
then this question will be showed as a combobox, filled with the current materials of this book

This is explained in the 'GiD customization manual'
http://www.gidhome.com/documents/customizationmanual/APPENDIX%20B%20(classic%20problemtype%20system)/PROBLEMTYPE%20'CLASSIC'/CONFIGURATION%20FILES/Special%20fields