Beispiel #1
0
#centerbody= STL('nozzle/Centerbody.stl')
centerbody= STL('NozzleSurfacesBin/Centerbody_Bin.stl')

print "STL Load Time: ", time.time()-start_time
start_time = time.time()


n_c = 3
body = Body(centerbody,controls=n_c) #just makes n_C evenly spaced points
#body = Body(centerbody,C,name="centerbody") #uses given tuples of points
body0 = body.copy()

geom = Geometry()
#geom.add(body0,name="cb0")
geom.add(body,name="centerbody")

#params = geom.get_params() #params['centerbody'] = [(0,0),]

print "Bspline Compute Time: ", time.time()-start_time
start_time = time.time()

deltaC_x = np.zeros((n_c,))
deltaC_r = np.zeros((n_c,))
deltaC_r[-1] = 10 #second to last element, set to 10
deltaC = np.array(zip(deltaC_x,deltaC_r))

geom.deform(centerbody=deltaC)

print "Run Time: ", time.time()-start_time
start_time = time.time()
Beispiel #2
0

#set up thickness control points 
#NOTE: all control points fixed in x 
#NOTE: first and last control point fixed in r
n_C = 3 #number  control points
C_x = np.linspace(x_min,x_max,n_C) 
C_r = np.zeros((n_C,))
C_thickness = np.array(zip(C_x,C_r))

#body = Body(centerbody,n_C=10) #just makes n_C evenly spaced points
shell = Shell(ocowl, icowl, C_centerline, C_thickness, name="cowl") #uses given tuples of points
shell0 = shell.copy()

geom = Geometry()
geom.add(shell0,name="c0")
geom.add(shell,name="cowl")

#params = geom.get_params() #params['centerbody'] = [(0,0),]

print "Bspline Compute Time: ", time.time()-start_time
start_time = time.time()

#calculate new P's

deltaC_x = [0,0,0]
deltaC_r = [0,0,0]
deltaC_c = np.array(zip(deltaC_x,deltaC_r))

deltaC_x = [0,0,0]
deltaC_r = [0,1,0]
Beispiel #3
0
#set up control points 
X = centerbody.points[:,0]
x_max = np.max(X)
x_min = np.min(X)
n_C = 5 #10 control points
C_x = np.linspace(x_min,x_max,n_C) 
C_r = np.zeros((n_C,))
C = np.array(zip(C_x,C_r))

centerbody = Body(centerbody, controls=n_C, r_ref=100, x_ref=1000)
cowl = Shell(outer_cowl, inner_cowl, n_C, n_C, r_ref=100, x_ref=1000)
shroud = Shell(outer_shroud, inner_shroud, n_C, n_C, r_ref=100, x_ref=1000)

geom = Geometry()
geom.add(centerbody, name="centerbody")
geom.add(cowl, name="cowl")
geom.add(shroud, name="shroud")

print "Geom Calc Time: ", time.time()-start_time
start_time = time.time()

deltaC_x = np.zeros((n_C,))
deltaC_x[3:] = 1
deltaC_r = np.zeros((n_C,))
deltaC_r[3] = 1 #second to last element, set to 10
deltaC = np.array(zip(deltaC_x,deltaC_r))
geom.deform(centerbody=deltaC)


deltaC_cx = np.zeros((n_C,))
Beispiel #4
0
cowl = STL('nozzle/cowl.stl')

print "STL Load Time: ", time.time()-start_time
start_time = time.time()


n_c = 10
body = Body(plug, controls=n_c, x_ref=10) #just makes n_C evenly spaced points
shell = Shell(cowl, cowl.copy(), n_c, n_c)

print "Bspline Compute Time: ", time.time()-start_time
start_time = time.time()


geom = Geometry()
geom.add(body,name="plug")
geom.add(shell,name="cowl")

orig_points = geom.points.copy()

print "Geometry Object Building: ", time.time()-start_time
start_time = time.time()

deltaC_x = np.zeros((n_c,))
deltaC_r = np.zeros((n_c,))
# deltaC_x[3:] = 2 #second to last element, set to 10
deltaC = np.array(zip(deltaC_x,deltaC_r))
geom.deform(plug=deltaC)


deltaC_cx = np.zeros((n_c,))