armi.matProps.material module

How matProps defines a material class.

class armi.matProps.material.Material[source]

Bases: object

The Material class is a generic container for all Material types, whether they contain ASME properties, fluid properties, or steel properties.

It may be necessary to have multiple Material definitions for a single material containing different phases.

Constructor for Material class.

validFileFormatVersions = [3.0, 'TESTS']
materialType

Enum represting type for the Material object

composition

List of Constituent objects representing composition of Material.

name

Name of Material object.

hash() str[source]

Returns the SHA1 hash value of a Material instance.

saved() bool[source]

Returns a bool value indicating whether the Material has been stored internally in the matProps.materials map via matProps.addMaterial().

save()[source]

Sets Material._saved flag to True.

static dataCheckMaterialFile(filePath, rootNode)[source]

This is a partial data check of the material data file.

Checks the first level of data keywords and also check that the file format is a valid version.

Parameters:
  • filePath (str) – Path containing name of YAML file whose file format and property nodes are checked.

  • rootNode (dict) – Root YAML node of file parsed from filePath.

static getValidFileFormatVersions()[source]

Get a vector of strings with all of the valid file format versions.

static getNode(node: dict, subnodeName: str)[source]

Searches a node for a child element and returns it.

Parameters:
  • node (dict) – Parent level node from which a child element is searched.

  • subnodeName (str) – Name of the child element that is queried from node.

loadNode(node: dict)[source]

Loads YAML and parses information to fill in Material data members including all relevant Function objects.

Parameters:

node (dict) – Material definition, like a dict that is loaded from a YAML file.

loadFile(filePath: str)[source]

Loads yaml file and parses information to fill in Material data members including all relevant Function objects.

Parameters:

filePath (str) – Path containing name of YAML file to parse.