`_checkParamConsistency` not being used in `AssemblyBlueprint.construct()`
See original GitHub issueThere is a method inside of the AssemblyBlueprint
class called _checkParamConsistency
, which is supposed to check that an assembly blueprint has the same number of mesh points, heights, xs types, and material modification entries as there are blocks. This is called within AssemblyBlueprint.construct
.
I think the issue is that this checking method is called after the assembly is constructed, and if there is an inconsistency in the assembly blueprint stemming from different numbers of blocks/xs-types/etc. then _constructAssembly
will expose that inconsistency by bombing:
[CRIT 000 ] Stack trace: Traceback (most recent call last):
File "c:\users\ckeckler\codes\armi\armi\__main__.py", line 34, in main
code = ArmiCLI().run()
File "c:\users\ckeckler\codes\armi\armi\cli\__init__.py", line 187, in run
return self.executeCommand(args.command, args.args)
File "c:\users\ckeckler\codes\armi\armi\cli\__init__.py", line 216, in executeCommand
return cmd.invoke()
File "c:\users\ckeckler\codes\armi\armi\cli\run.py", line 33, in invoke
inputCase.run()
File "c:\users\ckeckler\codes\armi\armi\cases\case.py", line 370, in run
o = self.initializeOperator()
File "c:\users\ckeckler\codes\armi\armi\cases\case.py", line 430, in initializeOperator
r = reactors.factory(self.cs, self.bp)
File "c:\users\ckeckler\codes\armi\armi\reactor\reactors.py", line 141, in factory
coreDesign.construct(cs, bp, r, geom=geom)
File "c:\users\ckeckler\codes\armi\armi\reactor\blueprints\reactorBlueprint.py", line 142, in construct
self._loadAssemblies(cs, system, gridDesign, gridDesign.gridContents, bp)
File "c:\users\ckeckler\codes\armi\armi\reactor\blueprints\reactorBlueprint.py", line 165, in _loadAssemblies
newAssembly = bp.constructAssem(cs, specifier=aTypeID)
File "c:\users\ckeckler\codes\armi\armi\reactor\blueprints\__init__.py", line 265, in constructAssem
self._prepConstruction(cs)
File "c:\users\ckeckler\codes\armi\armi\reactor\blueprints\__init__.py", line 303, in _prepConstruction
a = aDesign.construct(cs, self)
File "c:\users\ckeckler\codes\armi\armi\reactor\blueprints\assemblyBlueprint.py", line 109, in construct
a = self._constructAssembly(cs, blueprint)
File "c:\users\ckeckler\codes\armi\armi\reactor\blueprints\assemblyBlueprint.py", line 118, in _constructAssembly
b = self._createBlock(cs, blueprint, bDesign, axialIndex)
File "c:\users\ckeckler\codes\armi\armi\reactor\blueprints\assemblyBlueprint.py", line 159, in _createBlock
meshPoints = self.axialMeshPoints[axialIndex]
File "c:\users\ckeckler\codes\armi\.venv_armi\lib\site-packages\yamlize\sequences.py", line 41, in __getitem__
return self.__items[index]
IndexError: list index out of range
And if _constructAssembly
passes without error, then the things that _checkParamConsistency
are supposed to check for are, by definition, acceptable. So effectively, _checkParamConsistency
is never really used and the nice error message that it provides is never seen by the user.
Example of failing input is here. Uncomment the indicated line in the definition of the inner fuel
assembly blueprint and the case passes.
Pretty sure this could be easily fixed just by swapping the order of the method calls and slightly retooling _checkParamConsistency
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
@jakehader You might want to wait until #513 is fully resolved. I made a change to the dict holding the material modifications, and so this method was also updated. Likely won’t conflict much, but just FYI.
Fixed with the closure of #517