-
Notifications
You must be signed in to change notification settings - Fork 92
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
Make NuclideBases not global #473
Comments
We made a step in a direction where global nuclide bases are less bad than they used to be by adding more nuclides in #998. Unfortunately, the nuclide data is still global and the burn chain modifications still may occur when it's being imposed. I specifically added logging statements if a user overwrites any default parameter from the We can probably take this further still. |
This has reared it's head again, and will have to be put on the calendar for ARMI So, finally, I think we have enough interest to make this ticket happen. |
I notice that it is not just So, let's try to itemize the nuclide information that is currently in the global scope, and where (outside the nuclideBases
elements
thermalScattering
|
MaterialsI am a touch worried about the current state of ARMI materials because of this "global nuclides" situation. Currently, if you update the burn chain, all the global nuclides can be updated. Which means that the mass fractions of materials can be changed in the middle during a run? That is a dangerous idea in parallel unit tests. |
@aaronjamesreynolds @opotowsky And anyone else who is interested... I have a branch out now to start this this ticket: obliterate_global_nuclides. (To see the current state of the branch go here.) All these global will be moved into this new class: armi/armi/nucDirectory/nuclideBases.py Line 1470 in a76a238
Note the big table above. This is only the start. But merge freeze or not, I can start thinking about all this. |
This looks good @john-science. Are you thinking that this class would be instantiated on an application basis and then once the application is configured we can call through |
Well, at the moment, I am guessing the nuclides bases have to live on the That table shows where the nuclide bases are used. So, the usage of It is probable that no matter where I put the new object, there will have to be a some breaking changes (probably in the materials). BUT choosing a good place to put this new object will cut the work needed for this change down by 2x or even 10x. |
Two cents: Rationale: interfaces always have access to the reactor, not necessarily the application. And the app is already a global thing, so putting the nuclides there isn't really getting rid of global nuclides. It's just moving them. |
The directory in
nuclideBases
is global, which leads to considerable pain:collapseFissionProducts
andupdateYieldVector
methods within thefissionProductModel
.So, we should be thinking of another place for this to live, and spin up an object containing the valid nuclides for that scope. Reactor? Case? Somewhere else? Even a global database that is actually an object instead of a magical singleton-esque horror would be better than it is now. Also, if it is mutable beyond the initial setup with a burn chain, then we need to think about how to recover it's state from the database.
The text was updated successfully, but these errors were encountered: