Commit 44922bd7 authored by Patrick Shriwise's avatar Patrick Shriwise
Browse files

Reading in new pebble values.

parent 80b93d05
......@@ -52,29 +52,33 @@ if random_distribution==0:
# In the actual TAMU experiment, the pebble diameter is 22.225mm.
# But in CAD, we made it 22.225mm*0.95 = 21.11375 mm To avoid any pebble contacts.
# So the pebble radius is 21.11375 mm/2 = 10.556875 mm = 1.0556875 cm
# To scale up tp 3 cm pebble radius , I should scale Nek mesh and CAD file by a factor
# To scale up tp 3 cm pebble radius , I should scale Nek mesh and CAD file by a factor
# 3/1.0556875 = 2.8417500444
tamu_exp_factor = 1/1.0556875 # Factor to scale geometry to TAMU experiment with pebble radius 1.0556875 cm
radius_pebble_inner = 2.5/2 # UCBTH-14-002, Table 2-1 (differs slightly from Cisneros, Table 5-2) ; scaled by TAMU experiment factor
radius_pebble_outer = 3.0/2 # UCBTH-14-002, Table 2-1; Cisneros, Table 5-2 ; scaled by TAMU experiment factor
radius_pebble_central = radius_pebble_outer - 0.1 # UCBTH-14-002, Table 2-1; Cisneros, Table 5-2 ; scaled by TAMU experiment factor
tolerance = 0.02 # Tolerance for pebbles universe filling
tolerance = 0.00 # Tolerance for pebbles universe filling
radius_pebble_flibe = radius_pebble_outer+tolerance
# Pebble centers coordinates (x,y,z)
print("Reading pseudo-random pebble centers from file pebble_centers.txt")
pebble_centers = np.loadtxt('pebble_centers.txt')
pebble_centers = pebble_centers*radius_pebble_outer*tamu_exp_factor # pebbles centers have cm unit and must be scaled by TAMU experiment factor
pebble_centers = np.loadtxt('list_pebbles_1568.csv', delimiter=',', skiprows=1)[:, 1:]
pebble_centers *= tamu_exp_factor # pebbles centers have cm unit and must be scaled by TAMU experiment factor
pebble_centers *= 0.5
print("File pebble_centers.txt reading completed")
rescaled_file = 'pebble_centers_rescaled.txt'
np.savetxt(rescaled_file, pebble_centers.reshape((-1,3)))
print("Saved rescaled centers to " + rescaled_file)
# Vessel
extra_thickness = 8.125 # change this value to set keff=1
x_vessel = 0.0 # x position vessel
extra_thickness = 12.125 # change this value to set keff=1
x_vessel = 0.0 # x position vessel
y_vessel = 0.0 # y position vessel
z1_vessel = -2.54 - extra_thickness # bottom plane vessel ; scaled by TAMU experiment factor
z2_vessel = 12.7 + extra_thickness # top plane vessel ; scaled by TAMU experiment factor
radius_vessel = 7.0 + extra_thickness # scaled by TAMU experiment factor
z1_vessel = np.min(pebble_centers[:, 2]) - radius_pebble_outer
z2_vessel = np.max(pebble_centers[:, 2]) + radius_pebble_outer
radius_vessel = np.max(np.linalg.norm(pebble_centers[:, :-1], axis=1)) + radius_pebble_outer
z1_vessel -= extra_thickness # bottom plane vessel ; scaled by TAMU experiment factor
z2_vessel += extra_thickness # top plane vessel ; scaled by TAMU experiment factor
radius_vessel += extra_thickness # scaled by TAMU experiment factor
height_vessel = z2_vessel - z1_vessel
# -------------- Printing Parameters ---------
print ("GEOMETRY PARAMETERS")
......@@ -225,7 +229,7 @@ cz_vessel = openmc.ZCylinder(x0=x_vessel, y0=y_vessel, R=radius_ve
pz_vessel_bottom = openmc.ZPlane(z0=z1_vessel, boundary_type='reflective')
pz_vessel_top = openmc.ZPlane(z0=z2_vessel, boundary_type='reflective')
cell_name = ['cell_pebble_' + str(i) for i in range (len(pebble_centers))]
s_pebble = [openmc.Sphere(x0=pebble_centers[i,0], y0=pebble_centers[i,1], z0=pebble_centers[i,2], R=radius_pebble_flibe, boundary_type='transmission') for i in range (len(pebble_centers))]
s_pebble = [openmc.Sphere(x0=pebble_centers[i,0], y0=pebble_centers[i,1], z0=pebble_centers[i,2], R=radius_pebble_flibe, boundary_type='transmission') for i in range (len(pebble_centers))]
c_pebble = [openmc.Cell(name=cell_name[i], fill=u_pebble, region=-s_pebble[i]) for i in range (len(pebble_centers))]
r_vessel = -cz_vessel & +pz_vessel_bottom & -pz_vessel_top
for i in range(len(pebble_centers)):
......@@ -244,13 +248,13 @@ c_vessel = openmc.Cell(name='c_vessel', fill=m_flibe, region = r_
# pebble_random = [openmc.model.TRISO(radius_pebble_outer, u_pebble_random, i) for i in spheres_random]
# lower_left, upper_right = c_vessel.region.bounding_box
# shape = (5, 5, 5)
# pitch = (upper_right - lower_left)/shape
# pitch = (upper_right - lower_left)/shape
# l_pebble = openmc.model.create_triso_lattice(pebble_random, lower_left, pitch, shape, m_flibe)
# c_vessel.fill = l_pebble
#
# Global geometry
# c_all = [[c_vessel, c_pebble[i]] for i in range (len(pebble_centers))] # The for loop does not work
u_zero = openmc.Geometry([c_vessel, c_pebble[0], c_pebble[1], c_pebble[2], c_pebble[3], c_pebble[4], c_pebble[5], c_pebble[6], c_pebble[7], c_pebble[8], c_pebble[9], c_pebble[10], c_pebble[11], c_pebble[12], c_pebble[13], c_pebble[14], c_pebble[15], c_pebble[16], c_pebble[17], c_pebble[18], c_pebble[19], c_pebble[20], c_pebble[21], c_pebble[22], c_pebble[23], c_pebble[24], c_pebble[25], c_pebble[26], c_pebble[27], c_pebble[28], c_pebble[29], c_pebble[30], c_pebble[31], c_pebble[32], c_pebble[33], c_pebble[34], c_pebble[35], c_pebble[36], c_pebble[37], c_pebble[38], c_pebble[39], c_pebble[40], c_pebble[41], c_pebble[42], c_pebble[43], c_pebble[44], c_pebble[45], c_pebble[46], c_pebble[47], c_pebble[48], c_pebble[49], c_pebble[50], c_pebble[51], c_pebble[52], c_pebble[53], c_pebble[54], c_pebble[55], c_pebble[56], c_pebble[57], c_pebble[58], c_pebble[59], c_pebble[60], c_pebble[61], c_pebble[62], c_pebble[63], c_pebble[64], c_pebble[65], c_pebble[66], c_pebble[67], c_pebble[68], c_pebble[69], c_pebble[70], c_pebble[71], c_pebble[72], c_pebble[73], c_pebble[74], c_pebble[75], c_pebble[76], c_pebble[77], c_pebble[78], c_pebble[79], c_pebble[80], c_pebble[81], c_pebble[82], c_pebble[83], c_pebble[84], c_pebble[85], c_pebble[86], c_pebble[87], c_pebble[88], c_pebble[89], c_pebble[90], c_pebble[91], c_pebble[92], c_pebble[93], c_pebble[94], c_pebble[95], c_pebble[96], c_pebble[97], c_pebble[98], c_pebble[99], c_pebble[100], c_pebble[101], c_pebble[102], c_pebble[103], c_pebble[104], c_pebble[105], c_pebble[106], c_pebble[107], c_pebble[108], c_pebble[109], c_pebble[110], c_pebble[111], c_pebble[112], c_pebble[113], c_pebble[114], c_pebble[115], c_pebble[116], c_pebble[117], c_pebble[118], c_pebble[119], c_pebble[120], c_pebble[121], c_pebble[122], c_pebble[123], c_pebble[124], c_pebble[125], c_pebble[126], c_pebble[127], c_pebble[128], c_pebble[129], c_pebble[130], c_pebble[131], c_pebble[132], c_pebble[133], c_pebble[134], c_pebble[135], c_pebble[136], c_pebble[137], c_pebble[138], c_pebble[139], c_pebble[140], c_pebble[141], c_pebble[142], c_pebble[143], c_pebble[144], c_pebble[145]])
u_zero = openmc.Geometry([c_vessel] + list(c_pebble))
# -------------- Printing Cells --------------
print ("Cell of the vessel:")
print (c_vessel)
......@@ -260,7 +264,7 @@ print (c_pebble)
settings = openmc.Settings()
settings.source = openmc.Source(space=openmc.stats.Box(*c_vessel.bounding_box, only_fissionable=True))
settings.particles = 10000
settings.inactive = 50
settings.inactive = 50
settings.batches = 150
settings.temperature = dict(default=573, method='interpolation',
multipole=True, range=(300.0, 1500.0), tolerance=1000.0)
......
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