Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fluid volumes after prescribed axial expansion #1828

Merged
merged 9 commits into from
Sep 16, 2024
7 changes: 4 additions & 3 deletions armi/reactor/converters/axialExpansionChanger.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
from statistics import mean
from typing import List

from numpy import array

from armi import runLog
from armi.materials import material
from armi.reactor.components import UnshapedComponent
from armi.reactor.flags import Flags
from numpy import array

TARGET_FLAGS_IN_PREFERRED_ORDER = [
Flags.FUEL,
Expand Down Expand Up @@ -364,8 +365,8 @@ def axiallyExpandAssembly(self):

_checkBlockHeight(b)
# Call Component.clearCache to update the Component volume, and therefore the masses,
# of all solid components.
for c in getSolidComponents(b):
# of all components.
for c in b:
c.clearCache()
# redo mesh -- functionality based on assembly.calculateZCoords()
mesh.append(b.p.ztop)
Expand Down
16 changes: 15 additions & 1 deletion armi/reactor/converters/tests/test_axialExpansionChanger.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import unittest
from statistics import mean

from numpy import array, linspace, zeros

from armi import materials
from armi.materials import _MATERIAL_NAMESPACE_ORDER, custom
from armi.reactor.assemblies import HexAssembly, grids
Expand All @@ -35,7 +37,6 @@
from armi.reactor.tests.test_reactors import loadTestReactor, reduceTestReactorRings
from armi.tests import TEST_ROOT
from armi.utils import units
from numpy import array, linspace, zeros


class AxialExpansionTestBase(unittest.TestCase):
Expand Down Expand Up @@ -448,6 +449,10 @@ def test_noMovementACLP(self):
.. test:: Ensure the ACLP does not move during fuel-only expansion.
:id: T_ARMI_AXIAL_EXP_PRESC1
:tests: R_ARMI_AXIAL_EXP_PRESC

.. test:: Ensure the component volumes are correctly updated during prescribed expansion.
:id: T_ARMI_AXIAL_EXP_PRESC1
albeanth marked this conversation as resolved.
Show resolved Hide resolved
:tests: R_ARMI_AXIAL_EXP_PRESC
"""
# build test assembly with ACLP
assembly = HexAssembly("testAssemblyType")
Expand Down Expand Up @@ -490,6 +495,15 @@ def test_noMovementACLP(self):
msg="ACLP ztop has changed. It should not with fuel component only expansion!",
)

# verify that the component volumes are correctly updated
for b in assembly:
for c in b:
self.assertAlmostEqual(
c.getArea() * b.getHeight(),
c.getVolume(),
places=12,
)

def test_reset(self):
self.obj.setAssembly(self.a)
self.obj.reset()
Expand Down
Loading