Replies: 2 comments 3 replies
-
I have been shouted down on this several times, but several people. While I tend to agree with you, many of our users fiercely defend the shuffle logic being contained in an external "shuffle.py" file. Just a head's up. |
Beta Was this translation helpful? Give feedback.
-
Devil's advocate -- Who says that we need to be able to reproduce an analysis given only a database? Speaking broadly, I would not say that is what is expected of calculations of record. A calculation can have multiple files that work in tandem, and this is very common. I also wouldn't single out the shuffle logic file here. At the risk of ruining my own life, I will point out that there are other files that can do stuff during an ARMI run. You can point to a custom material class, for instance. |
Beta Was this translation helpful? Give feedback.
-
I've been poking around the fuel handler interface and how it enables shuffling and rotation. And I have two suggestions in mind.
Traceability on shuffle logic
The shuffle logic script is the python file loaded by the settings that exposes some class that performs the fuel handling. Namely it implements logic to move assemblies around, discharging and creating fresh assemblies as necessary. I gather it's intended to be totally bespoke for each group.
But that shuffle logic file is, as far as I can gather, not stored in the database. That means it's impossible to re-produce someone's analysis just from the database. We store the blueprints and settings files but nothing related to the shuffle file.
Some thoughts
2 is probably the easiest, but it also feels like a security problem waiting to happen. Now you've got a binary file (database) that is producing a python file that is executed (potentially) without any user intervention. This could probably be mitigated by storing some checksum but it still gives me pause.
1 means the default FuelHandlerInterface that is shipped with ARMI won't work because it won't know how to shuffle assemblies. But that's kind of already the default state given we require people to bring their own shuffle logic file. 1 also means groups can have better version control over their shuffle logic, but it may be slower to test out new strategies. But maybe that encourages groups to have code review on their shuffle logic if that gets elevated in importance: not a throwaway script but an interface-level object.
Rotation
The rotation algorithm so far must be a function that is importable directly from the rotation algorithms submodule
armi/armi/physics/fuelCycle/fuelHandlers.py
Lines 115 to 120 in 864106e
(I don't like that try/except pattern but that's for a later time)
This means that groups attempting to develop their own rotation algorithm must make changes to the ARMI framework in order to have those picked up by the fuel handler. Additionally, the rotation is only fired if flux recon is active, which is 1) not documented as far as I am aware, and 2) not something that is facilitated by the open-source framework.
I propose we make the (functionally abstract)
FuelHandler
that is shipped in the framework more extensible for rotation. In that I mean we pull out that rotation code to a separate method that subclasses can override. Just like shuffling logic is tailored to a specific reactor and benefits from parameters defined within and without the public framework, one may expect rotation to require similar data.The layout I have in mind looks similar to
Beta Was this translation helpful? Give feedback.
All reactions