Merge pull request #3 from ChasingNeutrons/element_name

Element name
This commit is contained in:
ChasingNeutrons 2020-02-27 12:49:31 +00:00 committed by GitHub
commit a01e37b503
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -4,6 +4,7 @@ import os
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

View file

@ -530,8 +530,8 @@ class Material(IDManagerMixin):
# 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)