Group Constant File Generation With moltres_xs.py
Example problem: Godiva Sphere
In this tutorial, we demonstrate how to use OpenMC to generate group constants for Moltres using moltres_xs.py
.
The relevant files for this tutorial may be found in the godiva
tutorial directory. To run these input files and subsequent group constant generation scripts, the user must install OpenMC version 0.13.2 or later.
Step 1: Generating Group Constants with OpenMC
In this directory, there are 2 OpenMC input files for 900K and 1200K simulations: godiva_openmc_900.py
and godiva_openmc_1200.py
. Unlike Scale or Serpent, OpenMC does not have a notion of branches to generate group constants for different temperatures and burnups. Thus, separate input files for different temperatures is required.
The user must include the openmc_xs.generate_openmc_tallies_xml()
function in the OpenMC input file to generate a domain_dict
. The function sets up the OpenMC tallies required for the group constant generation. This is necessary because unlike Serpent, OpenMC does not generate all the group constant data with any simulation, the user must specify what they want. The user may define domains as either openmc.Material or openmc.Cell.
For this tutorial, we also provide the OpenMC output files obtained after running the input files: statepoint_900_openmc.100.h5
, statepoint_1200_openmc.100.h5
, summary_900.h5
, and summary_1200.h5
. Each OpenMC simulation generates a statepoint and summary file. Both output files are required for the group constant generation.
Step 2: Parsing OpenMC Output Files with moltres_xs.py
godiva_openmc.inp
is the input file that informs moltres_xs.py
how to parse the various OpenMC output files to generate Moltres group constants. The structure of the input file is as follows:
[TITLE]
*name of output json file*
[MAT]
*number of materials*
*names of materials listed*
[BRANCH]
*number of branches*
*material name* *temperature* *file index* *burnup index* *universe index* *branch index*
[FILES]
*number of files*
*statepoint file name* *openmc* *openmc input file* *summary file*
For OpenMC, since we do not utilize the burnup and branch indexes, users must indicate both index values as "1" so that moltres_xs.py
correctly parses the input file. For OpenMC, we also add additional openmc input files and summary files. The universe index must correspond to the material or cell id defined in the OpenMC input file.
To generate the Moltres group constants, the user runs: ` python ../../python/moltres_xs.py godiva_openmc.inp
` This will output
godiva_openmc.json
containing the Moltres group constants. An example of this output file can be found in ../../python/test/gold/godiva.json
.
OpenMC Group Constant Generation
This table outlines the OpenMC methods used by moltres_xs.py
to calculate the group constants for Moltres.
Group Constant | Description | OpenMC Tally Used | Units |
---|---|---|---|
BETA_EFF | Delayed neutron fraction | mgxs.Beta() | - |
CHI_T | Fission spectrum (total) | mgxs.Chi() | - |
CHI_P | Fission spectrum (prompt neutrons) | mgxs.Chi(prompt=True) | - |
CHI_D | Fission spectrum (delayed neutrons) | mgxs.ChiDelayed() | - |
DECAY_CONSTANT | Decay rate for delayed neutron precursors | mgxs.DecayRate() | 1/s |
DIFFCOEF | Diffusion coefficient multi-group cross section | mgxs.DiffusionCoefficient() | cm |
FISSE | Average deposited fission energy | mgxs.KappaFissionXS() / mgxs.FissionXS() | MeV |
FISSXS | Fission cross section | mgxs.FissionXS() | 1/cm |
GTRANSFXS | Scattering production XS Matrix | mgxs.ScatterProbabilityMatrix() * mgxs.ScatterXS() | 1/cm |
NSF | Fission neutron production cross section | nu-fission / flux | 1/cm |
RECIPVEL | Inverse neutron speed | mgxs.InverseVelocity() | s/cm |
REMXS | Removal cross section (out scatter + absorption) | mgxs.ScatterProbabilityMatrix() * mgxs.ScatterXS() + mgxs.AbsorptionXS() | 1/cm |
Serpent Comparison
We cross verified the group constants generated by OpenMC with group constants generated by Serpent. godiva_serpent
and godiva_serpent_res.m
are the Serpent input and output files for the Godiva sphere. godiva_serpent.inp
generates the group constants with moltres_xs.py
. Note the minor differences between godiva_openmc.inp
and godiva_serpent.inp
arising from the use of branch
and coef
cards to set up various reactor states at various temperatures in Serpent. Serpent condenses multi-temperature group constant data from the various branches into one *_res.m
output file.
The only difference in syntax format for Serpent-based *.inp
files lies in the [FILES]
section as follows:
[FILES]
*number of files*
*serpent _res.m file name* *serpent*
The group constant values generated by both Serpent and OpenMC are similar in values and orders of magnitude. The only notable difference is in the FISSE group constant value. Serpent outputs FISSE values of ~193 MeV, while OpenMC outputs FISSE values of ~202 MeV. A possible reason for this discrepancy is that Serpent includes neutrino energies while OpenMC does not.