armi.reactor.blueprints package

Blueprints describe the geometric and composition details of the objects in the reactor (e.g. fuel assemblies, control rods, etc.).

Inputs captured within this blueprints module pertain to major design criteria like custom material properties or basic structures like the assemblies in use.

This is essentially a wrapper for a yaml loader. The given yaml file is expected to rigidly adhere to given key:value pairings.

See the blueprints documentation for more details.

The file structure is expectation is:

nuclide flags:
    AM241: {burn: true, xs: true}
    ...

custom isotopics: {} # optional

blocks:
    name:
        component name:
            component dimensions
    ...

assemblies:
    name:
        specifier: ABC
        blocks: [...]
        height: [...]
        axial mesh points: [...]
        xs types: [...]

        # optional
        myMaterialModification1: [...]
        myMaterialModification2: [...]

        # optionally extra settings (note this is probably going to be a removed feature)
        #    hotChannelFactors: TWRPclad

Examples

>>> design = blueprints.Blueprints.load(self.yamlString)
>>> print(design.gridDesigns)

Notes

The blueprints system was built to enable round trip translations between text representations of input and objects in the code.

armi.reactor.blueprints.loadFromCs(cs, roundTrip=False)[source]

Function to load Blueprints based on supplied Settings.

class armi.reactor.blueprints.Blueprints[source]

Bases: Object

Base Blueprintsobject representing all the subsections in the input file.

constructAssem(cs, name=None, specifier=None, orientation=0.0)[source]

Construct a new assembly instance from the assembly designs in this Blueprints object.

Parameters:
  • cs (Settings) – Used to apply various modeling options when constructing an assembly.

  • name (str (optional, and should be exclusive with specifier)) – Name of the assembly to construct. This should match the key that was used to define the assembly in the Blueprints YAML file.

  • specifier (str (optional, and should be exclusive with name)) – Identifier of the assembly to construct. This should match the identifier that was used to define the assembly in the Blueprints YAML file.

  • orientation (float (optional, is usually just zero)) – Rotate the Assembly at creation.

Raises:

ValueError – If neither name nor specifier are passed

Notes

There is some possibility for “compiling” the logic with closures to make constructing an assembly / block / component faster. At this point is is pretty much irrelevant because we are currently just deepcopying already constructed assemblies.

Currently, this method is backward compatible with other code in ARMI and generates the .assemblies attribute (the BOL assemblies). Eventually, this should be removed.

classmethod migrate(inp: TextIO, version: str = None)[source]

Given a stream representation of a blueprints file, migrate it.

Parameters:
  • inp (TextIO) – Input stream to migrate.

  • version (str) – Optional DB version string, for example: 1.2.3

classmethod dump(data, stream=None, Dumper=<class 'ruamel.yaml.dumper.RoundTripDumper'>)[source]

A modification of yamlize.Object.dump.

With the release of ruamel.yaml 0.19.1, we began to get an error where lists that include only empty and 0.0 values incorrectly for the zero values to zero strings: ‘0.0’.

classmethod streamCleaner(stream) None[source]

Clean the zero strings into zero floats.

With the release of ruamel.yaml 0.19.1, we began to get an error where lists that include only empty and 0.0 values incorrectly for the zero values to zero strings: ‘0.0’.

attributes = <yamlize.attribute_collection.AttributeCollection object>
classmethod load(stream, roundTrip=False)[source]

A wrapper around the yamlize.Object.load() method.

With the release of ruamel.yaml 0.19.1, we began getting the following error: AttributeError: ‘RoundTripLoader’ object has no attribute ‘max_depth’ Setting that attribute to None solved the issue. However, it would be prudent to rework blueprints loading to side step the issue entirely. This occurs because of the way yamlize calls get_single_node.

addDefaultSFP()[source]

Create a default SFP if it’s not in the blueprints.

armi.reactor.blueprints.migrate(bp: Blueprints, cs)[source]

Apply migrations to the input structure.

This is a good place to perform migrations that address changes to the system design description (settings, blueprints). We have access both here, so we can even move stuff between files.

Subpackages

Submodules