armi.matProps.material module

How matProps defines a material class.

class armi.matProps.material.MatPropsMaterial(yamlPath=None)[source]

Bases: object

The MatPropsMaterial 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 MatPropsMaterial definitions for a single material containing different phases.

Implementation: Materials can be defined in custom YAML files. I_ARMI_MAT_YAML
signature: MatPropsMaterial
requirements: R_ARMI_MAT_YAML

The ARMI matProps package can build a MatPropsMaterial object from a custom YAML format. This file format is flexible and extensible. It is designed around the idea that mostly what scientists and engineers want from a material in software is the ability to define it in terms of nuclide fractions and properties. In particular, the most work in this code is to allow users to define material properties (like density) using simple mathematical syntax or tabular data.

Constructor for MatPropsMaterial class.

validFileFormatVersions = [3.0, 'TESTS']
YAML_PATH = None
materialType

Enum represting type for the MatPropsMaterial object

composition

List of Constituent objects representing composition of MatPropsMaterial.

name

Name of MatPropsMaterial object.

yamlPath

Path to the YAML file that was loaded to build this instance.

hash() str[source]

Returns the SHA1 hash value of a MatPropsMaterial instance.

saved() bool[source]

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

save()[source]

Sets MatPropsMaterial._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) – MatPropsMaterial definition, like a dict that is loaded from a YAML file.

loadFile(yamlPath: str)[source]

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

Parameters:

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