Open jakehader opened 2 years ago
I'm gonna work on this. Thinking about it more, this is really a bug that is leading to inaccuracies in my calculations against data.
Point (2) is for another PR. Not sure I'm gonna do that one at this point though.
As to your Point (2) above, I think if you want to make a chunk of data "standard" in this way, we would use a class. So there would be a class (even a very, very small one) that has attributes: self.nG
, self.nF
, self.n2n
, self.nA
, self.nP
, self.n3n
, all with a well-defined type.
The benefit here is there isn't some "standard dictionary with six magic keys" that everyone just has to know about. No one could forget one, and screw things up.
Just thinking aloud here.
Based on the changes proposed in https://github.com/terrapower/armi/pull/810#discussion_r937171187, the following suggestions were made to further improve the reaction rate calculation for blocks/components but we're not yet implemented.
xsType
input to bemicroSuffix
, so that this encapsulates both the XS Type (i.e., A, B, C) as well as the burnup group (i.e., A, B, C) so that we can actually get reaction rates based on burnup-dependent cross sections.To do this, we can use
self.getMicroSuffix()
, where on the block level this is implemented as is, but on a component this is implemented as reaching up to its parent and getting it from the block-level.{"nG": 0, "nF": 0, "n2n": 0, "nA": 0, "nP": 0, "n3n": 0}
. This is a bit of a refactor, but having this mapping of these strings to the following xsLibrary micros would be good:Just grepping around the code base, I see this mapping occurring in
blocks.py/getReactionRates
,composites.py/getReactionRates
,component.py/getReactionRateDict
,isotopicsDepletionInterface.py/makeXsecTable
, andcrossSectionTable.py/CrossSectionTable
.It might make sense to have the strings for
nG
,nF
,n2n
,nA
,nP
, etc. mapped back toxsCollections.py
module-level constants that already exist: