-
Notifications
You must be signed in to change notification settings - Fork 179
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
OpenMC mat fix #1076
OpenMC mat fix #1076
Conversation
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.
OpenMC does need you to expand elements before writing XML. The only cases where it accepts elemental data is if the nuclear data library itself uses elemental data. The most common example is carbon which has historically been given as an elemental evaluation (although evaluations for C12 and C13 have now become available in ENDF/B-VIII.0). Other than carbon, everything else should probably be split out into nuclides. The way we handle this in OpenMC's Python API is to look at the user's OPENMC_CROSS_SECTIONS
environment variable to figure out what data they actually have available. Not sure you'd really want to have that kind of logic here though...
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 OK to me, but I don't know anything about OpenMC formats
Welp. That was rather silly of me. I ran into that carbon issue when converting a DAGMC model and generalized it without looking more closely. I'll include a corner case for carbon for now. |
Ignoring Carbon for expansion in the OpenMC material writer.
I've updated the writer and added the option of passing a set of nucids to ignore in |
pyne/material.pyx
Outdated
|
||
Parameters | ||
---------- | ||
nucset : set, optional |
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.
Indentation looks like it got messed up here (and below as well)
pyne/material.pyx
Outdated
"""expand_elements(self) | ||
Exapnds the elements ('U', 'C', etc) in the material by replacing them | ||
with their natural isotopic distributions. This function returns a copy. | ||
Exapnds the elements ('U', 'C', etc) in the material by |
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.
Typo: Exapnds
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 good to me now!
Any further comments @gonuke? |
Already approved... |
This PR updates OpenMC material writing in the following ways:
It adds tests which: