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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 18: Waves ll"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 18.1: Sample_Problem_1.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"exec('degree_rad.sci', -1)\n",
"\n",
"//Given that\n",
"Vs = 1482 //in m/s\n",
"Vw = 343 //in m/s\n",
"\n",
"//Sample Problem 18-1\n",
"printf('**Sample Probelm 18-1**\n')\n",
"//deltaT = d/V = D*sin(theta)/V\n",
"//D*sin(90)/Vs = D*sin(theta)/Vw\n",
"theta = rtod(asin(Vw/Vs))\n",
"printf('The actual angle at which source is present, is %fdegree', theta)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 18.2: Sample_Problem_2.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Given that\n",
"deltaPm = 28 //in N/m^2\n",
"density = 1.21 //in kg/m^3\n",
"f = 1000 //in Hz\n",
"v = 343 //in m/s\n",
"\n",
"//Sample Problem 18-2\n",
"printf('**Sample Problem 18-2**\n')\n",
"w = 2*%pi*f\n",
"Sm = deltaPm/(v*density*w)\n",
"printf('The amplitude of sound will be %em', Sm)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 18.3: Sample_Problem_3.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Given that\n",
"D = 1.5 //times wavelength\n",
"\n",
"//Sample Problem 18-3a\n",
"printf('**Sample Problem 18-3a**\n')\n",
"deltaL = 0\n",
"printf('Waves undergo constructive interference at P1\n')\n",
"\n",
"//Sample Problem 18-3b\n",
"printf('\n**Sample Problem 18-3b**\n')\n",
"deltaL = D\n",
"deltaPhi = 1.5*2*%pi\n",
"if modulo((deltaPhi/%pi), 2)==0 then\n",
" printf('Waves undergo constructive interference at P2\n')\n",
"else\n",
" printf('Waves undergo desstructive interference at P2')\n",
"end"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 18.4: Sample_Problem_4.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Given that\n",
"L = 10 //in meter\n",
"Ps = 1.6*10^4\n",
"\n",
"//Sample Problem 18-4a\n",
"printf('**Sample Problem 18-4a**\n')\n",
"r = 12 //in meter\n",
"I = Ps/(2*%pi*r*L)\n",
"printf('The intensity of the sound at a distance %dm is equal to %fW/m^2\n', r, I)\n",
"\n",
"//Sapmle Problem 18-4b\n",
"printf('\n**Sample Problem 18-4b**\n')\n",
"Ad = 2*10^-4 //in m^2\n",
"Pd = I*Ad\n",
"printf('The sound energy intercepted by the acoustic detector is %eW', Pd)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 18.5: Sample_Problem_5.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Given that\n",
"B2 = 120 //in dB\n",
"B1 = 92 //in dB\n",
"\n",
"//Sample Problem 18-5\n",
"printf('**Sample Problem 18-5**\n')\n",
"//B2 = 10 * log(I2/Io)\n",
"//B1 = 10 * log(I1/Io)\n",
"r = 10^((B2 - B1)/10) //The ratio\n",
"printf('The Ratio of the intensities is %f', r)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 18.6: Sample_Problem_6.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Given that\n",
"L = 67*10^-2 //in cm\n",
"Vs = 343 //in m/s\n",
"\n",
"//Sample Problem 18-6a\n",
"printf('**Sample Problem 18-6a**\n')\n",
"//Open Ends\n",
"f = Vs/(2*L)\n",
"printf('The frequency of sound in case of open end is %fHz\n', f)\n",
"\n",
"//Sample Problem 18-6b\n",
"printf('\n**Sample Problem 18-6b**\n')\n",
"//cloes end\n",
"fo = Vs/(4*L)\n",
"printf('The frequency of sound in case of open ends is %fHz', fo)"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 18.8: Sample_Problem_8.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"//Given that\n",
"v = 242 //in m/s\n",
"f = 1250 //in Hz\n",
"Vs = 343 //in m/s\n",
"\n",
"//Sample Problem 18-8a\n",
"printf('**Sample Problem 18-8a**\n')\n",
"F = (Vs/(Vs-v))*f\n",
"printf('The frequency measured by the detector on the pole is %fHz\n', F)\n",
"\n",
"//Sample Problem 18-8b\n",
"printf('\n**Sample Problem 18-8b**\n')\n",
"Fe = (Vs+v)/Vs*F\n",
"printf('The frequency measured by the detector on the rocket is %fHz', Fe)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Scilab",
"language": "scilab",
"name": "scilab"
},
"language_info": {
"file_extension": ".sce",
"help_links": [
{
"text": "MetaKernel Magics",
"url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
}
],
"mimetype": "text/x-octave",
"name": "scilab",
"version": "0.7.1"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|