summaryrefslogtreecommitdiff
path: root/Engineering_Physics_Malik/Chapter_8.ipynb
blob: 60f3ed3a9ca44d44557dc67970e10a5617ef89a4 (plain)
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
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 8: Sound Waves and Acoustics of Buildings \n"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.1, Page 8.17"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given \n",
      "v = 34500 # speed of sound in cm/sec\n",
      "f = 20 # lower limit of frequency for human hearing ear in Hz\n",
      "f_ = 20000 # upper limit of frequency for human hearing ear in Hz\n",
      "\n",
      "#Clculations\n",
      "l1 = v / f\n",
      "l2 = v / f_\n",
      "\n",
      "#Results\n",
      "print \"Wavelength range of the sound wave is %.f cm to %.f cm.\"%(l1,l2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Wavelength range of the sound wave is 1725 cm to 1 cm.\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.2, Page 8.18"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import sqrt\n",
      "\n",
      "# Given \n",
      "T = 373. # temperature in kelvin\n",
      "d = 1.293e-3 # density of air at S.T.P. in gm/cm^3\n",
      "d_ = 13.6 # density of mercury in gm/cm^3\n",
      "Cp = 0.2417 # specific heat of air at constant pressure \n",
      "Cv = 0.1715 # specific heat of air at constant volume\n",
      "g = 980 # gravitational constant i dynes/cm^3\n",
      "\n",
      "#calculations\n",
      "p = 76 * d_ * g\n",
      "gama = Cp / Cv\n",
      "v = sqrt(gama * (p / d))\n",
      "v_ = v * sqrt(T / 273)\n",
      "\n",
      "#Result\n",
      "print \"Velocity of sound in the air in %.f cm/sec.\"%v_\n",
      "#Incorrect answer in textbook"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Velocity of sound in the air in 38839 cm/sec.\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.3, Page 8.18"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import sqrt\n",
      "\n",
      " \n",
      "# Given that\n",
      "n = 512. # frequency of tuning fork in Hz \n",
      "T = 290. # temperature in kelvin\n",
      "l = 66.5 # wavelength of the gas emitted by tuning fork in cm\n",
      "d = 1.293e-3 # density of air at S.T.P. in gm/cm^3\n",
      "d_ = 13.6 # density of mercury in gm/cm^3\n",
      "g = 980 # gravitational constant i dynes/cm^3\n",
      "\n",
      "#Calculations\n",
      "p = 76 * d_ * g# calculation for pressure\n",
      "v_ = n * l# calculation for velocity of sound in air at temperature 17 c \n",
      "v = v_ * sqrt(273 / T)# calculation for velocity of sound in air at temp 0 c\n",
      "gama = v**2 * (d / p)# calculation for ratio of two specific heat\n",
      "\n",
      "#Result\n",
      "print \"Ratio of  two principal specific heats of air is %.2f\"%gama"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Ratio of  two principal specific heats of air is 1.39\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.4, Page 8.19"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given \n",
      "A = 15 * 30 # area of the floor in square meter\n",
      "h = 6 # height of hall in meter\n",
      "N = 500 # no. of people\n",
      "t = 1.36 # optimum time for orchestral music in sec\n",
      "k = 0.44 # absorption coefficient per person\n",
      "\n",
      "#Calculations\n",
      "aS = 0.161 * ((A * h) / t)\n",
      "a = N * k\n",
      "a_ = aS - a\n",
      "w = a_ + (N / 2) * k + (N / 2) * 0.02\n",
      "t = (0.161 * (A * h)) / w\n",
      "\n",
      "#Results\n",
      "print \"Coefficient of absorption to be provided by the walls, floor and ceiling when the hall is fully occupied is %.f SI unit.\"%a_\n",
      "print \"Reverberation time if only half upholstered seats are occupied is %.2f sec.\"%t\n",
      "#Answer varies due to rounding-off "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "319.632352941\n",
        "Coefficient of absorption to be provided by the walls, floor and ceiling when the hall is fully occupied is 100 SI unit.\n",
        "Reverberation time if only half upholstered seats are occupied is 2.03 sec.\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.5, Page 8.19"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given\n",
      "V = 8000 # volume of hall in meter^3\n",
      "t = 1.8 # reverberation time in sec\n",
      "\n",
      "#Calculation\n",
      "aS = (0.161 * V) / t# calculation for the total absorption constant\n",
      "\n",
      "#Result\n",
      "print \"The total absorption constant = %.3f O.W.U.\"%aS\n",
      "#Incorrect answer in the textbook"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The total absorption constant = 715.556 O.W.U.\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.6, Page 8.20"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given \n",
      "V = 1700 # volume in meter^3\n",
      "a1 = 98 # area of plastered wall in m^2\n",
      "a2 = 144 # area of plastered ceiling in m^2\n",
      "a3 = 15 # area of wooden door in m^2\n",
      "a4 = 88 # area of cushioned chairs in m^2\n",
      "a5 = 150 # area of audience (each person) in m^2\n",
      "k1 = 0.03 # coefficient of absorption for plastered wall in O.W.U.\n",
      "k2 = 0.04 # coefficient of absorption for plastered ceiling in O.W.U.\n",
      "k3 = 0.06 # coefficient of absorption for wooden door in O.W.U.\n",
      "k4 = 1 # coefficient of absorption for cushioned chair in O.W.U.\n",
      "k5 = 4.7 # coefficient of absorption for audience (each person) in O.W.U.\n",
      "\n",
      "#Calculations\n",
      "A1 = a1 * k1# calculation for the absorption by the plaster wall\n",
      "A2 = a2 * k2# calculation for the absorption by the plastered ceiling\n",
      "A3 = a3 * k3# calculation for wooden door\n",
      "A4 = a4 * k4# calculation for cushioned chairs \n",
      "A = A1 + A2 + A3 + A4# calculation for total absorption\n",
      "T = 0.161 * (V / A)# calculation for reverberation time\n",
      "\n",
      "#Result\n",
      "print \"Reverberation time is %.2f sec\"%T"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Reverberation time is 2.80 sec\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.7, Page 8.20"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given \n",
      "V = 1400 # volume of hall in meter^3\n",
      "C = 110 # seating capacity of hall \n",
      "a1 = 98 # area of plastered wall in m^2\n",
      "a2 = 144 # area of plastered ceiling in m^2\n",
      "a3 = 15 # area of wooden door in m^2\n",
      "a4 = 88 # area of cushioned chairs in m^2\n",
      "a5 = 150 # area of audience (each person) in m^2\n",
      "k1 = 0.03 # coefficient of absorption for plastered wall in O.W.U.\n",
      "k2 = 0.04 # coefficient of absorption for plastered ceiling in O.W.U.\n",
      "k3 = 0.06 # coefficient of absorption for wooden door in O.W.U.\n",
      "k4 = 1 # coefficient of absorption for cushioned chair in O.W.U.\n",
      "k5 = 4.7 # coefficient of absorption for audience (each person) in O.W.U.\n",
      "\n",
      "#Calculations\n",
      "A1 = a1 * k1# calculation for the absorption by the plaster wall\n",
      "A2 = a2 * k2# calculation for the absorption by the plastered ceiling\n",
      "A3 = a3 * k3# calculation for wooden door\n",
      "A4 = a4 * k4# calculation for cushioned chairs \n",
      "A5 = C*k5 # the absorption due to persons\n",
      "A = A1 + A2 + A3 + A4 + A5 # calculation for total absorption\n",
      "T = (0.161 * V) / A# calculation for the reverberation time\n",
      "\n",
      "#Result\n",
      "print \"Reverberation time is %.3f sec\"%T"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Reverberation time is 0.367 sec\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.8, Page 8.21"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given \n",
      "V = 980 # volume in meter^3\n",
      "a1 = 150 # area of wall in m^2\n",
      "a2 = 95 # area of ceiling in m^2\n",
      "a3 = 90 # area of floor in m^2\n",
      "k1 = 0.03 # coefficient of absorption for wall in O.W.U.\n",
      "k2 = 0.80 # coefficient of absorption for ceiling in O.W.U.\n",
      "k3 = 0.06 # coefficient of absorption for floor in O.W.U.\n",
      "\n",
      "#calculations\n",
      "A1 = a1 * k1\n",
      "A2 = a2 * k2\n",
      "A3 = a3 * k3\n",
      "A = A1 + A2 + A3\n",
      "T = 0.161 * (V / A)\n",
      "\n",
      "#Result\n",
      "print \"Reverberation time = %.2f sec\"%T"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Reverberation time = 1.84 sec\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.9, Page 8.21"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given \n",
      "V = 980 # volume in meter^3\n",
      "a = 1.58 # area of window in m^2\n",
      "I_ = 1e-12 # standard intensity level of sound wave in W/m^2\n",
      "l = 60 # intensity level in dB\n",
      "\n",
      "#calculations\n",
      "I = I_ * 10**(l / 10)# calculation for intensity\n",
      "AP = I * a# calculation for acoustic power\n",
      "\n",
      "#Result\n",
      "print \"Acoustic power = %.2e watt\"%AP"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Acoustic power = 1.58e-06 watt\n"
       ]
      }
     ],
     "prompt_number": 14
    }
   ],
   "metadata": {}
  }
 ]
}