openmc.deplete.Operator¶
-
class
openmc.deplete.
Operator
(geometry, settings, chain_file=None, prev_results=None, diff_burnable_mats=False, energy_mode='fission-q', fission_q=None, dilute_initial=1000.0, fission_yield_mode='constant', fission_yield_opts=None, reduce_chain=False, reduce_chain_level=None)[source]¶ OpenMC transport operator for depletion.
Instances of this class can be used to perform depletion using OpenMC as the transport operator. 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
.Parameters: - geometry (openmc.Geometry) – OpenMC geometry object
- settings (openmc.Settings) – OpenMC Settings object
- chain_file (str, optional) – Path to the depletion chain XML file. Defaults to the file
listed under
depletion_chain
inOPENMC_CROSS_SECTIONS
environment variable. - prev_results (ResultsList, 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. Default: False.
- energy_mode ({"energy-deposition", "fission-q"}) – Indicator for computing system energy.
"energy-deposition"
will compute with a single energy deposition tally, taking fission energy release data and heating into consideration."fission-q"
will use the fission Q values from the depletion chain - 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"energy_mode" == "fission-q"
- dilute_initial (float, optional) – Initial atom density [atoms/cm^3] to add for nuclides that are zero in initial condition to ensure they exist in the decay chain. Only done for nuclides with reaction rates. Defaults to 1.0e3.
- fission_yield_mode ({"constant", "cutoff", "average"}) –
Key indicating what fission product yield scheme to use. The key determines what fission energy helper is used:
- ”constant”:
ConstantFissionYieldHelper
- ”cutoff”:
FissionYieldCutoffHelper
- ”average”:
AveragedFissionYieldHelper
The documentation on these classes describe their methodology and differences. Default:
"constant"
- ”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. - reduce_chain (bool, optional) –
If True, use
openmc.deplete.Chain.reduce()
to reduce the depletion chain up toreduce_chain_level
. Default is False.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 ofNone
implies no limit on the depth.New in version 0.12.
Variables: - geometry (openmc.Geometry) – OpenMC geometry object
- settings (openmc.Settings) – OpenMC settings object
- dilute_initial (float) – Initial atom density [atoms/cm^3] to add for nuclides that are zero in initial condition to ensure they exist in the decay chain. Only done for nuclides with reaction rates.
- 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 (ResultsList or None) – Results from a previous depletion calculation.
None
if no results are to be used. - diff_burnable_mats (bool) – Whether to differentiate burnable materials with multiple instances
-
__call__
(vec, power)[source]¶ Runs a simulation.
Simulation will abort under the following circumstances:
- No energy is computed using OpenMC tallies.
Parameters: - vec (list of numpy.ndarray) – Total atoms to be used in function.
- power (float) – Power of the reactor in [W]
Returns: Eigenvalue and reaction rates resulting from transport operator
Return type:
-
get_results_info
()[source]¶ Returns volume list, material lists, and nuc lists.
Returns: - volume (dict of str float) – Volumes corresponding to materials in full_burn_dict
- nuc_list (list of str) – A list of all nuclide names. Used for sorting the simulation.
- burn_list (list of int) – A list of all material IDs to be burned. Used for sorting the simulation.
- full_burn_list (list) – List of all burnable material IDs