add_material#

Materials.add_material(materialname, props=None)[source]#

Add a material with default values.

When the added material object is returned, you can customize the material. This method does not update the material.

Parameters:
materialnamestr

Name of the material.

propsdict, optional

Material property dictionary. The default is None.

Returns:
pyaedt.modules.Material.Material

References

>>> oDefinitionManager.AddMaterial

Examples

>>> from pyaedt import Hfss
>>> hfss = Hfss()
>>> mat = hfss.materials.add_material("MyMaterial")
>>> print(mat.conductivity.value)
>>> oDefinitionManager.GetProjectMaterialNames
>>> oMaterialManager.GetData