ansys.materials.manager.serialize#

Provides functions to serialize materials.

Module Contents#

Functions#

serialize_material(→ str)

Output the JSON representation of a material in Fluent format to a string.

serialize_material_to_file(material, file_name)

Output the JSON representation of a material in Fluent format to a file.

ansys.materials.manager.serialize.serialize_material(material: ansys.materials.manager.material.Material) str#

Output the JSON representation of a material in Fluent format to a string.

Parameters:
materialMaterial

Material to serialize.

Returns:
str

String representation of the material in Fluent format.

ansys.materials.manager.serialize.serialize_material_to_file(material: ansys.materials.manager.material.Material, file_name: Union[str, pathlib.Path])#

Output the JSON representation of a material in Fluent format to a file.

Parameters:
materialMaterial

Material to serialize.

file_nameUnion[str, pathlib.Path]

Name of the file to create.