Skip to content

Commit

Permalink
Merge pull request #3 from ChasingNeutrons/element_name
Browse files Browse the repository at this point in the history
Element name
  • Loading branch information
ChasingNeutrons authored Feb 27, 2020
2 parents eba6a6e + 70b2f96 commit a01e37b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions openmc/data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import re
from warnings import warn


# Isotopic abundances from Meija J, Coplen T B, et al, "Isotopic compositions
# of the elements 2013 (IUPAC Technical Report)", Pure. Appl. Chem. 88 (3),
# pp. 293-306 (2013). The "representative isotopic abundance" values from
Expand Down
4 changes: 2 additions & 2 deletions openmc/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,8 @@ def add_element(self, element, percent, percent_type='ao', enrichment=None):
# Allow for element identifier to be given as a symbol or name
if len(element)>2:
el = element.lower()
element = openmc.data.ELEMENT_SYMBOL.get(el,"empty")
if element == "empty":
element = openmc.data.ELEMENT_SYMBOL.get(el)
if element is None:
msg = 'Element name "{}" not recognised'.format(el)
raise ValueError(msg)

Expand Down

0 comments on commit a01e37b

Please sign in to comment.