Skip to content
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

Feature request: Add support for temperatures #13

Open
shimwell opened this issue Jun 7, 2024 · 2 comments
Open

Feature request: Add support for temperatures #13

shimwell opened this issue Jun 7, 2024 · 2 comments

Comments

@shimwell
Copy link

shimwell commented Jun 7, 2024

Thanks for making this package Paul

I've been trying to make use of endf.IncidentNeutron instead of openmc.IncidentNeutron for a plotting package I'm working on.

The first feature that appears to be different is the temperature attribute.

import openmc
openmc_neutron = openmc.data.IncidentNeutron.from_ace('neutron_file/Li/006/lib/endf/Li006-n.ace')
openmc_neutron.temperatures
>>>['293K']

import endf
endf_neutron = endf.IncidentNeutron.from_ace('neutron_file/Li/006/lib/endf/Li006-n.ace')
endf_neutron.temperatures
>>> AttributeError: module 'endf' has no attribute 'temperature'. Did you mean: 'temperature_str'?

Just wondering if adding temperature is on the roadmap

@shimwell
Copy link
Author

shimwell commented Jun 7, 2024

looks like one can access the temperatures with this code

endf_neutron = endf.IncidentNeutron.from_ace('neutron_file/Li/006/lib/endf/Li006-n.ace')
reactions=endf_neutron.reactions[1]
temperatures=list(reactions.xs.keys())

So perhaps we could just add a getter to the IncidentNeutron class

@shimwell
Copy link
Author

shimwell commented Jun 7, 2024

If we do add tempertures then we could perhaps also sneak in IncidentNeutron.kTs which is in the openmc.IncidentNeutron and is the temperture in eV

Also openmc.IncidentNeutron.energy makes use of temperatures for the keys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant