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
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.
- 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.
- 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.
- 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 thesourceBlock
is a HexBlock then a HexGrid will be used. If thesourceBlock
is a CartesianBlock then a CartesianGrid without an offset will be used.- Parameters
sourceBlock (
armi.reactor.blocks.Block
) – An ARMI Block object to convert.quite (boolean, optional) – If True, less information is output in the runLog.
- 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
anddriverFuelBlock
to defined and for thesourceBlock
to have a spatial grid defined. Additionally, both thesourceBlock
anddriverFuelBlock
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.
- 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
- Returns
radiiList – List of radii from inner to outer. Components are added on both sides.
- Return type
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)