Skip to content

Commit

Permalink
Add case where symmetry factor is 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mgjarrett committed Feb 11, 2025
1 parent 1f10f53 commit 3ff834e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions armi/reactor/tests/test_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1215,6 +1215,18 @@ def test_getMgFlux(self, mock_sf):
np.testing.assert_almost_equal(neutronFlux, np.ones(5) * volFrac)
np.testing.assert_almost_equal(gammaFlux, np.ones(4) * volFrac * 2.0)

mock_sf.return_value = 1
self.block.p.mgFlux = np.array([1, 1, 1, 1, 1])
self.block.p.mgFluxGamma = np.array([2, 2, 2, 2])
fuel = self.block.getComponent(Flags.FUEL)
blockVol = self.block.getVolume()
fuelVol = fuel.getVolume()
volFrac = fuelVol / blockVol / self.block.getSymmetryFactor()
neutronFlux = fuel.getIntegratedMgFlux()
gammaFlux = fuel.getIntegratedMgFlux(gamma=True)
np.testing.assert_almost_equal(neutronFlux, np.ones(5) * volFrac)
np.testing.assert_almost_equal(gammaFlux, np.ones(4) * volFrac * 2.0)

@patch.object(blocks.HexBlock, "getSymmetryFactor")
def test_completeInitialLoading(self, mock_sf):
"""Ensure that some BOL block and component params are populated properly.
Expand Down

0 comments on commit 3ff834e

Please sign in to comment.