11import openmc
2- from libra_toolbox .neutronics .neutron_source import A325_generator_diamond
32from libra_toolbox .neutronics import vault
4- import helpers
3+ from libra_toolbox .neutronics .neutron_source import A325_generator_diamond
4+ from libra_toolbox .neutronics .materials import *
55
66
77def baby_geometry (x_c : float , y_c : float , z_c : float ):
@@ -204,7 +204,7 @@ def baby_geometry(x_c: float, y_c: float, z_c: float):
204204 position [2 ] + src_supp_height ,
205205 )
206206 src_supports .append (source_support )
207-
207+
208208 # regions
209209 source_wall_region = - ext_cyl_source & + source_region
210210 source_region = - source_region
@@ -229,7 +229,7 @@ def baby_geometry(x_c: float, y_c: float, z_c: float):
229229 lead_block_3_region = - lead_blocks [2 ]
230230 lead_block_4_region = - lead_blocks [3 ]
231231 src_supp_1_region = - src_supports [0 ] & ~ source_wall_region & ~ source_region
232- src_supp_2_region = - src_supports [1 ] & ~ source_wall_region & ~ source_region
232+ src_supp_2_region = - src_supports [1 ] & ~ source_wall_region & ~ source_region
233233 he_region = (
234234 + z_plane_5
235235 & - z_plane_12
@@ -281,37 +281,37 @@ def baby_geometry(x_c: float, y_c: float, z_c: float):
281281 source_region = openmc .Cell (region = source_region )
282282 source_region .fill = None
283283 epoxy_cell = openmc .Cell (region = epoxy_region )
284- epoxy_cell .fill = epoxy
284+ epoxy_cell .fill = Epoxy
285285 alumina_compressed_cell = openmc .Cell (region = alumina_compressed_region )
286- alumina_compressed_cell .fill = alumina
286+ alumina_compressed_cell .fill = Alumina
287287 vessel_cell = openmc .Cell (region = vessel_region )
288- vessel_cell .fill = inconel625
288+ vessel_cell .fill = Inconel625
289289 alumina_cell = openmc .Cell (region = alumina_region )
290- alumina_cell .fill = alumina
290+ alumina_cell .fill = Alumina
291291 cllif_cell = openmc .Cell (region = cllif_region )
292- cllif_cell .fill = cllif_nat # cllif_nat or lithium_lead
292+ cllif_cell .fill = Cllif # Cllif or lithium_lead
293293 gap_cell = openmc .Cell (region = gap_region )
294- gap_cell .fill = he
294+ gap_cell .fill = Helium
295295 cap_cell = openmc .Cell (region = cap_region )
296- cap_cell .fill = inconel625
296+ cap_cell .fill = Inconel625
297297 firebrick_cell = openmc .Cell (region = firebrick_region )
298- firebrick_cell .fill = firebrick
298+ firebrick_cell .fill = Firebrick
299299 heater_cell = openmc .Cell (region = heater_region )
300- heater_cell .fill = heater_mat
300+ heater_cell .fill = Heater_mat
301301 table_cell = openmc .Cell (region = table_under_source_region )
302- table_cell .fill = epoxy
302+ table_cell .fill = Epoxy
303303 sphere_cell = openmc .Cell (region = sphere_region )
304- sphere_cell .fill = air
304+ sphere_cell .fill = Air
305305 he_cell = openmc .Cell (region = he_region )
306- he_cell .fill = he
306+ he_cell .fill = Helium
307307 lead_block_1_cell = openmc .Cell (region = lead_block_1_region )
308- lead_block_1_cell .fill = lead
308+ lead_block_1_cell .fill = Lead
309309 lead_block_2_cell = openmc .Cell (region = lead_block_2_region )
310- lead_block_2_cell .fill = lead
310+ lead_block_2_cell .fill = Lead
311311 lead_block_3_cell = openmc .Cell (region = lead_block_3_region )
312- lead_block_3_cell .fill = lead
312+ lead_block_3_cell .fill = Lead
313313 lead_block_4_cell = openmc .Cell (region = lead_block_4_region )
314- lead_block_4_cell .fill = lead
314+ lead_block_4_cell .fill = Lead
315315 src_supp_1_cell = openmc .Cell (region = src_supp_1_region )
316316 src_supp_1_cell .fill = HDPE
317317 src_supp_2_cell = openmc .Cell (region = src_supp_2_region )
@@ -351,16 +351,16 @@ def baby_model():
351351 """
352352
353353 materials = [
354- inconel625 ,
355- cllif_nat ,
354+ Inconel625 ,
355+ Cllif ,
356356 SS304 ,
357- heater_mat ,
358- firebrick ,
359- alumina ,
360- lead ,
361- air ,
362- epoxy ,
363- he ,
357+ Heater_mat ,
358+ Firebrick ,
359+ Alumina ,
360+ Lead ,
361+ Air ,
362+ Epoxy ,
363+ Helium ,
364364 HDPE ,
365365 ]
366366
@@ -407,132 +407,14 @@ def baby_model():
407407 return model
408408
409409
410- ############################################################################
411- # Define Materials
412- # Source: PNNL Materials Compendium April 2021
413- # PNNL-15870, Rev. 2
414- inconel625 = openmc .Material (name = "Inconel 625" )
415- inconel625 .add_element ("C" , 0.000990 , "wo" )
416- inconel625 .add_element ("Al" , 0.003960 , "wo" )
417- inconel625 .add_element ("Si" , 0.004950 , "wo" )
418- inconel625 .add_element ("P" , 0.000148 , "wo" )
419- inconel625 .add_element ("S" , 0.000148 , "wo" )
420- inconel625 .add_element ("Ti" , 0.003960 , "wo" )
421- inconel625 .add_element ("Cr" , 0.215000 , "wo" )
422- inconel625 .add_element ("Mn" , 0.004950 , "wo" )
423- inconel625 .add_element ("Fe" , 0.049495 , "wo" )
424- inconel625 .add_element ("Co" , 0.009899 , "wo" )
425- inconel625 .add_element ("Ni" , 0.580000 , "wo" )
426- inconel625 .add_element ("Nb" , 0.036500 , "wo" )
427- inconel625 .add_element ("Mo" , 0.090000 , "wo" )
428- inconel625 .set_density ("g/cm3" , 8.44 )
429-
430- # lif-licl - natural - pure
431- licl_frac = 0.695
432- cllif_nat = openmc .Material (name = "ClLiF natural" )
433- cllif_nat .add_element ("F" , 0.5 * (1 - licl_frac ), "ao" )
434- cllif_nat .add_element ("Li" , 0.5 * (1 - licl_frac ) + 0.5 * licl_frac , "ao" )
435- cllif_nat .add_element ("Cl" , 0.5 * licl_frac , "ao" )
436- cllif_nat .set_density (
437- "g/cm3" , helpers .get_exp_cllif_density (650 )
438- ) # 69.5 at. % LiCL at 650 C
439-
440- # Stainless Steel 304 from PNNL Materials Compendium (PNNL-15870 Rev2)
441- SS304 = openmc .Material (name = "Stainless Steel 304" )
442- # SS304.temperature = 700 + 273
443- SS304 .add_element ("C" , 0.000800 , "wo" )
444- SS304 .add_element ("Mn" , 0.020000 , "wo" )
445- SS304 .add_element ("P" , 0.000450 , "wo" )
446- SS304 .add_element ("S" , 0.000300 , "wo" )
447- SS304 .add_element ("Si" , 0.010000 , "wo" )
448- SS304 .add_element ("Cr" , 0.190000 , "wo" )
449- SS304 .add_element ("Ni" , 0.095000 , "wo" )
450- SS304 .add_element ("Fe" , 0.683450 , "wo" )
451- SS304 .set_density ("g/cm3" , 8.00 )
452-
453- heater_mat = openmc .Material (name = "heater" )
454- heater_mat .add_element ("C" , 0.000990 , "wo" )
455- heater_mat .add_element ("Al" , 0.003960 , "wo" )
456- heater_mat .add_element ("Si" , 0.004950 , "wo" )
457- heater_mat .add_element ("P" , 0.000148 , "wo" )
458- heater_mat .add_element ("S" , 0.000148 , "wo" )
459- heater_mat .add_element ("Ti" , 0.003960 , "wo" )
460- heater_mat .add_element ("Cr" , 0.215000 , "wo" )
461- heater_mat .add_element ("Mn" , 0.004950 , "wo" )
462- heater_mat .add_element ("Fe" , 0.049495 , "wo" )
463- heater_mat .add_element ("Co" , 0.009899 , "wo" )
464- heater_mat .add_element ("Ni" , 0.580000 , "wo" )
465- heater_mat .add_element ("Nb" , 0.036500 , "wo" )
466- heater_mat .add_element ("Mo" , 0.090000 , "wo" )
467- heater_mat .set_density ("g/cm3" , 2.44 )
468-
469- # Using Microtherm with 1 a% Al2O3, 27 a% ZrO2, and 72 a% SiO2
470- # https://www.foundryservice.com/product/microporous-silica-insulating-boards-mintherm-microtherm-1925of-grades/
471- firebrick = openmc .Material (name = "Firebrick" )
472- # Estimate average temperature of Firebrick to be around 300 C
473- # Firebrick.temperature = 273 + 300
474- firebrick .add_element ("Al" , 0.004 , "ao" )
475- firebrick .add_element ("O" , 0.666 , "ao" )
476- firebrick .add_element ("Si" , 0.240 , "ao" )
477- firebrick .add_element ("Zr" , 0.090 , "ao" )
478- firebrick .set_density ("g/cm3" , 0.30 )
479-
480- # alumina insulation
481- # data from https://precision-ceramics.com/materials/alumina/
482- alumina = openmc .Material (name = "Alumina insulation" )
483- alumina .add_element ("O" , 0.6 , "ao" )
484- alumina .add_element ("Al" , 0.4 , "ao" )
485- alumina .set_density ("g/cm3" , 3.98 )
486-
487- # air
488- air = openmc .Material (name = "Air" )
489- air .add_element ("C" , 0.00012399 , "wo" )
490- air .add_element ("N" , 0.75527 , "wo" )
491- air .add_element ("O" , 0.23178 , "wo" )
492- air .add_element ("Ar" , 0.012827 , "wo" )
493- air .set_density ("g/cm3" , 0.0012 )
494-
495- # epoxy
496- epoxy = openmc .Material (name = "Epoxy" )
497- epoxy .add_element ("C" , 0.70 , "wo" )
498- epoxy .add_element ("H" , 0.08 , "wo" )
499- epoxy .add_element ("O" , 0.15 , "wo" )
500- epoxy .add_element ("N" , 0.07 , "wo" )
501- epoxy .set_density ("g/cm3" , 1.2 )
502-
503- # helium @5psig
504- pressure = 34473.8 # Pa ~ 5 psig
505- temperature = 300 # K
506- R_he = 2077 # J/(kg*K)
507- density = pressure / (R_he * temperature ) / 1000 # in g/cm^3
508- he = openmc .Material (name = "Helium" )
509- he .add_element ("He" , 1.0 , "ao" )
510- he .set_density ("g/cm3" , density )
511-
512- # lead
513- # data from https://wwwrcamnl.wr.usgs.gov/isoig/period/pb_iig.html
514- lead = openmc .Material ()
515- lead .set_density ("g/cm3" , 11.34 )
516- lead .add_nuclide ("Pb204" , 0.014 , "ao" )
517- lead .add_nuclide ("Pb206" , 0.241 , "ao" )
518- lead .add_nuclide ("Pb207" , 0.221 , "ao" )
519- lead .add_nuclide ("Pb208" , 0.524 , "ao" )
520-
521- # High Density Polyethylene
522- # Reference: PNNL Report 15870 (Rev. 1)
523- HDPE = openmc .Material (name = "HDPE" )
524- HDPE .set_density ("g/cm3" , 0.95 )
525- HDPE .add_element ("H" , 0.143724 , "wo" )
526- HDPE .add_element ("C" , 0.856276 , "wo" )
527-
528410if __name__ == "__main__" :
529411 model = baby_model ()
530412 model .run ()
531413 sp = openmc .StatePoint (f"statepoint.{ model .settings .batches } .h5" )
532414 tbr_tally = sp .get_tally (name = "TBR" ).get_pandas_dataframe ()
533415
534- print (f"TBR: { tbr_tally ['mean' ].iloc [0 ] :.6e} \n " )
535- print (f"TBR std. dev.: { tbr_tally ['std. dev.' ].iloc [0 ] :.6e} \n " )
416+ print (f"TBR: { tbr_tally ['mean' ].iloc [0 ]:.6e} \n " )
417+ print (f"TBR std. dev.: { tbr_tally ['std. dev.' ].iloc [0 ]:.6e} \n " )
536418
537419 processed_data = {
538420 "modelled_TBR" : {
@@ -557,4 +439,4 @@ def baby_model():
557439 with open (processed_data_file , "w" ) as f :
558440 json .dump (existing_data , f , indent = 4 )
559441
560- print (f"Processed data stored in { processed_data_file } " )
442+ print (f"Processed data stored in { processed_data_file } " )
0 commit comments