An open source utility to convert various publicly available macroscopic nuclear cross section formats.
This converter takes one of several different input XS formats and converts them to one of several different output XS formats.
To compile OpenXSConverter, navigate to the source folder and then make the converter by typing:
>> make
A successful compilation of OpenXSConverter will conclude with the line:
>> mv ./OpenXSConverter.exe ../
To run OpenXSConverter, simply invoke the OpenXSConverter binary and follow it immediately with the XS input file followed by the XS output format (where <xs_in>
is the name of the XS input file, <out_form>
is the output format, and <pn_ord>
is the
>> <path_to_OpenXSConverter>/OpenXSConverter.exe <xs_in> <out_form> <pn_ord>
The output file will be titled <xs_in>_<out_form>.out
unless the output is for an HDF5 format (such as OpenMC cross sections), in which case it will be of the form <xs_in>_<out_form>.out.h5
.
Note that if the optional parameter <pn_ord>
is given, then that is the <pn_ord>
is greater than the scattering order available in the input file, then OpenXSConverter will throw a warning message and default to the scattering order available in the input file, if it is not given then OpenXSConverter will similarly default to he maximum available scattering order in the input file.
Currently, the OpenXSConverter only supports the following input/output formats:
- Input formats:
- Serpent Version 2 multigroup XS output
- THOR XS format.
- OpenMC XS HDF5 formatted cross sections generated by OpenMC.
- Output formats:
-
THOR
- THOR XS format. -
OpenMC
- Creates an initial Python script for running with OpenMC. This script only contains the commands to create and use the cross sections so the user must either add it to an existing OpenMC script, or create one with this initial baseline by adding geometry, settings, etc. -
MCNP
- MCNP multigroup XS input format. Note that the MCNP format uses 20 equi-probable cosine bins for anisotropic scattering, so the$P_n$ scattering approximation will not be perfectly preserved. -
MPACT
- MPACT Macroscopic multigroup XS input format.
-
NOTE: Anisotropic MCNP output seems to be working, however it does not match well with anisotropic OpenMC for the same XS, so caution should be used trusting it. Isotropic MCNP output however does seem to match well.
There are also plans to add the following formats for input as well:
- MPACT/VERA.
The folder examples
contains an example of an OpenMC generated cross section, example.h5
, that has been converted to both OpenMC input, example.py
, as well as THOR cross sections example.xs
.
These cross sections are from a nonphysical 5 cm sphere of 1 kg/cm3 pure U235 surrounded by another 5 cm of 1 kg/cm3 hydrogen.
These particular cross sections have 3 energy groups and