ansys.materials.manager.util.matml.matml_parser#

Provides the matml_parser module.

Module Contents#

Classes#

Parameter

Define a parameter such as density or Young's Modulus.

PropertySet

Define a PropertySet which contains one or several parameters.

MatmlReader

Parse a MATML (engineering data xml) file.

Attributes#

MATERIALS_ELEMENT_KEY

MATML_DOC_KEY

METADATA_KEY

BULKDATA_KEY

UNITLESS_KEY

BEHAVIOR_KEY

WBTRANSFER_KEY

MAT_TRANSFER_ID

ansys.materials.manager.util.matml.matml_parser.MATERIALS_ELEMENT_KEY = 'Materials'#
ansys.materials.manager.util.matml.matml_parser.MATML_DOC_KEY = 'MatML_Doc'#
ansys.materials.manager.util.matml.matml_parser.METADATA_KEY = 'Metadata'#
ansys.materials.manager.util.matml.matml_parser.BULKDATA_KEY = 'BulkDetails'#
ansys.materials.manager.util.matml.matml_parser.UNITLESS_KEY = 'Unitless'#
ansys.materials.manager.util.matml.matml_parser.BEHAVIOR_KEY = 'Behavior'#
ansys.materials.manager.util.matml.matml_parser.WBTRANSFER_KEY = 'ANSYSWBTransferData'#
ansys.materials.manager.util.matml.matml_parser.MAT_TRANSFER_ID = 'DataTransferID'#
class ansys.materials.manager.util.matml.matml_parser.Parameter#

Define a parameter such as density or Young’s Modulus.

name: str#
data: Any#
qualifiers: Dict#
class ansys.materials.manager.util.matml.matml_parser.PropertySet#

Define a PropertySet which contains one or several parameters.

name: str#
parameters: Dict#
qualifiers: Dict#
class ansys.materials.manager.util.matml.matml_parser.MatmlReader(file_path: _PATH_TYPE)#

Parse a MATML (engineering data xml) file.

Fills a nested dict with all the materials and their properties. The key of the first layer are the material names. The conversion into a specific format/object representation is implemented separately.

The data can be accessed via matml_reader.materials

Create a new MATML reader object.

Parameters:
file_path

Matml (engineering data xml) file path

materials: Dict#
transfer_ids#
matml_file_path: _PATH_TYPE#
parse_matml() bool#

Read MATML (engineering data XML) file.

Output can be consumed via matml_reader.materials or matml_reader.get_material(name).

Returns the number of imported materials.

get_material(name: str) Dict#

Return a certain material.