armi.cases.inputModifiers.inputModifiers module

Modifies inputs.

class armi.cases.inputModifiers.inputModifiers.InputModifier(independentVariable=None)[source]

Bases: object

Object that modifies input definitions in some well-defined way.

(This class is abstract.)

Subclasses must implement a __call__ method accepting a CaseSettings, Blueprints, and SystemLayoutInput.

The class attribute FAIL_IF_AFTER should be a tuple defining what, if any, modifications this should fail if performed after. For example, one should not adjust the smear density (a function of Cladding ID) before adjusting the Cladding ID.

Some subclasses are provided, but you are expected to make your own design-specific modifiers in most cases.

Constuctor.

Parameters

independentVariable (dict or None, optional) – Name/value pairs to associate with the independent variable being modified by this object. Will be analyzed and plotted against other modifiers with the same name.

FAIL_IF_AFTER = ()
class armi.cases.inputModifiers.inputModifiers.SamplingInputModifier(name: str, paramType: str, bounds: list, independentVariable=None)[source]

Bases: armi.cases.inputModifiers.inputModifiers.InputModifier

Object that modifies input definitions in some well-defined way.

(This class is abstract.)

Subclasses must implement a __call__ method accepting a CaseSettings, Blueprints, and SystemLayoutInput.

This is a modified version of the InputModifier abstract class that imposes structure for parameters in a design space that will be sampled by a quasi-random sampling algorithm. These algorithms require input modifiers to specify if the parameter is continuous or discrete and have the bounds specified.

Constructor for the Sampling input modifier.

Parameters
  • name (str) – Name of input modifier.

  • paramType (str) – specify if parameter is ‘continuous’ or ‘discrete’

  • bounds (list) – If continuous, provide floating points [a, b] specifing the inclusive bounds. If discrete, provide a list of potential values [a, b, c, …]

  • independentVariable ([type], optional) – Name/value pairs to associate with the independent variable being modified by this object. Will be analyzed and plotted against other modifiers with the same name, by default None

class armi.cases.inputModifiers.inputModifiers.FullCoreModifier(independentVariable=None)[source]

Bases: armi.cases.inputModifiers.inputModifiers.InputModifier

Grow the SystemLayoutInput to from a symmetric core to a full core.

Notes

Besides the core, other grids may also be of interest for expansion, like a grid that defines fuel management. However, the expansion of a fuel management schedule to full core is less trivial than just expanding the core itself. Thus, this modifier currently does not attempt to update fuel management grids, but an expanded implementation could do so in the future if needed. For now, users must expand fuel management grids to full core themself.

Constuctor.

Parameters

independentVariable (dict or None, optional) – Name/value pairs to associate with the independent variable being modified by this object. Will be analyzed and plotted against other modifiers with the same name.

class armi.cases.inputModifiers.inputModifiers.SettingsModifier(settingName, value)[source]

Bases: armi.cases.inputModifiers.inputModifiers.InputModifier

Adjust setting to specified value.

class armi.cases.inputModifiers.inputModifiers.MultiSettingModifier(settingVals: dict)[source]

Bases: armi.cases.inputModifiers.inputModifiers.InputModifier

Adjust multiple settings to specified values.

Examples

>>> inputModifiers.MultiSettingModifier(
...    {CONF_NEUTRONICS_TYPE: "both", CONF_COARSE_MESH_REBALANCE: -1}
... )
class armi.cases.inputModifiers.inputModifiers.BluePrintBlockModifier(block, component, dimension, value)[source]

Bases: armi.cases.inputModifiers.inputModifiers.InputModifier

Adjust blueprint block->component->dimension to specified value.