The serialize.py module#

Summary#

serialize_material

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

serialize_material_to_file

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

Description#

Provides functions to serialize materials.

Module detail#

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.

serialize.serialize_material_to_file(material: ansys.materials.manager.material.Material, file_name: 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.