2.2.1. Introduction to Cross Sections

OpenSn does not provide a cross-section library. Users must supply cross-section data or generate it with a tool such as NJOY, Dragon, or OpenMC. In Python, multigroup cross-section data is represented by MultiGroupXS.

The tutorials in this section demonstrate three creation and input paths:

  • CreateSimpleOneGroup() constructs an isotropic one-group cross section from a total cross section, scattering ratio, and optional group velocity.

  • LoadFromOpenSn() reads OpenSn’s ASCII cross-section format for one-group or multigroup data.

  • LoadFromOpenMC() reads a named dataset and temperature from an OpenMC-generated HDF5 cross-section library.

The Python API also provides LoadFromCEPXS() for CEPXS files. Once loaded, cross sections can be combined with Combine() or modified in place with Scale().

See the Python API reference for constructor arguments, available data properties, and method behavior.

2.2.1.1. Where to get cross-section data

OpenSn does not distribute cross-section data of its own, so generating a suitable multigroup library is left to the user. A couple of third-party, open-source tools are well suited to this:

  • OpenMC, a Monte Carlo particle transport code whose MGXS module can generate multigroup cross-section libraries that OpenSn imports directly (see pyopensn.xs.MultiGroupXS.LoadFromOpenMC()).

  • Generate_MGXS, a small utility built on top of OpenMC for quickly generating multigroup cross sections for use with OpenSn. It produces MGXS data for representative neutronic environments (homogeneous problems, nested boxes, or nested cylinders) using fixed-source or eigenvalue OpenMC calculations, and it includes simple OpenSn/infinite-medium verification and plotting tools. The resulting OpenMC MGXS files can be loaded directly into OpenSn.