Commit d9b71435 authored by April Novak's avatar April Novak
Browse files

Address review comments.

parent f87749fb
...@@ -42,7 +42,7 @@ radius_pyc_outer = radius_sic + thickness_pyc_outer ...@@ -42,7 +42,7 @@ radius_pyc_outer = radius_sic + thickness_pyc_outer
packing_fraction = 0.40 # UCBTH-14-002, Table 2-1 packing_fraction = 0.40 # UCBTH-14-002, Table 2-1
if random_distribution == 0: if random_distribution == 0:
pitch_triso_lattice = (radius_pyc_outer)*(4*pi/3/packing_fraction)**0.33333333333333333333333 pitch_triso_lattice = (radius_pyc_outer)*(4*pi/3/packing_fraction)**(1/3.)
# Pebble # Pebble
radius_pebble_inner = 2.5/2 # UCBTH-14-002, Table 2-1 radius_pebble_inner = 2.5/2 # UCBTH-14-002, Table 2-1
...@@ -93,8 +93,8 @@ if verbose: ...@@ -93,8 +93,8 @@ if verbose:
print (" TRISO particle SiC radius [cm] = {}".format(radius_sic)) print (" TRISO particle SiC radius [cm] = {}".format(radius_sic))
print (" TRISO particle oPyC radius [cm] = {}".format(radius_pyc_outer)) print (" TRISO particle oPyC radius [cm] = {}".format(radius_pyc_outer))
print (" TRISO particles packing fraction [--] = {}".format(packing_fraction)) print (" TRISO particles packing fraction [--] = {}".format(packing_fraction))
print (" TRISO lattice pitch [cm] = {}".format(pitch_triso_lattice))
if random_distribution==0: if random_distribution==0:
print (" TRISO lattice pitch [cm] = {}".format(pitch_triso_lattice))
print (" TRISO particles regular lattice [cm] = {}".format(pitch_triso_lattice)) print (" TRISO particles regular lattice [cm] = {}".format(pitch_triso_lattice))
print (" Pebble core radius [cm] = {}".format(radius_pebble_inner)) print (" Pebble core radius [cm] = {}".format(radius_pebble_inner))
print (" Pebble shell outer radius [cm] = {}".format(radius_pebble_outer)) print (" Pebble shell outer radius [cm] = {}".format(radius_pebble_outer))
...@@ -253,23 +253,26 @@ if random_distribution==0: ...@@ -253,23 +253,26 @@ if random_distribution==0:
else: else:
c_triso_pyc_outer_random = openmc.Cell(name='c_triso_pyc_outer_random', fill=m_graphite_pyc, region=+s_sic) c_triso_pyc_outer_random = openmc.Cell(name='c_triso_pyc_outer_random', fill=m_graphite_pyc, region=+s_sic)
u_triso_random = openmc.Universe(cells=[c_triso_fuel, c_triso_c_buffer, c_triso_pyc_inner, c_triso_sic, c_triso_pyc_outer_random]) u_triso_random = openmc.Universe(cells=[c_triso_fuel, c_triso_c_buffer, c_triso_pyc_inner, c_triso_sic, c_triso_pyc_outer_random])
if not os.path.exists('triso_centers.npy'): if not os.path.exists('triso_centers.npy'):
print("Writing random TRISO centers to file triso_centers.npy") print("Writing random TRISO centers to file triso_centers.npy")
r_triso_random = +s_pebble_inner & -s_pebble_central r_triso_random = +s_pebble_inner & -s_pebble_central
spheres_random = openmc.model.pack_spheres(radius=radius_pyc_outer, region=r_triso_random, pf=packing_fraction, initial_pf=0.15) spheres_random = openmc.model.pack_spheres(radius=radius_pyc_outer, region=r_triso_random, pf=packing_fraction, initial_pf=0.15)
triso_random = [openmc.model.TRISO(radius_pyc_outer, u_triso_random, i) for i in spheres_random] triso_random = [openmc.model.TRISO(radius_pyc_outer, u_triso_random, i) for i in spheres_random]
centers = np.vstack([i.center for i in triso_random]) centers = np.vstack([i.center for i in triso_random])
np.save('triso_centers.npy', triso_random)
if verbose: if verbose:
packing_fraction = len(triso_random)*radius_pyc_outer**3/(radius_pebble_central**3-radius_pebble_inner**3) packing_fraction = len(triso_random)*radius_pyc_outer**3/(radius_pebble_central**3-radius_pebble_inner**3)
print("Calculated packing fraction of the TRISO particles random distribution = {}".format(packing_fraction)) print("Calculated packing fraction of the TRISO particles random distribution = {}".format(packing_fraction))
np.save('triso_centers.npy', triso_random)
print("Reading random TRISO centers from file triso_centers.npy") print("Reading random TRISO centers from file triso_centers.npy")
triso_random = np.load('triso_centers.npy') triso_random = np.load('triso_centers.npy', allow_pickle=True)
lower_left, upper_right = c_pebble_central.region.bounding_box lower_left, upper_right = c_pebble_central.region.bounding_box
shape = (5, 5, 5) shape = (5, 5, 5)
pitch = (upper_right - lower_left)/shape pitch = (upper_right - lower_left)/shape
l_triso = openmc.model.create_triso_lattice(triso_random, lower_left, pitch, shape, m_graphite_matrix) l_triso = openmc.model.create_triso_lattice(triso_random, lower_left, pitch, shape, m_graphite_matrix)
print("File triso_centers.npy reading completed") print("File triso_centers.npy reading completed")
# Fil central pebble cell with the TRISO lattice # Fil central pebble cell with the TRISO lattice
c_pebble_central.fill = l_triso c_pebble_central.fill = l_triso
...@@ -307,7 +310,7 @@ for center, name in zip(pebble_centers, cell_name): ...@@ -307,7 +310,7 @@ for center, name in zip(pebble_centers, cell_name):
# Place pebbles into a lattice # Place pebbles into a lattice
llc_vessel, urc_vessel = vessel_region.bounding_box llc_vessel, urc_vessel = vessel_region.bounding_box
l_pebble_shape = np.asarray((10, 10, 10)) l_pebble_shape = np.asarray((20, 20, 20))
l_pebble_pitch = (urc_vessel - llc_vessel) / l_pebble_shape l_pebble_pitch = (urc_vessel - llc_vessel) / l_pebble_shape
l_pebble = openmc.model.create_triso_lattice(pebble_trisos, llc_vessel, l_pebble_pitch, l_pebble_shape, m_flibe) l_pebble = openmc.model.create_triso_lattice(pebble_trisos, llc_vessel, l_pebble_pitch, l_pebble_shape, m_flibe)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment