Skip to content

Commit

Permalink
Responding to comments
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science committed Apr 8, 2024
1 parent 77159af commit 5e8a01c
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions armi/reactor/components/__init__.py
Expand Up @@ -341,22 +341,16 @@ def computeVolume(self):
"""
return self._deriveVolumeAndArea()

@staticmethod
def getMaxVolume(block):
def getMaxVolume(self):
"""
The maximum volume of the parent Block.
Parameters
----------
block : Block
Block of interest.
Returns
-------
vol : float
volume in cm^3.
"""
return block.getMaxArea() * block.getHeight()
return self.parent.getMaxArea() * self.parent.getHeight()

def _deriveVolumeAndArea(self):
"""
Expand Down Expand Up @@ -400,7 +394,7 @@ def _deriveVolumeAndArea(self):
except: # noqa: bare-except
siblingArea = None

remainingVolume = DerivedShape.getMaxVolume(self.parent) - siblingVolume
remainingVolume = self.getMaxVolume() - siblingVolume
if siblingArea:
remainingArea = self.parent.getMaxArea() - siblingArea

Expand All @@ -410,7 +404,7 @@ def _deriveVolumeAndArea(self):
f"The component areas in {self.parent} exceed the maximum "
"allowable volume based on the geometry. Check that the "
"geometry is defined correctly.\n"
f"Maximum allowable volume: {DerivedShape.getMaxVolume(self.parent)} "
f"Maximum allowable volume: {self.getMaxVolume()} "
f"cm^3\nVolume of all non-derived shape components: {siblingVolume} cm^3\n"
)
runLog.error(msg)
Expand Down

0 comments on commit 5e8a01c

Please sign in to comment.