summaryrefslogtreecommitdiff
path: root/Engineering_Mechanics_by_Tayal_A.K./chapter21_2.ipynb
blob: c58e0b47bd275c31499716e12fd84992fa7b610d (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
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
{
 "metadata": {
  "name": "chapter21.ipynb"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 21: Kinematics Of Rigid Body"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 21.21-1,Page No:536"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Initilization of variables\n",
      "\n",
      "N=1800 # r.p.m # Speed of the shaft\n",
      "t=5 # seconds # time taken to attain the rated speed # case (a)\n",
      "T=90 # seconds # time taken by the unit to come to rest # case (b)\n",
      "pi=3.14 # constant\n",
      "\n",
      "# Calculations\n",
      "\n",
      "omega=(2*pi*N)/(60)\n",
      "\n",
      "# (a)\n",
      "# we take alpha_1,theta_1 & n_1 for case (a)\n",
      "alpha_1=omega/t # rad/s^2 #\n",
      "theta_1=(omega**2)/(2*alpha_1) # radian\n",
      "# Let n_1 be the number of revolutions turned,\n",
      "n_1=theta_1*(1/(2*pi))\n",
      "\n",
      "# (b)\n",
      "# similarly we take alpha_1,theta_1 & n_1 for case (b)\n",
      "alpha_2=(omega/T) # rad/s^2 # However here alpha_2 is -ve\n",
      "theta_2=(omega**2)/(2*alpha_2) # radians\n",
      "# Let n_2 be the number of revolutions turned,\n",
      "n_2=theta_2*(1/(2*pi))\n",
      "\n",
      "# Results\n",
      "\n",
      "print\"(a) The no of revolutions the unit turns to attain the rated speed is \",round(n_1)\n",
      "print\"(b) The no of revolutions the unit turns to come to rest is \",round(n_2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) The no of revolutions the unit turns to attain the rated speed is  75.0\n",
        "(b) The no of revolutions the unit turns to come to rest is  1350.0\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 21.21-2,Page No:540"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Initilization of variables\n",
      "\n",
      "r=1 # m # radius of the cylinder\n",
      "v_c=20 # m/s # velocity of the cylinder at its centre\n",
      "\n",
      "# Calculations\n",
      "\n",
      "# The velocity of point E is given by using the triangle law as,\n",
      "v_e=(2)**0.5*v_c # m/s \n",
      "\n",
      "# Similarly the velocity at point F is given as,\n",
      "v_f=2*v_c # m/s \n",
      "\n",
      "# Results\n",
      "\n",
      "print\"The velocity of point E is \",round(v_e,2),\"m/s\"\n",
      "print\"The velocity of point F is \",round(v_f),\"m/s\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The velocity of point E is  28.28 m/s\n",
        "The velocity of point F is  40.0 m/s\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 21.21-3,Page No:541"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Initilization of Variables\n",
      "\n",
      "v_1=3 # m/s # uniform speed of the belt at top\n",
      "v_2=2 # m/s # uniform speed of the belt at the bottom\n",
      "r=0.4 # m # radius of the roller\n",
      "\n",
      "# Calculations\n",
      "\n",
      "# equating eq'ns 2 & 4 and solving for v_c & theta' (angular velocity). We use matrix to solve the eqn's\n",
      "A=[1 r;1 -r]\n",
      "B=[v_1;v_2]\n",
      "C=inv(A)*B\n",
      "\n",
      "# Results\n",
      "\n",
      "print\"The linear velocity (v_c) at point C is \",round(C(1)),\"m/s\"\n",
      "print\"The angular velocity at point C is \" round(C(2)),\"radian/second\"\n",
      "# NOTE: The answer of angular velocity is incorrect in the book\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "ename": "SyntaxError",
       "evalue": "invalid syntax (<ipython-input-4-f6df08d07dba>, line 12)",
       "output_type": "pyerr",
       "traceback": [
        "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-4-f6df08d07dba>\"\u001b[1;36m, line \u001b[1;32m12\u001b[0m\n\u001b[1;33m    A=[1 r;1 -r]\u001b[0m\n\u001b[1;37m         ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 21.21-4,Page No:542"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Initilization of Variables\n",
      "\n",
      "l=1 # m # length of bar AB\n",
      "v_a=5 # m/s # velocity of A\n",
      "theta=30 # degree # angle made by the bar with the horizontal\n",
      "\n",
      "# Calculations\n",
      "\n",
      "# From the vector diagram linear velocity of end B is given as,\n",
      "v_b=v_a/tan(theta*(pi/180)) # m/s \n",
      "\n",
      "# Now let the relative velocity be v_ba which is given as,\n",
      "v_ba=v_a/sin(theta*(pi/180)) # m/s\n",
      "\n",
      "# Now let the angular velocity of the bar be theta_a which is given as,\n",
      "theta_a=(v_ba)/l # radian/second\n",
      "\n",
      "# Velocity of point A\n",
      "v_a=(0.5)*theta_a # m/s\n",
      "\n",
      "# Magnitude of velocity at point C is,\n",
      "v_c=v_a # m/s # from the vector diagram\n",
      "\n",
      "# Results\n",
      "\n",
      "print\"(a) The angular velocity of the bar is \",round(theta_a),\"radian/second\"\n",
      "print\"(b) The velocity of end B is \",round(v_b,2),\"m/s\"\n",
      "print\"(c) The velocity of mid point C is \",round(v_c),\"m/s\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) The angular velocity of the bar is  10.0 radian/second\n",
        "(b) The velocity of end B is  8.67 m/s\n",
        "(c) The velocity of mid point C is  5.0 m/s\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 21.21-5,Page No:544"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Initilization of Variables\n",
      "\n",
      "r=0.12 # m # length of the crank\n",
      "l=0.6 # m # length of the connecting rod\n",
      "N=300 # r.p.m # angular velocity of the crank\n",
      "theta=30 # degree # angle made by the crank with the horizontal\n",
      "pi=3.14\n",
      "\n",
      "# Calculations\n",
      "\n",
      "# Now let the angle between the connecting rod and the horizontal rod be phi\n",
      "phi=arcsin(r*sin(theta*(pi/180))/(l))*(180/pi) # degree\n",
      "\n",
      "# Now let the angular velocity of crank OA be omega_oa, which is given by eq'n\n",
      "omega_oa=(2*pi*N)/(60) # radian/second\n",
      "\n",
      "# Linear velocity at A is given as,\n",
      "v_a=r*omega_oa # m/s\n",
      "\n",
      "# Now using the sine rule linear velocity at B can be given as,\n",
      "v_b=v_a*sin(35.7*(pi/180))/sin(84.3*(pi/180)) # m/s\n",
      "\n",
      "# Similarly the relative velocity (assume v_ba) is given as,\n",
      "v_ba=v_a*sin(60*(pi/180))/sin(84.3*(pi/180))\n",
      "\n",
      "# Angular velocity (omega_ab) is given as,\n",
      "omega_ab=v_ba/l # radian/second\n",
      "\n",
      "# Results\n",
      "\n",
      "print\"(a) The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n",
      "print\"(b) The velocity of the piston when the crank makes an angle of 30 degree is \",round(v_b,2),\"m/s\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) The angular velocity of the connecting rod is  5.46 radian/second\n",
        "(b) The velocity of the piston when the crank makes an angle of 30 degree is  2.21 m/s\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 21.21-6,Page No:548"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Initiization of variables\n",
      "\n",
      "r=1 # m # radius of the cylinder\n",
      "v_c=20 # m/s # velocity at the centre\n",
      "\n",
      "# Calculations\n",
      "\n",
      "# Angular velocity is given as,\n",
      "omega=v_c/r # radian/second\n",
      "\n",
      "# Velocity at point D is\n",
      "v_d=omega*(2)**0.5*r # m/s # from eq'n 1\n",
      "\n",
      "# Now, the velocity at point E is,\n",
      "v_e=omega*2*r # m/s \n",
      "\n",
      "# Results\n",
      "\n",
      "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n",
      "print\"The velocity at point E is \",round(v_e),\"m/s\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The velocity at point D is  28.28 m/s\n",
        "The velocity at point E is  40.0 m/s\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 21.21-7,Page No:548"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Initilization of Variables\n",
      "\n",
      "r=5 # cm # radius of the roller\n",
      "AB=0.1 # m\n",
      "v_a=3 # m/s # velocity at A\n",
      "v_b=2 # m/s # velocity at B\n",
      "\n",
      "# Calculations\n",
      "\n",
      "# Solving eqn's 1 & 2 using matrix for IA & IB we get,\n",
      "A=[-2 3;1 1]\n",
      "B=[0;AB]\n",
      "C=inv(A)*B\n",
      "d1=C(2)*10**2 # cm # assume d1 for case 1\n",
      "\n",
      "# Similary solving eqn's 3 & 4 again for IA & IB we get,\n",
      "P=[-v_b v_a;1 -1]\n",
      "Q=[0;AB]\n",
      "R=inv(P)*Q\n",
      "d2=R(2)*10**2 # cm # assume d2 for case 2\n",
      "\n",
      "# Results\n",
      "\n",
      "print\"The distance d when the bars move in the opposite directions are \",round(d1),\"cm\"\n",
      "print\"The distance d when the bars move in the same directions are \",round(d2),\"cm\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "ename": "SyntaxError",
       "evalue": "invalid syntax (<ipython-input-21-6e389b1a0870>, line 13)",
       "output_type": "pyerr",
       "traceback": [
        "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-21-6e389b1a0870>\"\u001b[1;36m, line \u001b[1;32m13\u001b[0m\n\u001b[1;33m    A=[-2 3;1 1]\u001b[0m\n\u001b[1;37m          ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
       ]
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 21.21-8,Page No:550"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Initilization of Variables\n",
      "\n",
      "v_c=1 # m/s # velocity t the centre\n",
      "r1=0.1 # m \n",
      "r2=0.20 # m\n",
      "EB=0.1 # m\n",
      "EA=0.3 # m\n",
      "ED=(r1**2+r2**2)**0.5 # m\n",
      "\n",
      "# Calculations\n",
      "\n",
      "# angular velocity is given as,\n",
      "omega=v_c/r1 # radian/seconds\n",
      "\n",
      "# Velocit at point B\n",
      "v_b=omega*EB # m/s \n",
      "\n",
      "# Velocity at point A\n",
      "v_a=omega*EA # m/s\n",
      "\n",
      "# Velocity at point D\n",
      "v_d=omega*ED # m/s\n",
      "\n",
      "# Results\n",
      "\n",
      "print\"The velocity at point A is \",round(v_a),\"m/s\"\n",
      "print\"The velocity at point B is \",round(v_b),\"m/s\"\n",
      "print\"The velocity at point D is \",round(v_d,2),\"m/s\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The velocity at point A is  3.0 m/s\n",
        "The velocity at point B is  1.0 m/s\n",
        "The velocity at point D is  2.24 m/s\n"
       ]
      }
     ],
     "prompt_number": 24
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 21.21-9,Page No:551"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Initilization of variables\n",
      "\n",
      "l=1 # m # length of bar AB\n",
      "v_a=5 # m/s # velocity at A\n",
      "theta=30 # degree # angle made by the bar with the horizontal\n",
      "\n",
      "# Calculations\n",
      "\n",
      "IA=l*sin(theta*(pi/180)) # m\n",
      "IB=l*cos(theta*(pi/180)) # m\n",
      "IC=0.5 # m # from triangle IAC\n",
      "\n",
      "# Angular veocity is given as,\n",
      "omega=v_a/(IA) # radian/second\n",
      "v_b=omega*IB # m/s\n",
      "v_c=omega*IC # m/s\n",
      "\n",
      "# Results\n",
      "\n",
      "print\"The velocity at point B is \",round(v_b,2),\"m/s\"\n",
      "print\"The velocity at point C is \",round(v_c),\"m/s\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The velocity at point B is  8.67 m/s\n",
        "The velocity at point C is  5.0 m/s\n"
       ]
      }
     ],
     "prompt_number": 26
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 21.21-11,Page No:552"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Initilization of variables\n",
      "\n",
      "v_a=2 # m/s # velocity at end A\n",
      "r=0.05 # m # radius of the disc\n",
      "alpha=30 # degree # angle made by the bar with the horizontal\n",
      "\n",
      "# Calculations \n",
      "\n",
      "# Soving eqn's 1 & 2 and substuting eqn 1 in it we get eq'n for omega as,\n",
      "omega=(v_a*(sin(alpha*(pi/180)))**2)/(r*cos(alpha*(pi/180))) # radian/second\n",
      "\n",
      "# Results\n",
      "\n",
      "print\"The anguar veocity of the bar is \",round(omega,2),\"radian/second\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The anguar veocity of the bar is  11.53 radian/second\n"
       ]
      }
     ],
     "prompt_number": 28
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 21.21-12,Page No:553"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Initilization of variables\n",
      "\n",
      "l=0.6 # m \n",
      "r=0.12 # m \n",
      "theta=30 # degree # angle made by OA with the horizontal\n",
      "phi=5.7 # degree # from EX 21.5\n",
      "N=300\n",
      "pi=3.14\n",
      "\n",
      "# Calculations\n",
      "\n",
      "# Let the angular velocity of the connecting rod be (omega_ab) which is given from eqn's 1 & 4 as,\n",
      "omega_oa=(2*pi*N)/(60) # radian/ second\n",
      "\n",
      "# Now,in triangle IBO.\n",
      "IB=(l*cos(phi*(pi/180))*tan(theta*(pi/180)))+(r*sin(theta*(pi/180))) # m\n",
      "IA=(l*cos(phi*(pi/180)))/(cos(theta*(pi/180))) # m\n",
      "\n",
      "# from eq'n 5\n",
      "v_b=(r*omega_oa*IB)/(IA) # m/s\n",
      "\n",
      "# From eq'n 6\n",
      "omega_ab=(r*omega_oa)/(IA) # radian/second\n",
      "\n",
      "# Results\n",
      "\n",
      "print\"The velocity at B is \",round(v_b,2),\"m/s\"\n",
      "print\"The angular velocity of the connecting rod is \",round(omega_ab,2),\"radian/second\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The velocity at B is  2.21 m/s\n",
        "The angular velocity of the connecting rod is  5.47 radian/second\n"
       ]
      }
     ],
     "prompt_number": 30
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 21.21-13,Page No:555"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Initilization of variables\n",
      "\n",
      "omega_ab=5 # rad/s # angular veocity of the bar\n",
      "AB=0.20 # m\n",
      "BC=0.15 # m\n",
      "CD=0.3 # m\n",
      "theta=30 # degree # where theta= angle made by AB with the horizontal\n",
      "alpha=60 # degree # where alpha=angle made by CD with the horizontal\n",
      "\n",
      "# Calculations\n",
      "\n",
      "# Consider triangle BIC\n",
      "IB=sin(alpha*(pi/180))*BC*1 # m\n",
      "IC=sin(theta*(pi/180))*BC*1 # m\n",
      "v_b=omega_ab*AB # m/s\n",
      "\n",
      "# let the angular velocity of the bar BC be omega_bc\n",
      "omega_bc=v_b/IB # radian/second\n",
      "v_c=omega_bc*IC # m/s\n",
      "\n",
      "# let the angular velocity of bar DC be omega_dc\n",
      "omega_dc=v_c/CD # radian/second\n",
      "\n",
      "# Results\n",
      "\n",
      "print\"The angular velocity of bar BC is \",round(omega_bc,3),\"rad/s\"\n",
      "print\"The angular velocity of bar CD is \",round(omega_dc,2),\"rad/s\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The angular velocity of bar BC is  7.7 rad/s\n",
        "The angular velocity of bar CD is  1.92 rad/s\n"
       ]
      }
     ],
     "prompt_number": 34
    }
   ],
   "metadata": {}
  }
 ]
}