Skip to content

Commit 12d5351

Browse files
minore update to the documentation
1 parent ae15186 commit 12d5351

6 files changed

Lines changed: 30 additions & 21 deletions

File tree

.codex

Whitespace-only changes.

docs/source/io_formats/depletion_chain.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,17 @@ attributes:
6060
``<source>`` Element
6161
--------------------
6262

63-
The ``<source>`` element represents photon and electron sources associated with
64-
the decay of a nuclide and contains information to construct an
63+
The ``<source>`` element represents decay particle sources associated with the
64+
decay of a nuclide and contains information to construct an
6565
:class:`openmc.stats.Univariate` object that represents this emission as an
6666
energy distribution. This element has the following attributes:
6767

6868
:type:
6969
The type of :class:`openmc.stats.Univariate` source term.
7070

7171
:particle:
72-
The type of particle emitted, e.g., 'photon' or 'electron'
72+
The type of particle emitted, e.g., ``photon``, ``electron``,
73+
``positron``, ``alpha``, ``neutron``, ``proton``, or ``fragment``
7374

7475
:parameters:
7576
The parameters of the source term, e.g., for a

docs/source/pythonapi/data.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ Core Functions
6464
combine_distributions
6565
decay_constant
6666
decay_energy
67+
decay_particle_energy
6768
decay_photon_energy
6869
dose_coefficients
6970
gnds_name

docs/source/usersguide/decay_sources.rst

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,13 @@ Generally, it involves the following steps:
3939
with the timestep index returns a :class:`~openmc.deplete.StepResult` object,
4040
which itself has a :meth:`~openmc.deplete.StepResult.get_material` method
4141
returning an activated material.
42-
4. The :meth:`openmc.Material.get_decay_photon_energy` method is used to obtain
43-
the energy spectrum of the decay photon source. The integral of the spectrum
44-
also indicates the intensity of the source in units of [Bq].
42+
4. The :meth:`openmc.Material.get_decay_particle_energy` method can be used to
43+
obtain the energy spectrum of decay particles from the activated material.
44+
For R2S, the photon spectrum is needed and can be obtained either with
45+
:meth:`openmc.Material.get_decay_particle_energy` using
46+
``particle='photon'`` or with the wrapper
47+
:meth:`openmc.Material.get_decay_photon_energy`. The integral of the
48+
spectrum indicates the intensity of the source in units of [Bq].
4549
5. A new photon source is defined using one of OpenMC's source classes with the
4650
energy distribution set equal to the object returned by the
4751
:meth:`openmc.Material.get_decay_photon_energy` method. The source is then
@@ -76,9 +80,10 @@ Altogether, the workflow looks as follows::
7680
model.settings.source = photon_source
7781
model.run()
7882

79-
Note that by default, the :meth:`~openmc.Material.get_decay_photon_energy`
80-
method will eliminate spectral lines with very low intensity, but this behavior
81-
can be configured with the ``clip_tolerance`` argument.
83+
Note that :meth:`~openmc.Material.get_decay_particle_energy` and
84+
:meth:`~openmc.Material.get_decay_photon_energy` will, by default, eliminate
85+
spectral lines with very low intensity, but this behavior can be configured
86+
with the ``clip_tolerance`` argument.
8287

8388
Cell-based R2S
8489
--------------
@@ -236,4 +241,3 @@ relevant tallies. This can be done with the aid of the
236241

237242
# Apply time correction factors
238243
tally = d1s.apply_time_correction(dose_tally, factors, time_index)
239-

openmc/data/decay.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,8 @@ def decay_photon_energy(nuclide: str) -> Univariate | None:
571571
for the first time, you need to ensure that a depletion chain has been
572572
specified in openmc.config['chain_file'].
573573
574-
.. versionadded:: 0.13.2
574+
This is a backward-compatible convenience wrapper around
575+
:func:`decay_particle_energy` with ``particle='photon'``.
575576
576577
Parameters
577578
----------
@@ -600,14 +601,16 @@ def decay_particle_energy(nuclide: str, particle: str) -> Univariate | None:
600601
nuclide : str
601602
Name of nuclide, e.g., 'Co58'
602603
particle : str
603-
Name of the decay particle, e.g., 'photon', 'neutron'
604+
Name of the decay particle, e.g., ``photon``, ``electron``,
605+
``positron``, ``alpha``, ``neutron``, ``proton``, or ``fragment``.
604606
605607
Returns
606608
-------
607609
openmc.stats.Univariate or None
608-
Distribution of energies in [eV] of decay particles emitted from decay, or None
609-
if no decay source of that particle exists. Note that the probabilities represent
610-
intensities, given as [Bq/atom] (in other words, decay constants).
610+
Distribution of energies in [eV] of decay particles emitted from decay,
611+
or None if no decay source of that particle exists. Note that the
612+
probabilities represent intensities, given as [Bq/atom] (in other
613+
words, decay constants).
611614
"""
612615

613616
if not _DECAY_PARTICLE_ENERGY:
@@ -674,4 +677,3 @@ def decay_energy(nuclide: str):
674677
warn(f"Chain file '{chain_file}' does not have any decay energy.")
675678

676679
return _DECAY_ENERGY.get(nuclide, 0.0)
677-

openmc/material.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,9 @@ def get_decay_particle_energy(
346346
Parameters
347347
----------
348348
particle : string
349-
Particle type to return the energy distribution for.
349+
Particle type to return the energy distribution for. Supported
350+
values are ``'photon'``, ``'electron'``, ``'positron'``,
351+
``'alpha'``, ``'neutron'``, ``'proton'``, and ``'fragment'``.
350352
clip_tolerance : float
351353
Maximum fraction of :math:`\sum_i x_i p_i` for discrete distributions
352354
that will be discarded.
@@ -427,10 +429,9 @@ def get_decay_photon_energy(
427429
) -> Univariate | None:
428430
r"""Return energy distribution of decay photons from unstable nuclides.
429431
430-
This is a convenience wrapper around :meth:`Material.get_decay_particle_energy`
431-
with ``particle='photon'``.
432-
433-
.. versionadded:: 0.14.0
432+
This is a backward-compatible convenience wrapper around
433+
:meth:`Material.get_decay_particle_energy` with
434+
``particle='photon'``.
434435
435436
Parameters
436437
----------

0 commit comments

Comments
 (0)