armi.reactor.components.component module

Components represent geometric objects within an assembly such as fuel, bond, coolant, ducts, wires, etc.

This module contains the abstract definition of a Component.

armi.reactor.components.component.componentTypeIsValid(component, name)[source]

Checks that the component assigned component type is valid.

Notes

  • Coolant components are can no longer be defined as a general Component and should be specfied as a DerivedShape if the coolant dimensions are not provided.

class armi.reactor.components.component.ComponentType(name, bases, attrs)[source]

Bases: CompositeModelType

ComponetType is a metaclass for storing and initializing Component subclass types.

The construction of Component subclasses is being done through factories for ease of user input. As a consequence, the __init__ methods’ arguments need to be known in order to conform them to the correct format. Additionally, the constructors arguments can be used to determine the Component subclasses dimensions.

Warning

The import-time metaclass-based component subclass registration was a good idea, but in practice has caused significant confusion and trouble. We will replace this soon with an explicit plugin-based component subclass registration system.

TYPES: Dict[str, Type]

meta hide-value:

NON_DIMENSION_NAMES = ('Tinput', 'Thot', 'isotopics', 'mergeWith', 'material', 'name', 'components', 'area')
class armi.reactor.components.component.Component(name, material, Tinput, Thot, area=None, isotopics='', mergeWith='', components=None)[source]

Bases: Composite

A primitive object in a reactor that has definite area/volume, material and composition.

Could be fuel pins, cladding, duct, wire wrap, etc. One component object may represent multiple physical components via the multiplicity mechanism.

Variables:
  • temperatureInC (float) – Current temperature of component in celcius.

  • inputTemperatureInC (float) – Reference temperature in C at which dimension definitions were input

  • temperatureInC – Temperature in C to which dimensions were thermally-expanded upon input.

  • material (str or material.Material) – The material object that makes up this component and give it its thermo-mechanical properties.

DIMENSION_NAMES = ()
INIT_SIGNATURE = ('name', 'material', 'Tinput', 'Thot', 'area', 'isotopics', 'mergeWith', 'components')
is3D = False
THERMAL_EXPANSION_DIMS = {}
pDefs = <armi.reactor.parameters.parameterDefinitions.ParameterDefinitionCollection object>
material: Material
property temperatureInC

Return the hot temperature in Celsius.

property temperatureInK

Current hot temperature in Kelvin.

resolveLinkedDims(components)[source]

Convert dimension link strings to actual links.

Set the dimension link.

setProperties(properties)[source]

Apply thermo-mechanical properties of a Material.

applyMaterialMassFracsToNumberDensities()[source]

Set the hot number densities for the component based on material mass fractions/density.

Notes

  • the density returned accounts for the expansion of the component due to the difference in self.inputTemperatureInC and self.temperatureInC

  • After the expansion, the density of the component should reflect the 3d density of the material

adjustDensityForHeightExpansion(newHot)[source]

Change the densities in cases where height of the block/component is changing with expansion.

Notes

Call before setTemperature since we need old hot temp. This works well if there is only 1 solid component. If there are multiple components expanding at different rates during thermal expansion this becomes more complicated and, and axial expansion should be used. Multiple expansion rates cannot trivially be accommodated. See AxialExpansionChanger.

getHeightFactor(newHot)[source]

Return the factor by which height would change by if we did 3D expansion.

Notes

Call before setTemperature since we need old hot temp.

getProperties()[source]

Return the active Material object defining thermo-mechanical properties.

property liquidPorosity
property gasPorosity
setLumpedFissionProducts(lfpCollection)[source]

Sets lumped fission product collection on a lfp compatible material if possible.

getArea(cold=False)[source]

Get the area of a Component in cm^2.

See also

block.getVolumeFractions

component coolant is typically the “leftover” and is calculated and set here

getVolume()[source]

Return the volume [cm^3] of the Component.

Notes

self.p.volume is not set until this method is called, so under most circumstances it is probably not safe to access self.p.volume directly. This is because not all components (e.g., DerivedShape) can compute their volume during initialization.

clearCache()[source]

Invalidate the volume so that it will be recomputed from current dimensions upon next access.

The updated value will be based on its shape and current dimensions. If there is a parent container and that container contains a DerivedShape, then that must be updated as well since its volume may be changing.

See also

clearLinkedCache

Clears cache of components that depend on this component’s dimensions.

computeVolume()[source]

Compute volume.

containsVoidMaterial()[source]

Returns True if component material is void.

containsSolidMaterial()[source]

Returns True if the component material is a solid.

getComponentArea(cold=False)[source]

Get the area of this component in cm^2.

Parameters:

cold (bool, optional) – Compute the area with as-input dimensions instead of thermally-expanded

getComponentVolume()[source]
setVolume(val)[source]
setArea(val)[source]
setTemperature(temperatureInC)[source]

Adjust temperature of this component.

This will cause thermal expansion or contraction of solid or liquid components and will accordingly adjust number densities to conserve mass.

Liquids still have a number density adjustment, but some mass tends to expand in or out of the bounding area.

Since some composites have multiple materials in them that thermally expand differently, the axial dimension is generally left unchanged. Hence, this a 2-D thermal expansion.

Number density change is proportional to mass density change \(\frac{d\rho}{\rho}\). A multiplicative factor \(f_N\) to apply to number densities when going from T to T’ is as follows:

\[\begin{split}N^{\prime} = N \cdot f_N \\ \frac{dN}{N} = f_N - 1\end{split}\]

Since \(\frac{dN}{N} \sim\frac{d\rho}{\rho}\), we have:

\[f_N = \frac{d\rho}{\rho} + 1 = \frac{\rho^{\prime}}{\rho}\]
getNuclides()[source]

Return nuclides in this component.

This includes anything that has been specified in here, including trace nuclides.

getNumberDensity(nucName)[source]

Get the number density of nucName, return zero if it does not exist here.

Parameters:

nucName (str) – Nuclide name

Returns:

number density – number density in atoms/bn-cm.

Return type:

float

getNuclideNumberDensities(nucNames)[source]

Return a list of number densities for the nuc names requested.

setName(name)[source]

Components use name for type and name.

setNumberDensity(nucName, val)[source]

Set heterogeneous number density.

Parameters:
  • nucName (str) – nuclide to modify

  • val (float) – Number density to set in atoms/bn-cm (heterogeneous)

setNumberDensities(numberDensities)[source]

Set one or more multiple number densities. Clears out any number density not listed.

Parameters:

numberDensities (dict) – nucName: ndens pairs.

Notes

We don’t just call setNumberDensity for each nuclide because we don’t want to call getVolumeFractions for each nuclide (it’s inefficient).

updateNumberDensities(numberDensities)[source]

Set one or more multiple number densities. Leaves unlisted number densities alone.

Parameters:

numberDensities (dict) – nucName: ndens pairs.

getEnrichment()[source]

Get the mass enrichment of this component, as defined by the material.

getMassEnrichment()[source]

Get the mass enrichment of this component, as defined by the material.

Notes

Getting mass enrichment on any level higher than this is ambiguous because you may have enriched boron in one pin and enriched uranium in another and blending those doesn’t make sense.

getMass(nuclideNames=None)[source]

Determine the mass in grams of nuclide(s) and/or elements in this object.

\[\text{mass} = \frac{\sum_i (N_i \cdot V \cdot A_i)}{N_A \cdot 10^{-24}}\]
where

\(N_i\) is number density of nuclide i in (1/bn-cm),

\(V\) is the object volume in \(cm^3\)

\(N_A\) is Avogadro’s number in 1/moles,

\(A_i\) is the atomic weight of of nuclide i in grams/mole

Parameters:

nuclideNames (str, optional) – The nuclide/element specifier to get the mass of in the object. If omitted, total mass is returned.

Returns:

mass – The mass in grams.

Return type:

float

setDimension(key, val, retainLink=False, cold=True)[source]

Set a single dimension on the component.

Parameters:
  • key (str) – The dimension key (op, ip, mult, etc.)

  • val (float) – The value to set on the dimension

  • retainLink (bool, optional) – If True, the val will be applied to the dimension of linked component which indirectly changes this component’s dimensions.

  • cold (bool, optional) – If True sets the component cold dimension to the specified value.

getDimension(key, Tc=None, cold=False)[source]

Return a specific dimension at temperature as determined by key.

Parameters:
  • key (str) – The dimension key (op, ip, mult, etc.)

  • Tc (float) – Temperature in C. If None, the current temperature of the component is used.

  • cold (bool, optional) – If true, will return cold (input) value of the requested dimension

getBoundingCircleOuterDiameter(Tc=None, cold=False)[source]

Abstract bounding circle method that should be overwritten by each shape subclass.

getCircleInnerDiameter(Tc=None, cold=False)[source]

Abstract inner circle method that should be overwritten by each shape subclass.

Notes

The inner circle is meaningful for annular shapes, i.e., circle with non-zero ID, hexagon with non-zero IP, etc. For shapes with corners (e.g., hexagon, rectangle, etc) the inner circle intersects the corners of the inner bound, opposed to intersecting the “flats”.

dimensionIsLinked(key)[source]

True if a the specified dimension is linked to another dimension.

getDimensionNamesLinkedTo(otherComponent)[source]

Find dimension names linked to the other component in this component.

clearLinkedCache()[source]

Clear this cache and any other dependent volumes.

getLinkedComponents()[source]

Find other components that are linked to this component.

getThermalExpansionFactor(Tc=None, T0=None)[source]

Retrieves the material thermal expansion fraction.

Parameters:

Tc (float, optional) – Adjusted temperature to get the thermal expansion factor at relative to the reference temperature

Return type:

Thermal expansion factor as a percentage (1.0 + dLL), where dLL is the linear expansion factor.

printContents(includeNuclides=True)[source]

Print a listing of the dimensions and composition of this component.

setDimensionReport()[source]

Gives a report of the dimensions of this component.

updateDims(key='', val=None)[source]
mergeNuclidesInto(compToMergeWith)[source]

Set another component’s number densities to reflect this one merged into it.

You must also modify the geometry of the other component and remove this component to conserve atoms.

iterComponents(typeSpec=None, exact=False)[source]
backUp()[source]

Create and store a backup of the state.

This needed to be overridden due to linked components which actually have a parameter value of another ARMI component.

restoreBackup(paramsToApply)[source]

Restore the parameters from perviously created backup.

This needed to be overridden due to linked components which actually have a parameter value of another ARMI component.

adjustMassEnrichment(massFraction)[source]

Change the mass fraction of this component.

The nuclides to adjust are defined by the material. This changes whichever nuclides are to be enriched vs. the baseline nuclides of that element while holding mass constant. For example it might adjust boron or uranium enrichment.

Conceptually, you could hold number of atoms, volume, or mass constant during this operation. Historically ARMI adjusted mass fractions which was meant to keep mass constant.

If you have 20 mass % Uranium and adjust the enrichment, you will still have 20% Uranium mass. But, the actual mass actually might change a bit because the enriched nuclide weighs less.

See also

Material.enrichedNuclide

getIntegratedMgFlux(adjoint=False, gamma=False)[source]

Return the multigroup neutron tracklength in [n-cm/s].

The first entry is the first energy group (fastest neutrons). Each additional group is the next energy group, as set in the ISOTXS library.

Parameters:
  • adjoint (bool, optional) – Return adjoint flux instead of real

  • gamma (bool, optional) – Whether to return the neutron flux or the gamma flux.

Returns:

integratedFlux

Return type:

multigroup neutron tracklength in [n-cm/s]

getPinMgFluxes(adjoint: Optional[bool] = False, gamma: Optional[bool] = False) ndarray[source]

Retrieves the pin multigroup fluxes for the component.

Parameters:
  • adjoint (bool, optional) – Return adjoint flux instead of real

  • gamma (bool, optional) – Whether to return the neutron flux or the gamma flux.

Returns:

A (N, nGroup) array of pin multigroup fluxes, where N is the equivalent to the multiplicity of the component (self.p.mult) and nGroup is the number of energy groups of the flux.

Return type:

np.ndarray

Raises:

ValueError – If the location(s) of the component are not aligned with pin indices from the block. This would happen if this component is not actually a pin.

density() float[source]

Returns the mass density of the object in g/cc.

getLumpedFissionProductCollection()[source]

Get collection of LFP objects. Will work for global or block-level LFP models.

Returns:

lfps – lfpName keys , lfp object values

Return type:

LumpedFissionProduct

getMicroSuffix()[source]
paramCollectionType

alias of ComponentParameterCollection

getPitchData()[source]

Return the pitch data that should be used to determine block pitch.

Notes

This pitch data should only be used if this is the pitch defining component in a block. The block is responsible for determining which component in it is the pitch defining component.

getFuelMass() float[source]

Return the mass in grams if this is a fueled component.

finalizeLoadingFromDB()[source]

Apply any final actions after creating the component from database.

This should only be called internally by the database loader. Otherwise some properties could be doubly applied.

This exists because the theoretical density is initially defined as a material modification, and then stored as a Material attribute. When reading from blueprints, the blueprint loader sets the theoretical density parameter from the Material attribute. Component parameters are also set when reading from the database. But, we need to set the Material attribute so routines that fetch a material’s density property account for the theoretical density.

class armi.reactor.components.component.ShapedComponent(name, material, Tinput, Thot, area=None, isotopics='', mergeWith='', components=None)[source]

Bases: Component

A component with well-defined dimensions.

DIMENSION_NAMES = ()
INIT_SIGNATURE = ('name', 'material', 'Tinput', 'Thot', 'area', 'isotopics', 'mergeWith', 'components')
paramCollectionType

alias of ComponentParameterCollection

material: Material