armi package¶
Welcome to the Advanced Reactor Modeling Interface (ARMI).
This module initializes the ARMI platform. The bootstrap process is broken into several phases:
Import fundamental dependencies in Python library and some third-party libs
Investigate environment: Check Python version, check code version, check MPI situation, check for TTY/GUI/interactivity,
Set up temp dirs
Set up printout table formats (in preparation of logging info)
Initialize all possible nuclide objects in the nuclide directory
Discover and register available built-in
plugins(custom ones registered after input available)Discover and define all potential configuration settings from available plugins
Read input files
Update
nuclide directorywith depletion info based on configDiscover and define all state
Parameterson data model (possibly dependent on config)Discover
Entry pointsfrom pluginsChoose entry point based on user command
If using the run entry point, additional work is done:
Build
reactor modelbased on inputBuild
operator objectwith specific calculation loopBuild ordered interface stack based on configuration settings
Begin looping over interface stack, operating upon data model according to operator design
Loop until complete
Wrap up
Quit
-
armi.isStableReleaseVersion(version=None)[source]¶ Determine if the version should be considered a stable release
-
armi.disconnectAllHdfDBs()[source]¶ Forcibly disconnect all instances of HdfDB objects
Notes
This is a hack to help ARMI exit gracefully when the garbage collector and h5py have issues destroying objects. After lots of investigation, the root cause for why this was having issues was never identified. It appears that when several HDF5 files are open in the same run (e.g. when calling armi.init() multiple times from a post-processing script), when these h5py File objects were closed, the garbage collector would raise an exception related to the repr’ing the object. We get around this by using the garbage collector to manually disconnect all open HdfDB objects.
-
armi.cleanTempDirs(olderThanDays=None)[source]¶ Clean up temporary files after a run.
- Parameters
olderThanDays (int, optional) – If provided, deletes other ARMI directories if they are older than the requested time.
Windows HPC system sends a SIGBREAK signal when the user cancels a job, which (The) –
NOT handled by atexit. Notably SIGBREAK doesn't exist off Windows. (is) –
the SIGBREAK signal to work with a Microsoft HPC, the TaskCancelGracePeriod (For) –
must be configured to be non-zero. This sets the period between SIGBREAK (option) –
SIGTERM/SIGINT. To do cleanups in this case, we must use the signal module. (and) –
even then it does not work because MS mpiexec does not pass signals (Actually,) –
through. –
-
armi.init(choice=None, fName=None, cs=None)[source]¶ Scan a directory for armi inputs and load one to interact with.
- Parameters
choice (int, optional) – Automatically run with this item out of the menu that would be produced of existing xml files.
fName (str, optional) – An actual case name to load. e.g. ntTwr1.xml
cs (object, optional) – If supplied, supercede the other case input methods and use the object directly
Examples
>>> o = armi.init()
-
armi.getDefaultPlugins() → List[Type[armi.plugins.ArmiPlugin]][source]¶ Return a list containing the default set of ARMI Framework plugins.
This is useful for an application to fold all of the ARMI Framework’s capabilities into its own set of plugins.
-
armi.getDefaultPluginManager() → pluggy.manager.PluginManager[source]¶ Return a plugin manager containing the default set of ARMI Framework plugins.
This is useful when using standalone facilities of ARMI without a specific application.
-
armi.getPluginManager() → Optional[pluggy.manager.PluginManager][source]¶ Return the plugin manager, if there is one.
-
armi.getPluginManagerOrFail() → pluggy.manager.PluginManager[source]¶ Return the plugin manager. Raise an error if there is none.
-
armi.configure(app: armi.apps.App)[source]¶ Set the plugin manager for the Framework and configure internals to those plugins.
Subpackages¶
- armi.bookkeeping package
- armi.cases package
- armi.cli package
- armi.localization package
- armi.materials package
- Submodules
- armi.materials.alloy200 module
- armi.materials.b4c module
- armi.materials.be9 module
- armi.materials.caH2 module
- armi.materials.californium module
- armi.materials.concrete module
- armi.materials.copper module
- armi.materials.cs module
- armi.materials.custom module
- armi.materials.graphite module
- armi.materials.hafnium module
- armi.materials.hastelloyN module
- armi.materials.ht9 module
- armi.materials.inconel module
- armi.materials.inconel600 module
- armi.materials.inconel625 module
- armi.materials.inconel800 module
- armi.materials.inconelPE16 module
- armi.materials.inconelX750 module
- armi.materials.lead module
- armi.materials.leadBismuth module
- armi.materials.lithium module
- armi.materials.magnesium module
- armi.materials.material module
- armi.materials.materialParameters module
- armi.materials.mgO module
- armi.materials.molybdenum module
- armi.materials.mox module
- armi.materials.nZ module
- armi.materials.potassium module
- armi.materials.scandiumOxide module
- armi.materials.siC module
- armi.materials.sodium module
- armi.materials.sodiumChloride module
- armi.materials.sulfur module
- armi.materials.tZM module
- armi.materials.tantalum module
- armi.materials.thU module
- armi.materials.thorium module
- armi.materials.thoriumOxide module
- armi.materials.uThZr module
- armi.materials.uZr module
- armi.materials.uranium module
- armi.materials.uraniumOxide module
- armi.materials.void module
- armi.materials.water module
- armi.materials.yttriumOxide module
- armi.materials.zincOxide module
- armi.materials.zr module
- Submodules
- armi.nucDirectory package
- armi.nuclearDataIO package
- Submodules
- armi.nuclearDataIO.cccc module
- armi.nuclearDataIO.compxs module
- armi.nuclearDataIO.dlayxs module
- armi.nuclearDataIO.endf module
- armi.nuclearDataIO.fixsrc module
- armi.nuclearDataIO.gamiso module
- armi.nuclearDataIO.isotxs module
- armi.nuclearDataIO.labels module
- armi.nuclearDataIO.nuclearFileMetadata module
- armi.nuclearDataIO.pmatrx module
- armi.nuclearDataIO.ripl module
- armi.nuclearDataIO.rtflux module
- armi.nuclearDataIO.xsCollections module
- armi.nuclearDataIO.xsLibraries module
- armi.nuclearDataIO.xsNuclides module
- Submodules
- armi.operators package
- armi.physics package
- Subpackages
- armi.physics.fuelCycle package
- armi.physics.neutronics package
- Subpackages
- Submodules
- armi.physics.neutronics.const module
- armi.physics.neutronics.crossSectionGroupManager module
- armi.physics.neutronics.crossSectionSettings module
- armi.physics.neutronics.diffIsotxs module
- armi.physics.neutronics.macroXSGenerationInterface module
- armi.physics.neutronics.parameters module
- armi.physics.neutronics.settings module
- armi.physics.safety package
- armi.physics.thermalHydraulics package
- Submodules
- Subpackages
- armi.reactor package
- Subpackages
- Submodules
- armi.reactor.assemblies module
- armi.reactor.assemblyLists module
- armi.reactor.assemblyParameters module
- armi.reactor.batch module
- armi.reactor.batchParameters module
- armi.reactor.blockParameters module
- armi.reactor.blocks module
- armi.reactor.composites module
- armi.reactor.flags module
- armi.reactor.geometry module
- armi.reactor.grids module
- armi.reactor.locations module
- armi.reactor.reactorParameters module
- armi.reactor.reactors module
- armi.reactor.zones module
- armi.scripts package
- armi.settings package
- armi.utils package
- Submodules
- armi.utils.asciimaps module
- armi.utils.codeTiming module
- armi.utils.densityTools module
- armi.utils.directoryChangers module
- armi.utils.directoryChangersMpi module
- armi.utils.dynamicImporter module
- armi.utils.flags module
- armi.utils.hexagon module
- armi.utils.iterables module
- armi.utils.outputCache module
- armi.utils.parsing module
- armi.utils.pathTools module
- armi.utils.plotting module
- armi.utils.properties module
- armi.utils.textProcessors module
- armi.utils.triangle module
- armi.utils.units module
- Submodules