Skip to content

Commit

Permalink
Removing Assembly.doubleResolution (#1951)
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science authored Oct 14, 2024
1 parent a3ef1a3 commit cdf99f0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 46 deletions.
32 changes: 0 additions & 32 deletions armi/reactor/assemblies.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,38 +315,6 @@ def getAveragePlenumTemperature(self):

return sum(plenumTemps) / len(plenumTemps)

def doubleResolution(self):
"""
Turns each block into two half-size blocks.
Notes
-----
Used for mesh sensitivity studies.
Warning
-------
This is likely destined for a geometry converter rather than this instance method.
"""
newBlockStack = []
topIndex = -1
for b in self:
b0 = b
b1 = copy.deepcopy(b)
for bx in [b0, b1]:
newHeight = bx.getHeight() / 2.0
bx.p.height = newHeight
bx.p.heightBOL = newHeight
topIndex += 1
bx.p.topIndex = topIndex
newBlockStack.append(bx)
bx.clearCache()

self.removeAll()
self.spatialGrid = grids.AxialGrid.fromNCells(len(newBlockStack))
for b in newBlockStack:
self.add(b)
self.reestablishBlockOrder()

def adjustResolution(self, refA):
"""Split the blocks in this assembly to have the same mesh structure as refA."""
newBlockStack = []
Expand Down
14 changes: 0 additions & 14 deletions armi/reactor/tests/test_assemblies.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,20 +392,6 @@ def test_getVolume(self):
places = 6
self.assertAlmostEqual(cur, ref, places=places)

def test_doubleResolution(self):
b = self.assembly[0]
initialHeight = b.p.heightBOL
self.assembly.doubleResolution()
cur = len(self.assembly.getBlocks())
ref = 2 * len(self.blockList)
self.assertEqual(cur, ref)

cur = self.assembly.getBlocks()[0].getHeight()
ref = self.height / 2.0
places = 6
self.assertNotEqual(initialHeight, b.p.heightBOL)
self.assertAlmostEqual(cur, ref, places=places)

def test_adjustResolution(self):
# Make a second assembly with 4 times the resolution
assemNum2 = self.assemNum * 4
Expand Down
1 change: 1 addition & 0 deletions doc/release/0.4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ API Changes
#. ``copyInterfaceInputs`` no longer requires a valid setting object. (`PR#1934 <https://github.com/terrapower/armi/pull/1934>`_)
#. Removing ``buildEqRingSchedule``. (`PR#1928 <https://github.com/terrapower/armi/pull/1928>`_)
#. Allowing for unknown Flags when opening a DB. (`PR#1844 <https://github.com/terrapower/armi/pull/1835>`_)
#. Removing ``Assembly.doubleResolution()``. (`PR#1951 <https://github.com/terrapower/armi/pull/1951>`_)
#. Removing ``assemblyLists.py`` and the ``AssemblyList`` class. (`PR#1891 <https://github.com/terrapower/armi/pull/1891>`_)
#. Removing ``Assembly.rotatePins`` and ``Block.rotatePins``. Prefer ``Assembly.rotate`` and ``Block.rotate``. (`PR#1846 <https://github.com/terrapower/armi/1846`_)
#. Transposing ``pinMgFluxes`` parameters so that leading dimension is pin index (`PR#1937 <https://github.com/terrapower/armi/pull/1937>`)
Expand Down

0 comments on commit cdf99f0

Please sign in to comment.