armi.reactor.converters.blockConverters module

Convert block geometry from one to another, etc.

class armi.reactor.converters.blockConverters.BlockConverter(sourceBlock)[source]

Bases: object

Converts a block.

Parameters:
  • sourceBlock (armi.reactor.blocks.Block) – An ARMI Block object to convert.

  • quite (boolean, optional) – If True, less information is output in the runLog.

dissolveComponentIntoComponent(soluteName, solventName, minID=0.0)[source]

Make a new block that homogenized one component into another while conserving number of atoms.

Parameters:
  • soluteName (str) – The name of the solute component in _sourceBlock

  • solventName (str) – The name of the solvent component in _sourceBlock

  • minID (float) – The minimum hot temperature diameter allowed for the solvent. This is useful for forcing components to not overlap.

Warning

Nuclides merged into another component will be the temperature of the new component as temperature is stored on the component level. In the solute and solvent are the same temperature this is not an issue. Converted blocks that have dissolved components should avoid having their temperatures changed. This is because the component being merged into retains its old thermal expansion properties and may not be consistent with how the components would behave independently. For this reason it is recommended that these blocks be made right before the physics calculation of interest and be immediately discarded. Attaching them to the reactor is not recommended.

convert()[source]
class armi.reactor.converters.blockConverters.ComponentMerger(sourceBlock, soluteName, solventName)[source]

Bases: BlockConverter

For a provided block, merged the solute component into the solvent component.

Notes

It is the job of the developer to determine if merging a Block into one Component will yield valid or sane results.

Parameters:
  • sourceBlock (armi.reactor.blocks.Block) – An ARMI Block object to convert.

  • soluteName (str) – The name of the solute component in _sourceBlock

  • solventName (str) – The name of the solvent component in _sourceBlock

  • quite (boolean, optional) – If True, less information is output in the runLog.

convert()[source]

Return a block with the solute merged into the solvent.

class armi.reactor.converters.blockConverters.MultipleComponentMerger(sourceBlock, soluteNames, solventName, specifiedMinID=0.0)[source]

Bases: BlockConverter

Dissolves multiple components and checks validity at end.

Doesn’t run _verifyExpansion until the end so that the order the components are dissolved in does not cause a failure. For example if two liners are dissolved into the clad and the farthest liner was dissolved first, this would normally cause a ValueError in _verifyExpansion since the clad would be completely expanded over a non void component.

Standard constructor method.

Parameters:
  • sourceBlock (armi.reactor.blocks.Block) – An ARMI Block object to convert.

  • soluteNames (list) – List of str names of the solute components in _sourceBlock

  • solventName (str) – The name of the solvent component in _sourceBlock

  • minID (float) – The minimum hot temperature diameter allowed for the solvent. This is useful for forcing components to not overlap.

  • quite (boolean, optional) – If True, less information is output in the runLog.

convert()[source]

Return a block with the solute merged into the solvent.

class armi.reactor.converters.blockConverters.BlockAvgToCylConverter(sourceBlock, driverFuelBlock=None, numInternalRings=1, numExternalRings=None)[source]

Bases: BlockConverter

Convert a block and driver block into a block made of a concentric circles using block (homogenized) composition.

Notes

This converter is intended for use in building 1-dimensional models of a set of block. numInternalRings controls the number of rings to use for the source block, while the numExternalRings controls the number of rings for the driver fuel block. The number of blocks to in each ring grows by 6 for each ring in hex geometry and 8 for each ring in Cartesian.

This converter is opinionated in that it uses a spatial grid to determine how many blocks to add based on the type of the sourceBlock. For example, if the sourceBlock is a HexBlock then a HexGrid will be used. If the sourceBlock is a CartesianBlock then a CartesianGrid without an offset will be used.

See also

HexComponentsToCylConverter

This converter is more useful if the pin lattice is in a

hex

convert()[source]

Return a block converted into cylindrical geometry, possibly with other block types surrounding it.

plotConvertedBlock(fName=None)[source]

Render an image of the converted block.

class armi.reactor.converters.blockConverters.HexComponentsToCylConverter(sourceBlock, driverFuelBlock=None, numExternalRings=None, mergeIntoClad=None)[source]

Bases: BlockAvgToCylConverter

Converts a hexagon full of pins into a circle full of concentric circles.

Notes

This is intended to capture heterogeneous effects while generating cross sections in MCC3. The resulting 1D cylindrical block will not be used in subsequent core calculations.

Repeated pins/coolant rings will be built, followed by the non-pins like duct/intercoolant pinComponentsRing1 | coolant | pinComponentsRing2 | coolant | … | nonpins …

This converter expects the sourceBlock and driverFuelBlock to defined and for the sourceBlock to have a spatial grid defined. Additionally, both the sourceBlock and driverFuelBlock must be instances of HexBlocks.

convert()[source]

Perform the conversion.

armi.reactor.converters.blockConverters.getOuterDiamFromIDAndArea(ID, area)[source]

Return the outer diameter of an annulus with given inner diameter (ID) and area.

armi.reactor.converters.blockConverters.radiiFromHexPitches(pitches)[source]

Return list of radii for equivalent-area circles from list of from hexagon flat-to-flat pitches.

armi.reactor.converters.blockConverters.radiiFromHexSides(sideLengths)[source]

Return list of radii for equivalent-area circles from list of from hexagon side lengths.

armi.reactor.converters.blockConverters.radiiFromRingOfRods(distToRodCenter, numRods, rodRadii, layout='hexagon')[source]

Return list of radii from ring of rods.

Parameters:
  • distToRodCenter (float) – Distance from center of assembly to center of pin.

  • numRods (int) – Number of rods in the ring of rods

  • rodRadii (list) – Radii from smallest to largest. Outer radius becomes inner radius of next component.

Returns:

radiiList – List of radii from inner to outer. Components are added on both sides.

Return type:

list

Notes

There are two assumptions when making circles:

  1. The rings are concentric about the radToRodCenter.

  2. The ring area of the fuel rods are distributed to the inside and outside rings with the same thickness. thicknessOnEachSide (\(t\)) is calculated as follows:

    \begin{aligned} r_1 &\equiv \text{inner rad that thickness is added to on inside} \\ r_2 &\equiv \text{outer rad that thickness is added to on outside} \\ \texttt{radToRodCenter} &= \frac{r_1 + r_2}{2} \text{(due to being concentric)} \\ \text{Total Area} &= \text{Area of annulus 1} + \text{Area of annulus 2} \\ \text{Area of annulus 1} &= \pi r_1^2 - \pi (r_1 - t)^2 \\ \text{Area of annulus 2} &= \pi (r_2 + t)^2 - \pi r_2^2 \\ t &= \frac{\text{Total Area}}{4\pi\times\texttt{radToRodCenter}} \end{aligned}