saltproc.app module

saltproc.app._create_depcode_object(depcode_input)[source]

Helper function for run()

saltproc.app._create_reactor_object(reactor_input)[source]

Helper function for run()

saltproc.app._create_simulation_object(simulation_input, depcode)[source]

Helper function for run()

saltproc.app._print_simulation_input_info(simulation_input, depcode_input)[source]

Helper function for run()

saltproc.app._process_main_input_reactor_params(reactor_input, n_depletion_steps, codename)[source]

Process SaltProc reactor class input parameters based on the value and data type of the n_depletion_steps parameter as well as the depletion code being used, and throw errors if the input parameters are incorrect.

saltproc.app._scale_depletion_timesteps(timestep_units, depletion_timesteps, codename)[source]

Scale depletion_timesteps to the correct value based on timestep_units

saltproc.app._validate_depletion_timesteps_power_levels(n_depletion_steps, depletion_timesteps, power_levels)[source]

Ensure that the number of depletion timesteps and power levels match n_depletion_steps if it is given. Otherwise, compare the lengths of depletion_timesteps and power_levels

saltproc.app.get_extraction_process_paths(dot_file)[source]

Reads directed graph that describes fuel reprocessing system structure from a *.dot file.

Parameters

dot_file (str) – Path to the .dot describing the fuel reprocessing paths.

Returns

  • mat_name (str) – Name of burnable material which the reprocessing scheme applies to.

  • extraction_process_paths (list) – List of lists containing all possible paths between core_outlet and core_inlet.

saltproc.app.get_extraction_processes(process_file)[source]

Parses extraction_processes objects from the .json file describing processing system objects.

extraction_processes objects describe components that would perform fuel processing in a real reactor, such as a gas sparger or a nickel filter.

Parameters

process_file (str) – Path to the .json file describing the fuel reprocessing components.

Returns

extraction_processes – Dictionary mapping material names to extraction processes.

key

Name of burnable material.

value

Dictionary mapping process names to saltproc.process.Process objects.

Return type

dict of str to dict

saltproc.app.get_feeds(process_file)[source]

Parses feed objects from .json file describing processing system objects.

feed objects describe material flows that replace nuclides needed to keep the reactor operating that were removed during reprocessing.

Parameters

process_file (str) – Path to the .json file describing the fuel reprocessing components.

Returns

feeds – Dictionary that maps material names to material flows

key

Name of burnable material.

value

Dictionary mapping material flow names to saltproc.materialflow.Materialflow objects representing material feeds.

Return type

dict of str to dict

saltproc.app.parse_arguments()[source]

Parses arguments from command line.

Returns

  • s (int) – Number of threads to use for shared-memory parallelism.

  • i (str) – Path and name of main SaltProc input file (json format).

saltproc.app.read_main_input(main_inp_file)[source]

Reads main SaltProc input file (json format).

Parameters

main_inp_file (str) – Path to SaltProc main input file and name of this file.

Returns

  • input_path (Path) – Path to main input file

  • process_file (str) – Path to the .json file describing the fuel reprocessing components.

  • dot_file (str) – Path to the .dot describing the fuel reprocessing paths.

  • mpi_args (list of str) – Arguments for running simulations on supercomputers using mpiexec or similar programs.

  • object_inputs (3-tuple of dict) – tuple containing the inputs for constructing the Depcode, Simulation, and Reactor objects.

saltproc.app.refill_materials(mats, extracted_mass, waste_streams, process_file)[source]

Makes up material loss in removal processes by adding fresh fuel.

Parameters
  • mats (dict of str to Materialflow) – Dicitionary mapping material names to saltproc.materialflow.Materialflow objects that have already been reprocessed by reprocess_materials.

  • extracted_mass (dict of str to float) – Dictionary mapping material names to the mass in [g] of that material removed via reprocessing.

  • waste_streams (dict of str to dict) –

    Dictionary mapping material names to waste streams from reprocessing

    key

    Material name.

    value

    Dictionary mapping waste stream names to saltproc.materialflow.Materialflow objects representing waste streams.

  • process_file (str) – Path to the .json file describing the fuel reprocessing components.

Returns

waste_streams – Superset of the input parameter waste_streams. Dictionary has keys for feed streams that map to :classs:`Materialflow` objects representing those material feed streams.

Return type

dict of str to dict

saltproc.app.reprocess_materials(mats, process_file, dot_file)[source]

Applies extraction reprocessing scheme to burnable materials.

Parameters
  • mats (dict of str to Materialflow) – Dictionary that contains saltproc.materialflow.Materialflow objects with burnable material data right after irradiation in the core.

  • process_file (str) – Path to the .json file describing the fuel reprocessing components.

  • dot_file (str) – Path to the .dot describing the fuel reprocessing paths.

Returns

  • waste_streams (dict of str to dict) – Dictionary mapping material names to waste streams.

    key

    Material name.

    value

    Dictionary mapping waste stream names to saltproc.materialflow.Materialflow objects representing waste streams.

  • extracted_mass (dict of str to float) – Dictionary mapping material names to the mass in [g] of that material removed via reprocessing.

saltproc.app.run()[source]

Inititializes main run