Skip to content

Add the ability to build cross_sections.xml files from multiple nuclear data libraries #20

Closed

Description

@tim-fry

This issue is added in response to a requirement from @shimwell and @ukaea.

Currently cross_sections.xml files are based on a single library (e.g. TENDL or FENDL) but it would be useful if “hybrid” cross section xml files can be built by combining several libraries. An order of preference would be needed to decide which cross section h5 file is used if the isotope is available in both libraries (e.g combine TENDL and FENDL using FENDL as a priority). The python script should be a command line tool that accepts arguments for library xml files to combine.

I'm planning to create a script which requires 2x arguments:

  • A list of existing libraries (referenced by path) from which to create the combined library, in order or preference
  • A name/path to use for the new library

The script will locate and parse the cross_sections.xml files from each of the chosen libraries, sort the combined list of unique entries to create a combined library object and then output a new cross_sections.xml as per the existing convert/generate scripts. The .h5 files will be copied from each library folder as required (rather than parsing and exporting them).

Any suggestions or thoughts would be much appreciated.

Activity

  1. shimwell commented on Feb 6, 2020

    @shimwell
    Member

    This sounds great and will be super use full for those of us using mixed cross section libraries.

    At the moment I used the nndc script to make cross_sections.xml which includes neutrons and photons and then I splice this with other scripts to get a combined cross section.xml will all the isotopes used in the problem.

    I look forward to giving this a go when ready

  2. shimwell commented on Nov 11, 2020

    @shimwell
    Member

    Ah I should have marked this as done a while back, sorry for the delay.

    For anyone reading this the combine_libraries script allows combined cross_setions.xml files to be made.

    Here is an example which would combine fendl, nndc and tendl (assuming you have them downloaded) and make a nice combined combined_cross_sections.xml which contains all of them in the input order

    cd ~/data
    python3 combine_libraries.py -l fendl-3.1d-hdf5/cross_sections.xml nndc-b7.1-hdf5/cross_sections.xml tendl-2019-hdf5/cross_sections.xml -o combined_cross_sections.xml
    OPENMC_CROSS_SECTIONS=~/data/combined_cross_sections.xml
    echo 'export OPENMC_CROSS_SECTIONS=~/data/combined_cross_sections.xml' >> ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions