Replies: 3 comments 1 reply
-
Some thoughts in #1896 (reply in thread) about |
Beta Was this translation helpful? Give feedback.
-
If you load the C5G7 test reactor and grab an assembly, you get a hilariously large number of pins >>> r = armi.init(fName="armi/tests/c5g7/c5g7-settings.yaml").r
>>> fuelBlock = r.core[0][0]
>>> fuelBlock.getNumPins()
528 In that model, there are two clad components per lattice site armi/armi/tests/c5g7/c5g7-blueprints.yaml Lines 86 to 114 in c6f46e5 So you double count the sites. There are 17x17 total lattice sites, some of which are empty, so the upper bound on "real" pins is 289 |
Beta Was this translation helpful? Give feedback.
-
Potential solution that came out of a chat w/ @john-science: What if we made a
That allows us to provide an answer to the question of "what is a pin, even?" Getting thoughts out of my head real quick:
|
Beta Was this translation helpful? Give feedback.
-
tl;dr what is a pin even?
getNumBlocks
armi/armi/reactor/blocks.py
Lines 1066 to 1079 in 59c392c
does what it says it does
Flags
.However, there are some small edge cases that tripped me up that I'll present with this example based off the MHTGR input (#224)
mhtgr_get_pins.py
For the first go, none of the pins have the
Flags.PIN
flag. Partially because this was new to me as of today. But also, because I cannot find any examples of this flag being in any blueprint file in any repository I can access. Not to say the magic auto-assignment of flags doesn't pick that up. It's just not something I'd seen before.Without
Flags.PIN
,getNumPins
returns 210 pins. There are 210 things with the fuel flag (one comp with multiplicity of 210) and that is the largest number in the list of "multiplicities of circles with a certain flag." This does not equal the number of "lattice sites with circular objects" that I may consider to be pins.Adding the
Flags.PIN
to every component andgetNumPins
returns 314, or what I put down as the expected number of pins (fuel + burnable poison + coolant) from the start.Problems?
If you only have one type of thing on your hexagonal lattice, and it has one of the special flags, you're fine. But, as soon as you have mixed things, this could break down. Or if you always include
pin
in the flags portion of a component definition for things you'd like to be flags, you're also good.We use
getNumPins
to determineBlock.p.pinLocation
armi/armi/reactor/blocks.py
Line 1939 in 59c392c
If this count is wrong,
pinLocation
vector is going to have the wrong number of elements. SincepinLocation
reflects the ARMI-numbering of where that pin is in space, solvers that usepinLocation
to place data likepinPowByPin
in 2d space will incorrectly place data.What to do?
Some thoughts on how we could improve this.
What is a pin? Do fluids count?
This was a choice I made in the model above: the coolant channel in the mhtgr example is a pin.
Flags.COOLANT
is not listed in the magic list of flags that could be a pinarmi/armi/reactor/blocks.py
Lines 53 to 61 in 59c392c
But neither is
Flags.POISON
. A burnable poison compact has a much stronger argument for being a pin than coolant. Same for (imho) a shield component.More advanced logic
Circles should be pins. That makes sense. Could we look at the dimensionality of the circles and see if any have coincident inner and outer diameters? Then fuel + clad would align and be one pin. But how would you capture two different materials surrounded by the same sized cladding cylinder?
Spatial grid
If a
HexBlock
has a hexagonal spatial grid attached to it, it seems like a straightforward argument to look at all the things that live on that spatial grid. Maybe that have one of the pre-determined flags. But that feels more explicitRelated
getNumPins()
misinterprets some non-pinned blocks as having pins #1096Beta Was this translation helpful? Give feedback.
All reactions