-
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
Adding support for ex-core structures #1891
Conversation
I think I was going along the lines of more general would be more flexible. If you have a crazy reactor setup with two cores, then you would be forced into modeling one core as the |
Sure, we could do something more like this: class Recctor:
# ...
def __getattr__(self, key):
try:
return self.__dict__[key]
except KeyError:
if key in self.excore:
return self.excore[key]
else:
raise
def __setattr__(self, key, value):
try:
self.__dict__[key] = value
except KeyError:
if key in self.excore:
self.excore[key] = value
else:
raise This allows Though I still think |
Want to clarify that I am not likely going to be an immediate user nor stakeholder of this feature so take my suggestion w/ a grain of salt. Not a requirement |
@drewj-tp @jakehader @alexhjames I guess encapsulation is my goal here:
I mean, I can make And I'll have to check that no one tries to over-write the method Or, in code you could set There would just be so much error checking where I need to list every single time anyone adds or touches any method or attribute on a |
There is at least one place in our benchmarks that will need to be migrated due to this change. We used to allow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First off, thank you for all of this effort. This is definitely a step in the right direction. A few comments beyond those left in the code:
- This implementation seems to assume that any ex-core thing will be grid-like. But probably there are only so many things that might actually be like that, and something more flexible might be needed in the future. This is not a problem for this PR, more so a seed for future work.
- There are a lot of places where we do a check to make sure that an SFP exists. But as noted by one of the comments that you added, ARMI right now is adding an SFP by default. So maybe those checks are unnecessary?
- I support the decision to stash everything under
r.excore
instead of making them attributes onr
directly. I think this makes sense. One comment that Alex brought up is about the possibility of having twoCore
s, and then one of them would have to live underexcore
which is weird. While I agree with this, I also think that storing twoCore
objects on a singleReactor
doesn't make much sense from a traditional viewpoint. IfReactor
were insteadPlant
, then maybe I'd agree more with Alex. - There is a lot going on here. While everything appears to look good, I will not be at all surprised if this breaks some stuff in my workflow. Oh well.
Co-authored-by: Chris Keckler <[email protected]>
Co-authored-by: Chris Keckler <[email protected]>
@john-science Test this downstream before merging. |
* origin/main: Relaxing copyInterfaceInputs to not require a valid Setting (#1934) Moving C5G7 into its own test dir (#1941) Transposing pinMgFluxes so that the leading dimension represents pin index (#1937) Moving Core class to its own module (#1938) Removing unusable buildEqRingSchedule (#1928) Raising Error when loading inconsistent data from DB (#1940) Ensuring we only calculate smear density for pinned blocks (#1933) Update rotation requirement impl, tag links: Hex specific (#1936) Adding support for ex-core structures (#1891) Fixing edge case in assemblyBlueprint._checkParamConsistency (#1929)
What is the change?
Added initial support for ex-core structures in ARMI.
SpentFuelPool
logic was rolled into the newExcoreStructure
class.AssemblyList
class was removed.The ARMI
Reactor
class used to have two children that were also attributes:r.core
andr.sfp
. Now it has two children that are also attributes:r.core
andr.excore
. Andr.excore
is currently a dictionary where keys map to an arbitrary set of ex-core objects:r.excore["sfp"]
r.excore["ivs"]
r.excore["evst1"]
But, for convivence, you can also access these like attributes:
r.excore.sfp
r.excore.ivs
r.excore.evst1
Why is the change being made?
Thus far, ARMI has really only provided a data object model for the Reactor core (and also a default spent fuel pool). The large teams that model and analyze nuclear reactors will also want to model ex-core structures for fuel handling and mechanical analysis reasons.
Checklist
doc
folder.pyproject.toml
.