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

added modern RZ theta unittest for ARMI #1009

Merged
merged 7 commits into from Dec 15, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
42 changes: 42 additions & 0 deletions armi/reactor/tests/test_rz_reactors.py
Expand Up @@ -45,5 +45,47 @@ def test_findAllMeshPoints(self):
self.assertLess(i[-1], 2 * math.pi)


class Test_RZT_Reactor_modern(unittest.TestCase):
def test_loadRZT_reactor(self):
"""
The Godiva benchmark model is a HEU sphere with a radius of 8.74 cm

This unit tests loading and verifies the reactor is loaded correctly by
comparing volumes against expected volumes for full core (including
void boundary conditions) and just the fuel
"""
cs = settings.Settings(
fName=os.path.join(TEST_ROOT, "Godiva.armi.unittest.yaml")
)
r = reactors.loadFromCs(cs)

godivaRadius = 8.7407
reactorRadius = 9
reactorHeight = 17.5

refReactorVolume = math.pi * reactorRadius ** 2 * reactorHeight / 8
refFuelVolume = 4.0 / 3.0 * math.pi * (godivaRadius) ** 3 / 8

reactorVolumes = []
fuelVolumes = []
for b in r.core.getBlocks():
reactorVolumes.append(b.getVolume())
for c in b:
if "Godiva" in c.name:
fuelVolumes.append(c.getVolume())
"""
verify the total reactor volume is as expected
"""
tolerance = 1e-3
error = math.fabs((refReactorVolume - sum(reactorVolumes)) / refReactorVolume)
self.assertLess(error, tolerance)

"""
verify the total fuel volume is as expected
"""
error = math.fabs((refFuelVolume - sum(fuelVolumes)) / refFuelVolume)
self.assertLess(error, tolerance)


if __name__ == "__main__":
unittest.main()