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

Block.getNumPins broken for C5G7 model :: multiple cladding components per lattice site #1946

Open
drewj-tp opened this issue Oct 10, 2024 · 1 comment
Labels
bug Something is wrong: Highest Priority testing Related to tests

Comments

@drewj-tp
Copy link
Contributor

If you load the C5G7 test reactor and grab an assembly, you get a hilariously large number of pins

>>> r = armi.init(fName="armi/tests/c5g7/c5g7-settings.yaml").r
>>> fuelBlock = r.core[0][0]
>>> fuelBlock.getNumPins()
528

In that model, there are two clad components per lattice site

zirconium clad: &clad_Zr
shape: Circle
material: Custom
isotopics: Zr clad
Tinput: 20.0
Thot: 20.0
id: .8360
od: .9500
latticeIDs: [U]
gap 2: &fuel_gap_2
shape: Circle
material: Void
Tinput: 20.0
Thot: 20.0
id: zirconium clad.od
od: aluminum clad.id
latticeIDs: [U]
aluminum clad: &clad_Al
# NEA/NSC/DOC(96)2 Documents:
# "This clad is used to simulate hot conditions at room temperature
# (decrease the moderation ratio)"
shape: Circle
material: Custom
isotopics: Al clad
Tinput: 20.0
Thot: 20.0
id: .9700
od: 1.0800
latticeIDs: [U]

So you double count the sites. There are 17x17 total lattice sites, some of which are empty, so the upper bound on "real" pins is 289

Originally posted by @drewj-tp in #1900 (comment)

@john-science john-science added bug Something is wrong: Highest Priority testing Related to tests labels Oct 10, 2024
@john-science
Copy link
Member

john-science commented Oct 11, 2024

A great place for to start would be to write a unit test that can go with the existing C5G7 unit test for this exact thing:

TEST_INPUT_TITLE = "c5g7-settings.yaml"
class C5G7ReactorTests(unittest.TestCase):

I see you use armi.init() in the above example, that is a no-no for unit tests, so I suggest something like this:

    def test_numFuelPinsC5G7(self):
        _o, r = test_reactors.loadTestReactor(
            os.path.join(TEST_ROOT, "c5g7"),
            inputFileName=TEST_INPUT_TITLE,
        )
        b = r.core.getFirstBlock(Flags.FUEL)
        self.assertEqual(b.getNumPins(), 264)

Or something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong: Highest Priority testing Related to tests
Projects
None yet
Development

No branches or pull requests

2 participants