-
Notifications
You must be signed in to change notification settings - Fork 90
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
Remove reliance on Composite.iterComponents #1211
Comments
Related find in armi/armi/physics/neutronics/crossSectionGroupManager.py Lines 351 to 367 in 5e80827
In the Here it's a little trickier because you'd want to pick up temperatures of nuclides in each of those components. Otherwise if you just used the matrix temperature when finding the volume-weighted temperature, it would likely be lower for U235 as matrix temperature is usually less than fuel temperature |
@john-science @jakehader @opotowsky @ntouran your feedbacks would be appreciated here. I have some patches ready to send off if you buy in to this design change |
Potentially hot take here but I'll explain my motivation
Claim
There are a collection of places in ARMI where a composite does something like
when they really should do
(minor tweak to use a generator over a list but that's not the point of this ticket)
This works well and good with the current ARMI tree of
Assembly
->Block
->Component
. The problem comes when something comes between blocks and components that acts a little different to how ARMI expects despite still trying to be goodComposite
children.Motivation
I found these cases working on the particle fuel related issues (#1055 #1134). There, we have the following design pattern
Compact
that resides on aBlock
and inherits fromComposite
Component
(e.g., Circle for cylindrical compact)ParticleFuel
composite - Dedicated Composite sub-class for modeling particle fuel #1055Sphere
Component
for each layer in one particle fuel specificationWith the understanding of
mult
to be the number of a thing in it's parent, the multiplicity of one of the spherical components in the particle fuel is one. There is one kernel in a standard TRISO. But theParticleFuel
has a multiplicity equal to the number of particles in the matrix (on order of thousands). The matrix child has a multiplicity of1 - packingFraction
to adjust it's mass correctly by accounting for the region occupied by particle fuel. And finally, the multiplicity of theCompact
is the number of compacts in the block.When we do various summation routines, like
Block.getHmMass
for aBlock
that also contains aCompact
, the mass of the kernel is counted as just the mass of a single layer in one particle because we jump straight down to the spherical components withBlock.iterComponents
. We don't captureSphere.getHmMass() * nParticlesPerCompact * nCompactsPerBlock
However, if
Compact
andParticleFuel
provide their own getters that account for their multiplicity, andComposite
methods act more like aggregators ofchild.thing
, we can correct hit masses and volumes and densities.Occurrences
We've developed the compact feature fairly completely and it's able to do mass accounting etc. after we made changes to the following locations. In order to get this compact in, we had to remove calls to
iterComponents
in the following placesBlock.completeInitialLoading
armi/armi/reactor/blocks.py
Line 814 in e08b900
Block.getLargestComponent
armi/armi/reactor/blocks.py
Line 1253 in e08b900
Might need a new name? But also
Composite.getDimension
isn't abstract so it's not required that composites implement itComposite.getMass
armi/armi/reactor/composites.py
Line 888 in e08b900
Composite.getNuclideNumberDensities
armi/armi/reactor/composites.py
Lines 1235 to 1256 in e08b900
Little more complex because of the need for volumes but we've got a solution that might be acceptable
Composite.getFuelMass
armi/armi/reactor/composites.py
Line 2130 in e08b900
Would require
Component.getFuelMass
to be defined, but it's essentially trivialComposite.getBoundingCircleOuterDiameter
armi/armi/reactor/composites.py
Lines 3205 to 3216 in e08b900
Other
There are more places where
Composite.itercomponents
is called, and in some places it's probably okay. Calls likeComposite.getComponentNames
. These are just the cases we found needed to be changed to get a non-Component child of a block to play nice with mass reporting and the run sequence.Thankfully, because many of the most important actions are funneled through basically
getMass
andgetNuclideNumberDensities
, a lot of other great functionality is provided for freeFollow on
My hope is that we can send the
Compact
up for review end of next week. I can also send the patches we've made to places listed in a separate PR before putting theCompact
PR up.The text was updated successfully, but these errors were encountered: