summaryrefslogtreecommitdiff
path: root/Theory_Of_Machines_by__B._K._Sarkar/Chapter4.ipynb
blob: de08c088b5b22993c4693bd1baf4cc3b1ba15672 (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
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
{
 "metadata": {
  "name": "",
  "signature": "sha256:fdf50666cfa70019db7241b6e1fb1e819c70fb9987ea0caadb1e777e93e7d898"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter4-Gears and Gear Drivers"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg133"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Chapter-4, Illustration 1, Page 133\n",
      "##Title: Gears and Gear Drivers\n",
      "##=============================================================================\n",
      "import math\n",
      "\n",
      "##INPUT DATA\n",
      "TA=48.;##Wheel A teeth\n",
      "TB=30.;##Wheel B teeth\n",
      "m=5.;##Module pitch in mm\n",
      "phi=20.;##Pressure angle in degrees\n",
      "add=m;##Addendum in mm\n",
      "\n",
      "##CALCULATIONS\n",
      "R=(m*TA)/2.;##Pitch circle radius of wheel A in mm\n",
      "RA=R+add;##Radius of addendum circle of wheel A in mm\n",
      "r=(m*TB)/2.;##Pitch circle radius of wheel B in mm\n",
      "rA=r+add;##Radius of addendum circle of wheel B in mm\n",
      "lp=(math.sqrt((RA**2.)-((R**2.)*(math.cos(phi/57.3)**2.))))+(math.sqrt((rA**2.)-((r**2.)*(math.cos(phi/57.3)**2.))))-((R+r)*math.sin(phi/57.3));##Length of path of contact in mm\n",
      "la=lp/math.cos(phi/57.3);##Length of arc of contact in mm\n",
      "\n",
      "##OUTPUT\n",
      "print'%s %.1f %s'%('Length of arc of contact is ',la,' mm')\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "##================================END OF PROGRAM=============================================\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Length of arc of contact is  26.7  mm\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2-pg133"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Chapter-4, Illustration 2, Page 133\n",
      "##Title: Gears and Gear Drivers\n",
      "##=============================================================================\n",
      "import math\n",
      "\n",
      "##INPUT DATA\n",
      "TA=40.;##Wheel A teeth\n",
      "TB=TA;##Wheel B teeth\n",
      "m=6.;##Module pitch in mm\n",
      "phi=20.;##Pressure angle in degrees\n",
      "pi=3.141\n",
      "x=1.75;##Ratio of length of arc of contact to circular pitch\n",
      "\n",
      "##CALCULATIONS\n",
      "Cp=m*pi;##Circular pitch in mm\n",
      "R=(m*TA)/2.;##Pitch circle radius of wheel A in mm\n",
      "r=R;##Pitch circle radius of wheel B in mm\n",
      "la=x*Cp;##Length of arc of contact in mm\n",
      "lp=la*math.cos(phi/57.3);##Length of path of contact in mm\n",
      "RA=math.sqrt((((lp/2.)+(R*math.sin(phi/57.3)))**2.)+((R**2.)*(math.cos(phi/57.3))**2.));##Radius of addendum circle of each wheel in mm\n",
      "add=RA-R;##Addendum in mm\n",
      "\n",
      "##OUTPUT\n",
      "print'%s %.1f %s'%('Addendum of wheel is ',add,' mm')\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "##================================END OF PROGRAM=============================================\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Addendum of wheel is  6.1  mm\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3-pg134"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Chapter-4, Illustration 3, Page 134\n",
      "##Title: Gears and Gear Drivers\n",
      "##=============================================================================\n",
      "import math\n",
      "\n",
      "##INPUT DATA\n",
      "TA=48.;##Gear teeth\n",
      "TB=24.;##Pinion teeth\n",
      "m=6.;##Module in mm\n",
      "phi=20.;##Pressure angle in degrees\n",
      "\n",
      "##CALCULATIONS\n",
      "r=(m*TB)/2.;##Pitch circle radius of pinion in mm\n",
      "R=(m*TA)/2.;##Pitch circle radius of gear in mm\n",
      "RA=math.sqrt(((((r*math.sin(phi/57.3))/2.)+(R*math.sin(phi/57.3)))**2.)+((R**2)*(math.cos(phi/57.3))**2));##Radius of addendum circle of gear in mm\n",
      "rA=math.sqrt(((((R*math.sin(phi/57.3))/2.)+(r*math.sin(phi/57.3)))**2.)+((r**2)*(math.cos(phi/57.3))**2));##Radius of addendum circle of pinion in mm\n",
      "addp=rA-r;##Addendum for pinion in mm\n",
      "addg=RA-R;##Addendum for gear in mm\n",
      "lp=((R+r)*math.sin(phi/57.3))/2.;##Length of path of contact in mm\n",
      "la=lp/math.cos(phi/57.3);##Length of arc of contact in mm\n",
      "\n",
      "##OUTPUT\n",
      "print'%s %.1f %s  %.1f %s   %.1f %s '%('Addendum for pinion is',addp,' mm' ' Addendum for gear is ',addg,' mm' ' Length of arc of contact is ',la,' mm')\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "##================================END OF PROGRAM=============================================\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Addendum for pinion is 11.7  mm Addendum for gear is   4.7  mm Length of arc of contact is    39.3  mm \n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex4-pg135"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Chapter-4, Illustration 4, Page 135\n",
      "##Title: Gears and Gear Drivers\n",
      "##=============================================================================\n",
      "import math\n",
      "\n",
      "##INPUT DATA\n",
      "x=3.5;##Ratio of teeth of wheels\n",
      "C=1.2;##Centre distance between axes in m\n",
      "DP=4.4;##Diametrical pitch in cm\n",
      "\n",
      "##CALCULATIONS\n",
      "D=2*C*100.;##Sum of diameters of wheels in cm\n",
      "T=D*DP;##Sum of teeth of wheels\n",
      "TB1=T/(x+1);##Teeth of wheel B\n",
      "TB=math.floor(TB1);##Teeth of whhel B\n",
      "TA=x*TB;##Teeth of wheel A\n",
      "DA=TA/DP;##Diametral pitch of gear A in cm\n",
      "DB=TB/DP;##Diametral pitch of gear B in cm\n",
      "Ce=(DA+DB)/2.;##Exact centre distance between shafts in cm\n",
      "TB2=math.ceil(TB1);##Teeth of wheel B\n",
      "TA2=T-TB2;##Teeth of wheel A\n",
      "VR=TA2/TB2;##Velocity ratio\n",
      "\n",
      "##OUTPUT\n",
      "print'%s %.1f %s %.1f %s %.1f %s%.1f %s%.1f %s'%('Number of teeth on wheel A is ',TA,''  'Number of teeth on wheel B is ',TB,''  '  Exact centre distance is ',Ce,' cm '  'If centre distance is ',C,' m' 'then  Velocity ratio is',VR,'')\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "##================================END OF PROGRAM=============================================\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Number of teeth on wheel A is  819.0 Number of teeth on wheel B is  234.0   Exact centre distance is  119.7  cm If centre distance is 1.2  mthen  Velocity ratio is3.5 \n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex5-pg136"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Chapter-4, Illustration 5, Page 136\n",
      "##Title: Gears and Gear Drivers\n",
      "##=============================================================================\n",
      "import math\n",
      "\n",
      "##INPUT DATA\n",
      "C=600;##Distance between shafts in mm\n",
      "Cp=30;##Circular pitch in mm\n",
      "NA=200;##Speed of wheel A in rpm\n",
      "NB=600;##Speed of wheel B in rpm\n",
      "F=18;##Tangential pressure in kN\n",
      "pi=3.141\n",
      "\n",
      "##CALCULATIONS\n",
      "a=Cp/(pi*10.);##Ratio of pitch diameter of wheel A to teeth of wheel A in cm\n",
      "b=Cp/(pi*10.);##Ratio of pitch diameter of wheel B to teeth of wheel B in cm\n",
      "T=(2*C)/(a*10.);##Sum of teeth of wheels\n",
      "r=NB/NA;##Ratio of teeth of wheels\n",
      "TB=T/(r+1);##Teeth of wheel B\n",
      "TB1=math.ceil(TB);##Teeth of wheel B\n",
      "TA=TB1*r;##Teeth of wheel A\n",
      "DA=a*TA;##Pitch diameter of wheel A in cm\n",
      "DB=b*TB1;##Pitch diameter of wheel B in cm\n",
      "CPA=(pi*DA)/TA;##Circular pitch of gear A in cm\n",
      "CPB=(pi*DB)/TB1;##Circular pitch of gear B in cm\n",
      "C1=(DA+DB)*10/2.;##Exact centre distance in mm\n",
      "P=(F*1000.*pi*DA*NA)/(60.*1000.*100.);##Power transmitted in kW\n",
      "\n",
      "##OUTPUT\n",
      "print'%s %.1f %s %.1f %s %.1f %s %.1f %s %.1f %s %.1f %s %.1f %s %.1f %s '%('Number of teeth on wheel A is ',TA,' '' Number of teeth on wheel B is ',TB1,' '' Pitch diameter of wheel A is ',DA,' cm'' Pitch diameter of wheel B is ',DB,' cm'' Circular pitch of wheel A is',CPA,'cm ' 'Circular pitch of wheel B is ',CPB,' cm '' Exact centre distance between shafts is ',C1,' mm'' Power transmitted is',P,' kW')\n",
      "##================================END OF PROGRAM=============================================\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Number of teeth on wheel A is  96.0   Number of teeth on wheel B is  32.0   Pitch diameter of wheel A is  91.7  cm Pitch diameter of wheel B is  30.6  cm Circular pitch of wheel A is 3.0 cm Circular pitch of wheel B is  3.0  cm  Exact centre distance between shafts is  611.3  mm Power transmitted is 172.8  kW \n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6-pg137"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Chapter-4, Illustration 6, Page 137\n",
      "##Title: Gears and Gear Drivers\n",
      "##=============================================================================\n",
      "import math\n",
      "\n",
      "##INPUT DATA\n",
      "r=16.;##Speed ratio\n",
      "mA=4.;##Module of gear A in mm\n",
      "mB=mA;##Module of gear B in mm\n",
      "mC=2.5;##Mosule of gear C in mm\n",
      "mD=mC;##Module of gear D in mm\n",
      "C=150.;##Distance between shafts in mm\n",
      "\n",
      "##CALCULATIONS\n",
      "t=math.sqrt(r);##Ratio of teeth\n",
      "T1=(C*2.)/mA;##Sum of teeth of wheels A and B\n",
      "T2=(C*2.)/mC;##Sum of teeth of wheels C and D\n",
      "TA=T1/(t+1.);##Teeth of gear A\n",
      "TB=T1-TA;##Teeth of gear B\n",
      "TC=T2/(t+1.);##Teeth of gear C\n",
      "TD=T2-TC;##Teeth of gear D\n",
      "\n",
      "##OUTPUT\n",
      "print'%s %.1f %s %.1f %s %.1f %s %.1f %s '%('Number of teeth on gear A is ',TA,' '' Number of teeth on gear B is ',TB,'' 'Number of teeth on gear C is ',TC,'' ' Number of teeth on gear D is ',TD,'')\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "##================================END OF PROGRAM=============================================\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Number of teeth on gear A is  15.0   Number of teeth on gear B is  60.0 Number of teeth on gear C is  24.0  Number of teeth on gear D is  96.0  \n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex7-pg138"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Chapter-4, Illustration 7, Page 138\n",
      "##Title: Gears and Gear Drivers\n",
      "##=============================================================================\n",
      "import math\n",
      "\n",
      "##INPUT DATA\n",
      "N=4.5;##No. of turns\n",
      "\n",
      "##CALCULATIONS\n",
      "Vh=N/2.;##Velocity ratio of main spring spindle to hour hand spindle\n",
      "Vm=12.;##Velocity ratio of minute hand spindle to hour hand spindle\n",
      "T1=8.##     assumed no of teeth on gear 1\n",
      "T2=32.##    assumed no of teeth on gear 2\n",
      "T3=(T1+T2)/4.##       no of teeth on gear 3\n",
      "T4=(T1+T2)-T3## no of teeth on gear 4\n",
      "print'%s %.1f %s %.1f %s %.1f %s %.1f %s '%('no of teeth on gear 1=',T1,'' 'no of teeth on gear 2=',T2,' ''no of teeth on gear 3=',T3,' ''no of teeth on gear 4=',T4,'')\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "no of teeth on gear 1= 8.0 no of teeth on gear 2= 32.0  no of teeth on gear 3= 10.0  no of teeth on gear 4= 30.0  \n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex8-pg139"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Chapter-4, Illustration 8, Page 139\n",
      "##Title: Gears and Gear Drivers\n",
      "##=============================================================================\n",
      "import math\n",
      "\n",
      "##Input data\n",
      "Tb=70.;##Teeth of wheel B\n",
      "Tc=25.;##Teeth of wheel C\n",
      "Td=80.;##Teeth of wheel D\n",
      "Na=-100.;##Speed of arm A in clockwise in rpm\n",
      "y=-100.##Arm A rotates at 100 rpm clockwise\n",
      "\n",
      "##Calculations\n",
      "Te=(Tc+Td-Tb);##Teeth of wheel E\n",
      "x=(y/0.5)\n",
      "Nc=(y-(Td*x)/Tc);##Speed of wheel C in rpm\n",
      "\n",
      "##Output\n",
      "print'%s %.1f %s'%('Speed of wheel C is ',Nc,' rpm ''Direction of wheel C is anti-clockwise')\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "##================================END OF PROGRAM=============================================\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Speed of wheel C is  540.0  rpm Direction of wheel C is anti-clockwise\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex9-pg140"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Chapter-4, Illustration 9, Page 140\n",
      "##Title: Gears and Gear Drivers\n",
      "##=============================================================================\n",
      "import math\n",
      "\n",
      "##Input data\n",
      "Tb=25.;##Teeth of wheel B\n",
      "Tc=40.;##Teeth of wheel C\n",
      "Td=10.;##Teeth of wheel D\n",
      "Te=25.;##Teeth of wheel E\n",
      "Tf=30.;##Teeth of wheel F\n",
      "y=-120.;##Speed of arm A in clockwise in rpm\n",
      "\n",
      "##Calculations\n",
      "x=(-y/4.)\n",
      "Nb=x+y;##Speed of wheel B in rpm\n",
      "Nf=(-10/3.)*x+y;##Speed of wheel F in rpm\n",
      "\n",
      "##Output\n",
      "print'%s %.1f %s %.1f %s'%('Speed of wheel B is',Nb,' rpm  Direction of wheel B is clockwise' ' Speed of wheel F is ',Nf,' rpm Direction of wheel F is clockwise')\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "##================================END OF PROGRAM=============================================\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Speed of wheel B is -90.0  rpm  Direction of wheel B is clockwise Speed of wheel F is  -220.0  rpm Direction of wheel F is clockwise\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex10-pg141"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Chapter-4, Illustration 10, Page 141\n",
      "##Title: Gears and Gear Drivers\n",
      "##=============================================================================\n",
      "import math\n",
      "\n",
      "##Input data\n",
      "Ta=96.;##Teeth of wheel A\n",
      "Tc=48.;##Teeth of wheel C\n",
      "y=-20.;##Speed of arm C in rpm in clockwise\n",
      "\n",
      "##Calculations\n",
      "x=(y*Ta)/Tc\n",
      "Tb=(Ta-Tc)/2.;##Teeth of wheel B\n",
      "Nb=(-Tc/Tb)*x+y;##Speed of wheel B in rpm\n",
      "Nc=x+y;##Speed of wheel C in rpm\n",
      "\n",
      "##Output\n",
      "print'%s %.1f %s %.1f %s'%('Speed of wheel B is ',Nb,' rpm' 'Speed of wheel C is ',Nc,' rpm')\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "##================================END OF PROGRAM=============================================\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Speed of wheel B is  60.0  rpmSpeed of wheel C is  -60.0  rpm\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex11-pg142"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Chapter-4, Illustration 11, Page 142\n",
      "##Title: Gears and Gear Drivers\n",
      "##=============================================================================\n",
      "import math\n",
      "import numpy\n",
      "from numpy.linalg import inv\n",
      "##Input data\n",
      "Ta=40.##       no of teeth on gear A\n",
      "Td=90.##       no of teeth on gear D\n",
      "\n",
      "##Calculations\n",
      "Tb=(Td-Ta)/2.##      no of teeth on gear B\n",
      "Tc=Tb##           no of teeth on gear C\n",
      "##\n",
      "##x+y=-1\n",
      "##-40x+90y=45\n",
      "\n",
      "A=([[1, 1],[-Ta, Td]])##Coefficient matrix\n",
      "\n",
      "B=([[-1],[Td/2]])##Constant matrix\n",
      "   \n",
      "X=numpy.dot(inv(A) ,B)##Variable matrix\n",
      "##\n",
      "##x+y=-1\n",
      "##-40x+90y=0\n",
      "A1=([[1, 1],[-Ta, Td]])##Coefficient matrix\n",
      "B1=([[-1],[0]])##Constant matrix\n",
      "X1=numpy.dot(inv(A1) ,B1)##Variable matrix\n",
      "b=X1[1]  \n",
      "print(X[1]) \n",
      "print'%s %.4f %s'%('speed of the arm =',b,' revolution clockwise')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "[ 0.03846154]\n",
        "speed of the arm = -0.3077  revolution clockwise\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex12-pg144"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Chapter-4, Illustration 12, Page 144\n",
      "##Title: Gears and Gear Drivers\n",
      "##=============================================================================\n",
      "\n",
      "\n",
      "##Input data\n",
      "Te=30.;##Teeth of wheel E\n",
      "Tb=24.;##Teeth of wheel B\n",
      "Tc=22.;##Teeth of wheel C\n",
      "Td=70.;##Teeth of wheel D\n",
      "Th=15.;##Teeth of wheel H\n",
      "Nv=100.;##Speed of shaft V in rpm\n",
      "Nx=300.;##Speed of spindle X in rpm\n",
      "\n",
      "##Calculations\n",
      "Nh=Nv;##Speed of wheel H in rpm\n",
      "Ne=(-Th/Te)*Nv;##Speed of wheel E in rpm\n",
      "Ta=(Tc+Td-Tb);##Teeth of wheel A\n",
      "##x+y=-50\n",
      "##y=300\n",
      "x=(Ne-Nx)\n",
      "Nz=(187/210.)*x+Nx;##;##Speed of wheel Z in rpm\n",
      "\n",
      "##Output\n",
      "print'%s %.1f %s'%('Speed of wheel Z is ',Nz,' rpm  Direction of wheel Z is opposite to that of X')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Speed of wheel Z is  -11.7  rpm  Direction of wheel Z is opposite to that of X\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex13-pg145"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Chapter-4, Illustration 13, Page 145\n",
      "##Title: Gears and Gear Drivers\n",
      "##=============================================================================\n",
      "\n",
      "\n",
      "##Input data\n",
      "Tp=20.;##Teeth of wheel P\n",
      "Tq=30.;##Teeth of wheel Q\n",
      "Tr=10.;##Teeth of wheel R\n",
      "Nx=50.;##Speed of shaft X in rpm\n",
      "Na=100.;##Speed of arm A in rpm\n",
      "\n",
      "##Calculations\n",
      "##x+y=-50\n",
      "##y=100\n",
      "x=(-Nx-Na)\n",
      "y=(-2.*x+Na);##Speed of Y in rpm\n",
      "\n",
      "##Output\n",
      "print'%s %.1f %s'%('Speed of driven shaft Y is ',y,' rpm  Direction of driven shaft Y is anti-clockwise')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Speed of driven shaft Y is  400.0  rpm  Direction of driven shaft Y is anti-clockwise\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex4-pg146"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Chapter-4, Illustration 14, Page 146\n",
      "##Title: Gears and Gear Drivers\n",
      "##=============================================================================\n",
      "import math\n",
      "\n",
      "##Input data\n",
      "d=216.;##Ring diameter in mm\n",
      "m=4.;##Module in mm\n",
      "\n",
      "##Calculations\n",
      "Td=(d/m);##Teeth of wheel D\n",
      "Tb=Td/4.;##Teeth of wheel B\n",
      "Tb1=math.ceil(Tb);##Teeth of wheel B\n",
      "Td1=4.*Tb1;##Teeth of wheel D\n",
      "Tc1=(Td1-Tb1)/2.;##Teeth of wheel C\n",
      "d1=m*Td1;##Pitch circle diameter in mm\n",
      "\n",
      "##Output\n",
      "print'%s %.1f %s %.1f %s %.1f %s%.1f %s '%('Teeth of wheel B is ',Tb1,' ' 'Teeth of wheel C is ',Tc1,' ' 'Teeth of wheel D is ',Td1,' '' Exact pitch circle diameter is ',d1,' mm')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Teeth of wheel B is  14.0  Teeth of wheel C is  21.0  Teeth of wheel D is  56.0   Exact pitch circle diameter is 224.0  mm \n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex15-pg147"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Chapter-4, Illustration 15, Page 147\n",
      "##Title: Gears and Gear Drivers\n",
      "##=============================================================================\n",
      "import math\n",
      "\n",
      "##Input data\n",
      "Ta=100.##       no of teeth on gear A\n",
      "Tc=101.##       no of teeth on gear C\n",
      "Td=99.##        no of teeth on gear D\n",
      "Tp=20.##        no of teeth on planet gear\n",
      "y=1.##          from table 4.9(arm B makes one revolution)\n",
      "x=-y##         as gear is fixed\n",
      "\n",
      "##Calculations\n",
      "Nc=(Ta*x)/Tc+y##            Revolution of gear C \n",
      "Nd=(Ta*x)/Td+y##            Revolution of gear D\n",
      "\n",
      "##Output\n",
      "print'%s %.4f %s %.4f %s  '%('Revolution of gear C =',Nc,'' ' Revolution of gear D = ',Nd,'')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Revolution of gear C = 0.0099  Revolution of gear D =  -0.0101   \n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex16-pg148"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Chapter-4, Illustration 16, Page 148\n",
      "##Title: Gears and Gear Drivers\n",
      "##=============================================================================\n",
      "import math\n",
      "\n",
      "##Input data\n",
      "Ta=12.##       no of teeth on gear A\n",
      "Tb=60.##       no of teeth on gear B\n",
      "N=1000.##      speed of propeller shaft in rpm\n",
      "Nc=210.##      speed of gear C in rpm\n",
      "\n",
      "##Calculations\n",
      "Nb=(Ta*N)/Tb##     speed of gear B in rpm\n",
      "x=(Nb-Nc)\n",
      "Nd=Nb+x##          speed of road wheel driven by D\n",
      "\n",
      "##Output\n",
      "print'%s %.1f %s'%('speed of road wheel driven by D= ',Nd,' rpm')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "speed of road wheel driven by D=  190.0  rpm\n"
       ]
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex17-pg148"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Chapter-4, Illustration 17, Page 148\n",
      "##Title: Gears and Gear Drivers\n",
      "##=============================================================================\n",
      "import math\n",
      "import numpy\n",
      "from numpy.linalg import inv\n",
      "##Input data\n",
      "Ta=20.##   no of teeth on pinion A\n",
      "Tb=25.##   no of teeth on wheel B\n",
      "Tc=50.##   no of teeth on gear C\n",
      "Td=60.##   no of teeth on gear D\n",
      "Te=60.##  no of teeth on gear E\n",
      "Na=200.##   SPEED of the gear A\n",
      "Nd=100.##   speed of the gear D\n",
      "\n",
      "##calculations\n",
      "##(i)\n",
      "##(5/6)x+y=0\n",
      "##(5/4)x+y=200\n",
      "A1=([[Tc/Td, 1],[Tb/Ta, 1]])##Coefficient matrix\n",
      "B1=([[0],[Na]]) ##Constant matrix\n",
      "X1=numpy.dot(inv(A1),B1)##Variable matrix\n",
      "Ne1=X1[1]-(Tc/Td)*X1[0]##    \n",
      "T1=(-Ne1/Na)##     ratio of torques when D is fixed\n",
      "##(ii)\n",
      "##(5/4)x+y=200\n",
      "##(5/6)x+y=100\n",
      "A2=([[Tc/Td, 1],[Tb/Ta, 1]])##Coefficient matrix\n",
      "B2=([[Nd],[Na]])##Constant matrix\n",
      "X2=numpy.dot(inv(A2),B2)##Variable matrix\n",
      "Ne2=X2[1]-(Tc/Td)*X2[0]\n",
      "T2=(-Ne2/Na)##      ratio of torques when D ratates at 100 rpm\n",
      "\n",
      "##Output\n",
      "print'%s %.2f %s %.2f %s %.2f %s %.2f %s'%('speed of E= ',Ne1,' rpm in clockwise direction' and  'speed of E in 2nd case(when D rotates at 100 rpm)= ',Ne2,' rpm in clockwise direction' and 'ratio of torques when D is fixed= ',T1,' ' 'ratio of torques when D ratates at 100 rpm= ',T2,'')\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "speed of E=  -800.00 speed of E in 2nd case(when D rotates at 100 rpm)=  -300.00 ratio of torques when D is fixed=  4.00  ratio of torques when D ratates at 100 rpm=  1.50 \n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}