terrapower / armi

An open-source nuclear reactor analysis automation framework that helps design teams increase efficiency and quality
https://terrapower.github.io/armi/
Apache License 2.0
212 stars 82 forks source link

Interface index numbering changes within a snapshot run #1728

Open keckler opened 2 weeks ago

keckler commented 2 weeks ago

I noticed that during a snapshot run the numbering of interfaces as they are printed in the STDOUT changes between the interactInit() and interactBOC() times. Here are some pictures from my specific example: image

image

Note that the depletion interface is removed from the stack printing at BOC and later. Presumably this is because the depletion interface is not active during snapshot runs. But I would expect the interface indices to remain constant throughout the simulation.

This is of very low importance right now, just pointing it out.

john-science commented 2 weeks ago

Note that the depletion interface is removed from the stack printing at BOC and later.

This might be a function of code written in your depletion module. It might be moving itself in the stack order, and that is by design and out of the control of ARMI code.

My first thought is I would want to look at that code.

keckler commented 1 week ago

I think what is happening is that the CrossSectionGroupManager is being removed from the stack during a snapshot run, and then this enumerate call is only seeing the real-time stack: https://github.com/terrapower/armi/blob/8ab9099a49d4731da207f5e844f60ea6ebefddcd/armi/bookkeeping/report/reportingUtils.py#L407-L435

To fix this, the original stack for the run would need to be stored somewhere. Not the most straightforward this to do, but surely it could be done.