summaryrefslogtreecommitdiff
path: root/Engineering_Mechanics,_Schaum_Series_by_McLean/chapter14_2.ipynb
blob: c04236af7988021e624db9546f7a87c3049f5495 (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
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
{
 "metadata": {
  "name": "chapter14.ipynb"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 14: Kinematics of a Rigid Body in Plane Motion"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 14.14-2, Page no 265"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "d=500 #mm\n",
      "wo=0 #rpm\n",
      "w=300 #rpm\n",
      "t=20 #s\n",
      "t1=2 #s\n",
      "\n",
      "#Calculations\n",
      "alpha=(2*pi*(60**-1)*(w-wo))/t #rad/s**2\n",
      "w1=wo+alpha*t1 #rad/s\n",
      "v=(d*(2*1000)**-1)*w1 #m/s\n",
      "a_n=(d*(2*1000)**-1)*w1**2 #m/s**2\n",
      "a_t=(d*(2*1000)**-1)*alpha #m/s**2\n",
      "a=(a_n**2+a_t**2)**0.5 #m/s**2\n",
      "theta=arccos(a_n/a)*(180/pi) #degrees\n",
      "\n",
      "#Result\n",
      "print'The computed values are:'\n",
      "print'alpha=',round(alpha,2),\"rad/s**2\"\n",
      "print'w1=',round(w1,2),\"rad/s\"\n",
      "print'v=',round(v,3),\"m/s\"\n",
      "print'a=',round(a,2),\"m/s**2\"\n",
      "print'theta=',round(theta,1),\"degrees\"\n",
      "\n",
      "# The answers may wary in decimal points."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The computed values are:\n",
        "alpha= 1.57 rad/s**2\n",
        "w1= 3.14 rad/s\n",
        "v= 0.785 m/s\n",
        "a= 2.5 m/s**2\n",
        "theta= 9.0 degrees\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 14.14-3, Page no 266"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "s_BC=2 #m\n",
      "s_C=2.5 #m\n",
      "\n",
      "#Calculations\n",
      "s_B=(s_BC**2+s_C**2)**0.5 #m\n",
      "theta=arctan(s_BC*s_C**-1)*(180/pi) #degrees\n",
      "\n",
      "#Result\n",
      "print'The absolute displacement is',round(s_B,1),\"m\",'and the angle made by the vector is',round(theta,1),\"degrees.\" \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The absolute displacement is 3.2 m and the angle made by the vector is 38.7 degrees.\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 14.14-4, Page no 266"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "import numpy as np\n",
      "\n",
      "#Initilization of variables\n",
      "V_A=20 #mi/h\n",
      "V_B=70 #mi/h\n",
      "# as theta1=60 degrees,\n",
      "sintheta1=sqrt(3)*2**-1\n",
      "costheta1=2**-1\n",
      "# also phi=45 degrees, thus\n",
      "sinphi=sqrt(2)**-1\n",
      "cosphi=sqrt(2)**-1\n",
      "\n",
      "#Result\n",
      "#Vector's in matrix form\n",
      "v_A=np.array([-V_A*cosphi,V_A*sinphi]) #mi/h\n",
      "v_B=np.array([V_B*costheta1,V_B*sintheta1]) #mi/h\n",
      "a=v_A[0]+v_B[0] #mi/h\n",
      "b=v_A[1]+v_B[1] #mi/h\n",
      "v_ab=(a**2+b**2)**0.5 #mi/h\n",
      "theta=arctan(b/a)*(180/pi) #degrees\n",
      "#The relative velocity v_ba is just different in sign while the magnitude stays the same\n",
      "\n",
      "#Resul\n",
      "print'The relative velocity is',round(v_ab,1),\"mi/h\",'making an angle',round(theta,1),\"degrees\"\n",
      "\n",
      "# The ans may wary due to decimal point descrepancy."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The relative velocity is 77.6 mi/h making an angle 74.4 degrees\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 14.14-9, Page no 271"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "l=2.5 #m\n",
      "v_A=4 #m/s\n",
      "a_A=5 #m/s**2\n",
      "theta=30 #degrees\n",
      "\n",
      "#Calculations\n",
      "#Vector triangle yields v_a.b=2.93 m/s\n",
      "v_ab=2.93 #m/s\n",
      "w=v_ab*l**-1 #rad/s (clockwise)\n",
      "#Ploygon yields alpha_a/b=2.75 m/s**2\n",
      "alpha_ab=2.75 #m/s**2\n",
      "alpha=alpha_ab*l**-1 #rad/s**2 (counterclockwise)\n",
      "\n",
      "#Result\n",
      "print'The value of angular velocity is',round(w,2),\"rad/s\"\n",
      "print'The value of angular acceleration is',round(alpha,1),\"rad/s**2\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of angular velocity is 1.17 rad/s\n",
        "The value of angular acceleration is 1.1 rad/s**2\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 14.14-10, Page no 272"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "w=(2*pi*120)/60 #rad/s\n",
      "l=24 #in\n",
      "l_c=4 #in\n",
      "# as th=30 degrees,\n",
      "sinth=2**-1\n",
      "\n",
      "#Calculations\n",
      "v=(l_c*12**-1)*w #ft/s\n",
      "betaa=arcsin((l_c*sinth)/l)*(180/pi) #degrees\n",
      "# betaa yeilds 4.8 degrees, thus value of cosbetaa is,\n",
      "cosbetaa=0.996\n",
      "theta=60-betaa #degrees\n",
      "# here theta yeilds 55.2 degrees, thus value of costheta is,\n",
      "costheta=0.57\n",
      "#Component of velocity along connecting rod is \n",
      "v1=v*costheta #ft/s\n",
      "v_p=v1/cosbetaa #ft/s\n",
      "\n",
      "#Result\n",
      "print'The absoulte velocity is',round(v_p,2),\"ft/s\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The absoulte velocity is 2.4 ft/s\n"
       ]
      }
     ],
     "prompt_number": 29
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 14.14-13, Page no 274"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "v_pc=3.68 #ft/s\n",
      "l=2 #ft\n",
      "\n",
      "#Calculations\n",
      "w=v_pc/l #rad/s counterclockwise\n",
      "\n",
      "#Result\n",
      "print'The angular velocity is',round(w,2),\"rad/s\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The angular velocity is 1.84 rad/s\n"
       ]
      }
     ],
     "prompt_number": 30
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 14.14-14, Page no 274"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#This problem is a combination of numerical and graphical solution\n",
      "#The program only deals with the numerical solution parts the rest can be verified by graphical solution\n",
      "#Initilization of variables\n",
      "r=4*12**-1 #ft\n",
      "w=4*pi #rad/s\n",
      "l=2 #ft\n",
      "w2=1.84 #rad/s\n",
      "\n",
      "#Calculations\n",
      "ac_n=r*w**2 #ft/s**2\n",
      "a_pc_n=l*w2**2 #ft/s**2\n",
      "\n",
      "#Result\n",
      "print'The  value of ac_n is',round(ac_n,1),\"ft/s**2\"\n",
      "print'The value of a_pc_n is',round(a_pc_n,2),\"ft/s**2\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The  value of ac_n is 52.6 ft/s**2\n",
        "The value of a_pc_n is 6.77 ft/s**2\n"
       ]
      }
     ],
     "prompt_number": 31
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 14.14-15, Page no 275"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "w_bc=10 #rad/s\n",
      "AB=250 #mm\n",
      "BC=150 #mm\n",
      "AC=179 #mm\n",
      "AD=200 #mm\n",
      "# as theta1=45 degrees,\n",
      "sintheta1=(2**0.5)**-1\n",
      "costheta1=(2**0.5)**-1\n",
      "\n",
      "#Calculations\n",
      "v_c=(BC*1000**-1)*w_bc #m/s\n",
      "AC=((AB**2+BC**2)-(2*AB*BC*costheta1))**0.5 #m\n",
      "betaa=arcsin((BC*sintheta1)/AC)*(180/pi) #degrees\n",
      "gammaa=arcsin((AB*sintheta1)/AC)*(180/pi)#degrees answer in the textbook is incorrect\n",
      "ang=60-betaa #degrees\n",
      "# ang yeilds 23.7 degrees, thus\n",
      "sinang=0.40056\n",
      "cosang=0.916\n",
      "CD=sqrt(AD**2+AC**2-(2*AD*AC*cosang)) #mm\n",
      "D=arcsin((AC*sinang)/CD)*(180/pi) #degrees\n",
      "# D yeilds 63.2 degrees,thus\n",
      "sinD=0.8925\n",
      "theta=arcsin((AD*sinD)/AC)*(180/pi) #degrees\n",
      "n=360-(theta+gammaa+90) #degrees\n",
      "# n yeilds 101.8 degrees, thus \n",
      "cosn=-0.2045\n",
      "v_cd=v_c*cosn #m/s\n",
      "delta=180-(90+D) #degrees\n",
      "# Delts yeilds 26.8 degrees, thus\n",
      "cosdelta=0.8925\n",
      "v_D=v_cd/cosdelta #m/s\n",
      "w_AD=v_D/(AD*1000**-1) #rad/s\n",
      "\n",
      "#Result\n",
      "print'The angular Velocity of AD is',round(w_AD,2),\"rad/s clockwise.\" #Negative sign indicates clockwise orientation \n",
      "#Answer in the textbook is incorrect\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The angular Velocity of AD is -1.72 rad/s clockwise.\n"
       ]
      }
     ],
     "prompt_number": 47
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 14.14-18, Page No 277"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "# as theta1=73.9 degrees,theta2=60 degrees and theta3=46.1 degrees\n",
      "sintheta1=0.96\n",
      "sintheta2=sqrt(3)*2**-1\n",
      "sintheta3=0.72\n",
      "V=900 #mm/s\n",
      "\n",
      "#Calculations\n",
      "BC=((350*350)+(86.6*86.6))**0.5 #mm\n",
      "CD=400 #mm\n",
      "v_cb=(V*sintheta2)/(sintheta1) #mm/s\n",
      "v_c=((V*sintheta3))/(sintheta1) #mm/s\n",
      "w_dc=v_c/CD #rad/s\n",
      "w_bc=v_cb/BC #rad/s\n",
      "\n",
      "#Result\n",
      "print'The angular velocities are: w_dc=',round(w_dc,2),\"rad/s\",'and w_bc=',round(w_bc,2),\"rad/s\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The angular velocities are: w_dc= 1.69 rad/s and w_bc= 2.25 rad/s\n"
       ]
      }
     ],
     "prompt_number": 78
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 14.14-19, Page No 278"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "import numpy as np\n",
      "\n",
      "#Calculations\n",
      "#After equating the i and j terms we obtain simplified equations\n",
      "#Solving by matrix method\n",
      "A=np.array([[346,86.7],[200,-350]])\n",
      "B=np.array([[-3700],[-1790]]) \n",
      "C=np.linalg.solve(A,B)\n",
      "\n",
      "#Result\n",
      "print'The angular accelerations are alpha_DC=',round(C[0],3),\"rad/s**2\",'and alpha_BC=',round(C[1],2),\"rad/s**2\" \n",
      "#The signs only indicate that the originally assumed orientations are incorrect and are opposite to those assumed\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The angular accelerations are alpha_DC= -10.475 rad/s**2 and alpha_BC= -0.87 rad/s**2\n"
       ]
      }
     ],
     "prompt_number": 80
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 14.14-20, Page No 279"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "d=3 #m\n",
      "w=8 #rad/s (clockwise)\n",
      "alpha=4 #rad/s**2 (counterclockwise)\n",
      "r=d*2**-1 #m\n",
      "\n",
      "#Calculations\n",
      "vo=r*w #m/s\n",
      "ao=r*alpha #m/s**2\n",
      "#Here OB is r\n",
      "OB=r #m\n",
      "v_bo=OB*w #m/s\n",
      "v_B=v_bo+vo #m/s\n",
      "#Also\n",
      "a_bo=r*alpha #m/s**2 (directed left)\n",
      "a_bo_n=r*w**2 #m/s**2\n",
      "a_h=ao+a_bo #m/s**2\n",
      "a_v=a_bo_n #m/s**2\n",
      "a_B=((a_h**2)+(a_v**2))**0.5 #m/s**2\n",
      "phi=arctan(a_h/a_v)*(180/pi) #degrees\n",
      "\n",
      "#Result\n",
      "print'The linear velocity at B is',round(v_B),\"m/s\",'and the acceleration is',round(a_B,1),\"m/s**2\",'making an angle of',round(phi,2),\"degrees with horizontal\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The linear velocity at B is 24.0 m/s and the acceleration is 96.7 m/s**2 making an angle of 7.13 degrees with horizontal\n"
       ]
      }
     ],
     "prompt_number": 96
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 14.14-21, Page No 281"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "OA=0.6 #m\n",
      "w=8 #rad/s\n",
      "# as theta=30 degrees,\n",
      "sintheta=2**-1\n",
      "costheta=(3**0.5)*2**-1\n",
      "v_O=12 #m/s\n",
      "alpha=4 #rad/s**2\n",
      "a_O=6 #m/s**2\n",
      "\n",
      "#Calculations\n",
      "#Velocity Calculations\n",
      "v_AO=OA*w #m/s\n",
      "v_Ah=v_AO*sintheta+v_O #m/s horizontal component\n",
      "v_Av=v_AO*costheta #m/s\n",
      "v_A=((v_Ah**2)+(v_Av**2))**0.5 #m/s\n",
      "phi=arctan(v_Av/v_Ah)*(180/pi) #degrees\n",
      "#Acceleration Calculations\n",
      "a_AOt=OA*alpha #m/s**2\n",
      "a_AOn=OA*w**2 #m/s**2\n",
      "a_Ah=-a_O-a_AOn*costheta-a_AOt*sintheta #m/s**2\n",
      "a_Av=-a_AOn*sintheta+a_AOt*costheta #m/s**2\n",
      "a_A=((a_Ah**2)+(a_Av**2))**0.5 #m/s**2\n",
      "phi2=arctan(a_Av*a_Ah**-1)*(180/pi) #degrees\n",
      "\n",
      "#Result\n",
      "print'The velocity is',round(v_A),\"m/s\",'making an angle of',round(phi,1),\"degrees with horizontal.\"\n",
      "print'The acceleration is',round(a_A),\"m/s**2\",'making an angle of',round(phi2,1),\"degrees with horizontal\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The velocity is 15.0 m/s making an angle of 16.1 degrees with horizontal.\n",
        "The acceleration is 44.0 m/s**2 making an angle of 22.9 degrees with horizontal\n"
       ]
      }
     ],
     "prompt_number": 100
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 14.14-22, Page No 282"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "AL=5 #ft\n",
      "d=10 #ft displacement\n",
      "\n",
      "#Calculations\n",
      "theta=d/AL #radians\n",
      "s_o=3*theta#ft\n",
      "\n",
      "#Result\n",
      "print'The displacement So is',round(s_o),\"ft\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The displacement So is 6.0 ft\n"
       ]
      }
     ],
     "prompt_number": 101
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 14.14-23, Page No 283"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "#Speed and acceleration at the center\n",
      "v=12 #in/s\n",
      "a=18 #in/s**2\n",
      "\n",
      "#Calculations\n",
      "v_D=((a+v*0.5)*a**-1)*v #in/s\n",
      "#Speed at point F\n",
      "v_F=((v/2)*v**-1)*v_D #in/s\n",
      "#Acceleration at D\n",
      "a_D=(24/a)*a #in/s**2\n",
      "#Acceleration at F\n",
      "a_F=((v/2)*v**-1)*24 #in/s**2\n",
      "\n",
      "#Result\n",
      "print'The velocity and acceleration of weight A are',round(v_F),\"in/s\",'and',round(a_F),\"in/s**2 respectively.\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The velocity and acceleration of weight A are 8.0 in/s and 12.0 in/s**2 respectively.\n"
       ]
      }
     ],
     "prompt_number": 103
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 14.14-24, Page No 283"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Calculations\n",
      "#Speed and acceleration of D\n",
      "sD=((18-6)*18**-1)*12 #in/s\n",
      "aD=(12*18**-1)*18 #in/s**2\n",
      "#Speed and acceleration of F\n",
      "sF=(6*12**-1)*8 #in/s\n",
      "aF=(6*12**-1)*12 #in/s^2\n",
      "\n",
      "#Result\n",
      "print'The velocity and acceleration of weight A are',round(sF),\"in/s\",'and',round(aF),\"in/s**2 respectively.\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The velocity and acceleration of weight A are 4.0 in/s and 6.0 in/s**2 respectively.\n"
       ]
      }
     ],
     "prompt_number": 104
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 14.14-26, Page No 284"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "v_BG=300 #mm/s\n",
      "v_G=300 #mm/s\n",
      "a_BGt=500 #mm/s**2\n",
      "a_BGn=3600#mm/s**2\n",
      "a_Gh=500 #mm/s**2\n",
      "a_Bv=1800 #mm/s**2\n",
      "\n",
      "#Calculations\n",
      "w=((75-25)/25)*6 #rad/s\n",
      "alpha=((75-25)/25)*10 #rad/s**2\n",
      "v_B=(v_BG**2+v_G**2)**0.5 #mm/s\n",
      "a_v=a_Bv-a_BGt #mm/s**2\n",
      "a_h=a_BGn-a_Gh #mm/s**2\n",
      "a_B=(a_v**2+a_h**2)**0.5 #mm/s**2\n",
      "\n",
      "#Result \n",
      "print'The velocity and acceleration of point B are',round(v_B),\"mm/s\",'and',round(a_B),\"mm/s**2 respectively.\"\n",
      "\n",
      "# The ans for a_B is incorrectin textbook."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The velocity and acceleration of point B are 424.0 mm/s and 3362.0 mm/s**2 respectively.\n"
       ]
      }
     ],
     "prompt_number": 106
    }
   ],
   "metadata": {}
  }
 ]
}