add_material#

Materials.add_material(name, properties=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:
namestr

Name of the material.

propertiesdict, optional

Material property dictionary. The default is None.

Returns:
ansys.aedt.core.modules.material.Material

References

>>> oDefinitionManager.AddMaterial

Examples

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