2020-04-06 15:16:09 -05:00
|
|
|
import re
|
2024-04-24 17:05:10 -04:00
|
|
|
import warnings
|
2023-12-13 08:11:32 -06:00
|
|
|
|
2023-05-09 11:41:04 -04:00
|
|
|
import lxml.etree as ET
|
2016-10-06 21:39:57 -05:00
|
|
|
|
2016-11-09 18:10:41 -05:00
|
|
|
import openmc.checkvalue as cv
|
2022-08-31 22:13:54 -05:00
|
|
|
import openmc
|
2023-02-22 18:24:50 +00:00
|
|
|
from openmc.data import NATURAL_ABUNDANCE, atomic_mass, zam, \
|
2020-08-14 15:04:45 -05:00
|
|
|
isotopes as natural_isotopes
|
2016-10-25 20:54:56 -04:00
|
|
|
|
2016-07-25 06:33:37 -05:00
|
|
|
|
2017-11-29 22:23:47 -06:00
|
|
|
class Element(str):
|
2016-10-25 20:54:56 -04:00
|
|
|
"""A natural element that auto-expands to add the isotopes of an element to
|
|
|
|
|
a material in their natural abundance. Internally, the OpenMC Python API
|
|
|
|
|
expands the natural element into isotopes only when the materials.xml file
|
|
|
|
|
is created.
|
2015-06-01 22:22:53 +07:00
|
|
|
|
|
|
|
|
Parameters
|
|
|
|
|
----------
|
|
|
|
|
name : str
|
|
|
|
|
Chemical symbol of the element, e.g. Pu
|
|
|
|
|
|
|
|
|
|
Attributes
|
|
|
|
|
----------
|
|
|
|
|
name : str
|
|
|
|
|
Chemical symbol of the element, e.g. Pu
|
|
|
|
|
|
|
|
|
|
"""
|
2014-10-13 07:48:28 -04:00
|
|
|
|
2017-11-29 22:23:47 -06:00
|
|
|
def __new__(cls, name):
|
2017-12-24 16:06:05 +07:00
|
|
|
cv.check_type('element name', name, str)
|
2017-11-29 22:23:47 -06:00
|
|
|
cv.check_length('element name', name, 1, 2)
|
2017-12-24 16:34:25 +07:00
|
|
|
return super().__new__(cls, name)
|
2015-10-08 14:23:19 -04:00
|
|
|
|
2015-04-21 09:13:38 -05:00
|
|
|
@property
|
|
|
|
|
def name(self):
|
2017-11-29 22:23:47 -06:00
|
|
|
return self
|
2015-11-08 17:34:04 -05:00
|
|
|
|
2016-10-22 16:36:02 -04:00
|
|
|
def expand(self, percent, percent_type, enrichment=None,
|
2020-02-29 20:34:05 +00:00
|
|
|
enrichment_target=None, enrichment_type=None,
|
2020-02-14 16:12:44 +00:00
|
|
|
cross_sections=None):
|
2016-05-03 14:46:52 -06:00
|
|
|
"""Expand natural element into its naturally-occurring isotopes.
|
|
|
|
|
|
2022-08-31 22:13:54 -05:00
|
|
|
An optional cross_sections argument or the ``cross_sections``
|
|
|
|
|
configuration value is used to specify a cross_sections.xml file. If the
|
|
|
|
|
cross_sections.xml file is found, the element is expanded only into the
|
|
|
|
|
isotopes/nuclides present in cross_sections.xml. If no
|
2016-10-22 16:36:02 -04:00
|
|
|
cross_sections.xml file is found, the element is expanded based on its
|
|
|
|
|
naturally occurring isotopes.
|
|
|
|
|
|
|
|
|
|
Parameters
|
|
|
|
|
----------
|
|
|
|
|
percent : float
|
|
|
|
|
Atom or weight percent
|
|
|
|
|
percent_type : {'ao', 'wo'}
|
|
|
|
|
'ao' for atom percent and 'wo' for weight percent
|
|
|
|
|
enrichment : float, optional
|
2022-08-31 22:13:54 -05:00
|
|
|
Enrichment of an enrichment_target nuclide in percent (ao or wo). If
|
|
|
|
|
enrichment_target is not supplied then it is enrichment for U235 in
|
|
|
|
|
weight percent. For example, input 4.95 for 4.95 weight percent
|
2020-02-02 17:46:58 +01:00
|
|
|
enriched U. Default is None (natural composition).
|
|
|
|
|
enrichment_target: str, optional
|
2022-08-31 22:13:54 -05:00
|
|
|
Single nuclide name to enrich from a natural composition (e.g.,
|
|
|
|
|
'O16')
|
2020-04-10 21:52:43 -05:00
|
|
|
|
|
|
|
|
.. versionadded:: 0.12
|
2020-02-14 16:12:44 +00:00
|
|
|
enrichment_type: {'ao', 'wo'}, optional
|
|
|
|
|
'ao' for enrichment as atom percent and 'wo' for weight percent.
|
2020-03-04 11:58:46 +00:00
|
|
|
Default is: 'ao' for two-isotope enrichment; 'wo' for U enrichment
|
2020-04-10 21:52:43 -05:00
|
|
|
|
|
|
|
|
.. versionadded:: 0.12
|
2016-10-22 16:36:02 -04:00
|
|
|
cross_sections : str, optional
|
|
|
|
|
Location of cross_sections.xml file. Default is None.
|
|
|
|
|
|
2016-05-03 14:46:52 -06:00
|
|
|
Returns
|
|
|
|
|
-------
|
|
|
|
|
isotopes : list
|
|
|
|
|
Naturally-occurring isotopes of the element. Each item of the list
|
2017-11-29 23:23:38 -06:00
|
|
|
is a tuple consisting of a nuclide string, the atom/weight percent,
|
|
|
|
|
and the string 'ao' or 'wo'.
|
2016-05-03 14:46:52 -06:00
|
|
|
|
2020-02-02 21:12:16 +01:00
|
|
|
Raises
|
|
|
|
|
------
|
|
|
|
|
ValueError
|
|
|
|
|
No data is available for any of natural isotopes of the element
|
|
|
|
|
ValueError
|
2022-08-31 22:13:54 -05:00
|
|
|
If only some natural isotopes are available in the cross-section
|
|
|
|
|
data library and the element is not O, W, or Ta
|
2020-02-02 21:12:16 +01:00
|
|
|
ValueError
|
2020-03-04 11:41:52 +00:00
|
|
|
If a non-naturally-occurring isotope is requested
|
2020-02-02 21:12:16 +01:00
|
|
|
ValueError
|
2020-03-04 11:41:52 +00:00
|
|
|
If enrichment is requested of an element with more than two
|
|
|
|
|
naturally-occurring isotopes.
|
2020-02-14 18:55:50 +00:00
|
|
|
ValueError
|
|
|
|
|
If enrichment procedure for Uranium is used when element is not
|
|
|
|
|
Uranium.
|
2020-02-29 20:34:05 +00:00
|
|
|
ValueError
|
|
|
|
|
Uranium enrichment is requested with enrichment_type=='ao'
|
2020-02-14 18:55:50 +00:00
|
|
|
|
2017-10-04 14:15:13 -05:00
|
|
|
Notes
|
|
|
|
|
-----
|
|
|
|
|
When the `enrichment` argument is specified, a correlation from
|
|
|
|
|
`ORNL/CSD/TM-244 <https://doi.org/10.2172/5561567>`_ is used to
|
|
|
|
|
calculate the weight fractions of U234, U235, U236, and U238. Namely,
|
|
|
|
|
the weight fraction of U234 and U236 are taken to be 0.89% and 0.46%,
|
2022-08-31 22:13:54 -05:00
|
|
|
respectively, of the U235 weight fraction. The remainder of the isotopic
|
|
|
|
|
weight is assigned to U238.
|
2017-10-04 14:15:13 -05:00
|
|
|
|
2020-03-04 11:41:52 +00:00
|
|
|
When the `enrichment` argument is specified with `enrichment_target`, a
|
|
|
|
|
general enrichment procedure is used for elements composed of exactly
|
|
|
|
|
two naturally-occurring isotopes. `enrichment` is interpreted as atom
|
2020-03-04 11:58:46 +00:00
|
|
|
percent by default but can be controlled by the `enrichment_type`
|
2020-03-04 11:41:52 +00:00
|
|
|
argument.
|
2020-02-02 21:12:16 +01:00
|
|
|
|
2016-05-03 14:46:52 -06:00
|
|
|
"""
|
2020-02-14 17:54:01 +00:00
|
|
|
# Check input
|
2020-02-29 20:34:05 +00:00
|
|
|
if enrichment_type is not None:
|
|
|
|
|
cv.check_value('enrichment_type', enrichment_type, {'ao', 'wo'})
|
2016-05-03 14:46:52 -06:00
|
|
|
|
2020-02-14 18:55:50 +00:00
|
|
|
if enrichment is not None:
|
|
|
|
|
cv.check_less_than('enrichment', enrichment, 100.0, equality=True)
|
|
|
|
|
cv.check_greater_than('enrichment', enrichment, 0., equality=True)
|
|
|
|
|
|
2016-10-22 16:36:02 -04:00
|
|
|
# Get the nuclides present in nature
|
2020-08-14 15:04:45 -05:00
|
|
|
natural_nuclides = {name for name, abundance in natural_isotopes(self)}
|
2016-10-22 16:36:02 -04:00
|
|
|
|
2024-04-24 17:05:10 -04:00
|
|
|
# Issue warning if no existing nuclides
|
|
|
|
|
if len(natural_nuclides) == 0:
|
|
|
|
|
warnings.warn(f"No naturally occurring isotopes found for {self}.")
|
|
|
|
|
|
2016-10-25 20:54:56 -04:00
|
|
|
# Create dict to store the expanded nuclides and abundances
|
2023-08-19 13:15:11 +01:00
|
|
|
abundances = {}
|
2016-10-22 16:36:02 -04:00
|
|
|
|
2022-08-31 22:13:54 -05:00
|
|
|
# If cross_sections is None, get the cross sections from the global
|
|
|
|
|
# configuration
|
2016-10-22 16:36:02 -04:00
|
|
|
if cross_sections is None:
|
2022-08-31 22:13:54 -05:00
|
|
|
cross_sections = openmc.config.get('cross_sections')
|
2016-10-22 16:36:02 -04:00
|
|
|
|
|
|
|
|
# If a cross_sections library is present, check natural nuclides
|
|
|
|
|
# against the nuclides in the library
|
|
|
|
|
if cross_sections is not None:
|
|
|
|
|
library_nuclides = set()
|
|
|
|
|
tree = ET.parse(cross_sections)
|
|
|
|
|
root = tree.getroot()
|
2019-06-20 08:26:43 -05:00
|
|
|
for child in root.findall('library'):
|
2016-10-22 16:36:02 -04:00
|
|
|
nuclide = child.attrib['materials']
|
2025-06-18 18:10:03 +03:00
|
|
|
if re.match(r'{}\d+'.format(self), nuclide):
|
2016-10-25 20:54:56 -04:00
|
|
|
library_nuclides.add(nuclide)
|
2016-10-22 16:36:02 -04:00
|
|
|
|
2016-10-25 20:54:56 -04:00
|
|
|
# Get a set of the mutual and absent nuclides. Convert to lists
|
|
|
|
|
# and sort to avoid different ordering between Python 2 and 3.
|
2016-10-22 16:36:02 -04:00
|
|
|
mutual_nuclides = natural_nuclides.intersection(library_nuclides)
|
|
|
|
|
absent_nuclides = natural_nuclides.difference(mutual_nuclides)
|
2023-02-22 18:24:50 +00:00
|
|
|
mutual_nuclides = sorted(mutual_nuclides, key=zam)
|
|
|
|
|
absent_nuclides = sorted(absent_nuclides, key=zam)
|
2016-10-22 16:36:02 -04:00
|
|
|
|
2022-02-10 00:20:58 +00:00
|
|
|
# If all naturally occurring isotopes are present in the library,
|
2020-11-11 11:17:35 -06:00
|
|
|
# add them based on their abundance
|
2016-10-22 16:36:02 -04:00
|
|
|
if len(absent_nuclides) == 0:
|
2016-10-25 20:54:56 -04:00
|
|
|
for nuclide in mutual_nuclides:
|
|
|
|
|
abundances[nuclide] = NATURAL_ABUNDANCE[nuclide]
|
2016-10-22 16:36:02 -04:00
|
|
|
|
2020-11-11 11:17:35 -06:00
|
|
|
# If some naturally occurring isotopes are not present in the
|
|
|
|
|
# library, check if the "natural" nuclide (e.g., C0) is present. If
|
|
|
|
|
# so, set the abundance to 1 for this nuclide.
|
|
|
|
|
elif (self + '0') in library_nuclides:
|
|
|
|
|
abundances[self + '0'] = 1.0
|
|
|
|
|
|
2016-10-22 16:36:02 -04:00
|
|
|
elif len(mutual_nuclides) == 0:
|
2021-07-29 18:25:37 +01:00
|
|
|
msg = (f'Unable to expand element {self} because the cross '
|
2020-11-11 11:17:35 -06:00
|
|
|
'section library provided does not contain any of '
|
2021-07-29 18:25:37 +01:00
|
|
|
'the natural isotopes for that element.')
|
2020-11-11 11:17:35 -06:00
|
|
|
raise ValueError(msg)
|
|
|
|
|
|
|
|
|
|
# If some naturally occurring isotopes are in the library, add them.
|
|
|
|
|
# For the absent nuclides, add them based on our knowledge of the
|
|
|
|
|
# common cross section libraries (ENDF, JEFF, and JENDL)
|
2016-10-22 16:36:02 -04:00
|
|
|
else:
|
|
|
|
|
# Add the mutual isotopes
|
2016-10-25 20:54:56 -04:00
|
|
|
for nuclide in mutual_nuclides:
|
|
|
|
|
abundances[nuclide] = NATURAL_ABUNDANCE[nuclide]
|
2016-10-22 16:36:02 -04:00
|
|
|
|
|
|
|
|
# Adjust the abundances for the absent nuclides
|
2016-10-25 20:54:56 -04:00
|
|
|
for nuclide in absent_nuclides:
|
2016-10-28 13:24:35 +00:00
|
|
|
if nuclide in ['O17', 'O18'] and 'O16' in mutual_nuclides:
|
2016-10-25 20:54:56 -04:00
|
|
|
abundances['O16'] += NATURAL_ABUNDANCE[nuclide]
|
2025-06-18 18:10:03 +03:00
|
|
|
elif nuclide == 'Ta180_m1' and 'Ta181' in mutual_nuclides:
|
|
|
|
|
abundances['Ta181'] += NATURAL_ABUNDANCE[nuclide]
|
2016-10-25 20:54:56 -04:00
|
|
|
elif nuclide == 'W180' and 'W182' in mutual_nuclides:
|
|
|
|
|
abundances['W182'] += NATURAL_ABUNDANCE[nuclide]
|
|
|
|
|
else:
|
|
|
|
|
msg = 'Unsure how to partition natural abundance of ' \
|
|
|
|
|
'isotope {0} into other natural isotopes of ' \
|
|
|
|
|
'this element that are present in the cross ' \
|
|
|
|
|
'section library provided. Consider adding ' \
|
|
|
|
|
'the isotopes of this element individually.'
|
|
|
|
|
raise ValueError(msg)
|
2016-10-22 16:36:02 -04:00
|
|
|
|
|
|
|
|
# If a cross_section library is not present, expand the element into
|
|
|
|
|
# its natural nuclides
|
|
|
|
|
else:
|
2023-02-22 18:24:50 +00:00
|
|
|
for nuclide in sorted(natural_nuclides, key=zam):
|
2016-11-09 18:10:41 -05:00
|
|
|
abundances[nuclide] = NATURAL_ABUNDANCE[nuclide]
|
2016-10-22 16:36:02 -04:00
|
|
|
|
|
|
|
|
# Modify mole fractions if enrichment provided
|
2020-02-02 17:46:58 +01:00
|
|
|
# Old treatment for Uranium
|
|
|
|
|
if enrichment is not None and enrichment_target is None:
|
2016-10-22 16:36:02 -04:00
|
|
|
|
2020-02-14 17:54:01 +00:00
|
|
|
# Check that the element is Uranium
|
|
|
|
|
if self.name != 'U':
|
2021-07-31 22:33:45 +01:00
|
|
|
msg = ('Enrichment procedure for Uranium was requested, '
|
|
|
|
|
f'but the isotope is {self} not U')
|
2020-02-14 17:54:01 +00:00
|
|
|
raise ValueError(msg)
|
|
|
|
|
|
2020-02-29 20:34:05 +00:00
|
|
|
# Check that enrichment_type is not 'ao'
|
|
|
|
|
if enrichment_type == 'ao':
|
2020-03-04 11:41:52 +00:00
|
|
|
msg = ('Enrichment procedure for Uranium requires that '
|
|
|
|
|
'enrichment value is provided as wo%.')
|
2020-02-29 20:34:05 +00:00
|
|
|
raise ValueError(msg)
|
|
|
|
|
|
2016-10-22 16:36:02 -04:00
|
|
|
# Calculate the mass fractions of isotopes
|
2017-10-04 14:15:13 -05:00
|
|
|
abundances['U234'] = 0.0089 * enrichment
|
2016-10-25 20:54:56 -04:00
|
|
|
abundances['U235'] = enrichment
|
2017-10-04 14:15:13 -05:00
|
|
|
abundances['U236'] = 0.0046 * enrichment
|
|
|
|
|
abundances['U238'] = 100.0 - 1.0135 * enrichment
|
2016-10-22 16:36:02 -04:00
|
|
|
|
|
|
|
|
# Convert the mass fractions to mole fractions
|
2016-10-25 20:54:56 -04:00
|
|
|
for nuclide in abundances.keys():
|
|
|
|
|
abundances[nuclide] /= atomic_mass(nuclide)
|
2016-10-22 16:36:02 -04:00
|
|
|
|
|
|
|
|
# Normalize the mole fractions to one
|
2016-10-25 20:54:56 -04:00
|
|
|
sum_abundances = sum(abundances.values())
|
|
|
|
|
for nuclide in abundances.keys():
|
|
|
|
|
abundances[nuclide] /= sum_abundances
|
2016-10-22 16:36:02 -04:00
|
|
|
|
2020-02-02 17:46:58 +01:00
|
|
|
# Modify mole fractions if enrichment provided
|
2020-02-14 17:54:01 +00:00
|
|
|
# New treatment for arbitrary element
|
2020-02-02 20:54:41 +01:00
|
|
|
elif enrichment is not None and enrichment_target is not None:
|
|
|
|
|
|
2020-02-26 12:18:19 +00:00
|
|
|
# Provide more informative error message for U235
|
|
|
|
|
if enrichment_target == 'U235':
|
2020-03-04 11:41:52 +00:00
|
|
|
msg = ("There is a special procedure for enrichment of U235 "
|
|
|
|
|
"in U. To invoke it, the arguments 'enrichment_target'"
|
|
|
|
|
"and 'enrichment_type' should be omitted. Provide "
|
|
|
|
|
"a value only for 'enrichment' in weight percent.")
|
2020-02-26 12:18:19 +00:00
|
|
|
raise ValueError(msg)
|
|
|
|
|
|
|
|
|
|
# Check if it is two-isotope mixture
|
2020-02-14 16:12:44 +00:00
|
|
|
if len(abundances) != 2:
|
2021-07-29 18:25:37 +01:00
|
|
|
msg = (f'Element {self} does not consist of two naturally-occurring '
|
|
|
|
|
'isotopes. Please enter isotopic abundances manually.')
|
2020-02-14 16:12:44 +00:00
|
|
|
raise ValueError(msg)
|
|
|
|
|
|
2020-02-02 20:54:41 +01:00
|
|
|
# Check if the target nuclide is present in the mixture
|
2020-03-04 11:41:52 +00:00
|
|
|
if enrichment_target not in abundances:
|
|
|
|
|
msg = ('The target nuclide {} is not one of the naturally-occurring '
|
|
|
|
|
'isotopes ({})'.format(enrichment_target, list(abundances)))
|
2020-02-02 20:54:41 +01:00
|
|
|
raise ValueError(msg)
|
|
|
|
|
|
2020-02-14 16:12:44 +00:00
|
|
|
# If weight percent enrichment is requested convert to mass fractions
|
|
|
|
|
if enrichment_type == 'wo':
|
|
|
|
|
# Convert the atomic abundances to weight fractions
|
|
|
|
|
# Compute the element atomic mass
|
2020-03-04 11:41:52 +00:00
|
|
|
element_am = sum(atomic_mass(nuc)*abundances[nuc] for nuc in abundances)
|
2020-02-02 20:54:41 +01:00
|
|
|
|
2020-02-14 16:12:44 +00:00
|
|
|
# Convert Molar Fractions to mass fractions
|
2020-03-04 11:41:52 +00:00
|
|
|
for nuclide in abundances:
|
2020-02-14 16:12:44 +00:00
|
|
|
abundances[nuclide] *= atomic_mass(nuclide) / element_am
|
2020-02-02 20:54:41 +01:00
|
|
|
|
2020-03-04 11:41:52 +00:00
|
|
|
# Normalize to one
|
2020-02-14 16:12:44 +00:00
|
|
|
sum_abundances = sum(abundances.values())
|
2020-03-04 11:41:52 +00:00
|
|
|
for nuclide in abundances:
|
2020-02-14 16:12:44 +00:00
|
|
|
abundances[nuclide] /= sum_abundances
|
2020-02-02 20:54:41 +01:00
|
|
|
|
2020-02-14 16:12:44 +00:00
|
|
|
# Enrich the mixture
|
|
|
|
|
# The procedure is more generic that it needs to be. It allows
|
2020-03-04 11:41:52 +00:00
|
|
|
# to enrich mixtures of more then 2 isotopes, keeping the ratios
|
2020-02-14 16:12:44 +00:00
|
|
|
# of non-enriched nuclides the same as in natural composition
|
2020-02-02 20:54:41 +01:00
|
|
|
|
|
|
|
|
# Get fraction of non-enriched isotopes in nat. composition
|
|
|
|
|
non_enriched = 1.0 - abundances[enrichment_target]
|
|
|
|
|
tail_fraction = 1.0 - enrichment / 100.0
|
|
|
|
|
|
2020-02-14 16:12:44 +00:00
|
|
|
# Enrich all nuclides
|
2022-02-10 00:20:58 +00:00
|
|
|
# Do bogus operation for enrichment target but overwrite immediately
|
2020-02-14 16:12:44 +00:00
|
|
|
# to avoid if statement in the loop
|
2020-02-02 20:54:41 +01:00
|
|
|
for nuclide, fraction in abundances.items():
|
|
|
|
|
abundances[nuclide] = tail_fraction * fraction / non_enriched
|
|
|
|
|
abundances[enrichment_target] = enrichment / 100.0
|
|
|
|
|
|
2020-02-14 16:12:44 +00:00
|
|
|
# Convert back to atomic fractions if requested
|
|
|
|
|
if enrichment_type == 'wo':
|
|
|
|
|
# Convert the mass fractions to mole fractions
|
2020-03-04 11:41:52 +00:00
|
|
|
for nuclide in abundances:
|
2020-02-14 16:12:44 +00:00
|
|
|
abundances[nuclide] /= atomic_mass(nuclide)
|
2020-02-02 20:54:41 +01:00
|
|
|
|
2020-02-14 16:12:44 +00:00
|
|
|
# Normalize the mole fractions to one
|
|
|
|
|
sum_abundances = sum(abundances.values())
|
2020-03-04 11:41:52 +00:00
|
|
|
for nuclide in abundances:
|
2020-02-14 16:12:44 +00:00
|
|
|
abundances[nuclide] /= sum_abundances
|
2020-02-02 17:46:58 +01:00
|
|
|
|
2016-10-25 21:13:14 -04:00
|
|
|
# Compute the ratio of the nuclide atomic masses to the element
|
2016-10-22 16:36:02 -04:00
|
|
|
# atomic mass
|
|
|
|
|
if percent_type == 'wo':
|
|
|
|
|
|
|
|
|
|
# Compute the element atomic mass
|
|
|
|
|
element_am = 0.
|
2016-10-25 20:54:56 -04:00
|
|
|
for nuclide in abundances.keys():
|
|
|
|
|
element_am += atomic_mass(nuclide) * abundances[nuclide]
|
2016-10-22 16:36:02 -04:00
|
|
|
|
|
|
|
|
# Convert the molar fractions to mass fractions
|
2016-10-25 20:54:56 -04:00
|
|
|
for nuclide in abundances.keys():
|
|
|
|
|
abundances[nuclide] *= atomic_mass(nuclide) / element_am
|
2016-10-22 16:36:02 -04:00
|
|
|
|
|
|
|
|
# Normalize the mass fractions to one
|
2016-10-25 20:54:56 -04:00
|
|
|
sum_abundances = sum(abundances.values())
|
|
|
|
|
for nuclide in abundances.keys():
|
|
|
|
|
abundances[nuclide] /= sum_abundances
|
2016-10-22 16:36:02 -04:00
|
|
|
|
2016-10-24 09:12:57 -04:00
|
|
|
# Create a list of the isotopes in this element
|
2016-05-03 14:46:52 -06:00
|
|
|
isotopes = []
|
2016-10-25 20:54:56 -04:00
|
|
|
for nuclide, abundance in abundances.items():
|
2017-11-29 23:23:38 -06:00
|
|
|
isotopes.append((nuclide, percent * abundance, percent_type))
|
2016-10-22 16:36:02 -04:00
|
|
|
|
2016-05-03 14:46:52 -06:00
|
|
|
return isotopes
|