Skip to content

Commit

Permalink
Reset caching on block components within uniform mesh converter (#878)
Browse files Browse the repository at this point in the history
* Small update for reseting component volumes during setting number densities to ensure that the component volumes are recalculated.
  • Loading branch information
jakehader authored Sep 14, 2022
1 parent c40a3ca commit 46ee8dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions armi/reactor/assemblies.py
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,7 @@ def getBlocksBetweenElevations(self, zLower, zUpper):
EPS = 1e-10
blocksHere = []
allMeshPoints = set()

for b in self:
if b.p.ztop >= zLower and b.p.zbottom <= zUpper:
allMeshPoints.add(b.p.zbottom)
Expand Down
4 changes: 4 additions & 0 deletions armi/reactor/converters/uniformMesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,3 +859,7 @@ def setNumberDensitiesFromOverlaps(block, overlappingBlockInfo):
+ numberDensity * overlappingHeightInCm / blockHeightInCm
)
block.setNumberDensities(totalDensities)
# Set the volume of each component in the block to `None` so that the
# volume of each volume is recomputed.
for c in block:
c.p.volume = None

0 comments on commit 46ee8dd

Please sign in to comment.