armi icon indicating copy to clipboard operation
armi copied to clipboard

Composite.calcTotalParam needs some TLC

Open john-science opened this issue 1 year ago • 0 comments

I believe this method has gotten kind of stale, and needs some love:

https://github.com/terrapower/armi/blob/e2dba79a4e68c23a0dd06b90ea2e4cbaca335095/armi/reactor/composites.py#L1722

Some issues:

  1. It only works if you call it on an Assembly or a Core, but it is defined on the generic Composite.
  2. This method is used in a lot of places downstream, but I believe a few of the input parameters are never used by anyone. We should clean those out.
  3. This method needs to... at least, have a warning in the docstring that notes that not all params CAN be summed meaningfully.
    • This method is kind of risky. Not all parameters can be meaningfully summed. And the user has to KNOW.
  4. The code itself also needs a little TLC, this naming convention is pretty whiffy:

https://github.com/terrapower/armi/blob/e2dba79a4e68c23a0dd06b90ea2e4cbaca335095/armi/reactor/composites.py#L1783

john-science avatar Nov 21 '23 22:11 john-science