Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 50 additions & 52 deletions analysis/neutron/foil_analysis.ipynb

Large diffs are not rendered by default.

172 changes: 30 additions & 142 deletions analysis/neutron/openmc_model.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import openmc
from libra_toolbox.neutronics.neutron_source import A325_generator_diamond
from libra_toolbox.neutronics import vault
import helpers
from libra_toolbox.neutronics import materials as libra_materials


def baby_geometry(x_c: float, y_c: float, z_c: float):
Expand Down Expand Up @@ -252,41 +252,41 @@ def baby_geometry(x_c: float, y_c: float, z_c: float):

# cells
source_wall_cell_1 = openmc.Cell(region=source_wall_region)
source_wall_cell_1.fill = SS304
source_wall_cell_1.fill = libra_materials.SS304
source_region = openmc.Cell(region=source_region)
source_region.fill = None
epoxy_cell = openmc.Cell(region=epoxy_region)
epoxy_cell.fill = epoxy
epoxy_cell.fill = libra_materials.Epoxy
alumina_compressed_cell = openmc.Cell(region=alumina_compressed_region)
alumina_compressed_cell.fill = alumina
alumina_compressed_cell.fill = libra_materials.Alumina
vessel_cell = openmc.Cell(region=vessel_region)
vessel_cell.fill = inconel625
vessel_cell.fill = libra_materials.Inconel625
alumina_cell = openmc.Cell(region=alumina_region)
alumina_cell.fill = alumina
alumina_cell.fill = libra_materials.Alumina
cllif_cell = openmc.Cell(region=cllif_region)
cllif_cell.fill = cllif_nat # cllif_nat or lithium_lead
cllif_cell.fill = libra_materials.Cllif
gap_cell = openmc.Cell(region=gap_region)
gap_cell.fill = he
gap_cell.fill = libra_materials.Helium
cap_cell = openmc.Cell(region=cap_region)
cap_cell.fill = inconel625
cap_cell.fill = libra_materials.Inconel625
firebrick_cell = openmc.Cell(region=firebrick_region)
firebrick_cell.fill = firebrick
firebrick_cell.fill = libra_materials.Firebrick
heater_cell = openmc.Cell(region=heater_region)
heater_cell.fill = heater_mat
heater_cell.fill = libra_materials.Heater_mat
table_cell = openmc.Cell(region=table_under_source_region)
table_cell.fill = epoxy
table_cell.fill = libra_materials.Epoxy
sphere_cell = openmc.Cell(region=sphere_region)
sphere_cell.fill = air
sphere_cell.fill = libra_materials.Air
he_cell = openmc.Cell(region=he_region)
he_cell.fill = he
he_cell.fill = libra_materials.Helium
lead_block_1_cell = openmc.Cell(region=lead_block_1_region)
lead_block_1_cell.fill = lead
lead_block_1_cell.fill = libra_materials.Lead
lead_block_2_cell = openmc.Cell(region=lead_block_2_region)
lead_block_2_cell.fill = lead
lead_block_2_cell.fill = libra_materials.Lead
lead_block_3_cell = openmc.Cell(region=lead_block_3_region)
lead_block_3_cell.fill = lead
lead_block_3_cell.fill = libra_materials.Lead
lead_block_4_cell = openmc.Cell(region=lead_block_4_region)
lead_block_4_cell.fill = lead
lead_block_4_cell.fill = libra_materials.Lead

cells = [
source_wall_cell_1,
Expand Down Expand Up @@ -320,16 +320,16 @@ def baby_model():
"""

materials = [
inconel625,
cllif_nat,
SS304,
heater_mat,
firebrick,
alumina,
lead,
air,
epoxy,
he,
libra_materials.Inconel625,
libra_materials.Cllif,
libra_materials.SS304,
libra_materials.Heater_mat,
libra_materials.Firebrick,
libra_materials.Alumina,
libra_materials.Lead,
libra_materials.Air,
libra_materials.Epoxy,
libra_materials.Helium,
]

# BABY coordinates
Expand Down Expand Up @@ -375,126 +375,14 @@ def baby_model():
return model


############################################################################
# Define Materials
# Source: PNNL Materials Compendium April 2021
# PNNL-15870, Rev. 2
inconel625 = openmc.Material(name="Inconel 625")
inconel625.add_element("C", 0.000990, "wo")
inconel625.add_element("Al", 0.003960, "wo")
inconel625.add_element("Si", 0.004950, "wo")
inconel625.add_element("P", 0.000148, "wo")
inconel625.add_element("S", 0.000148, "wo")
inconel625.add_element("Ti", 0.003960, "wo")
inconel625.add_element("Cr", 0.215000, "wo")
inconel625.add_element("Mn", 0.004950, "wo")
inconel625.add_element("Fe", 0.049495, "wo")
inconel625.add_element("Co", 0.009899, "wo")
inconel625.add_element("Ni", 0.580000, "wo")
inconel625.add_element("Nb", 0.036500, "wo")
inconel625.add_element("Mo", 0.090000, "wo")
inconel625.set_density("g/cm3", 8.44)

# lif-licl - natural - pure
licl_frac = 0.695
cllif_nat = openmc.Material(name="ClLiF natural")
cllif_nat.add_element("F", 0.5 * (1 - licl_frac), "ao")
cllif_nat.add_element("Li", 0.5 * (1 - licl_frac) + 0.5 * licl_frac, "ao")
cllif_nat.add_element("Cl", 0.5 * licl_frac, "ao")
cllif_nat.set_density(
"g/cm3", helpers.get_exp_cllif_density(650)
) # 69.5 at. % LiCL at 650 C

# Stainless Steel 304 from PNNL Materials Compendium (PNNL-15870 Rev2)
SS304 = openmc.Material(name="Stainless Steel 304")
# SS304.temperature = 700 + 273
SS304.add_element("C", 0.000800, "wo")
SS304.add_element("Mn", 0.020000, "wo")
SS304.add_element("P", 0.000450, "wo")
SS304.add_element("S", 0.000300, "wo")
SS304.add_element("Si", 0.010000, "wo")
SS304.add_element("Cr", 0.190000, "wo")
SS304.add_element("Ni", 0.095000, "wo")
SS304.add_element("Fe", 0.683450, "wo")
SS304.set_density("g/cm3", 8.00)

heater_mat = openmc.Material(name="heater")
heater_mat.add_element("C", 0.000990, "wo")
heater_mat.add_element("Al", 0.003960, "wo")
heater_mat.add_element("Si", 0.004950, "wo")
heater_mat.add_element("P", 0.000148, "wo")
heater_mat.add_element("S", 0.000148, "wo")
heater_mat.add_element("Ti", 0.003960, "wo")
heater_mat.add_element("Cr", 0.215000, "wo")
heater_mat.add_element("Mn", 0.004950, "wo")
heater_mat.add_element("Fe", 0.049495, "wo")
heater_mat.add_element("Co", 0.009899, "wo")
heater_mat.add_element("Ni", 0.580000, "wo")
heater_mat.add_element("Nb", 0.036500, "wo")
heater_mat.add_element("Mo", 0.090000, "wo")
heater_mat.set_density("g/cm3", 2.44)

# Using Microtherm with 1 a% Al2O3, 27 a% ZrO2, and 72 a% SiO2
# https://www.foundryservice.com/product/microporous-silica-insulating-boards-mintherm-microtherm-1925of-grades/
firebrick = openmc.Material(name="Firebrick")
# Estimate average temperature of Firebrick to be around 300 C
# Firebrick.temperature = 273 + 300
firebrick.add_element("Al", 0.004, "ao")
firebrick.add_element("O", 0.666, "ao")
firebrick.add_element("Si", 0.240, "ao")
firebrick.add_element("Zr", 0.090, "ao")
firebrick.set_density("g/cm3", 0.30)

# alumina insulation
# data from https://precision-ceramics.com/materials/alumina/
alumina = openmc.Material(name="Alumina insulation")
alumina.add_element("O", 0.6, "ao")
alumina.add_element("Al", 0.4, "ao")
alumina.set_density("g/cm3", 3.98)

# air
air = openmc.Material(name="Air")
air.add_element("C", 0.00012399, "wo")
air.add_element("N", 0.75527, "wo")
air.add_element("O", 0.23178, "wo")
air.add_element("Ar", 0.012827, "wo")
air.set_density("g/cm3", 0.0012)

# epoxy
epoxy = openmc.Material(name="Epoxy")
epoxy.add_element("C", 0.70, "wo")
epoxy.add_element("H", 0.08, "wo")
epoxy.add_element("O", 0.15, "wo")
epoxy.add_element("N", 0.07, "wo")
epoxy.set_density("g/cm3", 1.2)

# helium @5psig
pressure = 34473.8 # Pa ~ 5 psig
temperature = 300 # K
R_he = 2077 # J/(kg*K)
density = pressure / (R_he * temperature) / 1000 # in g/cm^3
he = openmc.Material(name="Helium")
he.add_element("He", 1.0, "ao")
he.set_density("g/cm3", density)

# lead
# data from https://wwwrcamnl.wr.usgs.gov/isoig/period/pb_iig.html
lead = openmc.Material()
lead.set_density("g/cm3", 11.34)
lead.add_nuclide("Pb204", 0.014, "ao")
lead.add_nuclide("Pb206", 0.241, "ao")
lead.add_nuclide("Pb207", 0.221, "ao")
lead.add_nuclide("Pb208", 0.524, "ao")


if __name__ == "__main__":
model = baby_model()
model.run()
sp = openmc.StatePoint(f"statepoint.{model.settings.batches}.h5")
tbr_tally = sp.get_tally(name="TBR").get_pandas_dataframe()

print(f"TBR: {tbr_tally['mean'].iloc[0] :.6e}\n")
print(f"TBR std. dev.: {tbr_tally['std. dev.'].iloc[0] :.6e}\n")
print(f"TBR: {tbr_tally['mean'].iloc[0]:.6e}\n")
print(f"TBR std. dev.: {tbr_tally['std. dev.'].iloc[0]:.6e}\n")

processed_data = {
"modelled_TBR": {
Expand Down
Loading
Loading