armi.reactor.blueprints.isotopicOptions module

Defines nuclide flags and custom isotopics via input.

Nuclide flags control meta-data about nuclides. Custom isotopics allow specification of arbitrary isotopic compositions.

class armi.reactor.blueprints.isotopicOptions.NuclideFlag(*args, **kwargs)[source]

Bases: Object

Defines whether or not each nuclide is included in the burn chain and cross sections.

Also controls which nuclides get expanded from elementals to isotopics and which natural isotopics to exclude (if any). Oftentimes, cross section library creators include some natural isotopes but not all. For example, it is common to include O16 but not O17 or O18. Each code has slightly different interpretations of this so we give the user full control here.

We also try to provide useful defaults.

There are lots of complications that can arise in these choices. It makes reasonable sense to use elemental compositions for things that are typically used without isotopic modifications (Fe, O, Zr, Cr, Na). If we choose to expand some or all of these to isotopics at initialization based on cross section library requirements, a single case will work fine with a given lattice physics option. However, restarting from that case with different cross section needs is challenging.

Implementation: The blueprint object that represents a nuclide flag. I_ARMI_BP_NUC_FLAGS1
signature: NuclideFlag
requirements: R_ARMI_BP_NUC_FLAGS

This class creates a yaml interface for the user to specify in their blueprints which isotopes should be depleted. It is incorporated into the “nuclide flags” section of a blueprints file by being included as key-value pairs within the NuclideFlags class, which is in turn included into the overall blueprints within Blueprints.

This class includes a boolean burn attribute which can be specified for any nuclide. This attribute is examined by the fileAsActiveOrInert() method to sort the nuclides into sets of depletable or not, which is typically called during construction of assemblies in constructAssem().

Note that while the burn attribute can be set by the user in the blueprints, other methods may also set it based on case settings (see, for instance, genDefaultNucFlags(), autoUpdateNuclideFlags(), and getAllNuclideBasesByLibrary()).

Variables:
  • nuclideName (str) – The name of the nuclide

  • burn (bool) – True if this nuclide should be added to the burn chain. If True, all reachable nuclides via transmutation and decay must be included as well.

  • xs (bool) – True if this nuclide should be included in the cross section libraries. Effectively, if this nuclide is in the problem at all, this should be true.

  • expandTo (list of str, optional) – isotope nuclideNames to expand to. For example, if nuclideName is O then this could be ["O16", "O17"] to expand it into those two isotopes (but not O18). The nuclides will be scaled up uniformly to account for any missing natural nuclides.

fileAsActiveOrInert(activeSet, inertSet)[source]

Given a nuclide or element name, file it as either active or inert.

If isotopic expansions are requested, include the isotopics rather than the NaturalNuclideBase, as the NaturalNuclideBase will never occur in such a problem.

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

Bases: KeyedList

An OrderedDict of NuclideFlags, keyed by their nuclideName.

Initialize a Map.

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

  • **kwargs – kwargs for input to OrderedDict.

item_type

alias of NuclideFlag

attributes = <yamlize.attribute_collection.KeyedListAttributeCollection object>
class armi.reactor.blueprints.isotopicOptions.CustomIsotopic(*args)[source]

Bases: Map

User specified, custom isotopics input defined by a name (such as MOX), and key/pairs of nuclide names and numeric values consistent with the input format.

Implementation: Certain material modifications will be applied using this code. I_ARMI_MAT_USER_INPUT2
signature: CustomIsotopic
requirements: R_ARMI_MAT_USER_INPUT

Defines a yaml construct that allows the user to define a custom isotopic vector from within their blueprints file, including a name and key-value pairs corresponding to nuclide names and their concentrations.

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 used in key-value pairs within the CustomIsotopics class, which is imported and used as an attribute within the larger Blueprints class.

These isotopics are linked to a component during calls to construct(), where the name specified in the isotopics attribute of the component blueprint is searched against the available CustomIsotopics defined in the “custom isotopics” section of the blueprints. Once linked, the apply() method is called, which adjusts the massFrac attribute of the component’s material class.

key_type

alias of Yamlizablestr

value_type

alias of Yamlizablefloat

property density
classmethod from_yaml(loader, node, rtd)[source]

Override the Yamlizable.from_yaml to inject custom data validation logic, and complete initialization of the object.

classmethod from_yaml_key_val(loader, key_node, val_node, key_attr, rtd)[source]

Override the Yamlizable.from_yaml to inject custom data validation logic, and complete initialization of the object.

apply(material)[source]

Apply specific isotopic compositions to a component.

Generically, materials have composition-dependent bulk properties such as mass density. Note that this operation does not update these material properties. Use with care.

Parameters:

material (armi.materials.material.Material) – An ARMI Material instance.

attributes = <yamlize.attribute_collection.MapAttributeCollection object>
class armi.reactor.blueprints.isotopicOptions.CustomIsotopics(*args, **kwargs)[source]

Bases: KeyedList

OrderedDict of CustomIsotopic objects, keyed by their name.

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 CustomIsotopic

apply(material, customIsotopicsName)[source]

Apply specific isotopic compositions to a component.

Generically, materials have composition-dependent bulk properties such as mass density. Note that this operation does not update these material properties. Use with care.

Parameters:
armi.reactor.blueprints.isotopicOptions.getDefaultNuclideFlags()[source]

Return a default set of nuclides to model and deplete.

Notes

The nuclideFlags input on blueprints has confused new users and is infrequently changed. It will be moved to be a user setting, but in any case a reasonable default should be provided. We will by default model medium-lived and longer actinides between U234 and CM247.

We will include B10 and B11 without depletion, sodium, and structural elements.

We will include LFPs with depletion.

armi.reactor.blueprints.isotopicOptions.eleExpandInfoBasedOnCodeENDF(cs)[source]

Intelligently choose elements to expand based on code and ENDF version.

If settings point to a particular code and library and we know that combo requires certain elementals to be expanded, we flag them here to make the user input as simple as possible.

This determines both which elementals to keep and which specific expansion subsets to use.

Notes

This logic is expected to be moved to respective plugins in time.

Returns:

  • elementalsToKeep (set) – Set of NaturalNuclideBase instances to not expand into natural isotopics.

  • expansions (dict) – Element to list of nuclides for expansion. For example: {oxygen: [oxygen16]} indicates that all oxygen should be expanded to O16, ignoring natural O17 and O18. (variables are Natural/NuclideBases)

armi.reactor.blueprints.isotopicOptions.genDefaultNucFlags()[source]

Perform all the yamlize-required type conversions.

armi.reactor.blueprints.isotopicOptions.autoUpdateNuclideFlags(cs, nuclideFlags, inerts)[source]

This function is responsible for examining the fission product model treatment that is selected by the user and adding a set of nuclides to the nuclideFlags list.

Notes

The reason for adding this method is that when switching between fission product modeling treatments it can be time-consuming to manually adjust the nuclideFlags inputs.

armi.reactor.blueprints.isotopicOptions.getAllNuclideBasesByLibrary(cs)[source]

Return a list of nuclide bases available for cross section modeling based on the CONF_FISSION_PRODUCT_LIBRARY_NAME setting.