Analyzing DRAGON DATA Structures for burnup

The analysis of available nuclides was done using using a PWR unit cell with the EVO module


In [1]:
from IPython.core.display import HTML
import markdown2

Wims keys are obtained from: WIMS Library Update Project.


In [2]:
wims_key = {3001:'H', 3:'He3', 4:'He4', 6:'Li6', 7:'Li7', 9:'Be', 10:'B10',     
1010:'B10', 11:'B11', 1011:'B', 2012:'C', 14:'N', 6016:'O', 19:'F',             
23:'Na', 24:'Mg', 27:'Al', 29:'Si', 31:'P', 32:'S', 35:'Cl', 40:'Ca',           
48:'Ti', 51:'V', 52:'Cr', 55:'Mn', 2056:'Fe', 58:'Ni', 1059:'Co59',             
3063:'Cu', 91:'Zr', 93:'Nb93', 96:'Mo', 3109:'Ag', 2113:'Cd', 2115:'In',        
118:'Sn', 121:'Sb121', 123:'Sb123', 152:'Eu', 2154:'Gd154', 2155:'Gd155',       
2156:'Gd156', 2157:'Gd157', 2158:'Gd158', 160:'Dy160', 161:'Dy161',             
162:'Dy162', 163:'Dy163', 164:'Dy164', 165:'Ho165', 2166:'Er166',               
2167:'Er167', 2176:'Hf176', 2177:'Hf177', 2178:'Hf178', 2179:'Hf179',           
2180:'Hf180', 178:'Hf', 181:'Ta', 183:'W', 207:'Pb', 4083:'Kr83',               
4095:'Mo95', 4099:'Tc99', 4101:'Ru101', 5103:'Ru103', 4106:'Ru106',             
4103:'Rh103', 4105:'Rh105', 5105:'Pd105', 4107:'Pd107', 4108:'Pd108',           
4109:'Ag109', 4113:'Cd113', 4115:'In115', 4125:'Sb125', 5127:'Te127m',          
4127:'I127', 4131:'Xe131', 4133:'Cs133', 4134:'Cs134', 4137:'Cs137',            
6135:'I135', 5134:'Xe134', 4135:'Xe135', 5135:'Cs135', 4136:'Xe136',            
4143:'Nd143', 4145:'Nd145', 4147:'Pm147', 5147:'Pm147', 6147:'Sm147',           
4148:'Pm148m', 5148:'Pm148', 6148:'Sm148', 5149:'Pm149', 4149:'Sm149',          
4150:'Sm150', 4151:'Sm151', 4152:'Sm152', 5151:'Eu151', 5152:'Eu152',           
4153:'Eu153', 4154:'Eu154', 4155:'Eu155', 2232:'Th232', 4232:'U232',            
232:'U232', 9233:'U233', 1231:'Pa231', 1233:'Pa233', 234:'U234',                
2235:'U235', 236:'U236', 4927:'U237', 927:'U237', 8238:'U238', 937:'Np237',     
1939:'Np239', 948:'Pu238', 6239:'Pu239', 1240:'Pu240', 1241:'Pu241',            
242:'Pu242', 1242:'Pu242', 951:'Am241', 1952:'Am242', 952:'Am242m',             
953:'Am243', 962:'Cm242', 963:'Cm243', 964:'Cm244', 1055:'Mn55',                
1054:'Fe54', 3058:'Fe58', 2059:'Co59', 1058:'Ni58', 1063:'Cu63', 84:'Kr84',     
2103:'Rh103', 1115:'In115', 3115:'In115', 1151:'Eu151', 1164:'Dy164',           
176:'Lu176', 197:'Au197', 1232:'Th232', 3232:'Th232', 1235:'U235',              
1003:'U235', 1238:'U238', 3238:'U238', 1237:'Np237', 1239:'Pu239',              
1632:'Th232', 1633:'U233', 1635:'U235', 1638:'U238', 1639:'Pu239',              
1640:'Pu240', 1641:'Pu241', 1642:'Pu242', 4902: 'FP' }

In [3]:
def dupli(the_list):
    count = the_list.count # this optimization added courtesy of Sven's comment
    result = [(item, count(item)) for item in set(the_list)]
    result.sort()
    return result

def dupli_v2(the_list):
    """
    Like dupli but now just consider when items in set are > 1
    """
    count = the_list.count # this optimization added courtesy of Sven's comment
    result = [(item, count(item)) for item in set(the_list) if count(item) > 1]
    result.sort()
    return result

def wims(item):
    try:
        return wims_key[int(item)]
    except ValueError:
        return item
    
def solo(the_list):
    """
    Like dupli but now just consider when items in set are = 1
    And return just the list, formatting WIMS keys as necessary
    """
    count = the_list.count # this optimization added courtesy of Sven's comment
    result = [wims(item) for item in set(the_list) if count(item) == 1]
    result.sort()
    return result

Note that a truncated DATA structure file was used here


In [4]:
lines = []
with open('pwrcel.burn.001', 'r') as f:                                                  
    for line in f:
        # ignore lines beginning with
        if not line.startswith(' ') and not line.startswith('->'):
            if 'COMPO' not in line and 'SIGNA' not in line:
                lines.append(line.split().pop(0))

struct = str(dupli_v2(lines))
def bulletize(string):
    string = string.replace("('","   - ")
    string = string.replace("), ",'\n')
    string = string.replace("',",":")
    string = string.replace('[','')
    string = string.replace(')]','')
    return string

struct = 'Detected DRAGON DATA Structures\n-----\n\n' + struct

HTML(markdown2.markdown(bulletize(struct)))


Out[4]:

Detected DRAGON DATA Structures

  • CHI: 21
  • IJJS00: 84
  • NFTOT: 21
  • NG: 84
  • NJJS00: 84
  • NUSIGF: 21
  • SCAT-SAVED: 84
  • SCAT00: 84
  • SIGS00: 84
  • TOTAL: 84
  • TRANC: 84
  • XS-SAVED: 84

In [5]:
nuclides = solo(lines)
nuclides.remove('BURN')
nuclides.remove('SCAT01')
nuclides.remove('SIGS01')
nuclides.remove('NJJS01')
nuclides.remove('IJJS01')

num_nuclides = len(nuclides)
nuclides = str(nuclides)

nuclides = 'Detected Nuclides Accounted for in Burnup\n-----\n* ' + str(num_nuclides) + ' nuclides counted' + nuclides

def n_bulletize(string):
    string = string.replace("'",'').replace("[","\n   -  ").replace("]","")
    string = string.replace(',','\n   - ')
    return string
#print(n_bulletize(nuclides))
HTML(markdown2.markdown(n_bulletize(nuclides)))


Out[5]:

Detected Nuclides Accounted for in Burnup

  • 84 nuclides counted
    • Ag109
    • Am241
    • Am242
    • Am242m
    • Am243
    • Cd113
    • Cm242
    • Cm243
    • Cm244
    • Cs133
    • Cs134
    • Cs135
    • Cs137
    • Dy160
    • Dy161
    • Dy162
    • Dy163
    • Dy164
    • Er166
    • Er167
    • Eu151
    • Eu152
    • Eu153
    • Eu154
    • Eu155
    • FP
    • Gd154
    • Gd155
    • Gd156
    • Gd157
    • Gd158
    • Ho165
    • I127
    • I135
    • In115
    • Kr83
    • Mo95
    • Nd143
    • Nd145
    • Np237
    • Np239
    • O16
    • Pa231
    • Pd105
    • Pd107
    • Pd108
    • Pm147
    • Pm147
    • Pm148
    • Pm148m
    • Pm149
    • Pu238
    • Pu239
    • Pu240
    • Pu241
    • Pu242
    • Pu242
    • Rh103
    • Rh105
    • Ru101
    • Ru103
    • Ru106
    • Sb125
    • Sm147
    • Sm148
    • Sm149
    • Sm150
    • Sm151
    • Sm152
    • Tc99
    • Te127m
    • U232
    • U232
    • U233
    • U234
    • U235
    • U236
    • U237
    • U237
    • U238
    • Xe131
    • Xe134
    • Xe135
    • Xe136

In [87]:
string = ""
nuclides = solo(lines)

def show_false(target_list):
    string = ""
    for target in target_list:
        if target not in nuclides:
            string += ' ' + str(target) + ' ' 
        else:
            string += ""
    return string

print show_false(['U238','Np239','Pu239','Pu240','Pu241','Pu242','Am241','Pu243',
                  'Am243', 'Am244', 'Cm244', 'U235', 'U236', 'U237', 'Np237',
                  'Nd147', 'Pm147', 'Pm148m', 'Pm148', 'Sm147', 'Sm148', 'Pm148m',
                  'Pm149', 'Sm149', 'Pm150', 'Sm150', 'Sm151', 'Eu151', 'Sm152',
                  'Sm153', 'Eu152', 'Eu153', 'Sm154', 'Eu154', 'Eu155', 'Eu156',
                  'As77','Se77','Se78', 'Br81', 'Br82', 'Kr82', 'Kr83', 'Kr84',
                  'Kr85', 'Rb85', 'Sr90','Y90', 'Zr90', 'Y91', 'Zr91', 'Zr93', 'Zr94',
                  'Nb93', 'Zr95', 'Nb95', 'Mo95', 'Mo96', 'Mo97', 'Mo98', 'Mo99', 'Tc99',
                  'Ru99', 'Ru100', 'Ru101', 'Ru102', 'I135', 'Xe135', 'Xe136', 'I133',
                  'Xe133', 'Cs133', 'Cs134', 'Cs135', 'Ba135', 'Ba136', 'Cs137', 'Ba137',
                  'Ba140', 'La140', 'Ce140', 'Ce141', 'Pr141', 'Ce143', 'Pr143', 'Nd145',
                  'Nd146', 'Gd157', 'Gd158', 'Sr89', 'Y89', 'Rh103', 'Pd104', 'Ru106',
                  'Pd106', 'Pd107', 'Ag107', 'Ag111', 'Cd111', 'I131', 'Xe131', 
                  'Sn115', 'Sn116', 'Nd143', 'Nd144', 'Te127m', 'I127', 'Te129m',
                  'Te130', 'I129', 'Cd113', 'Cd114'])


 Pu243  Am244  Nd147  Pm150  Sm153  Sm154  Eu156  As77  Se77  Se78  Br81  Br82  Kr82  Kr84  Kr85  Rb85  Sr90  Y90  Zr90  Y91  Zr91  Zr93  Zr94  Nb93  Zr95  Nb95  Mo96  Mo97  Mo98  Mo99  Ru99  Ru100  Ru102  I133  Xe133  Ba135  Ba136  Ba137  Ba140  La140  Ce140  Ce141  Pr141  Ce143  Pr143  Nd146  Sr89  Y89  Pd104  Pd106  Ag107  Ag111  Cd111  I131  Sn115  Sn116  Nd144  Te129m  Te130  I129  Cd114 

In [ ]: