Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Including cross_section.xml path in model.xml #3197

Open
shimwell opened this issue Nov 13, 2024 · 0 comments
Open

Including cross_section.xml path in model.xml #3197

shimwell opened this issue Nov 13, 2024 · 0 comments

Comments

@shimwell
Copy link
Member

Description

currently setting the cross section either using
openmc.config or material.cross_sections or environmental variable does not result in the information on where to find the cross sections being written to the model.xml

So running a python script where cross section is set then running openmc executable on the model.xml and this error is caused.

ERROR: No cross_sections.xml file was specified in materials.xml or in the
        OPENMC_CROSS_SECTIONS environment variable. OpenMC needs such a file to
        identify where to find data libraries. Please consult the user's guide
        at https://docs.openmc.org/ for information on how to set up data
        libraries.

Perhaps when the cross section on the material object is set then this could also be written to the model.xml file and materials.xml

Then perhaps some other changes and openmc executable could find the cross sections.

Alternatives

Move the openmc.config to the settings object so that the cross section path is written out in the settings part of the xml

Compatibility

I think generally this would improve user experience when running from python or with the openmc executable.

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

No branches or pull requests

1 participant