ansys.materials.manager.material_manager#

Provides the MaterialManager class.

Module Contents#

Classes#

MaterialManager

Manage material creation, assignment, and other management tasks.

class ansys.materials.manager.material_manager.MaterialManager(pyansys_client: Any)#

Manage material creation, assignment, and other management tasks.

This class is the main entry point for the Pythonic material management interface.

Create a MaterialManager object ready for use.

Parameters:
pyansys_clientAny

Valid instance of a PyAnsys client. Only PyMAPDL and PyFluent are supported currently.

model_type_map: Dict[str, ansys.materials.manager._models._BaseModel]#
write_material(material: ansys.materials.manager.material.Material) None#

Write a material to the solver.

Parameters:
materialMaterial

Material object to write to solver.

read_materials_from_session() Dict[str, ansys.materials.manager.material.Material]#

Given a PyAnsys session, return the materials present.

This method only supports PyMAPDL currently.

Returns:
Dict[str, Material]

Materials in the current session, indexed by an ID. For MAPDL, this is the material ID. For Fluent, this is the material name.