From c9e2e4337b2eea6dca7eff9433f9605ba2b5f829 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Fri, 2 Jun 2017 11:00:45 -0500 Subject: [PATCH] Fix maximum energy for generating thermal ACE files --- openmc/data/njoy.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openmc/data/njoy.py b/openmc/data/njoy.py index e7d3cd284..80817bf71 100644 --- a/openmc/data/njoy.py +++ b/openmc/data/njoy.py @@ -118,12 +118,12 @@ thermr / %%%%%%%%%%%%%%%% Add thermal scattering data (free gas) %%%%%%%%%%%%%%% 0 23 62 0 {mat} 12 {num_temp} 1 0 {iform} 1 221 1/ {temps} -0.001 4.0 +0.001 {energy_max} thermr / %%%%%%%%%%%%%%%% Add thermal scattering data (bound) %%%%%%%%%%%%%%%%%% 60 62 27 {mat_thermal} {mat} 16 {num_temp} {inelastic} {elastic} {iform} {natom} 222 1/ {temps} -0.001 4.0 +0.001 {energy_max} """ _ACE_THERMAL_TEMPLATE_ACER = """acer / @@ -347,7 +347,6 @@ def make_ace_thermal(filename, filename_thermal, temperatures=None, data = _THERMAL_DATA[mat_thermal] zaids = ' '.join(str(zaid) for zaid in data.zaids[:3]) - energy_max = ev_thermal.info['energy_max'] # Determine name of library library = '{}-{}.{}'.format(*ev_thermal.info['library']) @@ -369,6 +368,7 @@ def make_ace_thermal(filename, filename_thermal, temperatures=None, file_obj = StringIO(ev_thermal.section[7, 4]) items = endf.get_head_record(file_obj) items, values = endf.get_list_record(file_obj) + energy_max = values[3] natom = int(values[5]) # Note that the 'iform' parameter is omitted in NJOY 99. We assume that the