openmc.deplete.helpers.AveragedFissionYieldHelper¶
- class openmc.deplete.helpers.AveragedFissionYieldHelper(chain_nuclides)[source]¶
Class that computes fission yields based on average fission energy
Computes average energy at which fission events occurred with
\[\bar{E} = \frac{ \int_0^\infty E\sigma_f(E)\phi(E)dE }{ \int_0^\infty\sigma_f(E)\phi(E)dE }\]If the average energy for a nuclide is below the lowest energy with yield data, that set of fission yields is taken. Conversely, if the average energy is above the highest energy with yield data, that set of fission yields is used. For the case where the average energy is between two sets of yields, the effective fission yield computed by linearly interpolating between yields provided at the nearest energies above and below the average.
- Parameters
chain_nuclides (iterable of openmc.deplete.Nuclide) – Nuclides tracked in the depletion chain. All nuclides are not required to have fission yield data.
- Variables
constant_yields (collections.defaultdict) – Fission yields for all nuclides that only have one set of fission yield data. Dictionary of form
{str: {str: float}}
representing yields for{parent: {product: yield}}
. Default return object is an empty dictionaryresults (None or numpy.ndarray) – If tallies have been generated and unpacked, then the array will have shape
(n_mats, n_tnucs)
, wheren_mats
is the number of materials where fission reactions were tallied andn_tnucs
is the number of nuclides with multiple sets of fission yields. Data in the array are the average energy of fission events for tallied nuclides across burnable materials.
- classmethod from_operator(operator, **kwargs)[source]¶
Return a new helper with data from an operator
All keyword arguments should be identical to their counterpart in the main
__init__
method- Parameters
operator (openmc.deplete.CoupledOperator) – Operator with a depletion chain
kwargs – Additional keyword arguments to be used in construction
- Return type
- generate_tallies(materials, mat_indexes)[source]¶
Construct tallies to determine average energy of fissions
- Parameters
materials (iterable of
openmc.lib.Material
) – Materials to be used inopenmc.lib.MaterialFilter
mat_indexes (iterable of int) – Indices of tallied materials that will have their fission yields computed by this helper. Necessary as the
openmc.deplete.CoupledOperator
that uses this helper may only burn a subset of all materials when running in parallel mode.
- update_tally_nuclides(nuclides)[source]¶
Tally nuclides with non-zero density and multiple yields
Must be run after
generate_tallies()
.- Parameters
nuclides (iterable of str) – Potential nuclides to be tallied, such as those with non-zero density at this stage.
- Returns
nuclides – Union of input nuclides and those that have multiple sets of yield data. Sorted by nuclide name
- Return type
tuple of str
- Raises
AttributeError – If tallies not generated
- weighted_yields(local_mat_index)[source]¶
Return fission yields for a specific material
Use the computed average energy of fission events to determine fission yields. If average energy is between two sets of yields, linearly interpolate between the two. Otherwise take the closet set of yields.
- Parameters
local_mat_index (int) – Index for specific burnable material. Effective yields will be produced using
self.results[local_mat_index]
- Returns
library – Dictionary of
{parent: {product: fyield}}
. Default return value is an empty dictionary- Return type