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: armi.reactor.composites.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] = {'circle': <class 'armi.reactor.components.basicShapes.Circle'>, 'component': <class 'armi.reactor.components.component.Component'>, 'cube': <class 'armi.reactor.components.volumetricShapes.Cube'>, 'derivedshape': <class 'armi.reactor.components.DerivedShape'>, 'differentialradialsegment': <class 'armi.reactor.components.volumetricShapes.DifferentialRadialSegment'>, 'helix': <class 'armi.reactor.components.complexShapes.Helix'>, 'hexagon': <class 'armi.reactor.components.basicShapes.Hexagon'>, 'holedhexagon': <class 'armi.reactor.components.complexShapes.HoledHexagon'>, 'holedrectangle': <class 'armi.reactor.components.complexShapes.HoledRectangle'>, 'holedsquare': <class 'armi.reactor.components.complexShapes.HoledSquare'>, 'nullcomponent': <class 'armi.reactor.components.NullComponent'>, 'positiveornegativevolumecomponent': <class 'armi.reactor.components.PositiveOrNegativeVolumeComponent'>, 'radialsegment': <class 'armi.reactor.components.volumetricShapes.RadialSegment'>, 'rectangle': <class 'armi.reactor.components.basicShapes.Rectangle'>, 'shapedcomponent': <class 'armi.reactor.components.component.ShapedComponent'>, 'solidrectangle': <class 'armi.reactor.components.basicShapes.SolidRectangle'>, 'sphere': <class 'armi.reactor.components.volumetricShapes.Sphere'>, 'square': <class 'armi.reactor.components.basicShapes.Square'>, 'torus': <class 'armi.reactor.components.volumetricShapes.Torus'>, 'triangle': <class 'armi.reactor.components.basicShapes.Triangle'>, 'unshapedcomponent': <class 'armi.reactor.components.UnshapedComponent'>, 'unshapedvolumetriccomponent': <class 'armi.reactor.components.UnshapedVolumetricComponent'>, 'zeromasscomponent': <class 'armi.reactor.components.ZeroMassComponent'>}
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: armi.reactor.composites.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
  • ~Component.temperatureInC (float) – Current temperature of component in celcius.

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

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

  • ~Component.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>
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 initial (hot) number densities of this component based Material composition.

Notes

We apply the hot-height density reduction here to account for pre-expanded block heights in blueprints. Future temperature changes can be handled by multiplications of 1/(1+dLL)**2 instead of 1/(1+dLL)**3 since we have pre-expanded in the axial direction.

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 (book, optional) – If True sets the component to the dimension that would cause the hot dimension to be 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.

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]

Return an iterator of armi.reactor.component.Component objects within this Composite.

Parameters
  • typeSpec (TypeSpec) – Component flags. Will restrict Components to specific ones matching the flags specified.

  • exact (bool, optional) – Only match exact component labels (names). If True, ‘coolant’ will not match ‘interCoolant’. This has no impact if typeSpec is None.

Returns

items matching typeSpec and exact criteria

Return type

iterator of Component

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]

density()[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

getReactionRates(nucName, nDensity=None)[source]
Parameters
  • str (nucName -) – nuclide name – e.g. ‘U235’

  • float (nDensity -) – number Density

Returns

dictionary of reaction rates (rxn/s) for nG, nF, n2n, nA and nP

Return type

rxnRates - dict

Note

if you set nDensity to 1/CM2_PER_BARN this makes 1 group cross section generation easier

getMicroSuffix()[source]
paramCollectionType

alias of armi.reactor.parameters.parameterCollections.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.

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

Bases: armi.reactor.components.component.Component

A component with well-defined dimensions.

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

alias of armi.reactor.parameters.parameterCollections.ComponentParameterCollection

armi.reactor.components.component.getReactionRateDict(nucName, lib, xsType, mgFlux, nDens)[source]
Parameters
  • str (xsType -) – nuclide name – e.g. ‘U235’

  • isotxs (lib -) – cross section library

  • str – cross section type – e.g. - ‘A’

  • numpy.nArray (mgFlux -) – integrated mgFlux (n-cm/s)

  • float (nDens -) – number density (at/bn-cm)

Returns

dictionary of reaction rates (rxn/s) for nG, nF, n2n, nA and nP

Return type

rxnRates - dict

Note

assume there is no n3n cross section in ISOTXS