armi.reactor.excoreStructure module
This module provides the simplest base-class tools for representing reactor objects that are outside the reactor core.
The idea here is that all ex-core objects will be represented first as a spatial grid, and then arbitrary ArmiObjects can be added to that grid.
- class armi.reactor.excoreStructure.ExcoreStructure(name, parent=None)[source]
Bases:
Composite
This is meant as the simplest baseclass neede to represent an ex-core reactor thing.
An ex-core structure is expected to:
be a child of the Reactor,
have a grid associated with it,
contain a hierarchical set of ArmiObjects.
- property r
- add(obj, loc=None)[source]
Add an ArmiObject to a particular grid location, in this structure.
- Parameters:
assem (ArmiObject) – Any generic ArmiObject to add to the structure.
loc (LocationBase, optional) – The location on this structure’s grid. If omitted, will come from the object.
- paramCollectionType
alias of
ArmiObjectParameterCollection
- class armi.reactor.excoreStructure.ExcoreCollection[source]
Bases:
dict
A collection that allows ex-core structures to be accessed like a dict, or class attributes.
Examples
Build some sample data:
>>> sfp = ExcoreStructure("sfp") >>> ivs = ExcoreStructure("ivs")
Build THIS collection:
>>> excore = ExcoreCollection()
Now you can add data to this collection like it were a dictionary, and access freely:
>>> excore["sfp"] = sfp >>> excore["sfp"] <ExcoreStructure: sfp id:2311582653024> >>> excore.sfp <ExcoreStructure: sfp id:2311582653024>
Or you can add data as if it were a class attribute, and still have dual access:
>>> excore.ivs = ivs >>> excore.ivs <ExcoreStructure: ivs id:2311590971136> >>> excore["ivs"] <ExcoreStructure: ivs id:2311590971136>