Skip to content

Commit ecd8254

Browse files
authored
Add files via upload
1 parent ae27f2a commit ecd8254

File tree

2 files changed

+39
-19
lines changed

2 files changed

+39
-19
lines changed

etch_model_version3_cellular_automata.py

+26-15
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,16 @@
6060
#recipe_steps = {'step01':{'bosch':15,'iso':100,'cycles':7},
6161
## 'step02':{'bosch':300,'iso':None,'cycles':300},
6262
# 'step03':{'bosch':None,'iso':100,'cycles':1}}
63-
recipe_steps = {'step01':{'bosch':20,'iso':125,'cycles':7},
63+
recipe_steps = {'step01':{'bosch':15,'iso':100,'cycles':4},
6464
# 'step02':{'bosch':300,'iso':None,'cycles':300},
65-
'step03':{'bosch':None,'iso':100,'cycles':1}}
65+
'step03':{'bosch':None,'iso':800,'cycles':1}}
6666

6767

6868
# load mask
6969
im_dir = 'C:/Users/nicas/Documents/E241-MicroNanoFab/masks/'
70-
im_file = 'mask5_R5_C3_v0.png'
71-
pixel_um_conv = 49.291/80.4384
70+
im_file = 'python_model_fil_sq.png'
71+
pixel_um_conv = 276/100 # px/um
72+
gap = 249/pixel_um_conv
7273
# 151.37/100 # for R2_C2
7374
# for R5_C3: 49.291/80.4384 # px/um
7475

@@ -85,7 +86,7 @@
8586
out_file = im_dir + im_file[:dummy_i] + '_out' + im_file[dummy_i:]
8687
cv2.imwrite(out_file, conts_im)
8788

88-
cell_size = 5 # microns
89+
cell_size = 8 # microns
8990
wafer_thickness = 500 # microns
9091

9192
t_start = 0 # seconds
@@ -102,13 +103,19 @@
102103
def vert_rate(z):
103104
a = 0.141
104105
b = 0.0007
105-
return a*np.exp(-b*z)
106+
# return a*np.exp(-b*z)
107+
return (0.14-0.02) + z*(0.03/500)
108+
# d = a*np.exp(-b*z)
109+
# return d + d/2* np.cos(z * 2*np.pi/10)
106110
def horiz_rate(z):
107-
return 0.8#0.8*vert_rate(z)
111+
r = (0.65-0.1)+z*(0.1/500)
112+
return r*vert_rate(z)
113+
# return 0.6 + 0.2* np.cos(z * 2*np.pi/10)
108114

109115
#vert_rate = 8.5/60 # um/s
110116
def bosch_vert_step(z):
111-
return 0.84 - 0.1/500*z
117+
return (0.84-0.1) + 0.1/500*z
118+
# return 0.84 + 0.4* np.cos(z * 2*np.pi/10)
112119

113120
#bosch_vert_step = 0.84 # um/step
114121

@@ -268,8 +275,10 @@ def bosch_vert_step(z):
268275
ax = fig.add_subplot(111, projection='3d')
269276
#ax = plt.subplot(111,projection='polar')
270277
plot_flag = True
271-
278+
#
279+
#dummy_steps = loop_steps[loop_steps.index(step)-1:]
272280
for step_i, step in enumerate(loop_steps,start=1):
281+
#for step_i, step in enumerate(dummy_steps,start=loop_steps.index(step)):
273282

274283
#plot some results
275284
if step_i % (int(len(loop_steps)/10)) == 0:
@@ -616,7 +625,7 @@ def bosch_vert_step(z):
616625

617626
######
618627

619-
pts = etch_grid[loop_steps[-1]][0]
628+
pts = etch_grid['step03_iso01_isotime520']#loop_steps[-1]][0]
620629
states = etch_grid[loop_steps[-1]][1]
621630
iden = etch_grid[loop_steps[-1]][2]
622631

@@ -653,13 +662,15 @@ def bosch_vert_step(z):
653662
plotter.add_scalar_bar(title='z_height',height=0.08,width=0.4,
654663
position_x=0.01,position_y=0.1)
655664

665+
pts = etch_grid[loop_steps[-1]][0]
656666

657-
658-
cells = np.asarray(exposed_cells.points)
659-
#obj = make_grid([cells],cell_size)
667+
pts = etch_grid['step03_iso01_isotime520'][0]#loop_steps[-1]][0]
668+
#cells = np.asarray(exposed_cells.points)
669+
obj = make_grid([pts],cell_size)
670+
671+
#obj = pv.read('C:/Users/nicas/Documents/E241-MicroNanoFab/codes/etch_model_version5_1/exposed_obj.vtk')
672+
#obj = make_grid([np.array(obj.points)],cell_size)
660673

661-
obj = pv.read('C:/Users/nicas/Documents/E241-MicroNanoFab/codes/etch_model_version5_1/neigh_obj.vtk')
662-
obj = make_grid([np.array(obj.points)],cell_size)
663674
slices = obj.slice(normal=[1,1,0])
664675
plotter = pv.BackgroundPlotter(window_size=[1024, 768])
665676
plotter.add_mesh(obj, show_edges=False,

etch_sim_utilities.py

+13-4
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,9 @@ def make_grid(containers,cell_size):
242242
point_count = 0
243243
pts = np.array([])
244244
if type(container) == set: container = list(container)
245+
n_pts = len(container)
245246
for i_cell, cell_center in enumerate(container):
247+
if i_cell%1000 == 0: print('building cell %i of %i' %(i_cell,n_pts))
246248
cells.append(8)
247249
for p in range(8):
248250
cells.append(point_count)
@@ -400,7 +402,7 @@ def compute_normals(points, use_nn=False, flat=False,
400402
# ax = fig.add_subplot(111, projection='3d')
401403
if type(points) == dict:
402404
pts = [list(cell) for cell in points]
403-
cloud = make_cloud([exposed_cells])[0]
405+
cloud = make_cloud([points])[0]
404406
cloud = np.vstack((cloud,pts))
405407
knns = NearestNeighbors(n_neighbors=use_nn).fit(cloud)
406408
dists, indices = knns.kneighbors(cloud, return_distance=True)
@@ -424,7 +426,7 @@ def compute_normals(points, use_nn=False, flat=False,
424426
unit_norms[pt] = unit_norm
425427

426428
elif points.shape[0] == 3:
427-
cloud = make_cloud([exposed_cells])[0]
429+
cloud = make_cloud([points])[0]
428430
knns = NearestNeighbors(n_neighbors=use_nn).fit(cloud)
429431
dists, indices = knns.kneighbors(cloud, return_distance=True)
430432
pt_i = np.where((cloud[:,0] == points[0]) & (cloud[:,1] == points[1])
@@ -577,12 +579,19 @@ def compute_normals_for_cells(exposed_cells,removed_cells,
577579
normal_vect[1] += round(y_v - y,3)
578580
normal_vect[2] += round(z_v - z,3)
579581
if np.linalg.norm(normal_vect) == 0:
582+
# if this happens it is a point in space with a spehere of
583+
# neighbors making the normal_vect magnitude 0 so jus assign a
584+
# dummy normal
585+
normal_vects[cell] = np.array([1,0,0])
580586
alt_method_flag = True
581-
alt_method_points[cell] = []
582587
else:
583588
normal_vects[cell] = (normal_vect / np.linalg.norm(normal_vect))
584589
if alt_method_flag == True:
585-
alt_method_points = compute_normals(alt_method_points, use_nn=8)
590+
print('COMPUTING NORMAL W/ PT CLOUD')
591+
try:
592+
alt_method_points = compute_normals(alt_method_points, use_nn=5)
593+
except:
594+
print('\tEXCEPTION')
586595

587596
print('\t\t\tassigning normals to %i cells' % n_normals)
588597
for cell in list(exposed_cells.keys()):

0 commit comments

Comments
 (0)