-
Notifications
You must be signed in to change notification settings - Fork 2
OpenMC-only R2S Transport & Depletion #30
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.
Thanks @anu1217 - just one high-level comment on reusing the code in the OpenMC input file that relies on ALARA
Replacing with updated version that can also perform PyNE R2S
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've left several final (?) comments. We can probably move on from here to start focusing on comparing results.
WC_Layers/OpenMC_R2S.py
Outdated
| if str(mat.id) in activated_mats_list : | ||
| mat = results[-1].get_material(str(mat.id)) | ||
| energy = mat.get_decay_photon_energy() |
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.
This might be a good place for a little function
energy = get_decay_photon_energies(mat, results[-1])
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.
Could you elaborate on the benefit of doing this? get_decay_photon_energy() is also an openmc function, not my own
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.
Good question... (especially since I had to think about it myself to answer your question...)
Two motivations:
-
It isolates the details of the logic behind checking if a material is in the activated material list and then extracting the right piece of the results, thus lowing the cognitive burden of understanding the bigger picture of what's going on here.
-
That method could return
Noneif either the material wasn't in the activated materials list or if the energy wasNoneand then I think you could collapse the conditional clause somewhat
- Generalize make_settings() to take source as input instead of neutron_source - Call make_settings() twice to assign neutron settings and photon settings separately - Rearrange some .export_to_model_xml() calls
- Added new functions import_ext_model(), make_native_model(), run_pyne_r2s(), run_openmc_r2s() to simplify logic executed in main() - Modify argparse options - Remove args.photon_transport condition for OpenMC R2S (always run all R2S steps)
…llow flux beyond initial geometry
…o query unstructured mesh
This PR contains a script that performs all the necessary R2S physics steps using only OpenMC. It works as intended for the model with W and C spherical shells, and works with some modifications for the HCPB model. The latter may also require some variance reduction that could be hard-coded into the script, or perhaps selected using argparse.