mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Documentation updates
This commit is contained in:
parent
7af56d8db2
commit
ce1abc5350
4 changed files with 20 additions and 7 deletions
|
|
@ -63,6 +63,7 @@ Core Functions
|
|||
atomic_weight
|
||||
combine_distributions
|
||||
decay_constant
|
||||
decay_photon_source
|
||||
dose_coefficients
|
||||
gnd_name
|
||||
half_life
|
||||
|
|
|
|||
|
|
@ -579,13 +579,15 @@ class Decay(EqualityMixin):
|
|||
_DECAY_PHOTON_SOURCE = {}
|
||||
|
||||
|
||||
def decay_photon_source(nuclide):
|
||||
def decay_photon_source(nuclide: str) -> Univariate:
|
||||
"""Get photon source from the decay of a nuclide
|
||||
|
||||
This function relies on data stored in a depletion chain. Before calling it
|
||||
for the first time, you need to ensure that a depletion chain has been
|
||||
specified in openmc.config['chain_file'].
|
||||
|
||||
.. versionadded:: 0.14.0
|
||||
|
||||
Parameters
|
||||
----------
|
||||
nuclide : str
|
||||
|
|
|
|||
|
|
@ -202,6 +202,8 @@ class StepResult:
|
|||
def get_material(self, mat_id):
|
||||
"""Return material object for given depleted composition
|
||||
|
||||
.. versionadded:: 0.14.0
|
||||
|
||||
Parameters
|
||||
----------
|
||||
mat_id : str
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import openmc.checkvalue as cv
|
|||
from ._xml import clean_indentation, reorder_attributes
|
||||
from .mixin import IDManagerMixin
|
||||
from openmc.checkvalue import PathLike
|
||||
from openmc.stats import Univariate
|
||||
|
||||
|
||||
# Units for density supported by OpenMC
|
||||
|
|
@ -34,10 +35,10 @@ class Material(IDManagerMixin):
|
|||
To create a material, one should create an instance of this class, add
|
||||
nuclides or elements with :meth:`Material.add_nuclide` or
|
||||
:meth:`Material.add_element`, respectively, and set the total material
|
||||
density with :meth:`Material.set_density()`. Alternatively, you can
|
||||
use :meth:`Material.add_components()` to pass a dictionary
|
||||
containing all the component information. The material can then be
|
||||
assigned to a cell using the :attr:`Cell.fill` attribute.
|
||||
density with :meth:`Material.set_density()`. Alternatively, you can use
|
||||
:meth:`Material.add_components()` to pass a dictionary containing all the
|
||||
component information. The material can then be assigned to a cell using the
|
||||
:attr:`Cell.fill` attribute.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
|
@ -91,6 +92,13 @@ class Material(IDManagerMixin):
|
|||
fissionable_mass : float
|
||||
Mass of fissionable nuclides in the material in [g]. Requires that the
|
||||
:attr:`volume` attribute is set.
|
||||
decay_photon_source : openmc.stats.Univariate
|
||||
Energy distribution of photons emitted from decay of unstable nuclides
|
||||
within the material. The integral of this distribution is the total
|
||||
intensity of the photon source.
|
||||
|
||||
.. versionadded:: 0.14.0
|
||||
|
||||
"""
|
||||
|
||||
next_id = 1
|
||||
|
|
@ -256,7 +264,7 @@ class Material(IDManagerMixin):
|
|||
return density*self.volume
|
||||
|
||||
@property
|
||||
def decay_photon_source(self):
|
||||
def decay_photon_source(self) -> Univariate:
|
||||
atoms = self.get_nuclide_atoms()
|
||||
dists = []
|
||||
probs = []
|
||||
|
|
@ -832,7 +840,7 @@ class Material(IDManagerMixin):
|
|||
for nuclide in self._nuclides:
|
||||
if nuclide.name not in matching_nuclides:
|
||||
matching_nuclides.append(nuclide.name)
|
||||
|
||||
|
||||
return matching_nuclides
|
||||
|
||||
def get_nuclide_densities(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue