mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Updated regex to cross reference nuclides with elements
This commit is contained in:
parent
4100e97b00
commit
7900ad925a
1 changed files with 1 additions and 1 deletions
|
|
@ -200,7 +200,7 @@ def atomic_weight(element):
|
|||
"""
|
||||
weight = 0.
|
||||
for nuclide, abundance in NATURAL_ABUNDANCE.items():
|
||||
if re.match(element, nuclide):
|
||||
if re.match(r'{}\d+'.format(element), nuclide):
|
||||
weight += atomic_mass(nuclide) * abundance
|
||||
return None if weight == 0. else weight
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue