armi.materials package
The material package defines compositions and material-specific properties.
Properties in scope include temperature dependent thermo/mechanical properties
(like heat capacity, linear expansion coefficients, viscosity, density),
and material-specific nuclear properties that can’t exist at the nuclide level
alone (like thermal scattering laws).
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.setMaterialNamespaceOrder(order)[source]
Set the material namespace order at the Python interpreter, global level.
Implementation: Material collections are defined with an order of precedence in the case of duplicates. I_ARMI_MAT_ORDERAn ARMI application will need materials. Materials can be imported from any code the application has access to, like plugin packages. This leads to the situation where one ARMI application will want to import multiple collections of materials. To handle this, ARMI keeps a list of material namespaces. This is an ordered list of importable packages that ARMI can search for a particular material by name.
This automatic exploration of an importable package saves the user the tedium have having to import or include hundreds of materials manually somehow. But it comes with a caveat; the list is ordered. If two different namespaces in the list include a material with the same name, the first one found in the list is chosen, i.e. earlier namespaces in the list have precedence.
- 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 HT9This 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.
- 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.
Names can either be fully resolved class paths (e.g.
armi.materials.uZr:UZr) or simple class names (e.g.UZr). In the latter case, theCONF_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.
Implementation: Materials can be searched across packages in a defined namespace. I_ARMI_MAT_NAMESPACEDuring the runtime of an ARMI application, but particularly during the construction of the reactor in memory, materials will be requested by name. At that point, this code is called to search for that material name. The search goes through the ordered list of Python namespaces provided. The first time an instance of that material is found, it is returned. In this way, the first items in the material namespace list take precedence.
When a material name is passed to this function, it may be either a simple name like the string
"UO2"or it may be much more specific, likearmi.materials.uraniumOxide:UO2.- Parameters:
name (str) – The material class name to find, e.g.
"UO2". Optionally, a module path and class name can be provided with a colon separator asmodule:className, e.g.armi.materials.uraniumOxide:UO2for direct specification.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). Any value passed into this argument will be ignored if thenameis provided with amodulePath.
- Returns:
matCls – The material
- Return type:
- Raises:
KeyError – When material of name cannot be found in namespaces.
Examples
>>> resolveMaterialClassByName("UO2", ["something.else.materials", "armi.materials"]) <class 'something.else.materials.UO2'>
See also
armi.reactor.reactors.factoryApplies user settings to default namespace order.
Subpackages
- armi.materials.tests package
- Submodules
- armi.materials.tests.test__init__ module
- armi.materials.tests.test_air module
- armi.materials.tests.test_b4c module
- armi.materials.tests.test_be9 module
- armi.materials.tests.test_fluids module
- armi.materials.tests.test_graphite module
- armi.materials.tests.test_lithium module
- armi.materials.tests.test_materials module
MaterialConstructionTestsMaterialFindingTestsCalifornium_TestCaseCesium_TestCaseMagnesium_TestCaseMagnesiumOxide_TestCaseMolybdenum_TestCaseMOX_TestCaseNaCl_TestCaseNiobiumZirconium_TestCasePotassium_TestCaseScandiumOxide_TestCaseSodium_TestCaseTantalum_TestCaseThoriumUraniumMetal_TestCaseUranium_TestCaseUraniumOxide_TestCaseThorium_TestCaseThoriumOxide_TestCaseVoid_TestCaseMixture_TestCaseLead_TestCaseLeadBismuth_TestCaseCopper_TestCaseSulfur_TestCaseZr_TestCaseInconel_TestCaseInconel600_TestCaseInconel625_TestCaseInconelX750_TestCaseAlloy200_TestCaseCaH2_TestCaseHafnium_TestCaseHastelloyN_TestCaseTZM_TestCaseYttriumOxide_TestCaseZincOxide_TestCaseFuelMaterial_TestCase
- armi.materials.tests.test_sic module
- armi.materials.tests.test_sulfur module
- armi.materials.tests.test_thoriumOxide module
- armi.materials.tests.test_uZr module
- armi.materials.tests.test_water module
- Submodules
Submodules
- armi.materials.air module
- armi.materials.alloy200 module
- armi.materials.b4c module
B4CB4C.DEFAULT_MASS_DENSITYB4C.DEFAULT_THEORETICAL_DENSITY_FRACB4C.enrichedNuclideB4C.NATURAL_B10_NUM_FRACB4C.propertyValidTemperatureB4C.applyInputParams()B4C.updateTD()B4C.setNewMassFracsFromMassEnrich()B4C.setDefaultMassFracs()B4C.getMassEnrichmentFromNumEnrich()B4C.pseudoDensity()B4C.density()B4C.linearExpansionPercent()
- 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
Inconel600Inconel600.propertyValidTemperatureInconel600.referencesInconel600.refTempKInconel600.setDefaultMassFracs()Inconel600.polyfitThermalConductivity()Inconel600.thermalConductivity()Inconel600.polyfitHeatCapacity()Inconel600.heatCapacity()Inconel600.polyfitLinearExpansionPercent()Inconel600.linearExpansionPercent()Inconel600.linearExpansion()Inconel600.density()
- armi.materials.inconel625 module
Inconel625Inconel625.propertyValidTemperatureInconel625.referencesInconel625.refTempKInconel625.setDefaultMassFracs()Inconel625.polyfitThermalConductivity()Inconel625.thermalConductivity()Inconel625.polyfitHeatCapacity()Inconel625.heatCapacity()Inconel625.polyfitLinearExpansionPercent()Inconel625.linearExpansionPercent()Inconel625.linearExpansion()Inconel625.density()
- armi.materials.inconel800 module
- armi.materials.inconelPE16 module
- armi.materials.inconelX750 module
InconelX750InconelX750.propertyValidTemperatureInconelX750.referencesInconelX750.refTempKInconelX750.setDefaultMassFracs()InconelX750.polyfitThermalConductivity()InconelX750.thermalConductivity()InconelX750.polyfitHeatCapacity()InconelX750.heatCapacity()InconelX750.polyfitLinearExpansionPercent()InconelX750.linearExpansionPercent()InconelX750.linearExpansion()InconelX750.density()
- armi.materials.lead module
- armi.materials.leadBismuth module
- armi.materials.lithium module
- armi.materials.magnesium module
- armi.materials.material module
parentAwareDensityRedirect()MaterialMaterial.DATA_SOURCEMaterial.referencesMaterial.enrichedNuclideMaterial.modelConstMaterial.propertyValidTemperatureMaterial.thermalScatteringLawsMaterial.nameMaterial.getName()Material.getChildren()Material.getChildrenWithFlags()Material.backUp()Material.restoreBackup()Material.clearCache()Material.duplicate()Material.linearExpansion()Material.linearExpansionPercent()Material.linearExpansionFactor()Material.getThermalExpansionDensityReduction()Material.setDefaultMassFracs()Material.setMassFrac()Material.applyInputParams()Material.adjustMassEnrichment()Material.adjustMassFrac()Material.volumetricExpansion()Material.getTemperatureAtDensity()Material.liquidPorosityMaterial.gasPorosityMaterial.pseudoDensity()Material.pseudoDensityKgM3()Material.density()Material.densityKgM3()Material.getCorrosionRate()Material.yieldStrength()Material.thermalConductivity()Material.getProperty()Material.getMassFrac()Material.clearMassFrac()Material.removeNucMassFrac()Material.checkPropertyTempRange()Material.checkTempRange()Material.densityTimesHeatCapacity()Material.getNuclides()Material.getTempChangeForDensityChange()Material.heatCapacity()Material.getTD()Material.adjustTD()
FluidSimpleSolidFuelMaterial
- armi.materials.mgO module
- armi.materials.mixture 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
UraniumUranium.enrichedNuclideUranium.materialIntroUranium.propertyNotesUranium.propertyRawDataUranium.propertyUnitsUranium.propertyEquationUranium.propertyValidTemperatureUranium.referencesUranium.thermalConductivity()Uranium.heatCapacity()Uranium.setDefaultMassFracs()Uranium.applyInputParams()Uranium.meltingPoint()Uranium.density()Uranium.pseudoDensity()Uranium.linearExpansion()Uranium.linearExpansionPercent()
- armi.materials.uraniumOxide module
HeatCapacityConstantsUraniumOxideUraniumOxide.enrichedNuclideUraniumOxide.REFERENCE_TEMPERATUREUraniumOxide.heatCapacityConstantsUraniumOxide.propertyUnitsUraniumOxide.propertyValidTemperatureUraniumOxide.referencesUraniumOxide.thermalScatteringLawsUraniumOxide.thermalConductivityTableKUraniumOxide.thermalConductivityTableUraniumOxide.applyInputParams()UraniumOxide.setDefaultMassFracs()UraniumOxide.meltingPoint()UraniumOxide.density()UraniumOxide.heatCapacity()UraniumOxide.linearExpansion()UraniumOxide.linearExpansionPercent()UraniumOxide.thermalConductivity()
UO2
- armi.materials.void module
- armi.materials.water module
WaterWater.thermalScatteringLawsWater.referencesWater.TEMPERATURE_CRITICAL_KWater.DENSITY_CRITICAL_KGPERCUBICMETERWater.DENSITY_CRITICAL_GPERCUBICCENTIMETERWater.VAPOR_PRESSURE_CRITICAL_MPAWater.VAPOR_PRESSURE_CRITICAL_PAWater.ALPHA_0Water.PHI_0Water.dWater.setDefaultMassFracs()Water.theta()Water.tau()Water.vaporPressure()Water.vaporPressurePrime()Water.auxiliaryQuantitySpecificEnthalpy()Water.auxiliaryQuantitySpecificEntropy()Water.enthalpy()Water.entropy()Water.pseudoDensity()Water.density()
SaturatedWaterSaturatedSteam
- armi.materials.yttriumOxide module
- armi.materials.zincOxide module
- armi.materials.zr module