mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Improve documentation for FissionYieldHelpers
Add a separate section in the documentation describing the helpers. Reword purpose of mat_indexes in generate_tallies
This commit is contained in:
parent
454e6cc6b6
commit
aa86aa5262
5 changed files with 44 additions and 25 deletions
|
|
@ -77,16 +77,25 @@ data, such as number densities and reaction rates for each material.
|
|||
:template: myclass.rst
|
||||
|
||||
AtomNumber
|
||||
AveragedFissionYieldHelper
|
||||
ChainFissionHelper
|
||||
ConstantFissionYieldHelper
|
||||
DirectReactionRateHelper
|
||||
FissionYieldCutoffHelper
|
||||
OperatorResult
|
||||
ReactionRates
|
||||
Results
|
||||
ResultsList
|
||||
|
||||
The following classes are used to help the :class:`openmc.deplete.Operator`
|
||||
compute quantities like effective fission yields, reaction rates, and
|
||||
total system energy.
|
||||
|
||||
.. autosummary::
|
||||
:toctree: generated
|
||||
:nosignatures:
|
||||
:template: myclass.rst
|
||||
|
||||
helpers.AveragedFissionYieldHelper
|
||||
helpers.ChainFissionHelper
|
||||
helpers.ConstantFissionYieldHelper
|
||||
helpers.DirectReactionRateHelper
|
||||
helpers.FissionYieldCutoffHelper
|
||||
|
||||
The following classes are abstract classes that can be used to extend the
|
||||
:mod:`openmc.deplete` capabilities:
|
||||
|
|
|
|||
|
|
@ -443,8 +443,11 @@ class FissionYieldHelper(ABC):
|
|||
materials : iterable of C-API materials
|
||||
Materials to be used in :class:`openmc.capi.MaterialFilter`
|
||||
mat_indexes : iterable of int
|
||||
Indexes for materials in ``materials`` tracked on this
|
||||
process
|
||||
Indices of tallied materials that will have their fission
|
||||
yields computed by this helper. Necessary as the
|
||||
:class:`openmc.deplete.Operator` that uses this helper
|
||||
may only burn a subset of all materials when running
|
||||
in parallel mode.
|
||||
"""
|
||||
|
||||
def update_nuclides_from_operator(self, nuclides):
|
||||
|
|
@ -526,8 +529,11 @@ class TalliedFissionYieldHelper(FissionYieldHelper):
|
|||
materials : iterable of :class:`openmc.capi.Material`
|
||||
Materials to be used in :class:`openmc.capi.MaterialFilter`
|
||||
mat_indexes : iterable of int
|
||||
Indexes for materials in ``materials`` tracked on this
|
||||
process
|
||||
Indices of tallied materials that will have their fission
|
||||
yields computed by this helper. Necessary as the
|
||||
:class:`openmc.deplete.Operator` that uses this helper
|
||||
may only burn a subset of all materials when running
|
||||
in parallel mode.
|
||||
"""
|
||||
self._local_indexes = asarray(mat_indexes)
|
||||
|
||||
|
|
|
|||
|
|
@ -376,8 +376,11 @@ class FissionYieldCutoffHelper(TalliedFissionYieldHelper):
|
|||
materials : iterable of :class:`openmc.capi.Material`
|
||||
Materials to be used in :class:`openmc.capi.MaterialFilter`
|
||||
mat_indexes : iterable of int
|
||||
Indexes for materials in ``materials`` tracked on this
|
||||
process
|
||||
Indices of tallied materials that will have their fission
|
||||
yields computed by this helper. Necessary as the
|
||||
:class:`openmc.deplete.Operator` that uses this helper
|
||||
may only burn a subset of all materials when running
|
||||
in parallel mode.
|
||||
"""
|
||||
super().generate_tallies(materials, mat_indexes)
|
||||
energy_filter = EnergyFilter()
|
||||
|
|
@ -465,8 +468,9 @@ class AveragedFissionYieldHelper(TalliedFissionYieldHelper):
|
|||
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, a geometric mean of the yield distributions is
|
||||
used.
|
||||
of yields, the effective fission yield computed by
|
||||
linearly interpolating between yields provided at the
|
||||
nearest energies above and below the average.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
|
@ -502,8 +506,11 @@ class AveragedFissionYieldHelper(TalliedFissionYieldHelper):
|
|||
materials : iterable of :class:`openmc.capi.Material`
|
||||
Materials to be used in :class:`openmc.capi.MaterialFilter`
|
||||
mat_indexes : iterable of int
|
||||
Indexes for materials in ``materials`` tracked on this
|
||||
process
|
||||
Indices of tallied materials that will have their fission
|
||||
yields computed by this helper. Necessary as the
|
||||
:class:`openmc.deplete.Operator` that uses this helper
|
||||
may only burn a subset of all materials when running
|
||||
in parallel mode.
|
||||
"""
|
||||
super().generate_tallies(materials, mat_indexes)
|
||||
fission_tally = self._fission_rate_tally
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ class Nuclide(object):
|
|||
|
||||
|
||||
class FissionYieldDistribution(Mapping):
|
||||
"""Class for storing energy-dependent fission yields for a single nuclide
|
||||
"""Energy-dependent fission product yields for a single nuclide
|
||||
|
||||
Can be used as a dictionary mapping energies and products to fission
|
||||
yields::
|
||||
|
|
|
|||
|
|
@ -86,19 +86,16 @@ class Operator(TransportOperator):
|
|||
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 : str, {"constant", "cutoff"}
|
||||
fission_yield_mode : ("constant", "cutoff", "average")
|
||||
Key indicating what fission product yield scheme to use. The
|
||||
key determines what fission energy helper is used::
|
||||
key determines what fission energy helper is used:
|
||||
|
||||
* "constant": :class:`openmc.deplete.ConstantFissionYieldHelper`
|
||||
* "cutoff": :class:`openmc.deplete.FissionYieldCutoffHelper`
|
||||
* "average": :class:`openmc.deplete.AveragedFissionYieldHelper`
|
||||
* "constant": :class:`~openmc.deplete.helpers.ConstantFissionYieldHelper`
|
||||
* "cutoff": :class:`~openmc.deplete.helpers.FissionYieldCutoffHelper`
|
||||
* "average": :class:`~openmc.deplete.helpers.AveragedFissionYieldHelper`
|
||||
|
||||
The documentation on these classes describe their methodology
|
||||
and differences. ``"constant"`` will treat fission yields as
|
||||
constant with respect to energy, while ``"cutoff"`` will
|
||||
compute effective yields based on the number of fission events
|
||||
above and below a cutoff. Default: ``"constant"``
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue