armi.reactor.blueprints.componentBlueprint module

This module defines the ARMI input for a component definition, and code for constructing an ARMI Component.

Special logic is required for handling component links.

class armi.reactor.blueprints.componentBlueprint.ComponentDimension(*args, **kwargs)[source]

Bases: Object

Dummy object for ensuring well-formed component links are specified within the YAML input.

This can be either a number (float or int), or a conformation string (name.dimension).

classmethod from_yaml(loader, node, _rtd=None)[source]

Override the Yamlizable.from_yaml to inject custom interpretation of component dimension.

This allows us to create a new object with either a string or numeric value.

classmethod to_yaml(dumper, self, _rtd=None)[source]

Override the Yamlizable.to_yaml to remove the object-like behavior, otherwise we’d end up with a {value: ...} dictionary.

This allows someone to programmatically edit the component dimensions without using the ComponentDimension class.

attributes = <yamlize.attribute_collection.AttributeCollection object>
class armi.reactor.blueprints.componentBlueprint.ComponentBlueprint(*args, **kwargs)[source]

Bases: Object

This class defines the inputs necessary to build ARMI component objects. It uses yamlize to enable serialization to and from YAML.

construct(blueprint, matMods)[source]

Construct a component or group.

setCustomDensity(constructedComponent, blueprint, matMods)[source]

Apply a custom density to a material with custom isotopics but not a ‘custom material’.

attributes = <yamlize.attribute_collection.AttributeCollection object>
armi.reactor.blueprints.componentBlueprint.expandElementals(mat, blueprint)[source]

Expand elements to isotopics during material construction.

Does so as required by modeling options or user input.

See also

armi.reactor.blueprints.Blueprints._resolveNuclides

Sets the metadata defining this behavior.

armi.reactor.blueprints.componentBlueprint.insertDepletableNuclideKeys(c, blueprint)[source]

Auto update number density keys on all DEPLETABLE components.

Notes

This should be moved to a neutronics/depletion plugin hook but requires some refactoring in how active nuclides and reactors are initialized first.

See also

armi.physics.neutronics.isotopicDepletion.isotopicDepletionInterface.isDepletable

contains design docs describing the DEPLETABLE flagging situation

class armi.reactor.blueprints.componentBlueprint.ComponentKeyedList(*args, **kwargs)[source]

Bases: KeyedList

An OrderedDict of ComponentBlueprints keyed on the name.

This is used within the components: main entry of the blueprints.

This is not (yet) used when components are defined within a block blueprint. That is handled in the blockBlueprint construct method.

Initialize a Map.

Parameters:
  • *args – sequence of key/value pairs.

  • **kwargs – kwargs for input to OrderedDict.

item_type

alias of ComponentBlueprint

attributes = <yamlize.attribute_collection.KeyedListAttributeCollection object>
class armi.reactor.blueprints.componentBlueprint.GroupedComponent(*args, **kwargs)[source]

Bases: Object

A pointer to a component with a multiplicity to be used in a ComponentGroup.

Multiplicity can be a fraction (e.g. to set volume fractions)

attributes = <yamlize.attribute_collection.AttributeCollection object>
class armi.reactor.blueprints.componentBlueprint.ComponentGroup(*args, **kwargs)[source]

Bases: KeyedList

A single component group containing multiple GroupedComponents.

Example

triso:
kernel:

mult: 0.7

buffer:

mult: 0.3

Initialize a Map.

Parameters:
  • *args – sequence of key/value pairs.

  • **kwargs – kwargs for input to OrderedDict.

item_type

alias of GroupedComponent

attributes = <yamlize.attribute_collection.KeyedListAttributeCollection object>
class armi.reactor.blueprints.componentBlueprint.ComponentGroups(*args, **kwargs)[source]

Bases: KeyedList

A list of component groups.

This is used in the top-level blueprints file.

Initialize a Map.

Parameters:
  • *args – sequence of key/value pairs.

  • **kwargs – kwargs for input to OrderedDict.

attributes = <yamlize.attribute_collection.KeyedListAttributeCollection object>
item_type

alias of ComponentGroup