saltproc.OpenMCDepcode¶
- class saltproc.OpenMCDepcode(output_path, exec_path, template_input_file_path, geo_file_paths, depletion_settings, chain_file_path)[source]¶
Interface for running depletion steps in OpenMC, as well as obtaining depletion step results.
- Parameters
output_path (str) – Path to results storage directory.
exec_path (str) – Path to OpenMC depletion script.
template_input_file_path (dict of str to str) – Path to user input files (
.xml
file for geometry, material, and settings) for OpenMC. File type as strings are keys (e.g. ‘geometry’, ‘settings’, ‘material’), and file path as strings are values.geo_file_paths (str or list, optional) –
- Path to file that contains the reactor geometry.
List of str if reactivity control by switching geometry is On or just str otherwise.
- depletion_settingsdict
Keyword arguments to pass to
openmc.model.deplete()
.- chain_file_pathstr
Path to depletion chain file
- Variables
neutronics_parameters (dict of str to type) – Holds OpenMC depletion step neutronics parameters. Parameter names are keys and parameter values are values.
step_metadata (dict of str to type) – Holds OpenMC depletion step metadata. Metadata labels are keys and metadata values are values.
depcode_metadata (dict of str to type) – Holds OpenMC simulation metadata. Metadata labels are keys and metadata values are values.
runtime_inputfile (dict of str to str) – Paths to OpenMC input files used to run depletion step. Contains neutron settings and geometry.
runtime_matfile (str) – Path to OpenMC material file containing materials used to run depletion step, and modified after fuel reprocessing.
npop (int) – Size of neutron population per cycle
active_cycles (int) – Number of active cycles.
inactive_cycles (int) – Number of inactive cycles.
- name_to_nuclide_code(nucname)[source]¶
Converts depcode nuclide name to ZA nuclide code
- Parameters
nucname (str) – Nuclide namce
- Returns
nuc_name – ZA nuclide code
- Return type
str
- nuclide_code_to_name(nuc)[source]¶
Converts depcode nuclide code to symbolic nuclide name.
- Parameters
nuc_code (str) – Nuclide code
- Returns
nuc_name – Symbolic nuclide name (Am242m1).
- Return type
str
- read_depcode_metadata()[source]¶
Reads OpenMC’s depletion step metadata and stores it in the
OpenMCDepcode
object’sstep_metadata
attribute.
- read_depleted_materials(read_at_end=False)[source]¶
Reads depleted materials from OpenMC’s depletion_results.h5 file and returns a dictionary with a
Materialflow
object for each depleted material.- Parameters
read_at_end (bool, optional) – If True, the function reads data at the end of the depletion step. Otherwise, the function reads data at the beginning of the depletion step.
- Returns
depleted_materials – Dictionary containing depleted materials.
key
Name of burnable material.
value
Materialflow
object holding composition and properties.
- Return type
dict of str to Materialflow
- read_neutronics_parameters()[source]¶
Reads OpenMC depletion step neutronics parameters and stores them in
OpenMCDepcode
object’sneutronics_parameters
attribute.
- read_step_metadata()[source]¶
Reads OpenMC’s depletion step metadata and stores it in the
OpenMCDepcode
object’sstep_metadata
attribute.
- run_depletion_step(mpi_args=None, threads=None)[source]¶
Runs a depletion step in OpenMC as a subprocess
- mpi_argslist of str
Arguments for running simulations on supercomputers using
mpiexec
or similar programs.- threadsint
Threads to use for shared-memory parallelism
- switch_to_next_geometry()[source]¶
Switches the geometry file for the OpenMC depletion simulation to the next geometry file in geo_file_paths.
- update_depletable_materials(mats, dep_end_time)[source]¶
Updates material file with reprocessed material compositions.
- Parameters
mats (dict of str to Materialflow) –
Dictionary containing reprocessed material compositions
key
Name of burnable material.
value
Materialflow
object holding composition and properties.
dep_end_time (float) – Current time at the end of the depletion step (d).
- write_depletion_settings(reactor, step_idx)[source]¶
Write the depeletion settings for the
openmc.deplete
module.- Parameters
reactor (Reactor) – Contains information about power load curve and cumulative depletion time for the integration test.
step_idx (int) – Current depletion step.
- write_runtime_input(reactor, depletion_step, restart)[source]¶
Write OpenMC runtime input files for running depletion step.
- Parameters
reactor (Reactor) – Contains information about power load curve and cumulative depletion time for the integration test.
depletion_step (int) – Current depletion time step.
restart (bool) – Is the current simulation restarted?
- write_saltproc_openmc_tallies(materials, geometry, energy_bounds, n_delayed_groups)[source]¶
Write tallies for calculating burnup and delayed neutron parameters.
- Parameters
materials (openmc.Materials object) – The materials for the depletion simulation
geometry (openmc.Geometry object) – The geometry for the depletion simulation
energy_bounds (iterable of float) – Energy group boundaries for calculating \(\beta\), the delayed neutron fraction, and \(\lambda\), the decay rate for delayed neutron precursors.
n_delayed_groups (int) – Number of delayed groups for calculating \(\beta\), the delayed neutron fraction, and \(\lambda\), the decay rate for delayed neutron precursors.