openmc.deplete.CoupledOperator

class openmc.deplete.CoupledOperator(model, chain_file=None, prev_results=None, diff_burnable_mats=False, diff_volume_method='divide equally', normalization_mode='fission-q', fission_q=None, fission_yield_mode='constant', fission_yield_opts=None, reaction_rate_mode='direct', reaction_rate_opts=None, reduce_chain=False, reduce_chain_level=None)[source]

Transport-coupled transport operator.

Instances of this class can be used to perform transport-coupled depletion using OpenMC’s transport solver. Normally, a user needn’t call methods of this class directly. Instead, an instance of this class is passed to an integrator class, such as openmc.deplete.CECMIntegrator.

Changed in version 0.13.0: The geometry and settings parameters have been replaced with a model parameter that takes a Model object

Changed in version 0.13.1: Name changed from Operator to CoupledOperator

Parameters
  • model (openmc.model.Model) – OpenMC model object

  • chain_file (str, optional) – Path to the depletion chain XML file. Defaults to openmc.config['chain_file'].

  • prev_results (Results, optional) – Results from a previous depletion calculation. If this argument is specified, the depletion calculation will start from the latest state in the previous results.

  • diff_burnable_mats (bool, optional) – Whether to differentiate burnable materials with multiple instances. Volumes are divided equally from the original material volume.

  • normalization_mode ({"energy-deposition", "fission-q", "source-rate"}) – Indicate how tally results should be normalized. "energy-deposition" computes the total energy deposited in the system and uses the ratio of the power to the energy produced as a normalization factor. "fission-q" uses the fission Q values from the depletion chain to compute the total energy deposited. "source-rate" normalizes tallies based on the source rate (for fixed source calculations).

  • fission_q (dict, optional) – Dictionary of nuclides and their fission Q values [eV]. If not given, values will be pulled from the chain_file. Only applicable if "normalization_mode" == "fission-q"

  • fission_yield_mode ({"constant", "cutoff", "average"}) –

    Key indicating what fission product yield scheme to use. The key determines what fission energy helper is used:

    The documentation on these classes describe their methodology and differences. Default: "constant"

  • fission_yield_opts (dict of str to option, optional) – Optional arguments to pass to the helper determined by fission_yield_mode. Will be passed directly on to the helper. Passing a value of None will use the defaults for the associated helper.

  • reaction_rate_mode ({"direct", "flux"}, optional) –

    Indicate how one-group reaction rates should be calculated. The “direct” method tallies transmutation reaction rates directly. The “flux” method tallies a multigroup flux spectrum and then collapses one-group reaction rates after a transport solve (with an option to tally some reaction rates directly).

    New in version 0.12.1.

  • reaction_rate_opts (dict, optional) –

    Keyword arguments that are passed to the reaction rate helper class. When reaction_rate_mode is set to “flux”, energy group boundaries can be set using the “energies” key. See the FluxCollapseHelper class for all options.

    New in version 0.12.1.

  • reduce_chain (bool, optional) –

    If True, use openmc.deplete.Chain.reduce() to reduce the depletion chain up to reduce_chain_level.

    New in version 0.12.

  • reduce_chain_level (int, optional) –

    Depth of the search when reducing the depletion chain. Only used if reduce_chain evaluates to true. The default value of None implies no limit on the depth.

    New in version 0.12.

  • diff_volume_method (str) –

    Specifies how the volumes of the new materials should be found. Default is to ‘divide equally’ which divides the original material volume equally between the new materials, ‘match cell’ sets the volume of the material to volume of the cell they fill.

    New in version 0.14.0.

Variables
  • model (openmc.model.Model) – OpenMC model object

  • output_dir (pathlib.Path) – Path to output directory to save results.

  • round_number (bool) – Whether or not to round output to OpenMC to 8 digits. Useful in testing, as OpenMC is incredibly sensitive to exact values.

  • number (openmc.deplete.AtomNumber) – Total number of atoms in simulation.

  • nuclides_with_data (set of str) – A set listing all unique nuclides available from cross_sections.xml.

  • chain (openmc.deplete.Chain) – The depletion chain information necessary to form matrices and tallies.

  • reaction_rates (openmc.deplete.ReactionRates) – Reaction rates from the last operator step.

  • burnable_mats (list of str) – All burnable material IDs

  • heavy_metal (float) – Initial heavy metal inventory [g]

  • local_mats (list of str) – All burnable material IDs being managed by a single process

  • prev_res (Results or None) – Results from a previous depletion calculation. None if no results are to be used.

  • cleanup_when_done (bool) – Whether to finalize and clear the shared library memory when the depletion operation is complete. Defaults to clearing the library.

__call__(vec, source_rate)[source]

Runs a simulation.

Simulation will abort under the following circumstances:

  1. No energy is computed using OpenMC tallies.

Parameters
  • vec (list of numpy.ndarray) – Total atoms to be used in function.

  • source_rate (float) – Power in [W] or source rate in [neutron/sec]

Returns

Eigenvalue and reaction rates resulting from transport operator

Return type

openmc.deplete.OperatorResult

finalize()[source]

Finalize a depletion simulation and release resources.

initial_condition()[source]

Performs final setup and returns initial condition.

Returns

Total density for initial conditions.

Return type

list of numpy.ndarray

static write_bos_data(step)[source]

Write a state-point file with beginning of step data

Parameters

step (int) – Current depletion step including restarts