openmc.MGXSLibrary

class openmc.MGXSLibrary(energy_groups)[source]

Multi-Group Cross Sections file used for an OpenMC simulation. Corresponds directly to the MG version of the cross_sections.xml input file.

Variables:
  • energy_groups (openmc.mgxs.EnergyGroups) – Energy group structure.
  • inverse_velocities (Iterable of Real) – Inverse of velocities, units of sec/cm
  • xsdatas (Iterable of openmc.XSdata) – Iterable of multi-Group cross section data objects
add_xsdata(xsdata)[source]

Add an XSdata entry to the file.

Parameters:xsdata (openmc.XSdata) – MGXS information to add
add_xsdatas(xsdatas)[source]

Add multiple xsdatas to the file.

Parameters:xsdatas (tuple or list of openmc.XSdata) – XSdatas to add
export_to_xml(filename='mgxs.xml')[source]

Create an mgxs.xml file that can be used for a simulation.

Parameters:filename (str, optional) – filename of file, default is mgxs.xml
remove_xsdata(xsdata)[source]

Remove a xsdata from the file

Parameters:xsdata (openmc.XSdata) – XSdata to remove