Skip to content

Commit

Permalink
bug fix for xsGroup manager w/ coupling (#1118)
Browse files Browse the repository at this point in the history
  • Loading branch information
albeanth committed Jan 25, 2023
1 parent 1feecc8 commit 2a95ca6
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
22 changes: 20 additions & 2 deletions armi/physics/neutronics/crossSectionGroupManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,26 @@ def interactEOC(self, cycle=None):
self.clearRepresentativeBlocks()

def interactCoupled(self, iteration):
"""Update XS groups on each physics coupling iteration to get latest temperatures."""
self.interactBOC(cycle=None)
"""Update XS groups on each physics coupling iteration to get latest temperatures.
Notes
-----
This coupling iteration is limited to when the time node is equal to zero. This is
assumed to be reasonable for most applications as 1) microscopic cross section changes with burn-up
are deemed to be less significant compared to convergence on the temperature state, and 2) temperature
distributions are not expected to dramatically change for time steps > 0.
.. warning::
The latter assumptions are design and application-specific and a subclass should be
considered when violated.
See Also
--------
:py:meth:`Assembly <armi.physics.neutronics.latticePhysics.latticePhysics.LatticePhysicsInterface.interactCoupled>`
"""
if self.r.p.timeNode == 0:
self.interactBOC(cycle=None)

def clearRepresentativeBlocks(self):
"""Clear the representative blocks."""
Expand Down
10 changes: 10 additions & 0 deletions armi/physics/neutronics/tests/test_cross_section_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,16 @@ def test_createRepresentativeBlocksUsingExistingBlocks(self):
newReprBlock.getNumberDensities(), oldReprBlock.getNumberDensities()
)

def test_interactCoupled(self):
# ensure that representativeBlocks remains empty if timeNode == 1
self.blockList[0].r.p.timeNode = 1
self.csm.interactCoupled(iteration=0)
self.assertFalse(self.csm.representativeBlocks)
# ensure that representativeBlocks get populated if timeNode == 0
self.blockList[0].r.p.timeNode = 0
self.csm.interactCoupled(iteration=0)
self.assertTrue(self.csm.representativeBlocks)


class TestXSNumberConverters(unittest.TestCase):
def test_conversion(self):
Expand Down
1 change: 1 addition & 0 deletions doc/release/0.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Bug fixes
#. Fixed a bug where the material namespace order for test_axialExpansionChanger.py was persisting beyond the tests. (`PR#1046 https://github.com/terrapower/armi/pull/1046`_)
#. A bug was fixed in `PR#1022 <https://github.com/terrapower/armi/pull/1022>`_ where the gaseous fission products were not being removed from the core directly, but instead the fission yields within the lumped fission products were being adjusted.
#. Fixed a bug where non-fuel depletable components were not being initialized with all nuclides with the ``explicitFissionProducts`` model (`PR#1067 https://github.com/terrapower/armi/pull/1067`_)
#. Bug fix to ensure consistency between cross section group manager and lattice physics interface for tight coupling. (`PR#1118 <https://github.com/terrapower/armi/pull/1118>`_)

ARMI v0.2.5
===========
Expand Down

0 comments on commit 2a95ca6

Please sign in to comment.