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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from armi.reactor.converters.axialExpansionChanger.assemblyAxialLinkage import (
AssemblyAxialLinkage,
)
from armi.reactor.converters.axialExpansionChanger.expansionData import ExpansionData
from armi.reactor.converters.axialExpansionChanger.expansionData import (
ExpansionData,
getSolidComponents,
)
from armi.reactor.flags import Flags
Expand Down Expand Up @@ -359,8 +359,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
30 changes: 30 additions & 0 deletions armi/reactor/converters/tests/test_axialExpansionChanger.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,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_PRESC2
:tests: R_ARMI_AXIAL_EXP_PRESC
"""
# build test assembly with ACLP
assembly = HexAssembly("testAssemblyType")
Expand All @@ -473,6 +477,9 @@ def test_noMovementACLP(self):
aclpZTop = aclp.p.ztop
aclpZBottom = aclp.p.zbottom

# get total assembly fluid mass pre-expansion
preExpAssemFluidMass = self._getTotalAssemblyFluidMass(assembly)

# expand fuel
# get fuel components
cList = [c for b in assembly for c in b if c.hasFlags(Flags.FUEL)]
Expand All @@ -481,6 +488,9 @@ def test_noMovementACLP(self):
chngr = AxialExpansionChanger()
chngr.performPrescribedAxialExpansion(assembly, cList, pList, setFuel=True)

# get total assembly fluid mass post-expansion
postExpAssemFluidMass = self._getTotalAssemblyFluidMass(assembly)

# do assertion
self.assertEqual(
aclpZBottom,
Expand All @@ -493,6 +503,26 @@ 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,
)
# verify that the total assembly fluid mass is preserved through expansion
self.assertAlmostEqual(preExpAssemFluidMass, postExpAssemFluidMass, places=11)

@staticmethod
def _getTotalAssemblyFluidMass(assembly) -> float:
totalAssemblyFluidMass = 0.0
for b in assembly:
for c in b:
if isinstance(c.material, materials.material.Fluid):
totalAssemblyFluidMass += c.getMass()
return totalAssemblyFluidMass

def test_reset(self):
self.obj.setAssembly(self.a)
self.obj.reset()
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 @@ -35,6 +35,7 @@ Bug Fixes
#. Fixed ``PermissionError`` when using ``syncDbAfterWrite``. (`PR#1857 <https://github.com/terrapower/armi/pull/1857>`_)
#. Fixed ``MpiDirectoryChanger``. (`PR#1853 <https://github.com/terrapower/armi/pull/1853>`_)
#. Changed data type of ``thKernel`` setting from ``bool`` to ``str`` in ``ThermalHydraulicsPlugin``. (`PR#1855 <https://github.com/terrapower/armi/pull/1855>`_)
#. Update height of fluid components after axial expansion (`PR#1828 <https://github.com/terrapower/armi/pull/1828>`_)
#. TBD

Quality Work
Expand Down
Loading