materials.material module

Representation of a material’s engineering properties and other data.

class materials.material.Material(name, form=None, condition=None, category=None, subcategory=None, references=None, properties_dict=None, elemental_composition=None)[source]

Bases: object

An engineering material, in a particular form and condition.

elements_table_str()[source]

Create (as a string) a table of the elemental composition data.

materials.material.build_properties(properties_dict_yaml)[source]

Create a dict of Property from a (YAML-derived) dictionary.

Parameters:properties_dict_yaml (dict) – A dict of material property data derived from a YAML file.
Returns:keys are property name strings, values are Property objects.
Return type:properties_dict_py (dict)
materials.material.load_from_yaml(filename, form, condition)[source]

Load a material from a YAML file.

Parameters:
  • filename (string) – Path to the YAML file containing the material data.
  • form (string) – The form in which the material was produced, e.g. ‘extruded’, ‘forged’, etc. We use form in the same sense as MMPDS [1]. The form can effect some properties of the material. Must be a key in the forms section of the YAML file.
  • condition (string) – The condition, heat treatment, or temper of the material. MMPDS [1] uses ‘condition’ or ‘temper’ to refer to this concept, depending on the alloy family. Different alloy families use different condition/temper designations, these designations are described in MMPDS or the relevant materials standards. The condition can effect some properties of the material. Must be a key in the conditions section of the YAML file for the given form.
Returns:

Material