Skip to content

Commit 6d2d686

Browse files
use materials from toolbox
1 parent b17c627 commit 6d2d686

File tree

3 files changed

+31
-171
lines changed

3 files changed

+31
-171
lines changed

analysis/neutron/helpers.py

Lines changed: 0 additions & 28 deletions
This file was deleted.

analysis/neutron/openmc_model.py

Lines changed: 30 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import openmc
22
from libra_toolbox.neutronics.neutron_source import A325_generator_diamond
33
from libra_toolbox.neutronics import vault
4-
import helpers
4+
from libra_toolbox.neutronics import materials as libra_materials
55

66

77
def baby_geometry(x_c: float, y_c: float, z_c: float):
@@ -252,41 +252,41 @@ def baby_geometry(x_c: float, y_c: float, z_c: float):
252252

253253
# cells
254254
source_wall_cell_1 = openmc.Cell(region=source_wall_region)
255-
source_wall_cell_1.fill = SS304
255+
source_wall_cell_1.fill = libra_materials.SS304
256256
source_region = openmc.Cell(region=source_region)
257257
source_region.fill = None
258258
epoxy_cell = openmc.Cell(region=epoxy_region)
259-
epoxy_cell.fill = epoxy
259+
epoxy_cell.fill = libra_materials.Epoxy
260260
alumina_compressed_cell = openmc.Cell(region=alumina_compressed_region)
261-
alumina_compressed_cell.fill = alumina
261+
alumina_compressed_cell.fill = libra_materials.Alumina
262262
vessel_cell = openmc.Cell(region=vessel_region)
263-
vessel_cell.fill = inconel625
263+
vessel_cell.fill = libra_materials.Inconel625
264264
alumina_cell = openmc.Cell(region=alumina_region)
265-
alumina_cell.fill = alumina
265+
alumina_cell.fill = libra_materials.Alumina
266266
cllif_cell = openmc.Cell(region=cllif_region)
267-
cllif_cell.fill = cllif_nat # cllif_nat or lithium_lead
267+
cllif_cell.fill = libra_materials.Cllif
268268
gap_cell = openmc.Cell(region=gap_region)
269-
gap_cell.fill = he
269+
gap_cell.fill = libra_materials.Helium
270270
cap_cell = openmc.Cell(region=cap_region)
271-
cap_cell.fill = inconel625
271+
cap_cell.fill = libra_materials.Inconel625
272272
firebrick_cell = openmc.Cell(region=firebrick_region)
273-
firebrick_cell.fill = firebrick
273+
firebrick_cell.fill = libra_materials.Firebrick
274274
heater_cell = openmc.Cell(region=heater_region)
275-
heater_cell.fill = heater_mat
275+
heater_cell.fill = libra_materials.Heater_mat
276276
table_cell = openmc.Cell(region=table_under_source_region)
277-
table_cell.fill = epoxy
277+
table_cell.fill = libra_materials.Epoxy
278278
sphere_cell = openmc.Cell(region=sphere_region)
279-
sphere_cell.fill = air
279+
sphere_cell.fill = libra_materials.Air
280280
he_cell = openmc.Cell(region=he_region)
281-
he_cell.fill = he
281+
he_cell.fill = libra_materials.Helium
282282
lead_block_1_cell = openmc.Cell(region=lead_block_1_region)
283-
lead_block_1_cell.fill = lead
283+
lead_block_1_cell.fill = libra_materials.Lead
284284
lead_block_2_cell = openmc.Cell(region=lead_block_2_region)
285-
lead_block_2_cell.fill = lead
285+
lead_block_2_cell.fill = libra_materials.Lead
286286
lead_block_3_cell = openmc.Cell(region=lead_block_3_region)
287-
lead_block_3_cell.fill = lead
287+
lead_block_3_cell.fill = libra_materials.Lead
288288
lead_block_4_cell = openmc.Cell(region=lead_block_4_region)
289-
lead_block_4_cell.fill = lead
289+
lead_block_4_cell.fill = libra_materials.Lead
290290

291291
cells = [
292292
source_wall_cell_1,
@@ -320,16 +320,16 @@ def baby_model():
320320
"""
321321

322322
materials = [
323-
inconel625,
324-
cllif_nat,
325-
SS304,
326-
heater_mat,
327-
firebrick,
328-
alumina,
329-
lead,
330-
air,
331-
epoxy,
332-
he,
323+
libra_materials.Inconel625,
324+
libra_materials.Cllif,
325+
libra_materials.SS304,
326+
libra_materials.Heater_mat,
327+
libra_materials.Firebrick,
328+
libra_materials.Alumina,
329+
libra_materials.Lead,
330+
libra_materials.Air,
331+
libra_materials.Epoxy,
332+
libra_materials.Helium,
333333
]
334334

335335
# BABY coordinates
@@ -375,126 +375,14 @@ def baby_model():
375375
return model
376376

377377

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-
490378
if __name__ == "__main__":
491379
model = baby_model()
492380
model.run()
493381
sp = openmc.StatePoint(f"statepoint.{model.settings.batches}.h5")
494382
tbr_tally = sp.get_tally(name="TBR").get_pandas_dataframe()
495383

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")
498386

499387
processed_data = {
500388
"modelled_TBR": {

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dependencies:
1616
- pint
1717
- pip
1818
- pip:
19-
- libra-toolbox>=0.9
19+
- libra-toolbox>=0.9.1
2020
- openmc_data_downloader
2121
- matplotlib-label-lines
2222
- h-transport-materials

0 commit comments

Comments
 (0)