|
1 | 1 | import openmc |
2 | 2 | from libra_toolbox.neutronics.neutron_source import A325_generator_diamond |
3 | 3 | from libra_toolbox.neutronics import vault |
4 | | -import helpers |
| 4 | +from libra_toolbox.neutronics.materials import * |
5 | 5 |
|
6 | 6 |
|
7 | 7 | def baby_geometry(x_c: float, y_c: float, z_c: float): |
@@ -256,37 +256,37 @@ def baby_geometry(x_c: float, y_c: float, z_c: float): |
256 | 256 | source_region = openmc.Cell(region=source_region) |
257 | 257 | source_region.fill = None |
258 | 258 | epoxy_cell = openmc.Cell(region=epoxy_region) |
259 | | - epoxy_cell.fill = epoxy |
| 259 | + epoxy_cell.fill = Epoxy |
260 | 260 | alumina_compressed_cell = openmc.Cell(region=alumina_compressed_region) |
261 | | - alumina_compressed_cell.fill = alumina |
| 261 | + alumina_compressed_cell.fill = Alumina |
262 | 262 | vessel_cell = openmc.Cell(region=vessel_region) |
263 | | - vessel_cell.fill = inconel625 |
| 263 | + vessel_cell.fill = Inconel625 |
264 | 264 | alumina_cell = openmc.Cell(region=alumina_region) |
265 | | - alumina_cell.fill = alumina |
| 265 | + alumina_cell.fill = Alumina |
266 | 266 | cllif_cell = openmc.Cell(region=cllif_region) |
267 | | - cllif_cell.fill = cllif_nat # cllif_nat or lithium_lead |
| 267 | + cllif_cell.fill = Cllif # cllif_nat or lithium_lead |
268 | 268 | gap_cell = openmc.Cell(region=gap_region) |
269 | | - gap_cell.fill = he |
| 269 | + gap_cell.fill = Helium |
270 | 270 | cap_cell = openmc.Cell(region=cap_region) |
271 | | - cap_cell.fill = inconel625 |
| 271 | + cap_cell.fill = Inconel625 |
272 | 272 | firebrick_cell = openmc.Cell(region=firebrick_region) |
273 | | - firebrick_cell.fill = firebrick |
| 273 | + firebrick_cell.fill = Firebrick |
274 | 274 | heater_cell = openmc.Cell(region=heater_region) |
275 | | - heater_cell.fill = heater_mat |
| 275 | + heater_cell.fill = Heater_mat |
276 | 276 | table_cell = openmc.Cell(region=table_under_source_region) |
277 | | - table_cell.fill = epoxy |
| 277 | + table_cell.fill = Epoxy |
278 | 278 | sphere_cell = openmc.Cell(region=sphere_region) |
279 | | - sphere_cell.fill = air |
| 279 | + sphere_cell.fill = Air |
280 | 280 | he_cell = openmc.Cell(region=he_region) |
281 | | - he_cell.fill = he |
| 281 | + he_cell.fill = Helium |
282 | 282 | lead_block_1_cell = openmc.Cell(region=lead_block_1_region) |
283 | | - lead_block_1_cell.fill = lead |
| 283 | + lead_block_1_cell.fill = Lead |
284 | 284 | lead_block_2_cell = openmc.Cell(region=lead_block_2_region) |
285 | | - lead_block_2_cell.fill = lead |
| 285 | + lead_block_2_cell.fill = Lead |
286 | 286 | lead_block_3_cell = openmc.Cell(region=lead_block_3_region) |
287 | | - lead_block_3_cell.fill = lead |
| 287 | + lead_block_3_cell.fill = Lead |
288 | 288 | lead_block_4_cell = openmc.Cell(region=lead_block_4_region) |
289 | | - lead_block_4_cell.fill = lead |
| 289 | + lead_block_4_cell.fill = Lead |
290 | 290 |
|
291 | 291 | cells = [ |
292 | 292 | source_wall_cell_1, |
@@ -320,16 +320,16 @@ def baby_model(): |
320 | 320 | """ |
321 | 321 |
|
322 | 322 | materials = [ |
323 | | - inconel625, |
324 | | - cllif_nat, |
| 323 | + Inconel625, |
| 324 | + Cllif, |
325 | 325 | SS304, |
326 | | - heater_mat, |
327 | | - firebrick, |
328 | | - alumina, |
329 | | - lead, |
330 | | - air, |
331 | | - epoxy, |
332 | | - he, |
| 326 | + Heater_mat, |
| 327 | + Firebrick, |
| 328 | + Alumina, |
| 329 | + Lead, |
| 330 | + Air, |
| 331 | + Epoxy, |
| 332 | + Helium, |
333 | 333 | ] |
334 | 334 |
|
335 | 335 | # BABY coordinates |
@@ -375,126 +375,14 @@ def baby_model(): |
375 | 375 | return model |
376 | 376 |
|
377 | 377 |
|
378 | | -############################################################################ |
379 | | -# Define Materials |
380 | | -# Source: PNNL Materials Compendium April 2021 |
381 | | -# PNNL-15870, Rev. 2 |
382 | | -inconel625 = openmc.Material(name="Inconel 625") |
383 | | -inconel625.add_element("C", 0.000990, "wo") |
384 | | -inconel625.add_element("Al", 0.003960, "wo") |
385 | | -inconel625.add_element("Si", 0.004950, "wo") |
386 | | -inconel625.add_element("P", 0.000148, "wo") |
387 | | -inconel625.add_element("S", 0.000148, "wo") |
388 | | -inconel625.add_element("Ti", 0.003960, "wo") |
389 | | -inconel625.add_element("Cr", 0.215000, "wo") |
390 | | -inconel625.add_element("Mn", 0.004950, "wo") |
391 | | -inconel625.add_element("Fe", 0.049495, "wo") |
392 | | -inconel625.add_element("Co", 0.009899, "wo") |
393 | | -inconel625.add_element("Ni", 0.580000, "wo") |
394 | | -inconel625.add_element("Nb", 0.036500, "wo") |
395 | | -inconel625.add_element("Mo", 0.090000, "wo") |
396 | | -inconel625.set_density("g/cm3", 8.44) |
397 | | - |
398 | | -# lif-licl - natural - pure |
399 | | -licl_frac = 0.695 |
400 | | -cllif_nat = openmc.Material(name="ClLiF natural") |
401 | | -cllif_nat.add_element("F", 0.5 * (1 - licl_frac), "ao") |
402 | | -cllif_nat.add_element("Li", 0.5 * (1 - licl_frac) + 0.5 * licl_frac, "ao") |
403 | | -cllif_nat.add_element("Cl", 0.5 * licl_frac, "ao") |
404 | | -cllif_nat.set_density( |
405 | | - "g/cm3", helpers.get_exp_cllif_density(650) |
406 | | -) # 69.5 at. % LiCL at 650 C |
407 | | - |
408 | | -# Stainless Steel 304 from PNNL Materials Compendium (PNNL-15870 Rev2) |
409 | | -SS304 = openmc.Material(name="Stainless Steel 304") |
410 | | -# SS304.temperature = 700 + 273 |
411 | | -SS304.add_element("C", 0.000800, "wo") |
412 | | -SS304.add_element("Mn", 0.020000, "wo") |
413 | | -SS304.add_element("P", 0.000450, "wo") |
414 | | -SS304.add_element("S", 0.000300, "wo") |
415 | | -SS304.add_element("Si", 0.010000, "wo") |
416 | | -SS304.add_element("Cr", 0.190000, "wo") |
417 | | -SS304.add_element("Ni", 0.095000, "wo") |
418 | | -SS304.add_element("Fe", 0.683450, "wo") |
419 | | -SS304.set_density("g/cm3", 8.00) |
420 | | - |
421 | | -heater_mat = openmc.Material(name="heater") |
422 | | -heater_mat.add_element("C", 0.000990, "wo") |
423 | | -heater_mat.add_element("Al", 0.003960, "wo") |
424 | | -heater_mat.add_element("Si", 0.004950, "wo") |
425 | | -heater_mat.add_element("P", 0.000148, "wo") |
426 | | -heater_mat.add_element("S", 0.000148, "wo") |
427 | | -heater_mat.add_element("Ti", 0.003960, "wo") |
428 | | -heater_mat.add_element("Cr", 0.215000, "wo") |
429 | | -heater_mat.add_element("Mn", 0.004950, "wo") |
430 | | -heater_mat.add_element("Fe", 0.049495, "wo") |
431 | | -heater_mat.add_element("Co", 0.009899, "wo") |
432 | | -heater_mat.add_element("Ni", 0.580000, "wo") |
433 | | -heater_mat.add_element("Nb", 0.036500, "wo") |
434 | | -heater_mat.add_element("Mo", 0.090000, "wo") |
435 | | -heater_mat.set_density("g/cm3", 2.44) |
436 | | - |
437 | | -# Using Microtherm with 1 a% Al2O3, 27 a% ZrO2, and 72 a% SiO2 |
438 | | -# https://www.foundryservice.com/product/microporous-silica-insulating-boards-mintherm-microtherm-1925of-grades/ |
439 | | -firebrick = openmc.Material(name="Firebrick") |
440 | | -# Estimate average temperature of Firebrick to be around 300 C |
441 | | -# Firebrick.temperature = 273 + 300 |
442 | | -firebrick.add_element("Al", 0.004, "ao") |
443 | | -firebrick.add_element("O", 0.666, "ao") |
444 | | -firebrick.add_element("Si", 0.240, "ao") |
445 | | -firebrick.add_element("Zr", 0.090, "ao") |
446 | | -firebrick.set_density("g/cm3", 0.30) |
447 | | - |
448 | | -# alumina insulation |
449 | | -# data from https://precision-ceramics.com/materials/alumina/ |
450 | | -alumina = openmc.Material(name="Alumina insulation") |
451 | | -alumina.add_element("O", 0.6, "ao") |
452 | | -alumina.add_element("Al", 0.4, "ao") |
453 | | -alumina.set_density("g/cm3", 3.98) |
454 | | - |
455 | | -# air |
456 | | -air = openmc.Material(name="Air") |
457 | | -air.add_element("C", 0.00012399, "wo") |
458 | | -air.add_element("N", 0.75527, "wo") |
459 | | -air.add_element("O", 0.23178, "wo") |
460 | | -air.add_element("Ar", 0.012827, "wo") |
461 | | -air.set_density("g/cm3", 0.0012) |
462 | | - |
463 | | -# epoxy |
464 | | -epoxy = openmc.Material(name="Epoxy") |
465 | | -epoxy.add_element("C", 0.70, "wo") |
466 | | -epoxy.add_element("H", 0.08, "wo") |
467 | | -epoxy.add_element("O", 0.15, "wo") |
468 | | -epoxy.add_element("N", 0.07, "wo") |
469 | | -epoxy.set_density("g/cm3", 1.2) |
470 | | - |
471 | | -# helium @5psig |
472 | | -pressure = 34473.8 # Pa ~ 5 psig |
473 | | -temperature = 300 # K |
474 | | -R_he = 2077 # J/(kg*K) |
475 | | -density = pressure / (R_he * temperature) / 1000 # in g/cm^3 |
476 | | -he = openmc.Material(name="Helium") |
477 | | -he.add_element("He", 1.0, "ao") |
478 | | -he.set_density("g/cm3", density) |
479 | | - |
480 | | -# lead |
481 | | -# data from https://wwwrcamnl.wr.usgs.gov/isoig/period/pb_iig.html |
482 | | -lead = openmc.Material() |
483 | | -lead.set_density("g/cm3", 11.34) |
484 | | -lead.add_nuclide("Pb204", 0.014, "ao") |
485 | | -lead.add_nuclide("Pb206", 0.241, "ao") |
486 | | -lead.add_nuclide("Pb207", 0.221, "ao") |
487 | | -lead.add_nuclide("Pb208", 0.524, "ao") |
488 | | - |
489 | | - |
490 | 378 | if __name__ == "__main__": |
491 | 379 | model = baby_model() |
492 | 380 | model.run() |
493 | 381 | sp = openmc.StatePoint(f"statepoint.{model.settings.batches}.h5") |
494 | 382 | tbr_tally = sp.get_tally(name="TBR").get_pandas_dataframe() |
495 | 383 |
|
496 | | - print(f"TBR: {tbr_tally['mean'].iloc[0] :.6e}\n") |
497 | | - print(f"TBR std. dev.: {tbr_tally['std. dev.'].iloc[0] :.6e}\n") |
| 384 | + print(f"TBR: {tbr_tally['mean'].iloc[0]:.6e}\n") |
| 385 | + print(f"TBR std. dev.: {tbr_tally['std. dev.'].iloc[0]:.6e}\n") |
498 | 386 |
|
499 | 387 | processed_data = { |
500 | 388 | "modelled_TBR": { |
|
0 commit comments