diff --git a/armi/physics/neutronics/globalFlux/globalFluxInterface.py b/armi/physics/neutronics/globalFlux/globalFluxInterface.py index 9e51adab5..a7dfd0e9c 100644 --- a/armi/physics/neutronics/globalFlux/globalFluxInterface.py +++ b/armi/physics/neutronics/globalFlux/globalFluxInterface.py @@ -645,7 +645,7 @@ def _undoGeometryTransformations(self): geomConverter = self.geomConverters.get("edgeAssems") if geomConverter: geomConverter.scaleParamsRelatedToSymmetry( - self.r, paramsToScaleSubset=self.options.paramsToScaleSubset + self.r.core, paramsToScaleSubset=self.options.paramsToScaleSubset ) # Resets the reactor core model to the correct symmetry and removes diff --git a/armi/reactor/blueprints/reactorBlueprint.py b/armi/reactor/blueprints/reactorBlueprint.py index 75b363a64..988881a9b 100644 --- a/armi/reactor/blueprints/reactorBlueprint.py +++ b/armi/reactor/blueprints/reactorBlueprint.py @@ -240,6 +240,7 @@ def _modifyGeometry(self, container, gridDesign): runLog.header("=========== Applying Geometry Modifications ===========") converter = geometryConverters.EdgeAssemblyChanger() + converter.scaleParamsRelatedToSymmetry(container) converter.removeEdgeAssemblies(container) # now update the spatial grid dimensions based on the populated children diff --git a/armi/reactor/converters/geometryConverters.py b/armi/reactor/converters/geometryConverters.py index 4a81778e4..838ce1597 100644 --- a/armi/reactor/converters/geometryConverters.py +++ b/armi/reactor/converters/geometryConverters.py @@ -1513,8 +1513,6 @@ def removeEdgeAssemblies(self, core): assembliesOnLowerBoundary = core.getAssembliesOnSymmetryLine( grids.BOUNDARY_0_DEGREES ) - - self.scaleParamsRelatedToSymmetry(core.parent) # Don't use newAssembliesAdded b/c this may be BOL cleaning of a fresh case that has edge # assems. edgeAssemblies = core.getAssembliesOnSymmetryLine(grids.BOUNDARY_120_DEGREES) @@ -1540,7 +1538,7 @@ def removeEdgeAssemblies(self, core): self.reset() @staticmethod - def scaleParamsRelatedToSymmetry(reactor, paramsToScaleSubset=None): + def scaleParamsRelatedToSymmetry(core, paramsToScaleSubset=None): """ Scale volume-dependent params like power to account for cut-off edges. @@ -1557,11 +1555,11 @@ def scaleParamsRelatedToSymmetry(reactor, paramsToScaleSubset=None): "Scaling edge-assembly parameters to account for full hexes instead of two halves" ) completeListOfParamsToScale = _generateListOfParamsToScale( - reactor, paramsToScaleSubset + core, paramsToScaleSubset ) symmetricAssems = ( - reactor.core.getAssembliesOnSymmetryLine(grids.BOUNDARY_0_DEGREES), - reactor.core.getAssembliesOnSymmetryLine(grids.BOUNDARY_120_DEGREES), + core.getAssembliesOnSymmetryLine(grids.BOUNDARY_0_DEGREES), + core.getAssembliesOnSymmetryLine(grids.BOUNDARY_120_DEGREES), ) if not all(symmetricAssems): runLog.extra("No edge-assemblies found to scale parameters for.") @@ -1570,16 +1568,15 @@ def scaleParamsRelatedToSymmetry(reactor, paramsToScaleSubset=None): for b, bSymmetric in zip(a, aSymmetric): _scaleParamsInBlock(b, bSymmetric, completeListOfParamsToScale) - -def _generateListOfParamsToScale(r, paramsToScaleSubset): +def _generateListOfParamsToScale(core, paramsToScaleSubset): fluxParamsToScale = ( - r.core.getFirstBlock() + core.getFirstBlock() .p.paramDefs.inCategory(Category.fluxQuantities) .inCategory(Category.multiGroupQuantities) .names ) listOfVolumeIntegratedParamsToScale = ( - r.core.getFirstBlock() + core.getFirstBlock() .p.paramDefs.atLocation(ParamLocation.VOLUME_INTEGRATED) .since(SINCE_LAST_GEOMETRY_TRANSFORMATION) ) diff --git a/armi/reactor/converters/tests/test_geometryConverters.py b/armi/reactor/converters/tests/test_geometryConverters.py index 629092693..d06576fcb 100644 --- a/armi/reactor/converters/tests/test_geometryConverters.py +++ b/armi/reactor/converters/tests/test_geometryConverters.py @@ -320,7 +320,7 @@ def getAssemByRingPos(ringPos: tuple): # must be added after geom transform for b in self.o.r.core.getBlocks(): b.p.power = 1.0 - converter.scaleParamsRelatedToSymmetry(self.r) + converter.scaleParamsRelatedToSymmetry(self.r.core) a = self.r.core.getAssembliesOnSymmetryLine(grids.BOUNDARY_0_DEGREES)[0] self.assertTrue(all(b.p.power == 2.0 for b in a), "Powers were not scaled")