armi.reactor.converters.blockConverters module

Convert block geometry from one to another, etc.

class armi.reactor.converters.blockConverters.BlockConverter(sourceBlock, quiet=False)[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.

_checkInputs(soluteName, solventName, solute, solvent)[source]
_verifyExpansion(solute, solvent)[source]
convert()[source]
class armi.reactor.converters.blockConverters.ComponentMerger(sourceBlock, soluteName, solventName, quiet=False)[source]

Bases: armi.reactor.converters.blockConverters.BlockConverter

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

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, quiet=False)[source]

Bases: armi.reactor.converters.blockConverters.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.

This could be implemented on the regular ComponentMerger, as the Flags system has enough power in the type specification arguments to things like getComponents(), hasFlags(), etc., to do single and multiple components with the same code.

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.

_verifyExpansion(solute, solvent)[source]

Wait until all components are dissolved to check this.

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, quiet=False)[source]

Bases: armi.reactor.converters.blockConverters.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

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

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

convert()[source]

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

_addBlockRings(blockToAdd, blockName, numRingsToAdd, firstRing, mainComponent=None)[source]

Add a homogenous block ring to the converted block.

_addDriverFuelRings()[source]

Add driver fuel blocks as the outer-most surrounding ring.

Notes

This is intended to be used to drive non-fuel compositions, DU, etc.

plotConvertedBlock(fName=None)[source]

Render an image of the converted block.

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

Bases: armi.reactor.converters.blockConverters.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.

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

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

convert()[source]

Perform the conversion.

_dissolveComponents()[source]
_classifyComponents()[source]

Figure out which components are in each pin ring and which are not.

Assumption is that anything with multiplicity equal to numPins is a pin (clad, wire, bond, etc.) Non-pins will include things like coolant, duct, interduct, whatever else.

_buildFirstRing(pinComponents)[source]

Add first ring of components to new block.

_buildNthRing(pinComponents, ringNum)[source]

Build nth ring of pins and add them to block.

Each n-th ring is preceded with a circle of coolant between the previous ring and this one. Since we blended the wire and coolant, the area of this area is supposed to include the wire area.

This will be a fuel (or control) meat surrounded on both sides by clad, bond, liner, etc. layers.

_buildNonPinRings(nonPins)[source]

Throw each non-pin component on as an individual outer circle.

Also needs to add final coolant layer between the outer pins and the non-pins. Will crash if there are things that are not circles or hexes.

static _addSolidMaterialRing(baseComponent, innerDiameter, outDiameter, name)[source]
_addCoolantRing(coolantOD, nameSuffix)[source]
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: r1 = inner rad that thickness is added to on inside r2 = outer rad that thickness is added to on outside radToRodCenter = (r1 + r2) / 2.0 due to being concentric; Total Area = Area of annulus 1 + Area of annulus 2 Area of annulus 1 = pi * r1 ** 2 - pi * (r1 - t) ** 2 Area of annulus 2 = pi * (r2 + t) ** 2 - pi * r2 ** 2 Solving for thicknessOnEachSide(t): t = Total Area / (4 * pi * radToRodCenter)