From 334466d57f0c43503a091372a79149589b666633 Mon Sep 17 00:00:00 2001 From: liangjg Date: Mon, 3 Dec 2018 16:37:28 -0500 Subject: [PATCH 1/2] added scripts to generate 255-nuclide, simplified depetion chain from CASL-ORIGEN --- scripts/casl_chain.py | 266 +++++++++++++++++++++++ scripts/openmc-make-depletion-chain-casl | 238 ++++++++++++++++++++ 2 files changed, 504 insertions(+) create mode 100755 scripts/casl_chain.py create mode 100755 scripts/openmc-make-depletion-chain-casl diff --git a/scripts/casl_chain.py b/scripts/casl_chain.py new file mode 100755 index 0000000000..24fd017729 --- /dev/null +++ b/scripts/casl_chain.py @@ -0,0 +1,266 @@ +# This dictionary contains the 255-nuclides, simplified burnup chain used in +# CASL-ORIGEN, which can be found in Appendix A of Kang Seog Kim, "Specification +# for the VERA Depletion Benchmark Suite", CASL-U-2015-1014-000, Rev. 0, +# ORNL/TM-2016/53, 2016. +# +# Note 32 of the 255 nuclides appeare twice as they are both activation +# nuclides (category 1) and fission product nuclides (category 3). + +CASL_CHAIN = { + # Nuclide: (Is stable, CAT, IFPY, Special yield treatment) + 'B10': (True, 1, 0, None), + 'B11': (True, 1, 0, None), + 'O16': (True, 1, 0, None), + 'Ag107': (True, 1, 0, None), + 'Ag109': (True, 1, 0, None), # redundant as FP + 'Ag110': (False, 1, 0, None), # redundant as FP + 'Cd110': (True, 1, 0, None), # redundant as FP + 'Cd111': (True, 1, 0, None), # redundant as FP + 'Cd112': (True, 1, 0, None), + 'Cd113': (True, 1, 0, None), # redundant as FP + 'Cd114': (True, 1, 0, None), + 'Cd115': (False, 1, 0, None), + 'In113': (True, 1, 0, None), + 'In115': (True, 1, 0, None), # redundant as FP + 'Sm152': (True, 1, 0, None), # redundant as FP + 'Sm153': (False, 1, 0, None), # redundant as FP + 'Eu151': (True, 1, 0, None), # redundant as FP + 'Eu152': (False, 1, 0, None), + 'Eu152_m1': (False, 1, 0, None), + 'Eu153': (True, 1, 0, None), # redundant as FP + 'Eu154': (False, 1, 0, None), # redundant as FP + 'Eu155': (False, 1, 0, None), # redundant as FP + 'Eu156': (False, 1, 0, None), # redundant as FP + 'Eu157': (False, 1, 0, None), # redundant as FP + 'Gd152': (True, 1, 0, None), + 'Gd154': (True, 1, 0, None), # redundant as FP + 'Gd155': (True, 1, 0, None), # redundant as FP + 'Gd156': (True, 1, 0, None), # redundant as FP + 'Gd157': (True, 1, 0, None), # redundant as FP + 'Gd158': (True, 1, 0, None), # redundant as FP + 'Gd159': (False, 1, 0, None), # redundant as FP + 'Gd160': (True, 1, 0, None), # redundant as FP + 'Gd161': (False, 1, 0, None), # redundant as FP + 'Tb159': (True, 1, 0, None), # redundant as FP + 'Tb160': (False, 1, 0, None), # redundant as FP + 'Tb161': (False, 1, 0, None), # redundant as FP + 'Dy160': (True, 1, 0, None), # redundant as FP + 'Dy161': (True, 1, 0, None), # redundant as FP + 'Dy162': (True, 1, 0, None), # redundant as FP + 'Dy163': (True, 1, 0, None), # redundant as FP + 'Dy164': (True, 1, 0, None), # redundant as FP + 'Dy165': (False, 1, 0, None), # redundant as FP + 'Ho165': (True, 1, 0, None), # redundant as FP + 'Er162': (True, 1, 0, None), + 'Er164': (True, 1, 0, None), + 'Er166': (True, 1, 0, None), + 'Er167': (True, 1, 0, None), + 'Er168': (True, 1, 0, None), + 'Er169': (False, 1, 0, None), + 'Er170': (True, 1, 0, None), + 'Er171': (False, 1, 0, None), + 'Tm169': (True, 1, 0, None), + 'Tm170': (False, 1, 0, None), + 'Tm171': (False, 1, 0, None), + 'Hf174': (True, 1, 0, None), + 'Hf176': (True, 1, 0, None), + 'Hf177': (True, 1, 0, None), + 'Hf178': (True, 1, 0, None), + 'Hf179': (True, 1, 0, None), + 'Hf180': (True, 1, 0, None), + 'Hf181': (False, 1, 0, None), + 'Ta181': (True, 1, 0, None), + 'Ta182': (False, 1, 0, None), + 'Th230': (False, 2, 0, None), + 'Th231': (False, 2, 0, None), + 'Th232': (False, 2, 0, None), + 'Th233': (False, 2, 0, None), + 'Th234': (False, 2, 0, None), + 'Pa231': (False, 2, 0, None), + 'Pa232': (False, 2, 0, None), + 'Pa233': (False, 2, 0, None), + 'Pa234': (False, 2, 0, None), + 'U232': (False, 2, 0, None), + 'U233': (False, 2, 0, None), + 'U234': (False, 2, 0, None), + 'U235': (False, 2, 0, None), + 'U236': (False, 2, 0, None), + 'U237': (False, 2, 0, None), + 'U238': (False, 2, 0, None), + 'U239': (False, 2, 0, None), + 'Np236': (False, 2, 0, None), + 'Np237': (False, 2, 0, None), + 'Np238': (False, 2, 0, None), + 'Np239': (False, 2, 0, None), + 'Np240': (False, 2, 0, None), + 'Np240_m1': (False, 2, 0, None), + 'Pu236': (False, 2, 0, None), + 'Pu237': (False, 2, 0, None), + 'Pu238': (False, 2, 0, None), + 'Pu239': (False, 2, 0, None), + 'Pu240': (False, 2, 0, None), + 'Pu241': (False, 2, 0, None), + 'Pu242': (False, 2, 0, None), + 'Pu243': (False, 2, 0, None), + 'Am241': (False, 2, 0, None), + 'Am242': (False, 2, 0, None), + 'Am242_m1': (False, 2, 0, None), + 'Am243': (False, 2, 0, None), + 'Am244': (False, 2, 0, None), + 'Am244_m1': (False, 2, 0, None), + 'Cm242': (False, 2, 0, None), + 'Cm243': (False, 2, 0, None), + 'Cm244': (False, 2, 0, None), + 'Cm245': (False, 2, 0, None), + 'Cm246': (False, 2, 0, None), + 'Br81': (True, 3, 2, None), + 'Br82': (False, 3, 2, None), + 'Kr82': (True, 3, 3, [('Br82_m1', 0.024, 1), ('Kr82', 1.000, 1)]), + 'Kr83': (True, 3, 2, None), + 'Kr84': (True, 3, 2, None), + 'Kr85': (False, 3, 2, None), + 'Kr86': (True, 3, 2, None), + 'Sr89': (False, 3, 2, None), + 'Sr90': (False, 3, 2, None), + 'Y89': (True, 3, 1, None), + 'Y90': (False, 3, 1, None), + 'Y91': (False, 3, 2, None), + 'Zr91': (True, 3, 1, None), + 'Zr93': (False, 3, 2, None), + 'Zr95': (False, 3, 2, None), + 'Zr96': (True, 3, 2, None), + 'Nb95': (False, 3, 3, [('Nb95',1.000, 1), ('Nb95_m1', 0.944, 1)]), + 'Mo95': (True, 3, 3, [('Nb95_m1',0.056, 1), ('Mo95', 1.000, 1)]), + 'Mo96': (True, 3, 3, [('Nb96',1.000, 1), ('Mo96', 1.000, 1)]), + 'Mo97': (True, 3, 2, None), + 'Mo98': (True, 3, 2, None), + 'Mo99': (False, 3, 2, None), + 'Mo100': (True, 3, 2, None), + 'Tc99': (False, 3, 1, None), + 'Tc99_m1': (False, 3, 1, None), + 'Tc100': (False, 3, 1, None), + 'Ru100': (True, 3, 1, None), + 'Ru101': (True, 3, 2, None), + 'Ru102': (True, 3, 2, None), + 'Ru103': (False, 3, 2, None), + 'Ru104': (True, 3, 2, None), + 'Ru105': (False, 3, 2, None), + 'Ru106': (False, 3, 2, None), + 'Rh102': (False, 3, 1, None), + 'Rh102_m1': (False, 3, 1, None), + 'Rh103': (True, 3, 1, None), + 'Rh103_m1': (False, 3, 1, None), + 'Rh104': (False, 3, 1, None), + 'Rh105': (False, 3, 1, None), + 'Rh105_m1': (False, 3, 1, None), + 'Rh106': (False, 3, 1, None), + 'Rh106_m1': (False, 3, 1, None), + 'Pd104': (True, 3, 1, None), + 'Pd105': (True, 3, 1, None), + 'Pd106': (True, 3, 1, None), + 'Pd107': (False, 3, 2, None), + 'Pd108': (True, 3, 2, None), + 'Pd109': (False, 3, 2, None), + 'Ag109': (True, 3, 1, None), + 'Ag109_m1': (False, 3, 1, None), + 'Ag110': (False, 3, 2, None), + 'Ag110_m1': (False, 3, 2, None), + 'Ag111': (False, 3, 2, None), + 'Cd110': (True, 3, 1, None), + 'Cd111': (True, 3, 3, [('Ag110', -1.000, 2), ('Cd110', 1.000, 2), ('Cd111', 1.000, 1)]), + 'Cd113': (True, 3, 2, None), + 'In115': (True, 3, 2, None), + 'Sb121': (True, 3, 2, None), + 'Sb123': (False, 3, 2, None), + 'Sb125': (False, 3, 2, None), + 'Sb127': (False, 3, 2, None), + 'Te127': (False, 3, -1, None), + 'Te127_m1': (False, 3, -1, None), + 'Te129_m1': (False, 3, 2, None), + 'Te132': (False, 3, 2, None), + 'I127': (True, 3, 1, None), + 'I128': (False, 3, 3, [('I128', 0.931, 2)]), + 'I129': (False, 3, 3, [('I129', 1.000, 2), ('I129', -1.000, 2)]), + 'I130': (False, 3, 2, None), + 'I131': (False, 3, 2, None), + 'I132': (False, 3, 1, None), + 'I135': (False, 3, 2, None), + 'Xe128': (True, 3, 1, None), + 'Xe130': (True, 3, 1, None), + 'Xe131': (True, 3, 1, None), + 'Xe132': (True, 3, 1, None), + 'Xe133': (False, 3, 2, None), + 'Xe134': (True, 3, 2, None), + 'Xe135': (False, 3, 1, None), + 'Xe135_m1': (False, 3, 1, None), + 'Xe136': (True, 3, 2, None), + 'Xe137': (False, 3, 2, None), + 'Cs133': (True, 3, 1, None), + 'Cs134': (False, 3, 1, None), + 'Cs135': (False, 3, 1, None), + 'Cs136': (False, 3, 1, None), + 'Cs137': (False, 3, 1, None), + 'Ba134': (True, 3, 1, None), + 'Ba137': (True, 3, 1, None), + 'Ba140': (False, 3, 2, None), + 'La139': (True, 3, 2, None), + 'La140': (False, 3, 1, None), + 'Ce140': (True, 3, 1, None), + 'Ce141': (False, 3, 2, None), + 'Ce142': (True, 3, 2, None), + 'Ce143': (False, 3, 2, None), + 'Ce144': (False, 3, 2, None), + 'Pr141': (True, 3, 1, None), + 'Pr142': (False, 3, 1, None), + 'Pr143': (False, 3, 1, None), + 'Pr144': (False, 3, 1, None), + 'Nd142': (True, 3, 1, None), + 'Nd143': (True, 3, 1, None), + 'Nd144': (False, 3, 1, None), + 'Nd145': (True, 3, 2, None), + 'Nd146': (True, 3, 2, None), + 'Nd147': (False, 3, 2, None), + 'Nd148': (True, 3, 2, None), + 'Nd149': (False, 3, 2, None), + 'Nd150': (True, 3, 2, None), + 'Nd151': (False, 3, 2, None), + 'Pm147': (False, 3, 1, None), + 'Pm148': (False, 3, -1, None), + 'Pm148_m1': (False, 3, -1, None), + 'Pm149': (False, 3, 1, None), + 'Pm150': (False, 3, 1, None), + 'Pm151': (False, 3, 1, None), + 'Sm147': (False, 3, 1, None), + 'Sm148': (False, 3, 1, None), + 'Sm149': (False, 3, 1, None), + 'Sm150': (True, 3, 1, None), + 'Sm151': (False, 3, 1, None), + 'Sm152': (True, 3, 2, None), + 'Sm153': (False, 3, 2, None), + 'Sm154': (True, 3, 2, None), + 'Sm155': (False, 3, 2, None), + 'Eu151': (True, 3, 1, None), + 'Eu153': (True, 3, 1, None), + 'Eu154': (False, 3, 1, None), + 'Eu155': (False, 3, 1, None), + 'Eu156': (False, 3, 2, None), + 'Eu157': (False, 3, 2, None), + 'Gd154': (True, 3, 1, None), + 'Gd155': (True, 3, 1, None), + 'Gd156': (True, 3, 1, None), + 'Gd157': (True, 3, 1, None), + 'Gd158': (True, 3, 2, None), + 'Gd159': (False, 3, 2, None), + 'Gd160': (True, 3, 2, None), + 'Gd161': (False, 3, 2, None), + 'Tb159': (True, 3, 1, None), + 'Tb160': (False, 3, 1, None), + 'Tb161': (False, 3, 1, None), + 'Dy160': (True, 3, 1, None), + 'Dy161': (True, 3, 1, None), + 'Dy162': (True, 3, 2, None), + 'Dy163': (True, 3, 2, None), + 'Dy164': (True, 3, 2, None), + 'Dy165': (False, 3, 2, None), + 'Ho165': (True, 3, 3, [('Dy165_m1', 0.022, 2), ('Ho165', 1.000, 1)]) +} diff --git a/scripts/openmc-make-depletion-chain-casl b/scripts/openmc-make-depletion-chain-casl new file mode 100755 index 0000000000..5032785b21 --- /dev/null +++ b/scripts/openmc-make-depletion-chain-casl @@ -0,0 +1,238 @@ +#!/usr/bin/env python3 + +import glob +import os +from zipfile import ZipFile +from collections import OrderedDict, defaultdict +from io import StringIO +from itertools import chain + +try: + import lxml.etree as ET + _have_lxml = True +except ImportError: + import xml.etree.ElementTree as ET + _have_lxml = False + +import openmc.data +import openmc.deplete +from openmc._xml import clean_indentation +from openmc.deplete.chain import _REACTIONS +from openmc.deplete.nuclide import Nuclide, DecayTuple, ReactionTuple +from openmc._utils import download + +from casl_chain import CASL_CHAIN + +URLS = [ + 'http://www.nndc.bnl.gov/endf/b7.1/zips/ENDF-B-VII.1-neutrons.zip', + 'http://www.nndc.bnl.gov/endf/b7.1/zips/ENDF-B-VII.1-decay.zip', + 'http://www.nndc.bnl.gov/endf/b7.1/zips/ENDF-B-VII.1-nfy.zip' +] + +def main(): + if 'OPENMC_ENDF_DATA' in os.environ: + endf_dir = os.environ['OPENMC_ENDF_DATA'] + elif os.path.isdir("./decay") and os.path.isdir("./nfy") and os.path.isdir("./neutrons"): + endf_dir = '.' + else: + for url in URLS: + basename = download(url) + with ZipFile(basename, 'r') as zf: + print('Extracting {}...'.format(basename)) + zf.extractall() + endf_dir = '.' + + decay_files = glob.glob(os.path.join(endf_dir, 'decay', '*.endf')) + fpy_files = glob.glob(os.path.join(endf_dir, 'nfy', '*.endf')) + neutron_files = glob.glob(os.path.join(endf_dir, 'neutrons', '*.endf')) + + # Create a Chain + chain = openmc.deplete.Chain() + + # Create dictionary mapping target to filename + print('Processing neutron sub-library files...') + reactions = {} + for f in neutron_files: + evaluation = openmc.data.endf.Evaluation(f) + name = evaluation.gnd_name + if name in CASL_CHAIN: + reactions[name] = {} + for mf, mt, nc, mod in evaluation.reaction_list: + if mf == 3: + file_obj = StringIO(evaluation.section[3, mt]) + openmc.data.endf.get_head_record(file_obj) + q_value = openmc.data.endf.get_cont_record(file_obj)[1] + reactions[name][mt] = q_value + + # Determine what decay and FPY nuclides are available + print('Processing decay sub-library files...') + decay_data = {} + for f in decay_files: + data = openmc.data.Decay(f) + name = data.nuclide['name'] + if name in CASL_CHAIN: + decay_data[name] = data + + for name in CASL_CHAIN: + if name not in decay_data: + print("{} has not decay data?".format(name)) + + print('Processing fission product yield sub-library files...') + fpy_data = {} + for f in fpy_files: + data = openmc.data.FissionProductYields(f) + name = data.nuclide['name'] + if name in CASL_CHAIN: + fpy_data[name] = data + + print('Creating depletion_chain...') + missing_daughter = [] + missing_rx_product = [] + missing_fpy = [] + + for idx, parent in enumerate(sorted(decay_data, key=openmc.data.zam)): + data = decay_data[parent] + + nuclide = Nuclide() + nuclide.name = parent + + chain.nuclides.append(nuclide) + chain.nuclide_dict[parent] = idx + + if not CASL_CHAIN[parent][0] and \ + not data.nuclide['stable'] and data.half_life.nominal_value != 0.0: + nuclide.half_life = data.half_life.nominal_value + nuclide.decay_energy = sum(E.nominal_value for E in + data.average_energies.values()) + sum_br = 0.0 + for i, mode in enumerate(data.modes): + type_ = ','.join(mode.modes) + if mode.daughter in decay_data: + target = mode.daughter + else: + print('missing {} {} {}'.format(parent, ','.join(mode.modes), mode.daughter)) + continue + + # Write branching ratio, taking care to ensure sum is unity + br = mode.branching_ratio.nominal_value + sum_br += br + if i == len(data.modes) - 1 and sum_br != 1.0: + br = 1.0 - sum(m.branching_ratio.nominal_value + for m in data.modes[:-1]) + + # Append decay mode + nuclide.decay_modes.append(DecayTuple(type_, target, br)) + + if parent in reactions: + reactions_available = set(reactions[parent].keys()) + for name, mts, changes in _REACTIONS: + if mts & reactions_available: + delta_A, delta_Z = changes + A = data.nuclide['mass_number'] + delta_A + Z = data.nuclide['atomic_number'] + delta_Z + daughter = '{}{}'.format(openmc.data.ATOMIC_SYMBOL[Z], A) + + if name not in chain.reactions: + chain.reactions.append(name) + + if daughter not in decay_data: + missing_rx_product.append((parent, name, daughter)) + daughter = 'Nothing' + + # Store Q value + for mt in sorted(mts): + if mt in reactions[parent]: + q_value = reactions[parent][mt] + break + else: + q_value = 0.0 + + nuclide.reactions.append(ReactionTuple( + name, daughter, q_value, 1.0)) + + if any(mt in reactions_available for mt in [18, 19, 20, 21, 38]): + if parent in fpy_data: + q_value = reactions[parent][18] + nuclide.reactions.append( + ReactionTuple('fission', 0, q_value, 1.0)) + + if 'fission' not in chain.reactions: + chain.reactions.append('fission') + else: + missing_fpy.append(parent) + + if parent in fpy_data: + fpy = fpy_data[parent] + + if fpy.energies is not None: + nuclide.yield_energies = fpy.energies + else: + nuclide.yield_energies = [0.0] + + for E, table_yd, table_yc in zip(nuclide.yield_energies, fpy.independent, fpy.cumulative): + yields = defaultdict(float) + for product in table_yd: + if product in decay_data: + # identifier + ifpy = CASL_CHAIN[product][2] + # 1 for independent + if ifpy == 1: + if product not in table_yd: + print("No independent fission yields found for {} in {}".format(product, parent)) + else: + yields[product] += table_yd[product].nominal_value + # 2 for cumulative + elif ifpy == 2: + if product not in table_yc: + print("No cumulative fission yields found for {} in {}".format(product, parent)) + else: + yields[product] += table_yc[product].nominal_value + # -1 for stable + unstable + elif ifpy == -1: + if product not in table_yd: + print("No independent fission yields found for {} in {}".format(product, parent)) + else: + yields[product] += table_yc[product].nominal_value + product_meta = "{}_m1".format(product) + if product_meta in table_yd: + yields[product] += table_yc[product_meta].nominal_value + # 3 for special treatment with weight fractions + elif ifpy == 3: + for tuple_i in CASL_CHAIN[product][3]: + name_i, weight_i, ifpy_i = tuple_i + if name_i not in table_yd: + print("No fission yields found for {} in {}".format(name_i, parent)) + else: + if ifpy_i == 1: + yields[product] += weight_i * table_yd[name_i].nominal_value + elif ifpy_i == 2: + yields[product] += weight_i * table_yc[name_i].nominal_value + + nuclide.yield_data[E] = [] + for k in sorted(yields, key=openmc.data.zam): + nuclide.yield_data[E].append((k, yields[k])) + + # Display warnings + if missing_daughter: + print('The following decay modes have daughters with no decay data:') + for mode in missing_daughter: + print(' {}'.format(mode)) + print('') + + if missing_rx_product: + print('The following reaction products have no decay data:') + for vals in missing_rx_product: + print('{} {} -> {}'.format(*vals)) + print('') + + if missing_fpy: + print('The following fissionable nuclides have no fission product yields:') + for parent in missing_fpy: + print(' ' + parent) + print('') + + chain.export_to_xml('chain_casl.xml') + + +if __name__ == '__main__': + main() From 76ba24d394dcad2467cfb7aaf8dcec1e9238575f Mon Sep 17 00:00:00 2001 From: liangjg Date: Tue, 4 Dec 2018 10:16:02 -0500 Subject: [PATCH 2/2] updated casl chain and the scripts --- scripts/casl_chain.py | 13 ++++++++++++- scripts/openmc-make-depletion-chain-casl | 20 +++++++++++--------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/scripts/casl_chain.py b/scripts/casl_chain.py index 24fd017729..86389e3ced 100755 --- a/scripts/casl_chain.py +++ b/scripts/casl_chain.py @@ -7,7 +7,18 @@ # nuclides (category 1) and fission product nuclides (category 3). CASL_CHAIN = { - # Nuclide: (Is stable, CAT, IFPY, Special yield treatment) + # Nuclide: (Stable, CAT, IFPY, Special yield treatment) + # Stable: True if nuclide has no decay reactions + # CAT: Category of nuclides + # 1-Activation nuclides + # 2-Heavy metal nuclides + # 3-Fission product nuclides + # IFPY: Indicator of fission product yield + # 0-Non FPY + # 1-Direct FPY (-1 indicates (stable+metastable) direct FPY) + # 2-Cumulative FPY + # 3-Special treatment with weight fractions + # Special yield: (nuclide_i/weight_i/IFPY_i) 'B10': (True, 1, 0, None), 'B11': (True, 1, 0, None), 'O16': (True, 1, 0, None), diff --git a/scripts/openmc-make-depletion-chain-casl b/scripts/openmc-make-depletion-chain-casl index 5032785b21..7fdeed072a 100755 --- a/scripts/openmc-make-depletion-chain-casl +++ b/scripts/openmc-make-depletion-chain-casl @@ -30,10 +30,10 @@ URLS = [ ] def main(): - if 'OPENMC_ENDF_DATA' in os.environ: - endf_dir = os.environ['OPENMC_ENDF_DATA'] - elif os.path.isdir("./decay") and os.path.isdir("./nfy") and os.path.isdir("./neutrons"): + if os.path.isdir('./decay') and os.path.isdir('./nfy') and os.path.isdir('./neutrons'): endf_dir = '.' + elif 'OPENMC_ENDF_DATA' in os.environ: + endf_dir = os.environ['OPENMC_ENDF_DATA'] else: for url in URLS: basename = download(url) @@ -49,6 +49,8 @@ def main(): # Create a Chain chain = openmc.deplete.Chain() + print('Reading ENDF nuclear data from "{}"...'.format(os.path.abspath(endf_dir))) + # Create dictionary mapping target to filename print('Processing neutron sub-library files...') reactions = {} @@ -75,7 +77,7 @@ def main(): for name in CASL_CHAIN: if name not in decay_data: - print("{} has not decay data?".format(name)) + print('WARNING: {} has no decay data!'.format(name)) print('Processing fission product yield sub-library files...') fpy_data = {} @@ -178,22 +180,22 @@ def main(): # 1 for independent if ifpy == 1: if product not in table_yd: - print("No independent fission yields found for {} in {}".format(product, parent)) + print('No independent fission yields found for {} in {}'.format(product, parent)) else: yields[product] += table_yd[product].nominal_value # 2 for cumulative elif ifpy == 2: if product not in table_yc: - print("No cumulative fission yields found for {} in {}".format(product, parent)) + print('No cumulative fission yields found for {} in {}'.format(product, parent)) else: yields[product] += table_yc[product].nominal_value # -1 for stable + unstable elif ifpy == -1: if product not in table_yd: - print("No independent fission yields found for {} in {}".format(product, parent)) + print('No independent fission yields found for {} in {}'.format(product, parent)) else: yields[product] += table_yc[product].nominal_value - product_meta = "{}_m1".format(product) + product_meta = '{}_m1'.format(product) if product_meta in table_yd: yields[product] += table_yc[product_meta].nominal_value # 3 for special treatment with weight fractions @@ -201,7 +203,7 @@ def main(): for tuple_i in CASL_CHAIN[product][3]: name_i, weight_i, ifpy_i = tuple_i if name_i not in table_yd: - print("No fission yields found for {} in {}".format(name_i, parent)) + print('No fission yields found for {} in {}'.format(name_i, parent)) else: if ifpy_i == 1: yields[product] += weight_i * table_yd[name_i].nominal_value