armi.materials package¶
The material package defines compositions and temperature-dependent thermo-mechanical properties.
As the fundamental macroscopic building blocks of any physical object, these are highly important to reactor analysis.
This module handles the dynamic importing of all the materials defined here at the framework level as well as in all the attached plugins. It is expected that most teams will have special material definitions that they will want to define.
It may also make sense in the future to support user-input materials that are not hard-coded into the app.
The base class for all materials is in armi.materials.material.
-
armi.materials.importMaterialsIntoModuleNamespace(path, name, namespace, updateSource=None)[source]¶ Import all Material subclasses into the top subpackage
This allows devs to use
from armi.materials import HT9Disadvantage: pylint can’t tell if the module is available here.This can be used in plugins for similar purposes.
Warning
Do not directly import materials from this namespace in code. Use the full module import instead. This is just for material resolution. This will be replaced with a more formal material registry in the future.
- Parameters
path (str) – Path to package/module being imported
name (str) – module name
namespace (dict) – The namespace
updateSource (str, optional) – Change DATA_SOURCE on import to a different string. Useful for saying where plugin materials are coming from.
-
armi.materials.iterAllMaterialClassesInNamespace(namespace)[source]¶ Iterate over all Material subclasses found in a namespace.
Notes
Useful for testing.
-
armi.materials.resolveMaterialClassByName(name: str, namespaceOrder: List[str] = None)[source]¶ Find the first material class that matches a name in an ordered namespace.
This works with the
CONF_MATERIAL_NAMESPACE_ORDERsetting to allows users to choose which particular material of a common name (like UO2 or HT9) gets used.Input files usually specify a material like UO2. Which particular implementation gets used (Framework’s UO2 vs. a user plugins UO2 vs. the Kentucky Transportation Cabinet’s UO2) is up to the user at runtime.
- Parameters
name (str) – The material name to find, e.g.
"UO2".namespaceOrder (list of str, optional) – A list of namespaces in order of preference in which to search for the material. If not passed, the value in the global
MATERIAL_NAMESPACE_ORDERwill be used, which is often set by theCONF_MATERIAL_NAMESPACE_ORDERsetting (e.g. during reactor construction).
- Returns
matCls – The material
- Return type
- Raises
KeyError – When material of name cannot be found in namespaces.
Examples
>>> resolveMaterialClassByName("UO2", ["terrapower.twr.materials", "armi.materials"]) <class 'terrapower.twr.materials.UO2'>
See also
armi.reactor.reactors.factory()Applies user settings to default namespace order.
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