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.

Implementation: Construct component from blueprint file. I_ARMI_BP_COMP
signature: ComponentBlueprint
requirements: R_ARMI_BP_COMP

Defines a yaml construct that allows the user to specify attributes of a component from within their blueprints file, including a name, flags, shape, material and/or isotopic vector, input temperature, corresponding component dimensions, and ID for placement in a block lattice (see BlockBlueprint). Component dimensions that can be defined for a given component are dependent on the component’s shape attribute, and the dimensions defining each shape can be found in the components module.

Limited validation on the inputs is performed to ensure that the component shape corresponds to a valid shape defined by the ARMI application.

Relies on the underlying infrastructure from the yamlize package for reading from text files, serialization, and internal storage of the data.

Is implemented as part of a blueprints file by being imported and used as an attribute within the larger Blueprints class. Can also be used within the BlockBlueprint class to enable specification of components directly within the “blocks” portion of the blueprint file.

Includes a construct method, which instantiates an instance of Component with the characteristics specified in the blueprints (see I_ARMI_MAT_USER_INPUT1).

construct(blueprint, matMods, inputHeightsConsideredHot)[source]

Construct a component or group.

Implementation: User-defined on material alterations are applied here. I_ARMI_MAT_USER_INPUT1
signature: construct
requirements: R_ARMI_MAT_USER_INPUT

Allows for user input to impact a component’s materials by applying the “material modifications” section of a blueprints file (see I_ARMI_MAT_USER_INPUT0) to the material during construction. This takes place during lower calls to _conformKwargs() and subsequently _constructMaterial(), which operate using the component blueprint and associated material modifications from the component’s block.

Within _constructMaterial(), the material class is resolved into a material object by calling resolveMaterialClassByName(). The applyInputParams() method of that material class is then called, passing in the associated material modifications data, which the material class can then use to modify the isotopics as necessary.

Parameters:
  • blueprint (Blueprints) – Blueprints object containing various detailed information, such as nuclides to model

  • matMods (dict) – Material modifications to apply to the component.

  • inputHeightsConsideredHot (bool) – See the case setting of the same name.

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.

Implementation: Insert any depletable blueprint flags onto this component. I_ARMI_BP_NUC_FLAGS0
signature: insertDepletableNuclideKeys
requirements: R_ARMI_BP_NUC_FLAGS

This is called during the component construction process for each component from within construct().

For a given initialized component, check its flags to determine if it has been marked as depletable. If it is, use initReachableActiveNuclidesThroughBurnChain() to apply the user-specifications in the “nuclide flags” section of the blueprints to the Component such that all active isotopes and derivatives of those isotopes in the burn chain are initialized to have an entry in the component’s numberDensities dictionary.

Note that certain case settings, including fpModel and fpModelLibrary, may trigger modifications to the active nuclides specified by the user in the “nuclide flags” section of the blueprints.

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