MaterialManager#

class ansys.materials.manager.material_manager.MaterialManager#

Manage material creation, assignment, and other management tasks.

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

Overview#

add_material

Add a material into the library.

extend_material

Extend the models defined within a specific material.

delete_material

Delete a material from the library.

get_material

Return a material from the library.

write_to_matml

Write the materials in the library to a MatML file.

read_from_matml

Read materials from a MatML file and add them to the library.

write_to_mapdl

Write a material to the connected MAPDL session.

read_from_mapdl_session

Read material from the pyansys client session.

write_to_ls_dyna

Write the materials in the library to a LS-DYNA keyword file.

write_to_fluent

Write a material to the connected Fluent session.

materials

The material models.

client

The provided client.

Import detail#

from ansys.materials.manager.material_manager import MaterialManager

Property detail#

property MaterialManager.materials: dict[str, ansys.materials.manager._models.material.Material]#

The material models.

property MaterialManager.client: Any#

The provided client.

Method detail#

MaterialManager.add_material(material: ansys.materials.manager._models.material.Material) None#

Add a material into the library.

MaterialManager.extend_material(material_name: str, material_models: list[ansys.materials.manager._models._common.material_model.MaterialModel]) None#

Extend the models defined within a specific material.

MaterialManager.delete_material(material_name: str)#

Delete a material from the library.

MaterialManager.get_material(material_name) ansys.materials.manager._models.material.Material | None#

Return a material from the library.

MaterialManager.write_to_matml(path: str | pathlib.Path, material_names: list[str] | None = None) None#

Write the materials in the library to a MatML file.

MaterialManager.read_from_matml(path: str | pathlib.Path) None#

Read materials from a MatML file and add them to the library.

MaterialManager.write_to_mapdl(mapdl_client: ansys.materials.manager._models._common._MapdlCore | None = None, material_names: list[str] | None = None, material_ids: list[int] | None = None, reference_temperatures: list[float] | None = None) list[str] | None#

Write a material to the connected MAPDL session.

MaterialManager.read_from_mapdl_session(mapdl_client: ansys.materials.manager._models._common._MapdlCore) None#

Read material from the pyansys client session.

MaterialManager.write_to_ls_dyna(deck: ansys.dyna.core.Deck | None = None, material_names: list[str] | None = None) list[ansys.dyna.core.lib.keyword_base.KeywordBase] | None#

Write the materials in the library to a LS-DYNA keyword file.

MaterialManager.write_to_fluent(fluent_client: ansys.materials.manager._models._common._FluentCore, material_names: list[str] | None = None) list[dict]#

Write a material to the connected Fluent session.