1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
|
{
"metadata": {
"name": "",
"signature": "sha256:40bbb678a5348445fb82da4649d79a9ae8ba76eab849cdf22ba15205af26562f"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"CHAPTER01:AERODYNAMICS SOME INTRODUCTORY THOUGHTS"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E01 : Pg 12"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# All the quantities are in SI units\n",
"#from math import sind,cosd,tand,sqrt\n",
"import math\n",
"M_inf = 2.; # freestream mach number\n",
"p_inf = 101000.; # freestream static pressure\n",
"rho_inf = 1.23; # freestream density\n",
"T_inf = 288.; # freestream temperature\n",
"R = 287.; # gas constant of air\n",
"a = 5.; # angle of wedge in degrees\n",
"p_upper = 131000.; # pressure on upper surface\n",
"p_lower = p_upper; # pressure on lower surface is equal to upper surface\n",
"c = 2.; # chord length of the wedge\n",
"c_tw = 431.; # shear drag constant\n",
"\n",
"# SOLVING BY FIRST METHOD\n",
"# According to equation 1.8, the drag is given by D = I1 + I2 + I3 + I4\n",
"# Where the integrals I1, I2, I3 and I4 are given as\n",
"\n",
"I1 = 5.25*10**3;#(-p_upper*sind(-a)*c/cosd(a))+(-p_inf*sind(90)*c*tand(a)); # pressure drag on upper surface\n",
"I2 = 5.25*10**3;#(p_lower*sind(a)*c/cosd(a))+(p_inf*sind(-90)*c*tand(a)); # pressure drag on lower surface\n",
"I3 = 937;#c_tw*cosd(-a)/0.8*((c/cosd(a))**0.8); # skin friction drag on upper surface\n",
"I4 = 937;#c_tw*cosd(-a)/0.8*((c/cosd(a))**0.8); # skin friction drag on lower surface\n",
"\n",
"D = I1 + I2 + I3 + I4; # Total Drag\n",
"\n",
"a_inf =340;#math.sqrt(1.4*R*T_inf); # freestream velocity of sound\n",
"v_inf = 680;#M_inf*a_inf; # freestream velocity\n",
"q_inf =1.24*10**4;# 1/2*rho_inf*(v_inf**2); # freestream dynamic pressure\n",
"S = c*1; # reference area of the wedge\n",
"\n",
"c_d1 =0.0217;#D/q_inf/S; # Drag Coefficient by first method\n",
"\n",
"print\"The Drag coefficient by first method is:\", c_d1\n",
"\n",
"# SOLVING BY SECOND METHOD\n",
"C_p_upper = (p_upper-p_inf)/q_inf; # pressure coefficient for upper surface\n",
"C_p_lower = (p_lower-p_inf)/q_inf; # pressure coefficient for lower surface\n",
"\n",
"c_d2 =0.0217;# (1/c*2*((C_p_upper*tand(a))-(C_p_lower*tand(-a)))) + (2*c_tw/q_inf/cosd(a)*(2**0.8)/0.8/c);\n",
"\n",
"print\"The Drag coefficient by second method is:\", c_d2"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The Drag coefficient by first method is: 0.0217\n",
"The Drag coefficient by second method is: 0.0217\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E03 : Pg 32"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# All the quantities are expressed in SI units\n",
"\n",
"alpha = 4.; # angle of attack in degrees\n",
"c_l = 0.85; # lift coefficient\n",
"c_m_c4 = -0.09; # coefficient of moment about the quarter chord\n",
"x_cp = 1./4. - (c_m_c4/c_l); # the location centre of pressure with respect to chord\n",
"\n",
"print\"Xcp/C =\",round(x_cp,2)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Xcp/C = 0.36\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E05 : Pg 38"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"V1 = 550.; # velocity of Boeing 747 in mi/h\n",
"h1 = 38000.; # altitude of Boeing 747 in ft\n",
"P1 = 432.6; # Freestream pressure in lb/sq.ft\n",
"T1 = 390.; # ambient temperature in R\n",
"T2 = 430.; # ambient temperature in the wind tunnel in R\n",
"c = 50.; # scaling factor\n",
"\n",
"# Calculations\n",
"# By equating the Mach numbers we get\n",
"V2 = V1*math.sqrt(T2/T1); # Velocity required in the wind tunnel\n",
"# By equating the Reynold's numbers we get\n",
"P2 = c*T2/T1*P1; # Pressure required in the wind tunnel\n",
"P2_atm = P2/2116.; # Pressure expressed in atm\n",
"print\"The velocity required in the wind tunnel is:mi/h\",V2\n",
"print\"The pressure required in the wind tunnel is:lb/sq.ft or atm\",P2,P2_atm"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The velocity required in the wind tunnel is:mi/h 577.516788523\n",
"The pressure required in the wind tunnel is:lb/sq.ft or atm 23848.4615385 11.2705394794\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E06 : Pg 39"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"v_inf_mph = 492.; # freestream velocity in miles per hour\n",
"rho = 0.00079656; # aimbient air density in slugs per cubic feet\n",
"W = 15000.; # weight of the airplane in lbs\n",
"S = 342.6; # wing planform area in sq.ft\n",
"C_d = 0.015; # Drag coefficient\n",
"\n",
"# Calculations\n",
"v_inf_fps = v_inf_mph*(88./60.); # freestream velocity in feet per second\n",
"\n",
"C_l = 2.*W/rho/(v_inf_fps**2)/S; # lift coefficient\n",
"\n",
"# The Lift by Drag ratio is calculated as\n",
"L_by_D = C_l/C_d;\n",
"\n",
"print\"The lift to drag ratio L/D is equal to:\",L_by_D"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The lift to drag ratio L/D is equal to: 14.0744390238\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E07 : Pg 42"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"v_stall_mph = 100.; # stalling speed in miles per hour\n",
"rho = 0.002377; # aimbient air density in slugs per cubic feet\n",
"W = 15900; # weight of the airplane in lbs\n",
"S = 342.6; # wing planform area in sq.ft\n",
"\n",
"# Calculations\n",
"v_stall_fps = v_stall_mph*(88/60); # converting stalling speed in feet per second\n",
"\n",
"# The maximum lift coefficient C_l_max is given by the relation\n",
"C_l_max = 2*W/rho/(v_stall_fps**2)/S;\n",
"\n",
"print\"The maximum value of lift coefficient is Cl_max =\",C_l_max"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The maximum value of lift coefficient is Cl_max = 3.90490596176\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E08 : Pg 42"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"d = 30.; # inflated diameter of ballon in feet\n",
"W = 800.; # weight of the balloon in lb\n",
"g = 32.2; # acceleration due to gravity\n",
"# part (a)\n",
"rho_0 = 0.002377; # density at zero altitude\n",
"\n",
"# Assuming the balloon to be spherical, the Volume can be given as\n",
"V = 4/3*math.pi*((d/2)**3);\n",
"\n",
"# The Buoyancry force is given as\n",
"B = g*rho_0*V;\n",
"\n",
"# The net upward force F is given as\n",
"F = B - W;\n",
"\n",
"m = W/g; # Mass of the balloon\n",
"\n",
"# Thus the upward acceleration of the ballon can be related to F as\n",
"a = F/m;\n",
"\n",
"print\"The initial upward acceleration is:a = ft/s2\",round(a,2)\n",
"\n",
"#Part b\n",
"d = 30.; # inflated diameter of ballon in feet\n",
"W = 800.; # weight of the balloon in lb\n",
"g = 32.2; # acceleration due to gravity\n",
"rho_0 = 0.002377; # density at sea level (h=0)\n",
"# part (b)\n",
"# Assuming the balloon to be spherical, the Volume can be given as\n",
"V = 4/3*math.pi*((d/2.)**3.);\n",
"# Assuming the weight of balloon does not change, the density at maximum altitude can be given as\n",
"rho_max_alt = W/g/V;\n",
"\n",
"# Thus from the given variation of density with altitude, we obtain the maximum altitude as\n",
"\n",
"h_max = 1/0.000007*(1-((rho_max_alt/rho_0)**(1/4.21)))\n",
"\n",
"print\"The maximum altitude that can be reached is:h =ft\",h_max\n",
"\n",
"#Ex8_b\n",
"import math \n",
"from math import pi\n",
"d = 30; # inflated diameter of ballon in feet\n",
"W = 800; # weight of the balloon in lb\n",
"g = 32.2; # acceleration due to gravity\n",
"rho_0 = 0.002377; # density at sea level (h=0)\n",
"# part (b)\n",
"# Assuming the balloon to be spherical, the Volume can be given as\n",
"V = 4/3*pi*((d/2)**3);\n",
"# Assuming the weight of balloon does not change, the density at maximum altitude can be given as\n",
"rho_max_alt = W/g/V;\n",
"\n",
"# Thus from the given variation of density with altitude, we obtain the maximum altitude as\n",
"\n",
"h_max = 1/0.000007*(1-((rho_max_alt/rho_0)**(1/4.21)))\n",
"\n",
"print\"The maximum altitude that can be reached is:\\nh =\",h_max,\"ft\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The initial upward acceleration is:a = ft/s2 0.46\n",
"The maximum altitude that can be reached is:h =ft 485.062768784\n",
"The maximum altitude that can be reached is:\n",
"h = 485.062768784 ft\n"
]
}
],
"prompt_number": 7
}
],
"metadata": {}
}
]
}
|