Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into drewj/block-input-height
Browse files Browse the repository at this point in the history
* origin/main:
  Removing Assembly.doubleResolution (#1951)
  Adding DeprecationWarning for HistoryTrackerInterface (#1950)
  Removing tabulate as a dependency (#1948)
  Removing defunct comment from getPinCoordinates (#1931)
  • Loading branch information
drewj-tp committed Oct 14, 2024
2 parents a8b5ef7 + cdf99f0 commit c1ec0e0
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 52 deletions.
3 changes: 3 additions & 0 deletions armi/bookkeeping/historyTracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ def __init__(self, r, cs):
self.xsHistory = {}
self._preloadedBlockHistory = None

msg = "The HistoryTrackerInterface is deprecated, and will be removed."
runLog.warning(msg)

def interactBOL(self):
self.addDetailAssembliesBOL()

Expand Down
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
5 changes: 0 additions & 5 deletions armi/reactor/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1569,11 +1569,6 @@ def getPinCoordinates(self):
-------
localCoordinates : list
list of (x,y,z) pairs representing each pin in the order they are listed as children
Notes
-----
This assumes hexagonal pin lattice and needs to be upgraded once more generic geometry
options are needed. Only works if pins have clad.
"""
coords = []
for clad in self.getChildrenWithFlags(Flags.CLAD):
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 @@ -33,6 +33,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
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ dependencies = [
"ruamel.yaml.clib<=0.2.7 ; python_version < '3.11.0'", # C-based core of ruamel below
"ruamel.yaml<=0.17.21 ; python_version < '3.11.0'", # Our foundational YAML library
"scipy>=1.7.0", # Used for curve-fitting and matrix math
"tabulate>=0.8.9", # Used to pretty-print tabular data
"toml>0.9.5", # Needed to parse the pyproject.toml file
"voluptuous>=0.12.1", # Used to validate YAML data files
"yamlize==0.7.1", # Custom YAML-to-object library
Expand Down

0 comments on commit c1ec0e0

Please sign in to comment.