-
Notifications
You must be signed in to change notification settings - Fork 24
Tracking Initial Material Compositions Through ALARA #222
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
base: main
Are you sure you want to change the base?
Conversation
gonuke
left a comment
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 think this all looks OK. I am not sure if there is a reason you chose to store this all in atoms/kg rather than atoms/cm3.
I think this is another opportunity to think about breaking things like this up into more PRs. I guess there is a desire to make sure things don't break due to one PR. That may be a motivation for a feature branch, with individual PRs into that feature branch.
| double density = ptr->totalDensity; // g/cm^3 | ||
|
|
||
| // Calculate number density in atoms/kg | ||
| double nd_per_kg = 0.0; | ||
| if (density > 0.0) | ||
| nd_per_kg = nd_cm3 * 1e3 / density; // atoms/kg | ||
|
|
||
| // Store the pre-irradiation ND in this root | ||
| root->setPreIrradND(ptr, nd_per_kg); |
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 think it's probably OK to store it in atoms/cm3 and not convert to atoms/kg.
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'm not sure if I agree with that. Having made the change and testing it over all of the elements again, I'm seeing a 3-4 order of magnitude lower value in the pre-irradiation number densities as compared with the shutdown total number densities. I don't think that result is explainable from the physical response to the neutron flux just given the sheer order of magnitude change, but rather that it would not be computing the right value at all (see the comparison in the two charts below, with the first being the current code, the second being the code that would store it in atoms/cm3):
c7a-d14f-4bd4-8410-ba667072bdda" />
I put both with a log scale for the vertical axis for easier visualization.
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 think this just means we need to be more careful with which units we are comparing/recording. It shouldn't matter what units we use, if everything is consistent. My suggestion to use atoms/cm3 is just that this is a more common/natural unit.
Closes #200.
Closes #201.
This PR introduces some minor changes to the ALARA source code to calculate the initial number densities of the nuclides contained in the initial material compositions provided by the input file. Other response variables are also tracked at this pre-irradiation "time" (which is not strictly a singular time on the axis of cooling times, where shutdown would still correspond to t=0, but rather the static state before any neutron irradiation).
In response to these changes in the format of ALARA's output tables, updates are also made to processing and plotting modules in
tools/alara_output_processing/to both handle necessary data formatting adjustments (such as defining an imagined time of-1for the pre-irradiation state to be able to filter times numerically still, even for an unconventional time metric like this), as well as implementations for appropriate physical plots (such as mandating that negative times are not included in time plots).An interesting thing that I found when verifying my work to make sure that my methods were handling these calculations correctly was in looking at the increase in number density for each element in single element irradiation simulations run within
ALARAJOYWrapper/alarajoy_QA_notebook.ipynb. Here are two plots of the percentage increase in total number density after irradiation as compared to the initial number density vs atomic number, for all elements with activation data in FENDL2:Some notes and observations: