armi.materials.material module

Base Material classes.

Most temperatures may be specified in either K or C and the functions will convert for you.

class armi.materials.material.Material[source]

Bases: MatPropsMaterial

A material is made up of elements or isotopes. It has bulk properties like density.

Implementation: The abstract material class. I_ARMI_MAT_PROPERTIES1
signature: Material
requirements: R_ARMI_MAT_PROPERTIES

The ARMI Materials library is based on the Object-Oriented Programming design approach, and uses this generic Material base class. In this class we define a large number of material properties like density, heat capacity, or linear expansion coefficient. Specific materials then subclass this base class to assign particular values to those properties.

Implementation: Materials generate nuclide mass fractions at instantiation. I_ARMI_MAT_FRACS1
signature: Material
requirements: R_ARMI_MAT_FRACS

An ARMI material is meant to be able to represent real world materials that might be used in the construction of a nuclear reactor. As such, they are not just individual nuclides, but practical materials like a particular concrete, steel, or water. One of the main things that will be needed to describe such a material is the exact nuclide fractions. As such, the constructor of every Material subclass attempts to set these mass fractions.

Variables:
  • parent (Component) – The component to which this material belongs

  • massFrac (dict) – Mass fractions for all nuclides in the material keyed on the nuclide symbols

  • refDens (float) – A reference density used by some materials, for instance SimpleSolids, during thermal expansion

  • theoreticalDensityFrac (float) – Fraction of the material’s density in reality, which is commonly different from 1.0 in solid materials due to the manufacturing process. Can often be set from the blueprints input via the TD_frac material modification. For programmatic setting, use adjustTD().

Notes

Specific material classes may have many more attributes specific to the implementation for that material.

DATA_SOURCE = 'ARMI'

Indication of where the material is loaded from (may be plugin name)

references = {}

citation}

Type:

The literature references {property

enrichedNuclide = None

Name of enriched nuclide to be interpreted by enrichment modification methods

modelConst = {}

don’t use this.

Type:

Constants that may be used in interpolation functions for property lookups. Recommendation

propertyValidTemperature = {}

Dictionary of valid temperatures over which the property models are valid in the format ‘Property Name’: ((Temperature_Lower_Limit, Temperature_Upper_Limit), Temperature_Units)

getName()[source]

Duplicate of name property, kept for backwards compatibility.

getChildren(deep=False, generationNum=1, includeMaterials=False, predicate=None)[source]

Return empty list, representing that materials have no children.

getChildrenWithFlags(typeSpec: Flag | auto | Sequence[Flag | auto] | None, exactMatch=True)[source]

Return empty list, representing that this object has no children.

backUp()[source]

Create and store a backup of the state.

restoreBackup(paramsToApply)[source]

Restore the parameters from previously created backup.

clearCache()[source]

Clear the cache so all new values are recomputed.

duplicate()[source]

Copy without needing a deepcopy.

linearExpansion(Tk: float = None, Tc: float = None) float[source]

The instantaneous linear expansion coefficient (dL/L)/dT.

This is used for reactivity coefficients, etc. but will not affect density or dimensions.

See also

linearExpansionPercent

average linear thermal expansion to affect dimensions and density

linearExpansionPercent(Tk: float = None, Tc: float = None) float[source]

Average thermal expansion dL/L. Used for computing hot dimensions and density.

Defaults to 0.0 for materials that do not expand, or we lack expansion information for.

Parameters:
  • Tk (float) – temperature in (K)

  • Tc (float) – Temperature in (C)

Return type:

dLL(T) in % m/m/K

See also

linearExpansion

handle instantaneous thermal expansion coefficients

linearExpansionFactor(Tc: float, T0: float) float[source]

Return a dL/L factor relative to T0 instead of the material-dependent reference temperature.

Notes

For a detailed description of the linear expansion methodology, see “thermalExpansion” in the documentation.

Parameters:
  • Tc (float) – Current (hot) temperature in C

  • T0 (float) – Cold temperature in C

Returns:

dLL – The average thermal expansion between Tc and T0. If there is no dLL, it should return 0.0.

Return type:

float

getThermalExpansionDensityReduction(prevTempInC: float, newTempInC: float) float[source]

Return the factor required to update thermal expansion going from temperatureInC to temperatureInCNew.

setDefaultMassFracs()[source]

Mass fractions.

This method pulls the material composition from the material YAML definition file. Alternatively, this method can be over-riden by in Python to declare the default mass fractions using some custom logic.

setMassFrac(nucName: str, massFrac: float) None[source]

Assigns the mass fraction of a nuclide within the material.

Notes

This will try to convert the provided massFrac into a float for assignment. If the conversion cannot occur then an error will be thrown.

applyInputParams(**kwargs) None[source]

Apply material-specific material input parameters.

adjustMassEnrichment(massEnrichment: float) None[source]

Adjust the enrichment of the material.

See also

adjustMassFrac

adjustMassFrac(nuclideName: str, massFraction: float) None[source]

Change the mass fraction of the specified nuclide.

This adjusts the mass fraction of a specified nuclide relative to other nuclides of the same element. If there are no other nuclides within the element, then it is enriched relative to the entire material. For example, enriching U235 in UZr would enrich U235 relative to U238 and other naturally occurring uranium isotopes. Likewise, enriching ZR in UZr would enrich ZR relative to Uranium.

The method maintains a constant number of atoms, and adjusts refDens accordingly.

Parameters:
  • nuclideName (str) – Name of nuclide to enrich.

  • massFraction (float) – New mass fraction to achieve.

property liquidPorosity: float

Fraction of the material that is liquid void (unitless).

property gasPorosity: float

Fraction of the material that is gas void (unitless).

pseudoDensity(Tk: float = None, Tc: float = None) float[source]

Return density that preserves mass when thermally expanded in 2D (in g/cm^3).

This is not a material property that is physically measurable in the laboratory. This is merely the product of real density with a factor derived from linear expansion. This method is purely a helper method, useful to people modeling pin-type reactors.

density(Tk: float = None, Tc: float = None) float[source]

Return density that preserves mass when thermally expanded in 3D (in g/cm^3).

Notes

If this material has a parent, Component.density and Material.density can diverge. Thus, careful attention must be paid to which of these you call in your downstream code.

Since refDens is specified at the material-dep reference case, we don’t need to specify the reference temperature. It is already consistent with linearExpansion Percent. - p*(dp/p(T) + 1) =p*( p + dp(T) )/p = p + dp(T) = p(T) - dp/p = (1-(1 + dL/L)**3)/(1 + dL/L)**3

dynamicVisc(Tk: float = None, Tc: float = None) float[source]

Dynamic viscosity in Pa-s.

enthalpy(Tk: float = None, Tc: float = None) float[source]

Return enthalpy in J/kg.

yieldStrength(Tk: float = None, Tc: float = None) float[source]

Returns yield strength at given T in MPa.

thermalConductivity(Tk: float = None, Tc: float = None) float[source]

Thermal conductivity for given T (in units of W/m/K).

getProperty(propName: str, Tk: float = None, Tc: float = None, **kwargs) float[source]

Gets properties in a way that caches them.

Notes

Try not to use this method. This exists for backwards compatibility only. Use methods like density instead.

getMassFrac(nucName=None, normalized=True, expandFissionProducts=False)[source]

Return mass fraction of nucName.

Parameters:
  • nucName (str, optional) – Nuclide name to return (‘ZR’,’PU239’,etc.)

  • normalized (bool, optional) – Return the mass fraction such that the sum of all nuclides is sum to 1.0. Default True

Notes

self.massFrac are modified mass fractions that may not add up to 1.0 (for instance, after a axial expansion, the modified mass fracs will sum to less than one. The alternative is to put a multiplier on the density. They are mathematically equivalent.

This function returns the normalized mass fraction (they will add to 1.0) as long as the mass fracs are modified only by get and setMassFrac.

This is a performance-critical method as it is called millions of times in a typical ARMI run.

See also

setMassFrac

clearMassFrac() None[source]

Zero out all nuclide mass fractions.

checkPropertyTempRange(label, val)[source]

Checks if the given property / value combination fall between the min and max valid temperatures provided in the propertyValidTemperature object.

Parameters:
  • label (str) – The name of the function or property that is being checked.

  • val (float) – The value to check whether it is between minT and maxT.

Notes

  • This is a wrapper method around checkTempRange.

  • This method is used to aid defining pure Python materials outside of a matProps YAML file.

checkTempRange(minT, maxT, val, label='')[source]

Checks if the given temperature (val) is between the minT and maxT temperature limits supplied.

Label identifies what material type or element is being evaluated in the check.

This method is used to aid defining pure Python materials outside of a matProps YAML file.

Parameters:
  • minT (float) – The minimum and maximum values that val is allowed to have.

  • maxT (float) – The minimum and maximum values that val is allowed to have.

  • val (float) – The value to check whether it is between minT and maxT.

  • label (str) – The name of the function or property that is being checked.

Notes

This method is used to aid defining pure Python materials outside of a matProps YAML file.

heatCapacity(Tk=None, Tc=None)[source]

Returns heat capacity in units of J/kg/C.

getTD()[source]

Get the fraction of theoretical density for this material.

adjustTD(val)[source]

Set or change the fraction of theoretical density for this material.

class armi.materials.material.Fluid[source]

Bases: Material

A material that fills its container. Could also be a gas.

pseudoDensity(Tk: float = None, Tc: float = None) float[source]

Density and pseudoDensity are the same for Fluids.

getThermalExpansionDensityReduction(prevTempInC, newTempInC)[source]

Return the factor required to update thermal expansion going from one temperature (in C) to a another.

linearExpansion(Tk=None, Tc=None)[source]

For fluids, lets just not allow temperature changes to change dimensions since it is a liquid it will fill its space.

Implementation: Fluid materials are not thermally expandable. I_ARMI_MAT_FLUID
signature: linearExpansion
requirements: R_ARMI_MAT_FLUID

ARMI does not model thermal expansion of fluids. The Fluid superclass therefore sets the thermal expansion coefficient to zero. All fluids subclassing the Fluid material will inherit this method which sets the linear expansion coefficient to zero at all temperatures.

linearExpansionPercent(Tk=None, Tc=None)[source]

By default, fluids are considered incompresible.

class armi.materials.material.SimpleSolid[source]

Bases: Material

Base material for a simple material that primarily defines density.

refTempK = 300
pseudoDensity(Tk: float = None, Tc: float = None) float[source]

A 2D density, for materials linearly expanding (in g/cm^3).

class armi.materials.material.FuelMaterial[source]

Bases: Material

Material that is considered a nuclear fuel.

All this really does is enable the special class 1/class 2 isotopics input option.

applyInputParams(class1_custom_isotopics=None, class2_custom_isotopics=None, class1_wt_frac=None, customIsotopics=None, *args, **kwargs)[source]

Apply optional class 1/class 2 custom enrichment input.

Notes

This is often overridden to insert customized material modification parameters but then this parent should always be called at the end in case users want to use this style of custom input.

This is only applied to materials considered fuel so we don’t apply these kinds of parameters to coolants and structural material, which are often not parameterized with any kind of enrichment.