summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_H_K_Malik/7-WAVES_AND_OSCILLATIONS.ipynb
blob: 93ae53463a3ae933e558d4456ba51be7aa5bceb9 (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
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
{
"cells": [
 {
		   "cell_type": "markdown",
	   "metadata": {},
	   "source": [
       "# Chapter 7: WAVES AND OSCILLATIONS"
	   ]
	},
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.10: Calculation_of_Time_period_of_pendulum.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc \n",
"// Given that\n",
"f = 3 // acceleration of pendulum in m/sec^2\n",
"l = 1 // length of pendulum in meter\n",
"g = 9.8 // acceleration due to gravity in m/sec^2\n",
"// Sample Problem 10 on page no. 7.25\n",
"printf('\n # PROBLEM 10 # \n')\n",
"T = 2 * %pi * sqrt(l / (g + f))\n",
"printf('\n Standard formula used \n T = 2 * pi * sqrt(l / (g + f)). \n ') \n",
"printf('\n Time period of pendulum = %f sec.',T)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.11: Calculation_of_Time_period_of_motion.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc \n",
"// Given that\n",
"x = 0.3 // stretch in spring in meter\n",
"m1 = 6 // mass of first body in kg\n",
"m2 = 1 // mass of second body in kg\n",
"g = 9.8 //  gravitational acceleration of earth in m/sec^2\n",
"// Sample Problem 11 on page no. 7.26\n",
"printf('\n # PROBLEM 11 # \n')\n",
"k = (m1 * g) / x\n",
"T = (2 * %pi) * sqrt(m2 / k)\n",
"printf('\n Standard formula used \n k = (m1 * g) / x. \n T = (2 * pi) * sqrt(m2 / k).\n')\n",
"printf('\n Time period of motion = %f sec. ',T)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.12: EX7_12.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc \n",
"// Given that\n",
"x = 0.1 // compression in spring in m\n",
"F = 10 // restoring force in N\n",
"m = 4 // mass of body in kg\n",
"g = 9.8 // acceleration due to gravity in m/sec^2\n",
"// Sample Problem 12 on page no. 7.26\n",
"printf('\n # PROBLEM 12 # \n')\n",
"k = F / x\n",
"F_ = m * g\n",
"x_ = F_ / k\n",
"T = (2 * %pi) * sqrt(m / k)\n",
"printf('\n Standard formula used \n k = F / x. \n F_ = m * g. \n x_ = F_ / k. \n T = (2 * pi) * sqrt(m / k). \n ')\n",
"printf('\n Time period of motion = %f sec. \n Compression of the spring due to the weight of the body = %f m. ',T,x_)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.13: Calculation_of_Time.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc \n",
"// Given that\n",
"t = 50 // relaxation time in sec\n",
"r = 1 / exp(1) // falls in amplitude and energy\n",
"// Sample Problem 13 on page no. 7.26\n",
"printf('\n # PROBLEM 13 # \n')\n",
"s = 1 / (2 * t)\n",
"T = 1 / s // by using formula A=A_exp(-st) and using r=A/A_\n",
"printf('\n Standard formula used \n s = 1 / (2 * t). \n T = 1 / s . \n ')\n",
"printf('\n Time = %f sec',T)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.14: Calculation_of_Time.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc \n",
"// Given that\n",
"n = 260 // frequency in Hz\n",
"Q = 2000 // quality factor\n",
"r = 1 / (exp(1)^2) // decrease in amplitude \n",
"// Sample Problem 14 on page no. 7.27\n",
"printf('\n # PROBLEM 14 # \n')\n",
"tou = Q / (2 * %pi * n)\n",
"t = 2 * tou // by using formula A=A_exp(-st) and using r=A/A_\n",
"printf('\n Standard formula used \n tou = Q / (2 * pi * n). \n t = 2 * tou. \n')\n",
"printf('\n Time = %f sec.',t)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.1: Calculation_of_Amplitude_and_Mass_of_particle.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc \n",
"// Given that\n",
"E = 1.024e-3 // total energy of particle in J\n",
"T = 2 * %pi // time period of S.H.M. in sec\n",
"x = 0.08 * sqrt(2) // distance of partile in meter\n",
"t = %pi / 4 // time in second\n",
"// Sample Problem 1 on page no. 7.22\n",
"printf('\n # PROBLEM 1 # \n')\n",
"A = x / sin((2 * %pi * t) / T)\n",
"M = (E * T^2) / (2 * %pi^2 * A^2)\n",
"printf('\n Standard formula used \n A = x / sin((2 * pi * t) / T). \n M = (E * T^2) / (2 * pi^2 * A^2). \n')\n",
"printf('\n Amplitude = %f meter,\n Mass of particle = %f g',A,M/1e-3)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.2: Calculation_of_Maximum_amplitude_of_velocity.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc \n",
"// Given that\n",
"A = 0.05 // amplitude in meter\n",
"T = 10 // time period of S.H.M. in sec\n",
"// Sample Problem 2 on page no. 7.22\n",
"printf('\n # PROBLEM 2 # \n')\n",
"v = (A * 2 * %pi) / T\n",
"printf('\n Standard formula used \n v = (A * 2 * pi) / T')\n",
"printf('\n Maximum amplitude of velocity = %f meter/sec',v)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.3: 3Calculation_of_Force_constant_and_Time_period.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc \n",
"// Given that\n",
"E = 9 // total energy of particle in J\n",
"U = 5 // potential energy in J\n",
"A = 1 // amplitude in meter\n",
"m = 2 // mass of harmonic oscillator in kg\n",
"// Sample Problem 3 on page no. 7.23\n",
"printf('\n # PROBLEM 3 # \n')\n",
"kE = E - U// calculation for kinetic energy\n",
"k = (2 * kE) / A^2// calculation for force constant\n",
"T = (2 * %pi) * sqrt(m / k)// calculation for time period\n",
"printf('Standard formula used \n k.E.=1/2*k*A^2,\n T=2*pi*sqrt(m/k)\n')\n",
"printf('\n Force constant = %f J/m,\n Time period = %f sec',k,T)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.4: Calculation_of_Time_taken_by_the_particle.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc \n",
"// Given that\n",
"A = 0.06 // amplitude in meter\n",
"T = 6 // time period of S.H.M. in sec\n",
"x = 0.03 // position of particle in meter\n",
"// Sample Problem 4 on page no. 7.23\n",
"printf('\n # PROBLEM 4 # \n')\n",
"delta = asin(1) // by the formula x=Asin(wt+delta) and (at t = 0,x=A) \n",
"t = x / (A * sin(((2 * %pi) / T) + delta))\n",
"printf('\n Standard formula used \n x=Asin(wt+delta). \n ')\n",
"printf('\n Time taken by the particle = %f sec',t)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.5: Calculation_of_Maximum_velocity_and_acceleration.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc \n",
"// Given that\n",
"A = 0.05// amplitude in meter\n",
"T = 10 * %pi // time period of s.h.m. in sec\n",
"// Sample Problem 5 on page no. 7.24\n",
"printf('\n # PROBLEM 5 # \n')\n",
"v = A * (2 * %pi / T)\n",
"a = A * (2 * %pi / T)^2\n",
"printf('\n Standard formula used \n v = A * (2 * pi / T). \n a = A * (2 * pi / T)^2. \n ')\n",
"printf('\n Maximum velocity = %e meter/sec,\n acceleration = %e m/sec^2',v,a)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.6: Calculation_of_Maximum_velocity.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc \n",
"// Given that\n",
"A = 0.06// amplitude in meter\n",
"T = 10 * %pi // time period of s.h.m. in sec\n",
"// Sample Problem 6 on page no. 7.24\n",
"printf('\n # PROBLEM 6 # \n')\n",
"v = A * (2 * %pi / T)\n",
"printf('\n Standard formula used \n v = A * (2 * pi / T)')\n",
"printf('\n Maximum velocity = %e meter/sec',v)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.7: Calculation_of_natural_frequency.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc \n",
"// Given that\n",
"k = 16 // stiffness constant of spring n/m\n",
"m = 1 // mass of particle in kg\n",
"// Sample Problem 7 on page no. 7.24\n",
"printf('\n # PROBLEM 7 # \n')\n",
"n = sqrt(k / m) / (2 * %pi)\n",
"printf('\n Standard formula used \n n = sqrt(k / m) / (2 * pi).\n')\n",
"printf('\n natural frequency = %f Hz.',n)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.8: Calculation_of_The_time_period_of_pendulum.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc \n",
"// Given that\n",
"l = 1 // length of pendulum in meter\n",
"m = 2 // mass of particle in kg\n",
"g = 9.8 // acceleration due to gravity in m/sec^2\n",
"// Sample Problem 8 on page no. 7.25\n",
"printf('\n # PROBLEM 8 # \n')\n",
"T = 2 * %pi * sqrt(l / g)\n",
"printf('\n Standard formula used \n T = 2 * pi * sqrt(l / g). \n')\n",
"printf('\n The time period of pendulum = %f sec.',T)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.9: Calculation_of_Frequency.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc \n",
"// Given that\n",
"m = 100 // mass of particle in gm\n",
"// Sample Problem 9 on page no. 7.25\n",
"printf('\n # PROBLEM 9 # \n')\n",
"n = (1 / (2 * %pi)) * sqrt(10 / m) // by using given formula \n",
"printf('\n Standard formula used \n n = (1 / (2 * pi)) * sqrt(10 / m). \n')\n",
"printf('\n Frequency  = %f Hz.',n)"
   ]
   }
],
"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
}