-
Notifications
You must be signed in to change notification settings - Fork 89
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
Use of custom isotopics with thermal expansion turned on does not correctly preserve mass #1818
Comments
I replicated the problem, the output from the test case shows that the component with custom isotopics is initialized to the same mass, specifically the info message for the application of custom isotopics is the same: However, the BOL mass report indicates the difference: So the error is occurring somewhere between component construction and the BOL mass report. Outputs attached. |
I am not stepping through the debugger, but the mass density of ~26 g/cc seems odd and is set here -
I feel like this message is saying something cryptic about the behavior where the density once set on the component is not being scaled with temperature changes, so when volume changes due to thermal expansion the density is not being reduced to conserve mass. Is the material class assigned when Custom Isotopics are assigned set to Line 27 in 41ce854
If so, the armi/armi/materials/material.py Line 213 in 41ce854
On my phone so I didn't run the example, but just adding some bread crumbs to look at. I'd need to get a single component isolated in |
Don't focus on the value of ~26, it is just some contrived example that I built with placeholder values. |
I understand now, thanks! Update - the material is |
The intent of that message is to indicate to the user that the base material density is not being changed, only the component that is using custom isotopics. So a second component using the same material but not the same custom isotopics will have a different density. |
@jakehader Even with #1822 the issue would persist, I think. The example blueprints have |
https://github.com/terrapower/armi/blob/main/armi/reactor/converters/axialExpansionChanger.py#L112 This line in the axial expansion changer is most likely what is increasing the density of the components. I talked with @albeanth , my understanding is that the axial expansion changer assumes the heights provided in the blueprints are for hot heights, so the cold density of the component is increased such that the expanded/hot density will match the input density. So, #1822 could fix this but I'm still confused as to why the axial expansion changer will always increase the density. The function linked above even states that it should only be called when the |
The axial expansion changer doesn't assume anything about the blueprints height. That assumption of hot heights in the blueprints is in the building of the blueprints (i.e.,
It only increases the number density to account for the cold heights. I.e., when
This isn't the best description, I agree. Rather, it should say "when the setting The confusion stems from 1) a lack of documentation 😞 , and 2) hacking together solutions to fit the legacy way of having hot heights in the blueprints. It'd probably be clearer to just pull the plug and refactor the blueprints system to have inputted heights in the blueprints match Tinput. That's just not something we've prioritized. |
Thanks for the clarification. Since blueprints assume hot densities, I'm more on board with the fix in #1822 until we do something like what is discussed at #767 (comment). I tested the fix in #1822 and the block masses come out the same for the 25C and 250C cases. The BOL mass report shows a discrepancy still, but that may be from having frozen sodium (the 25C case has more mass). Chris is going to be testing on a non-toy problem using #1822. |
Hi all - thanks for the discussion. I didn't intend #1822 to be the final solution but it peaked my curiosity. @bsculac - I know you originally made the PR that this ticket is about so you're welcome to take over the branch and we can think about a better way to resolve this without passing in a case setting down to the component construct method. I got to a similar conclusion as you and @albeanth did but didn't get to write down all the nuances so I'm glad you spoke about it and wrote it down. I think that assuming hot dimensions for blocks is a modeling choice and we have historically had this because there was no axial expansion consideration for ARMI until it was implemented. Now that it is, there may be benchmark edge cases where this modeling choice is still convenient. It's hard to say we should remove it but doing so would definitely simplify the logic for expansion and make documenting the behavior or intended behavior much more straight forward. Let me know if you'd like to drive that straw man PR / branch to closure or please provide me some feedback on how we can better account for this density scaling when |
@jakehader see #1824. Let's chat a little more about simplifying this beast 💪 |
#1745 added the ability to combine a custom isotopic density vector with the material properties of a material class. I reviewed that PR and thought that everything looked good, but now I've been trying to use it on a real case and I've found a problem with mass conservation.
It appears that the component properly thermally expands. But during the thermal expansion, the component's number density is not adjusted away from the value specified in
custom isotopics
definition. This means that the density and the volume of the component become out of sync with each other, and as the component expands it gains mass.I've attached a simple example input that you can use to reproduce the problem. It has only one single real component which uses a custom isotopic as well as a material class. Follow these steps to see the problem:
Tinput
==Thot
in the componentimport armi; armi.configure()
from armi.bookkeeping.db import databaseFactory
db = databaseFactory("anl-afci-177.h5", 'r')
with db: r = db.load(0,0)
r.core[0][0].getMass()
Thot: 250
db = databaseFactory("anl-afci-177.h5", 'r')
with db: r = db.load(0,0)
r.core[0][0].getMass()
These masses should be exactly equal, but they are not. I have tried the same thing without using a custom isotopic in the component definition to confirm that this is not a problem with the axial expansion routine itself, and the masses were the same in that case.
@bsculac @onufer
example.zip
The text was updated successfully, but these errors were encountered: