Skip to content

Create OpenMC Materials from .son input

This implements the method for taking materials and blends and creating the corresponding OpenMC Material objects, and then writes that out to a material.xml file.

This has been updated to include methods for parsing the material information from the mixing_table produced by PyARC. This method can handle both mixtures of nuclides, elements, or a single component materials (see test for different cases). In the case that a wdens() of a single component is provided in a material definition (eg sodium in the test), the corresponding openmc input is converted to atom frac like the other inputs. Also, openmc has a temperature input for mixed materials that is not present in the PyARC blends. For the openmc temperature, I average the temperatures of the components weighted by their volume fractions. Note, that while an openmc materials.xml file is ultimately generated, I am testing for the properties of the objects generated in this code, not the file directly since the file creation is an openmc method.

Also included in this MR:

  • tests for the prerun material generation process, including a very bare minimum .son input file.
  • test for the precheck function (probably should have gone in the last MR)

Needed still:

  • handling for lumped_elements if included in the material definition. This information gets stored in the lumped_mixing_table rather than the mixing_table currently used in these methods. Since I still have not been granted access to the cluster to use MCC3, I don't have a good way at the moment to test anything with lumped elements. So that addition will come later.
Edited by Kiesling, Kalin Rose

Merge request reports

Loading