-
Notifications
You must be signed in to change notification settings - Fork 94
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
Allow axial expansion related classes to be more extensible #1918
Comments
Whatever you end up implementing here (I did not read this ticket in extreme detail), please make sure you consider this PR: #1376 That PR was closed because for whatever reason we haven't pulled the trigger on it, and it became stale. But we very much intend to merge it or something similar to it into the framework in the near future. Maybe file that under your "Other considerations" section above. |
@keckler don't you worry! It'll come back |
I think this will introduce functionality to help improve / extend the component linking. I'll make a comment on the changes I think will be useful and we can chat about some solutions or workarounds |
@drewj-tp what you propose for computing the thermal expansion factors sounds good to me. for assembly axial link check -- if you are proposing splitting up for the data class -- sure. Yeah, that would be nice. You are effectively replacing the 0/1 indexing for lower/upper; which is undoubtedly more readable. |
I'm working on some internal axial expansion work and finding myself needing to modify some of the functionality on the base class. In some cases I can call
super
and be good, but in other places I need a bit more control. I've got some partially developed code that I wanted to present in a ticket before fully submitting the PR. Estimating 10/6 for draft PR.ExpanionData.computeThermalExpansionFactors
One example is modifications to how
ExpansionData
computes expansion factors for a given component. The current logic for this method is fully encased in a single methodarmi/armi/reactor/converters/axialExpansionChanger/expansionData.py
Lines 174 to 190 in 34619df
but there isn't a simple way to drop in more bespoke expansion into this method without rewriting the entire routine. So, I propose cracking this method specifically into one primary method and two helper methods, more or less like
Assembly axial link check
The logic for determining if two components are axially linked is vital for determining how the tops and bottoms of blocks move through expansion. This logic is performed in
_determinedLinked
and isn't really overridable from withinarmi/armi/reactor/converters/axialExpansionChanger/assemblyAxialLinkage.py
Lines 186 to 200 in 34619df
I propose a staticmethod that points back to that function. Subclasses can use or override this method if they need additional logic for determining component linking.
Small data class for axial links
The data structure for the linking between blocks and between components is
dict[T, list[T | None, T | None]]
so there's lines likearmi/armi/reactor/converters/axialExpansionChanger/axialExpansionChanger.py
Line 325 in 34619df
where it may not be immediately clear (outside of some neighboring comments) what position
[0]
in this returned value represents.I would like to add a small dataclass like
(type
T
standin) that would make that above code snippet (and others) look likethat's more readable in my opinion.
Other considerations
getSolidComponents
since we mostly use it for iteration - Provide more Composite.iter* methods #1915The text was updated successfully, but these errors were encountered: