armi.reactor.converters.geometryConverters module

Change a reactor from one geometry to another.

Examples may include going from Hex to R-Z or from Third-core to full core. This module contains converters (which create new reactor objects with different geometry), and changers (which modify a given reactor in place) in this module.

Generally, mass is conserved in geometry conversions.

Warning

These are mostly designed for hex geometry.

class armi.reactor.converters.geometryConverters.GeometryChanger(cs=None)[source]

Bases: object

Geometry changer class that updates the geometry (number of assems or blocks per assem) of a given reactor.

convert(r)[source]

Run the conversion.

Parameters

r (Reactor object) – The reactor to convert.

reset()[source]

When called, the reactor core model is reset to it’s original configuration, or parameter data from the converted reactor core model is transformed back to the origin reactor state, thus cleaning up the converted reactor core model.

Notes

This should be implemented on each of the geometry converters.

class armi.reactor.converters.geometryConverters.GeometryConverter(cs=None)[source]

Bases: armi.reactor.converters.geometryConverters.GeometryChanger

Base class for GeometryConverter which makes a new converted reactor.

Examples

To convert a hex case to a R-Z case, do this:

>>> geomConv = armi.reactorConverters.HexToRZConverter(useMostCommonXsId=False, expandReactor=False)
>>> geomConv.convert(r)
>>> newR = geomConv.convReactor
>>> dif3d = dif3dInterface.Dif3dInterface('dif3dRZ', newR)
>>> dif3d.o = self.o
>>> dif3d.writeInput('rzGeom_actual.inp')
class armi.reactor.converters.geometryConverters.FuelAssemNumModifier(cs)[source]

Bases: armi.reactor.converters.geometryConverters.GeometryChanger

Modify the number of fuel assemblies in the reactor.

Notes

  • The number of fuel assemblies should ALWAYS be set for the third-core regardless of the reactor geometry model.

  • The modification is only valid for third-core and full-core geometry models.

convert(r)[source]

Set the number of fuel assemblies in the reactor.

Notes

  • While adding fuel, does not modify existing fuel/control positions, but does overwrite assemblies in the overwriteList (e.g. reflectors, shields)

  • Once specified amount of fuel is in place, removes all assemblies past the outer fuel boundary

  • To re-add reflector/shield assemblies around the new core, use the ringsToAdd attribute

addRing(assemType='big shield')[source]

Add a ring of fuel assemblies around the outside of an existing core

Works by first finding the assembly furthest from the center, then filling in all assemblies that are within one pitch further with the specified assembly type

Parameters

assemType (str) – Assembly type that will be added to the outside of the core

reset()[source]

Resetting the reactor core model state after adding fuel assemblies is not currently supported.

class armi.reactor.converters.geometryConverters.HexToRZThetaConverter(cs, converterSettings, expandReactor=False, strictHomogenization=False)[source]

Bases: armi.reactor.converters.geometryConverters.GeometryConverter

Convert hex-based cases to an equivalent R-Z-Theta full core geometry.

Parameters
  • converterSettings (dict) –

    Settings that specify how the mesh of the RZTheta reactor should be generated. Controls the number of theta regions, how to group regions, etc.

    uniformThetaMesh

    bool flag that determines if the theta mesh should be uniform or not

    thetaBins

    Number of theta bins to create

    radialConversionType
    • Ring Compositions – to convert by composition

    axialConversionType
    • Axial Coordinates – use armi.reactor.converters.meshConverters._RZThetaReactorMeshConverterByAxialCoordinates

    • Axial Bins – use armi.reactor.converters.meshConverters._RZThetaReactorMeshConverterByAxialBins

    homogenizeAxiallyByFlags

    Boolean that if set to True will ignore the axialConversionType input and determine a mesh based on the material boundaries for each RZ region axially.

  • expandReactor (bool) – If True, the HEX-Z reactor will be expanded to full core geometry prior to converting to the RZT reactor. Either way the converted RZTheta core will be full core.

  • strictHomogenization (bool) – If True, the converter will restrict HEX-Z blocks with dissimilar XS types from being homogenized into an RZT block.

convert(r)[source]

Run the conversion to 3 dimensional R-Z-Theta.

Variables

~HexToRZThetaConverter.convert.r (Reactor object) – The reactor to convert.

Notes

As a part of the RZT mesh converters it is possible to obtain a radial mesh that has repeated ring numbers. For instance, if there are fuel assemblies and control assemblies within the same radial hex ring then it’s possible that a radial mesh output from the byRingComposition mesh converter method will look something like:

self.meshConverter.radialMesh = [2, 3, 4, 4, 5, 5, 6, 6, 6, 7, 8, 8, 9, 10]

In this instance the hex ring will remain the same for multiple iterations over radial direction when homogenizing the hex core into the RZT geometry. In this case, the converter needs to keep track of the compositions within this ring so that it can separate this repeated ring into multiple RZT rings. Each of the RZT rings should have a single composition (fuel1, fuel2, control, etc.)

createHomogenizedRZTBlock(homBlock, lowerAxialZ, upperAxialZ, radialThetaZoneAssems)[source]

Create the homogenized RZT block by computing the average atoms in the zone.

Additional calculations are performed to determine the homogenized block type, the block average temperature, and the volume fraction of each hex block that is in the new homogenized block.

plotConvertedReactor(fNameBase=None)[source]

Generate plots for the converted RZT reactor.

Parameters

fNameBase (str, optional) – A name that will form the basis of the N plots that are generated by this method. Will get split on extension and have numbers added. Should be like coreMap.png.

Notes

XTView can be used to view the RZT reactor but this is useful to examine the conversion of the hex-z reactor to the rzt reactor.

This makes plots of each individual theta mesh

reset()[source]

Clear out attribute data, including holding the state of the converted reactor core model.

class armi.reactor.converters.geometryConverters.HexToRZConverter(cs, converterSettings, expandReactor=False, strictHomogenization=False)[source]

Bases: armi.reactor.converters.geometryConverters.HexToRZThetaConverter

Create a new reactor with R-Z coordinates from the Hexagonal-Z reactor

This is a subclass of the HexToRZThetaConverter. See the HexToRZThetaConverter for explanation and setup of the converterSettings.

class armi.reactor.converters.geometryConverters.ThirdCoreHexToFullCoreChanger(cs=None)[source]

Bases: armi.reactor.converters.geometryConverters.GeometryChanger

Change third-core models to full core in place

Does not generate a new reactor object.

Examples

>>> converter = ThirdCoreHexToFullCoreChanger()
>>> converter.convert(myReactor)
EXPECTED_INPUT_SYMMETRY = <armi.reactor.geometry.SymmetryType object>
convert(r)[source]

Run the conversion.

Parameters

sourceReactor (Reactor object) – The reactor to convert.

restorePreviousGeometry(r=None)[source]

Undo the changes made by convert by going back to 1/3 core.

class armi.reactor.converters.geometryConverters.EdgeAssemblyChanger(cs=None)[source]

Bases: armi.reactor.converters.geometryConverters.GeometryChanger

Add/remove “edge assemblies” for Finite difference or MCNP cases

Examples

edgeChanger = EdgeAssemblyChanger() edgeChanger.removeEdgeAssemblies(reactor.core)

addEdgeAssemblies(core)[source]

Add the assemblies on the 120 degree symmetric line to 1/3 symmetric cases

Needs to be called before a finite difference (DIF3D, DIFNT) or MCNP calculation

Parameters

reactor (Reactor) – Reactor to modify

See also

removeEdgeAssemblies

removes the edge assemblies

removeEdgeAssemblies(core)[source]

remove the edge assemblies in preparation for the nodal diffusion approximation

This makes use of the assemblies knowledge of if it is in a region that it needs to be removed.

See also

addEdgeAssemblies

adds the edge assemblies

static scaleParamsRelatedToSymmetry(reactor, paramsToScaleSubset=None)[source]

Scale volume-dependent params like power to account for cut-off edges

These params are at half their full hex value. Scale them right before deleting their symmetric identicals. The two operations (scaling them and then removing others) is identical to combining two half-assemblies into a full one.

See also

armi.reactor.converters.geometryConverter.EdgeAssemblyChanger.removeEdgeAssemblies, armi.reactor.blocks.HexBlock.getSymmetryFactor