summaryrefslogtreecommitdiff
path: root/hpmr.py
diff options
context:
space:
mode:
Diffstat (limited to 'hpmr.py')
-rw-r--r--hpmr.py42
1 files changed, 40 insertions, 2 deletions
diff --git a/hpmr.py b/hpmr.py
index 699d78f..bce95b2 100644
--- a/hpmr.py
+++ b/hpmr.py
@@ -71,7 +71,8 @@ mat_list.append(mat_mod_ss316)
mat_mod_yh2 = openmc.Material(name="Moderater Pin YH2")
mat_mod_yh2.add_element("Y",1.0)
mat_mod_yh2.add_element("H",2.0)
-mat_mod_yh2.add_s_alpha_beta("c_H_YH2")
+mat_mod_yh2.add_s_alpha_beta("c_H_in_YH2")
+mat_mod_yh2.add_s_alpha_beta("c_Y_in_YH2")
mat_mod_yh2.set_density("g/cc",4.3)
mat_list.append(mat_mod_yh2)
@@ -123,6 +124,10 @@ geo_constant_pin_pitch = 2.3
geo_constant_lattice_pitch = 26.752
geo_constant_triso_radius = 1.0
geo_constant_triso_packing = 0.40
+geo_constant_height = 1.0
+geo_constant_z_max = openmc.ZPlane(z0=+geo_constant_height)
+geo_constant_z_min = openmc.ZPlane(z0=-geo_constant_height)
+
### Inidividual Pin Universes ###
@@ -136,6 +141,33 @@ geo_triso_cells = [openmc.Cell(name="TRISO Kernel UCO",fill=mat_triso_uco,region
geo_triso_universe = openmc.Universe(name="TRISO Kernel Universe",cells=geo_triso_cells)
## TRISO compact ##
+geo_triso_compact_region = -openmc.ZCylinder(r=geo_constant_triso_radius,x0=0.0,y0=0.0)&+geo_constant_z_min&-geo_constant_z_max
+geo_triso_compact_domain = (10,10,10)
+
+# Generate packing
+geo_triso_compact_packing = openmc.model.pack_spheres(
+ radius=geo_triso_spheres[4].r,
+ region=geo_triso_compact_region,
+ pf=geo_constant_triso_packing
+ )
+
+# Create the TRISO particles
+geo_triso_compact_trisos = [openmc.model.TRISO(geo_triso_spheres[4].r, geo_triso_universe, loc) for loc in geo_triso_compact_packing]
+
+# Support with a lattice for domain decomposition
+geo_triso_compact_lattice = openmc.model.create_triso_lattice(
+ trisos=geo_triso_compact_trisos,
+ lower_left=(-geo_constant_triso_radius,-geo_constant_triso_radius,-geo_constant_height),
+ pitch=(geo_constant_triso_radius*2,geo_constant_triso_radius*2,geo_constant_height*2),
+ shape=geo_triso_compact_domain,
+ background=mat_graphite_matrix
+ )
+
+# Cast into cells and a universe
+geo_triso_compact_fuel_cell = openmc.Cell(name="TRISO Compact Cell",fill=geo_triso_compact_lattice,region=geo_triso_compact_region)
+geo_triso_compact_surrounding_cell = openmc.Cell(name="TRISO Compact Surrounding Cell",fill=mat_graphite_matrix,region=~geo_triso_compact_region)
+
+geo_triso_compact_universe = openmc.Universe(name="TRISO Compact Universe",cells=[geo_triso_compact_fuel_cell,geo_triso_compact_surrounding_cell])
## Heat Pipe ##
geo_pipe_cylinders = [openmc.ZCylinder(r=rad, x0=0.0, y0=0.0) for rad in [0.80, 0.90, 0.97, 1.05, 1.07]]
@@ -159,7 +191,13 @@ geo_mod_universe = openmc.Universe(name="Moderator Pin Universe",cells=geo_mod_c
### Assembly-level Geometry ###
+geometry = openmc.Geometry(geo_triso_compact_universe)
+geometry.export_to_xml()
############ SETTINGS ############
-
+settings = openmc.Settings()
+settings.particles = 10000
+settings.batches = 100
+settings.inactive = 50
+settings.export_to_xml()