From b791450b751a294cd42904b0638cba6b4fe72b9c Mon Sep 17 00:00:00 2001 From: Will Boyd Date: Thu, 11 Aug 2016 13:46:07 -0400 Subject: [PATCH] Added conditional to pass qualifying S(a,b) names through converter method --- openmc/data/thermal.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openmc/data/thermal.py b/openmc/data/thermal.py index 275836be7..8b6e35b61 100644 --- a/openmc/data/thermal.py +++ b/openmc/data/thermal.py @@ -43,7 +43,9 @@ _THERMAL_NAMES = {'al': 'c_Al27', 'al27': 'c_Al27', def get_thermal_name(name): """Get proper S(a,b) table name, e.g. 'HH2O' -> 'c_H_in_H2O'""" - if name.lower() in _THERMAL_NAMES: + if name in _THERMAL_NAMES.values(): + return name + elif name.lower() in _THERMAL_NAMES: return _THERMAL_NAMES[name.lower()] else: # Make an educated guess?? This actually works well for @@ -52,7 +54,7 @@ def get_thermal_name(name): matches = get_close_matches( name.lower(), _THERMAL_NAMES.keys(), cutoff=0.5) if len(matches) > 0: - return _THERMAL_NAMES[matches[0]] + '.' + xs + return _THERMAL_NAMES[matches[0]] else: # OK, we give up. Just use the ACE name. return 'c_' + name