-
Notifications
You must be signed in to change notification settings - Fork 87
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
Improve Flexibility Of Component Temp Mapping + Bug Fix With Radial NDens Update #845
Improve Flexibility Of Component Temp Mapping + Bug Fix With Radial NDens Update #845
Conversation
- Split off assigning a temperature to an actual component from updateComponentTempsBy1DTempField - this allows one to manually assign a temperature to a component - also adding an optional argument to `updateComponentTemp` to update the number densities on the component to account for radial expansion/contraction
- adding unit test for updateComponentTemp to keep coverage up
@mgjarrett I would appreciate a review from you as well! |
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.
Looks great. Code coverage is a go. I think I understand all the changes, too, which means I might be getting somewhere above 0% understanding the axial expansion features.
I also think the PR is still single-purpose. I mean, you need the new parameter for the new method. Two features, single purpose, and @john-science won't inhale any seawater over this.
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.
I still thing that we need a test that demonstrates that densities/number of atoms/masses are being preserved under the conditions when updateNDensForRadialExp
is set to True. Since the default has been changed to True for considering radial thermal expansion, I am not sure how the existing tests fit into this. My understanding from @albeanth is that the tests were only written w.r.t. demonstrating the axial thermal expansion in isolation (i.e., updateNDensForRadialExp
is False), so where in the tests are we maintaining these checks as wells as introducing new tests for updateNDensForRadialExp
set to True
?
I'd like to see a single assembly test under both of these conditions as well as some checks on block-wise masses and even volume fractions. I'd also like to see a test that demonstrates this in conjunction with the use of b.setPitch
. It seems that if we update the temperature of the block's _pitchDefiningComponent
then there needs to be a process where the pitch is either updated automatically, or it should be very clear if the user needs to do this.
@onufer suggested a very similar unit test last week, which was the impetus for #846.
Block-wise masses are only conserved for target components; this is tested in Other components do not have mass conserved. Either mass or density can be conserved for non-target components, but not both. It was initially implemented as mass, but #846 is changing it to density, which was the original plan. Mass is still conserved over the full assembly, which is tested here: I don't know of a test that verifies volume fractions are conserved. This would probably be a good add. We also don't have any test to verify number densities after using |
@mgjarrett thanks for taking on the response to @jakehader !
This is true. We do not have any tests to verify volume fractions. In the interest of atomic PRs, this feels worthy of a separate issue + PR. I can take this on.
This is also true. This feels like it should be in |
I vote enthusiastically for the multiple-PR approach, since they will be easier to review and this PR is needed with some urgency for a plugin |
This looks good! As for testing the pitch or tying pitch changes to a specific component this is outside of the scope of this change. I grepped around the code and don't see any tests for Line 2143 in 86dc4d8
For example:
I want to just check that (1) the pitch change is being propagated correctly at that there are tests for this and (2) that the pitch change with thermal expansion doesn't run into issues if it is called after the axial expansion changer and that the results are correct in terms of changes in masses and volume fractions of each component (see: I will make a new issue to work on based on this comment and then land this! |
…Dens Update (terrapower#845) - Split off assigning a temperature to an actual component from updateComponentTempsBy1DTempField - this allows one to manually assign a temperature to a component - also adding an optional argument to `updateComponentTemp` to update the number densities on the component to account for radial expansion/contraction
Description
This PR has two features (I know it bends the rules a little bit):
updateComponentTemp
.updateNDensForRadialExp
.True
by default to provide consistency with other ARMI functionality that updates component temperatures.c.getArea(cold)
expectscold
to be a boolean, not a value. The bug never reared its head as a float was passed intogetArea
(floats evaluate as True). However it is corrected here with the introduction of allowing number densities to be updated for radial expansion/contraction.Checklist
- There are technically 2 but they go hand in hand.
doc
folder.setup.py
.