From 666a28ed4446c58c886b89475c66c17a25f3e16d Mon Sep 17 00:00:00 2001 From: Michael Jarrett Date: Fri, 28 Jul 2023 10:39:44 -0700 Subject: [PATCH] Relax Error Check for 1D cylindrical collection (#1347) Co-authored-by: Chris Keckler --- .../neutronics/crossSectionGroupManager.py | 8 +++++++- .../tests/test_crossSectionManager.py | 20 +++++++++++++++++++ doc/release/0.2.rst | 6 ++++++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/armi/physics/neutronics/crossSectionGroupManager.py b/armi/physics/neutronics/crossSectionGroupManager.py index 152efe8f2..50ba177d8 100644 --- a/armi/physics/neutronics/crossSectionGroupManager.py +++ b/armi/physics/neutronics/crossSectionGroupManager.py @@ -540,6 +540,9 @@ def _checkComponentConsistency(b, repBlock): f"Blocks {b} and {repBlock} have differing number " f"of components and cannot be homogenized" ) + # Using Fe-56 as a proxy for structure and Na-23 as proxy for coolant is undesirably SFR-centric + # This should be generalized in the future, if possible + consistentNucs = {"PU239", "U238", "U235", "U234", "FE56", "NA23", "O16"} for c, repC in zip(sorted(b), sorted(repBlock)): compString = ( f"Component {repC} in block {repBlock} and component {c} in block {b}" @@ -552,7 +555,10 @@ def _checkComponentConsistency(b, repBlock): theseNucs = set(c.getNuclides()) thoseNucs = set(repC.getNuclides()) - diffNucs = theseNucs.symmetric_difference(thoseNucs) + # check for any differences between which `consistentNucs` the components have + diffNucs = theseNucs.symmetric_difference(thoseNucs).intersection( + consistentNucs + ) if diffNucs: raise ValueError( f"{compString} are in the same location, but nuclides " diff --git a/armi/physics/neutronics/tests/test_crossSectionManager.py b/armi/physics/neutronics/tests/test_crossSectionManager.py index eb44122b3..5028464f1 100644 --- a/armi/physics/neutronics/tests/test_crossSectionManager.py +++ b/armi/physics/neutronics/tests/test_crossSectionManager.py @@ -380,8 +380,28 @@ def test_checkComponentConsistency(self): nucDiffBlock.add(clad) nucDiffBlock.add(coolant) + # additional non-important nuclides + negligibleNucDiffBlock = HexBlock("blockNegligibleNucDiff") + negligibleNuc = {"N14": 1.0e-5} + modControl = baseComponents[0].getNumberDensities() + modClad = baseComponents[2].getNumberDensities() + modCoolant = baseComponents[4].getNumberDensities() + modControl.update(negligibleNuc) + modClad.update(negligibleNuc) + modCoolant.update(negligibleNuc) + mixedDensities = { + "control": modControl, + "clad": modClad, + "coolant": modCoolant, + } + control, clad, coolant = self._makeComponents(7, mixedDensities) + negligibleNucDiffBlock.add(control) + negligibleNucDiffBlock.add(clad) + negligibleNucDiffBlock.add(coolant) + blockCollection._checkComponentConsistency(refBlock, matchingBlock) blockCollection._checkComponentConsistency(refBlock, unsortedBlock) + blockCollection._checkComponentConsistency(refBlock, negligibleNucDiffBlock) for b in (nonMatchingMultBlock, nonMatchingLengthBlock, nucDiffBlock): with self.assertRaises(ValueError): blockCollection._checkComponentConsistency(refBlock, b) diff --git a/doc/release/0.2.rst b/doc/release/0.2.rst index 7e39e76ed..79b2f8634 100644 --- a/doc/release/0.2.rst +++ b/doc/release/0.2.rst @@ -8,6 +8,12 @@ Release Date: TBD What's new in ARMI ------------------ +#. The Spent Fuel Pool (``sfp``) was moved from the ``Core`` out to the ``Reactor``. (`PR#1336 `_) +#. Broad cleanup of ``Parameters``: filled in all empty units and descriptions, removed unused params. (`PR#1345 `_) +#. Removed redundant ``Material.name`` variable. (`PR#1335 `_) +#. Added SHA1 hashes of XS control files to the welcome text. (`PR#1334 `_) +#. Put back ``avgFuelTemp`` block parameter. (`PR#1362 `_) +#. Make cylindrical component block collection less strict about pre-homogenization checks. (`PR#1347 `_) #. TBD Bug fixes