openmc.Settings

class openmc.Settings[source]

Settings file used for an OpenMC simulation. Corresponds directly to the settings.xml input file.

Variables:
  • run_mode ({'eigenvalue' or 'fixed source'}) – The type of calculation to perform (default is ‘eigenvalue’)
  • batches (int) – Number of batches to simulate
  • generations_per_batch (int) – Number of generations per batch
  • inactive (int) – Number of inactive batches
  • particles (int) – Number of particles per generation
  • keff_trigger (dict) – Dictionary defining a trigger on eigenvalue. The dictionary must have two keys, ‘type’ and ‘threshold’. Acceptable values corresponding to type are ‘variance’, ‘std_dev’, and ‘rel_err’. The threshold value should be a float indicating the variance, standard deviation, or relative error used.
  • source (Iterable of openmc.Source) – Distribution of source sites in space, angle, and energy
  • output (dict) – Dictionary indicating what files to output. Valid keys are ‘summary’, ‘cross_sections’, ‘tallies’, and ‘distribmats’. Values corresponding to each key should be given as a boolean value.
  • output_path (str) – Path to write output to
  • verbosity (int) – Verbosity during simulation between 1 and 10
  • statepoint_batches (Iterable of int) – List of batches at which to write statepoint files
  • statepoint_interval (int) – Number of batches after which a new statepoint file should be written
  • sourcepoint_batches (Iterable of int) – List of batches at which to write source files
  • sourcepoint_interval (int) – Number of batches after which a new source file should be written
  • sourcepoint_separate (bool) – Indicate whether the souce should be written as part of the statepoint file or on its own
  • sourcepoint_write (bool) – Indicate whether the source should be written at all
  • sourcepoint_overwrite (bool) – Indicate whether to
  • confidence_intervals (bool) – If True, uncertainties on tally results will be reported as the half-width of the 95% two-sided confidence interval. If False, uncertainties on tally results will be reported as the sample standard deviation.
  • cross_sections (str) – Indicates the path to an XML cross section listing file (usually named cross_sections.xml). If it is not set, the OPENMC_CROSS_SECTIONS environment variable will be used for continuous-energy calculations and OPENMC_MG_CROSS_SECTIONS will be used for multi-group calculations to find the path to the XML cross section file.
  • multipole_library (str) – Indicates the path to a directory containing a windowed multipole cross section library. If it is not set, the OPENMC_MULTIPOLE_LIBRARY environment variable will be used. A multipole library is optional.
  • energy_grid ({'nuclide', 'logarithm', 'material-union'}) – Set the method used to search energy grids.
  • energy_mode ({'continuous-energy', 'multi-group'}) – Set whether the calculation should be continuous-energy or multi-group.
  • max_order (int) – Maximum scattering order to apply globally when in multi-group mode.
  • ptables (bool) – Determine whether probability tables are used.
  • run_cmfd (bool) – Indicate if coarse mesh finite difference acceleration is to be used
  • seed (int) – Seed for the linear congruential pseudorandom number generator
  • survival_biasing (bool) – Indicate whether survival biasing is to be used
  • weight (float) – Weight cutoff below which particle undergo Russian roulette
  • weight_avg (float) – Weight assigned to particles that are not killed after Russian roulette
  • entropy_dimension (tuple or list) – Number of Shannon entropy mesh cells in the x, y, and z directions, respectively
  • entropy_lower_left (tuple or list) – Coordinates of the lower-left point of the Shannon entropy mesh
  • entropy_upper_right (tuple or list) – Coordinates of the upper-right point of the Shannon entropy mesh
  • trigger_active (bool) – Indicate whether tally triggers are used
  • trigger_max_batches (int) – Maximum number of batches simulated. If this is set, the number of batches specified via batches is interpreted as the minimum number of batches
  • trigger_batch_interval (int) – Number of batches in between convergence checks
  • no_reduce (bool) – Indicate that all user-defined and global tallies should not be reduced across processes in a parallel calculation.
  • threads (int) – Number of OpenMP threads
  • trace (tuple or list) – Show detailed information about a single particle, indicated by three integers: the batch number, generation number, and particle number
  • track (tuple or list) – Specify particles for which track files should be written. Each particle is identified by a triplet with the batch number, generation number, and particle number.
  • ufs_dimension (tuple or list) – Number of uniform fission site (UFS) mesh cells in the x, y, and z directions, respectively
  • ufs_lower_left (tuple or list) – Coordinates of the lower-left point of the UFS mesh
  • ufs_upper_right (tuple or list) – Coordinates of the upper-right point of the UFS mesh
  • use_windowed_multipole (bool) – Whether or not windowed multipole can be used to evaluate resolved resonance cross sections.
  • resonance_scattering (ResonanceScattering or iterable of ResonanceScattering) – The elastic scattering model to use for resonant isotopes
export_to_xml()[source]

Create a settings.xml file that can be used for a simulation.