openmc.Settings

class openmc.Settings[source]

Settings used for an OpenMC simulation.

Variables:
  • batches (int) – Number of batches to simulate
  • 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.
  • create_fission_neutrons (bool) – Indicate whether fission neutrons should be created or not.
  • 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.
  • cutoff (dict) – Dictionary defining weight cutoff and energy cutoff. The dictionary may have three keys, ‘weight’, ‘weight_avg’ and ‘energy’. Value for ‘weight’ should be a float indicating weight cutoff below which particle undergo Russian roulette. Value for ‘weight_avg’ should be a float indicating weight assigned to particles that are not killed after Russian roulette. Value of energy should be a float indicating energy in eV below which particle will be killed.
  • energy_mode ({'continuous-energy', 'multi-group'}) – Set whether the calculation should be continuous-energy or multi-group.
  • entropy_mesh (openmc.Mesh) – Mesh to be used to calculate Shannon entropy. If the mesh dimensions are not specified. OpenMC assigns a mesh such that 20 source sites per mesh cell are to be expected on average.
  • generations_per_batch (int) – Number of generations per batch
  • inactive (int) – Number of inactive batches
  • 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.
  • max_order (None or int) – Maximum scattering order to apply globally when in multi-group mode.
  • 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.
  • no_reduce (bool) – Indicate that all user-defined and global tallies should not be reduced across processes in a parallel calculation.
  • output (dict) –

    Dictionary indicating what files to output. Acceptable keys are:

    path:String indicating a directory where output files should be written
    summary:Whether the ‘summary.h5’ file should be written (bool)
    tallies:Whether the ‘tallies.out’ file should be written (bool)
  • particles (int) – Number of particles per generation
  • ptables (bool) – Determine whether probability tables are used.
  • resonance_scattering (dict) – Settings for resonance elastic scattering. Accepted keys are ‘enable’ (bool), ‘method’ (str), ‘energy_min’ (float), ‘energy_max’ (float), and ‘nuclides’ (list). The ‘method’ can be set to ‘dbrc’ (Doppler broadening rejection correction), ‘wcm’ (weight correction method), and ‘ares’ (accelerated resonance elastic scattering). If not specified, ‘ares’ is the default method. The ‘energy_min’ and ‘energy_max’ values indicate the minimum and maximum energies above and below which the resonance elastic scattering method is to be applied. The ‘nuclides’ list indicates what nuclides the method should be applied to. In its absence, the method will be applied to all nuclides with 0 K elastic scattering data present.
  • run_cmfd (bool) – Indicate if coarse mesh finite difference acceleration is to be used
  • run_mode ({'eigenvalue', 'fixed source', 'plot', 'volume', 'particle restart'}) – The type of calculation to perform (default is ‘eigenvalue’)
  • seed (int) – Seed for the linear congruential pseudorandom number generator
  • source (Iterable of openmc.Source) – Distribution of source sites in space, angle, and energy
  • sourcepoint (dict) –

    Options for writing source points. Acceptable keys are:

    batches:list of batches at which to write source
    overwrite:bool indicating whether to overwrite
    separate:bool indicating whether the source should be written as a separate file
    write:bool indicating whether or not to write the source
  • statepoint (dict) –

    Options for writing state points. Acceptable keys are:

    batches:list of batches at which to write source
  • survival_biasing (bool) – Indicate whether survival biasing is to be used
  • tabular_legendre (dict) – Determines if a multi-group scattering moment kernel expanded via Legendre polynomials is to be converted to a tabular distribution or not. Accepted keys are ‘enable’ and ‘num_points’. The value for ‘enable’ is a bool stating whether the conversion to tabular is performed; the value for ‘num_points’ sets the number of points to use in the tabular distribution, should ‘enable’ be True.
  • temperature (dict) – Defines a default temperature and method for treating intermediate temperatures at which nuclear data doesn’t exist. Accepted keys are ‘default’, ‘method’, ‘tolerance’, and ‘multipole’. The value for ‘default’ should be a float representing the default temperature in Kelvin. The value for ‘method’ should be ‘nearest’ or ‘interpolation’. If the method is ‘nearest’, ‘tolerance’ indicates a range of temperature within which cross sections may be used. ‘multipole’ is a boolean indicating whether or not the windowed multipole method should be used to evaluate resolved resonance cross sections.
  • 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.
  • trigger_active (bool) – Indicate whether tally triggers are used
  • trigger_batch_interval (int) – Number of batches in between convergence checks
  • 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
  • ufs_mesh (openmc.Mesh) – Mesh to be used for redistributing source sites via the uniform fision site (UFS) method.
  • verbosity (int) – Verbosity during simulation between 1 and 10. Verbosity levels are described in <verbosity> Element.
  • volume_calculations (VolumeCalculation or iterable of VolumeCalculation) – Stochastic volume calculation specifications
export_to_xml(path='settings.xml')[source]

Export simulation settings to an XML file.

Parameters:path (str) – Path to file to write. Defaults to ‘settings.xml’.