summaryrefslogtreecommitdiff
path: root/Electrical_Machines_by_S._K._Bhattacharya/ch2.ipynb
blob: 0db6381998acb9c094104b04ab06253521a1179b (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
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
{
 "metadata": {
  "name": "",
  "signature": "sha256:cb9aa24547481a3c980ea8f6f78b2ee4b9225336fb41e32a30a8248c4be9ed70"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 2 : Direct Current Machines"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.4  Page No : 92"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given Data\n",
      "P = 2.         #number of poles\n",
      "Z = 400.        #number of conducters\n",
      "n = 300.        #speed in rpm\n",
      "E = 200.         #voltage of generator\n",
      "A = 2.           #number of parallel paths\n",
      "N = 1200.        #number of turns in each field coil\n",
      "\n",
      "# Calculations and Results\n",
      "phi = (E*60*A)/(Z*n*P)   #flux at the end of 0.15sec\n",
      "t = 0.15                     #time\n",
      "print \"magnitude of flux at the end of 15sec is %f wb\"%(phi)\n",
      "e = N*(phi/t)\n",
      "print \"induced emf in the field coil =  %d volts\"%(e)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "magnitude of flux at the end of 15sec is 0.100000 wb\n",
        "induced emf in the field coil =  800 volts\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.6  Page No : 93"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given Data\n",
      "P = 8.            #number of poles\n",
      "A = 8.            #number of parallel paths in the armature\n",
      "Z = 960.          #number of conductors\n",
      "N = 400.          #speed in rpm\n",
      "phi = 0.04       #flux per pole\n",
      "\n",
      "# Calculations\n",
      "E = (phi*Z*N*P)/(60*A)        #emf generated onopen circuit condition\n",
      "\n",
      "# Results\n",
      "print \"emf generated on open circuit condition, E = %d volts\"%(E)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "emf generated on open circuit condition, E = 256 volts\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.7  Page No : 97"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given Data\n",
      "E = 180.;                #induced emf at 500rpm\n",
      "N = 500.;                #speed in rpm\n",
      "\n",
      "# Calculations and Results\n",
      "K1 = (E/N)\n",
      "print \"K1 = %f\"%(K1)\n",
      "E1 = (K1*600)           #induced emf at 600rpm\n",
      "print \" induced emf at 600rpm is = %d V\"%(E1)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "K1 = 0.360000\n",
        " induced emf at 600rpm is = 216 V\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.8  Page No : 97"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given Data\n",
      "E1 = 220.;           #induced emf at N1 speed in volts\n",
      "N1 = 750.;          # speed \n",
      "K1 = (E1/N1)\n",
      "E2 = 250.;          #induced emf at speed N2\n",
      "N2 = E2/K1\n",
      "print \"speed at induced emf of 250V  = %d rpm\"%(N2)\n",
      "print (\"when induced emf is 250V and speed 700 rpm\")\n",
      "E3 = 250.;            #induced emf at N3 speed\n",
      "N3 = 700.;            #speed\n",
      "ratio = (E3*N1)/(E1*N3)\n",
      "Pi = (ratio-1)*100\n",
      "print \"percentage increase in flux is %f percent\"%(Pi)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "speed at induced emf of 250V  = 852 rpm\n",
        "when induced emf is 250V and speed 700 rpm\n",
        "percentage increase in flux is 21.753247 percent\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.9  Page No : 98"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given Data\n",
      "E = 200.      #emf induced\n",
      "I = 15.        #armature current\n",
      "n = 1200.          #speed in rpm\n",
      "\n",
      "# Calculations and Results\n",
      "omega = (2*3.14*n)/60;\n",
      "print \"omega = %f \"%(omega)\n",
      "T = (E*I)/omega;\n",
      "print \"electromagnetic torque = %f Nm\"%(T)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "omega = 125.600000 \n",
        "electromagnetic torque = 23.885350 Nm\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.10  Page No : 98"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given Data\n",
      "n = 10.;             #number of turns in 1 coil\n",
      "l = 0.2;            \n",
      "d = 0.2;          #diameter in metres\n",
      "B = 1.;              #uniform magnetic field density in weber per m**2\n",
      "N = 1500.;            #speed in rpm\n",
      "\n",
      "# Calculations and Results\n",
      "r = (d/2);           #radius in metres\n",
      "E = (B*l*((2*3.14*N)/60)*r*2*n);\n",
      "print \"total induced emf = %f V\"%(E)\n",
      "R = 4;                #total resistance in ohms\n",
      "I = E/R;\n",
      "print \"The current through the armature coil when connected to the load, I = %f A\"%(I)\n",
      "T = (E*I)/((2*3.14*N)/60)\n",
      "print \"torque = %f Nm\"%(T)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "total induced emf = 62.800000 V\n",
        "The current through the armature coil when connected to the load, I = 15.700000 A\n",
        "torque = 6.280000 Nm\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.11  Page No : 99"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given Data\n",
      "V = 230.;            #armature voltage supply in volts\n",
      "Ia = 12.;            #armature current in amperes\n",
      "Ra = 0.8;            #armature resistance in ohms\n",
      "N = 100.;               #speed in radian per second\n",
      "\n",
      "# Calculations and Results\n",
      "E = (V-(Ia*Ra))\n",
      "print \"induced emf, E = %fV\"%(E)\n",
      "Te = (E*Ia)/N\n",
      "print \"the electromagnetic torque = %fNm\"%(Te)\n",
      "Pi = V*Ia\n",
      "print \"electrical input to the armature, Pinput =  %dW\"%(Pi)\n",
      "Pd = Te*N\n",
      "print \"mechanical developed = %fW\"%(Pd)\n",
      "loss = (Ia**2*Ra)\n",
      "print \"armature copper loss = %fW\"%(loss)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "induced emf, E = 220.400000V\n",
        "the electromagnetic torque = 26.448000Nm\n",
        "electrical input to the armature, Pinput =  2760W\n",
        "mechanical developed = 2644.800000W\n",
        "armature copper loss = 115.200000W\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.13  Page No : 101"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given Data\n",
      "P = 50000.;            #power delivered in watts\n",
      "V = 250.;              #voltage in volts\n",
      "Ra = 0.02;            #armature resistance in ohms\n",
      "Rf = 50.;              #field resistance in ohms\n",
      "\n",
      "# Calculations and Results\n",
      "If = V/Rf             #field current in amperes\n",
      "Ng = 400.;             #speed in generating condition in rpm\n",
      "print \"field current, If = %dA\"%(If)\n",
      "Il = P/V               #load current in amperes\n",
      "print \"Load current, If = %dA\"%(Il)\n",
      "Ia = If+Il             #armature current in amperes\n",
      "print \"Aramture current, If = %dA\"%(Ia)\n",
      "Eg = (V+(Ia*Ra))\n",
      "print (\"At motor condition\")\n",
      "Ia = (Il-If)\n",
      "print \"Aramture current, If = %dA\"%(Ia)\n",
      "Em = (V-(Ia*Ra))\n",
      "print \"Em = %fV\"%(Em)\n",
      "Nm = (Ng*Em)/Eg\n",
      "print \"Speed of the motor = %drpm\"%(Nm)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "field current, If = 5A\n",
        "Load current, If = 200A\n",
        "Aramture current, If = 205A\n",
        "At motor condition\n",
        "Aramture current, If = 195A\n",
        "Em = 246.100000V\n",
        "Speed of the motor = 387rpm\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.14  Page No : 101"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given Data\n",
      "V = 250.;                #voltage supply in volts\n",
      "Ra = 0.12;              #armature resistance in ohms\n",
      "Rf = 100.;                #field resistance in ohms\n",
      "Il = 80.;                #load current in amperes\n",
      "\n",
      "# Calculations and Results\n",
      "If = V/Rf                \n",
      "print \"Field current, If = %f\"%(If)\n",
      "print (\"When machine is generating\")\n",
      "Ia = Il+If\n",
      "Eg = (V+(Ia*Ra))\n",
      "print \"Ia = %fA\"%(Ia)\n",
      "print \"Eg = %fV\"%(Eg)\n",
      "print (\"When machine is motoring\")\n",
      "Ia = Il-If\n",
      "Em = (V-(Ia*Ra))\n",
      "print \"Ia = %fA\"%(Ia)\n",
      "print \"Eg = %fV\"%(Em)\n",
      "ratio = Eg/Em\n",
      "print \"Ratio of speeds = %f\"%(ratio)\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Field current, If = 2.500000\n",
        "When machine is generating\n",
        "Ia = 82.500000A\n",
        "Eg = 259.900000V\n",
        "When machine is motoring\n",
        "Ia = 77.500000A\n",
        "Eg = 240.700000V\n",
        "Ratio of speeds = 1.079767\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.15  Page No : 102"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given Data\n",
      "V = 550.;            #voltage supply in volts\n",
      "P = 16.;            #number of poles\n",
      "N = 150.;             #speed in rpm\n",
      "Z = 2500.;            #number of armature conductors\n",
      "A = 16.;              \n",
      "Power = 1500000.;        #power in watt\n",
      "Cl = 25000.;              #full-load copper loss\n",
      "B = 0.9;                #flux density in the pole\n",
      "\n",
      "# Calculations and Results\n",
      "Ia = Power/V\n",
      "print \"Full load current = %fA\"%(Ia)\n",
      "Ra = Cl/(Ia**2)\n",
      "print \"Ra = %fohms\"%(Ra)\n",
      "E = V+(Ia*Ra)\n",
      "print \"Induced emf = %fvolts\"%(E)\n",
      "phi = (E*60*A)/(Z*N*P)\n",
      "print \"flux density = %fWb/m**2\"%(B)\n",
      "print \"flux = %fWb\"%(phi)\n",
      "area = (phi/B)\n",
      "print \" Area of pole shoe = %fcm**2\"%(area*10000)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Full load current = 2727.272727A\n",
        "Ra = 0.003361ohms\n",
        "Induced emf = 559.166667volts\n",
        "flux density = 0.900000Wb/m**2\n",
        "flux = 0.089467Wb\n",
        " Area of pole shoe = 994.074074cm**2\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.16  Page No : 103"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given Data\n",
      "Cd = 0.76;            #commutator diameter in metres\n",
      "Cr = .38;              #commutator radius in metres\n",
      "bw = 1.5*10**(-2);        #brush width in metres\n",
      "N = 600.;                #speed in rpm\n",
      "n = 10.;                #speed in rps\n",
      "\n",
      "# Calculations and Results\n",
      "V = Cr*(2*3.14*n);        \n",
      "print \"peripheral speed of commutator, V = %fm/sec\"%(V);\n",
      "Tc = bw/V;\n",
      "print \"Time of commutation = %fseconds\"%(Tc)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "peripheral speed of commutator, V = 23.864000m/sec\n",
        "Time of commutation = 0.000629seconds\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.17  Page No : 123"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given Data\n",
      "V = 240.;            #supply voltage in volts\n",
      "N = 800.;            #speed in rpm\n",
      "Ia = 2.;              #armeture current in amperes\n",
      "Ra = 0.4;            #armature resistance in ohms\n",
      "Rf = 160.;            #field resistance in ohms\n",
      "Il1 = 30.;            #line current in amperes\n",
      "\n",
      "# Calculations and Results\n",
      "E = V-(Ia*Ra);       #induced emf in volts\n",
      "print (\"At no-load\")\n",
      "print \"E = %fV\"%(E)\n",
      "If = V/Rf;             #field current in amperes\n",
      "print \"If = %fA\"%(If)\n",
      "K1 = E/(If*N);\n",
      "print \"K1 = %f\"%(K1)\n",
      "print (\"At a load of 30A\")\n",
      "Ia1 = (Il1-If);\n",
      "E1 = V-(Ia1*Ra);\n",
      "N1 = 950;               #speed in rpm\n",
      "If1 = E1/(K1*N1);\n",
      "print \"If1 = %fA\"%(If1);\n",
      "Rr = V/If1;\n",
      "R = (Rr-Rf);\n",
      "print \"Extra resistance required in the field circuit, R = %fohms\"%(R)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "At no-load\n",
        "E = 239.200000V\n",
        "If = 1.500000A\n",
        "K1 = 0.199333\n",
        "At a load of 30A\n",
        "If1 = 1.207182A\n",
        "Extra resistance required in the field circuit, R = 38.810149ohms\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.18  Page No : 124"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given Data\n",
      "V = 230.;                    #voltage supply in volts\n",
      "Ia = 20.;                    #armature current in amperes\n",
      "Ra = 0.5;                    #armature resistance in ohms\n",
      "\n",
      "# Calculations and Results\n",
      "E = V-(Ia*Ra);\n",
      "print \"E = %dV\"%(E)\n",
      "print (\"when extra resistance is added in the armature circuit,the speed is halved\")\n",
      "E2 = E/2;\n",
      "R = ((V-E2)/Ia)-Ra;\n",
      "print (\"The load torque is conmath.atant\")\n",
      "print \"extra resistance in the armature circui, R = %fohms\"%(R)\n",
      "print (\"The load torque directly proportional to square of speed\")\n",
      "print (\"if N is halfed, Iais one-fourthed\")\n",
      "Ia2 = Ia/4;\n",
      "R = ((V-E2)/Ia2)-Ra;\n",
      "print \"extra resistance in the armature circui, R = %fohms\"%(R)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "E = 220V\n",
        "when extra resistance is added in the armature circuit,the speed is halved\n",
        "The load torque is conmath.atant\n",
        "extra resistance in the armature circui, R = 5.500000ohms\n",
        "The load torque directly proportional to square of speed\n",
        "if N is halfed, Iais one-fourthed\n",
        "extra resistance in the armature circui, R = 23.500000ohms\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.19  Page No : 125"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given Data\n",
      "V = 250.;                    #voltage supply in volts\n",
      "Ia = 50.;                    #armature current in amperes\n",
      "Ra = 0.3;                    #armature resistance in ohms\n",
      "N = 1000.;\n",
      "\n",
      "# Calculations and Results\n",
      "E = V-(Ia*Ra);\n",
      "print \"E = %dV\"%(E)\n",
      "print (\"when extra resistance is added in the armature circuit when the speed is 800rpm\")\n",
      "N2 = 800.;\n",
      "E2 = (E*N2)/N;\n",
      "print \"E at 800rpm = %dV\"%(E2)\n",
      "R = ((V-E2)/Ia)-Ra;\n",
      "print \"extra resistance in the armature circui, R = %fohms\"%(R)\n",
      "print (\"if load is halfed,Ia will be halfed\")\n",
      "Ia2 = Ia/2;\n",
      "E1 = V-(Ia2*(Ra+R));\n",
      "print \"E1 = %dV\"%(E1)\n",
      "N1 = (N2*E1)/E2;\n",
      "print \"N1 = %frpm\"%(N1)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "E = 235V\n",
        "when extra resistance is added in the armature circuit when the speed is 800rpm\n",
        "E at 800rpm = 188V\n",
        "extra resistance in the armature circui, R = 0.940000ohms\n",
        "if load is halfed,Ia will be halfed\n",
        "E1 = 219V\n",
        "N1 = 931.914894rpm\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.20  Page No : 125"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given Data\n",
      "Il = 5.;            #current in amperes al no-load\n",
      "V = 250.;            #voltage in volts\n",
      "Rf = 250.;            #field resistance in ohms\n",
      "\n",
      "# Calculations and Results\n",
      "If1 = V/Rf;            #field current in amperes\n",
      "Ia1 = Il-If1;            #armature current\n",
      "Ra = 0.2;                    #armature resistance in ohms\n",
      "print (\"at a load current of 50A\")\n",
      "Il2 = 50;                #load current in amperes\n",
      "#armature reaction weakens by 3percent\n",
      "If2 = 0.97;                    #current in amperes\n",
      "Ia2 = Il2-If2;\n",
      "N1 = 1000; \n",
      "E1 = (V-(Ia1*Ra));\n",
      "E2 = (V-(Ia2*Ra));\n",
      "N2 = (N1*E2)/(0.97*E1);\n",
      "print \"N2 = %frpm\"%(N2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "at a load current of 50A\n",
        "N2 = 993.670467rpm\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.21  Page No : 126"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given Data\n",
      "P = 4;                  #pole\n",
      "V = 500;                #shunt motor  in volts\n",
      "Ia = 60;                    #armature current in amperes\n",
      "Ra = 0.2;                   #armature resistance in ohms\n",
      "\n",
      "# Calculations and Results\n",
      "E = V-(Ia*Ra)-2;\n",
      "print \"voltage drop across each brush = %fV\"%(E)\n",
      "phi = 0.03;                 #flux per pole in Wb\n",
      "Z = 720.;                    #total armature current in volts\n",
      "A = 2;\n",
      "N = (E*60*A)/(phi*Z*P)\n",
      "print \"full load speed of the motor = %frpm\"%(N)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "voltage drop across each brush = 486.000000V\n",
        "full load speed of the motor = 675.000000rpm\n"
       ]
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.22  Page No : 126"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "# Given Data\n",
      "V = 440;                #primary voltage in volts\n",
      "Ia = 50;                #armature current in amperes\n",
      "Ra = 0.2;                #armature resistance in ohms\n",
      "N = 600;                  #speed in rpm\n",
      "E = V-(Ia*Ra);           #emf induced  in volts before adding extra resistance\n",
      "#E = K*phi*N = K1*Ia*N\n",
      "K1 = E/(Ia*N);\n",
      "\n",
      "# Calculations and Results\n",
      "#we have the relation T = Kt1*Ia**2, T1 = Kt1*Ia1**2\n",
      "#when torque is half, say torque be T1\n",
      "#T1 = T/2. r = T/T1\n",
      "r = 2;\n",
      "Ia1 = math.sqrt(Ia**2/r);\n",
      "print \"Ia1 = %fA\"%(Ia1);\n",
      "#extra resistance R is introduced in the circuit\n",
      "N1 = 400;\n",
      "E1 = (K1*Ia1*N1);\n",
      "R = ((V-E1)/Ia1)-Ra;\n",
      "print \"value of extra resistance added = %fohms\"%(R)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Ia1 = 35.355339A\n",
        "value of extra resistance added = 6.511746ohms\n"
       ]
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.23  Page No : 127"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given Data\n",
      "V = 200.;                        #voltage in volts\n",
      "Ia = 20.;                        #armature current in amperes\n",
      "Ra = 0.5;                        #armature resistance in ohms\n",
      "Rse = 0.2;                        #field winding resistance in ohms\n",
      "\n",
      "# Calculations and Results\n",
      "E = V-(Ia*(Ra+Rse));\n",
      "print \"In first case, E = %fV\"%(E)\n",
      "#E = k*phi*N\n",
      "N = 1000;                        #speed in rpm\n",
      "Kphi = E/N;   \n",
      "#a resistance R is connected in parallel with the series field which is called diverter\n",
      "print (\"when resistace R is added and new conditions\")\n",
      "I = 20;                        #total current flowing\n",
      "#current is equally devided between series field and diverter\n",
      "Ise2 = I/2;\n",
      "#flux at 10A current is 20percent of flux at 20A current\n",
      "p = 0.70;                #percentage of flux\n",
      "Kpih1 = p*Kphi;\n",
      "E1 = (V-((Ia*Ra)+(Ise2*Rse)));\n",
      "print \"Induced emf = %fV\"%(E1)\n",
      "#new speed is N1\n",
      "N1 = E1/(p*Kphi)\n",
      "print \"N1 = %frpm\"%(N1)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "In first case, E = 186.000000V\n",
        "when resistace R is added and new conditions\n",
        "Induced emf = 188.000000V\n",
        "N1 = 1443.932412rpm\n"
       ]
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.24  Page No : 128"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Given Data\n",
      "V = 200.;                             #motor runs in volts\n",
      "Ia = 15.;                                  #current taken in amperes\n",
      "Ra = 1.;                                #motor resistance in ohms\n",
      "\n",
      "# Calculations and Results\n",
      "E1 = V-(Ia*Ra);\n",
      "print \"resistance when 1ohm = %fV\"%(E1)\n",
      "R = 5;                                   #resistance \n",
      "E2 = V-(Ia*(Ra+R))\n",
      "print \"resistance when 5ohms connected in series = %fV\"%(E2)\n",
      "N1 = 800;                                #speed of motor in rpm\n",
      "N2 = N1*(E2/E1);\n",
      "print \"speed at which motor will run when resistance is 5ohms = %frpm\"%(N2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "resistance when 1ohm = 185.000000V\n",
        "resistance when 5ohms connected in series = 110.000000V\n",
        "speed at which motor will run when resistance is 5ohms = 475.675676rpm\n"
       ]
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.25  Page No : 135"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Given Data\n",
      "P = 8.;                          #pole\n",
      "Z = 107.;                        #generator with slots\n",
      "Ia = 1000.;                    #current containing in amperes\n",
      "Bag = 0.32;                      #gap flux density in Wb/m**2\n",
      "lg = 0.012;                          #interpole air gap in meters\n",
      "pi = 3.14;\n",
      "\n",
      "# Calculations\n",
      "Mu = (4*pi*10**-7)\n",
      "AT = (((Ia*Z)/(2*P))+((Bag*lg)/Mu));\n",
      "\n",
      "# Results\n",
      "print \"current for each commutating pole = %f\"%(AT)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "current for each commutating pole = 9744.824841\n"
       ]
      }
     ],
     "prompt_number": 24
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.26  Page No : 135"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Given Data\n",
      "Bag = 0.3;                                  #flux density in the interpole air gap in Wb/m**2\n",
      "\n",
      "# Calculations and Results\n",
      "Ia = 200000./200;                        #armature current in amperes\n",
      "print \"Armature current = %f\"%(Ia)\n",
      "Z = 540.;                          #Number of armature conductors\n",
      "Zt = 540./2;                            #Number armature winding turns \n",
      "print \"Number armature winding turns = %f\"%(Zt)\n",
      "A = 6.;                             #the winding lap\n",
      "Ap = Zt/A;                        #Number of armature turns per parallel path\n",
      "print \"Number of armature turns per parallel path = %f\"%(Ap)\n",
      "P = 6;                              #pole\n",
      "Np = ((Ia*Ap)/P);\n",
      "print \"Number of armature ampere turns per pole = %f\"%(Np)\n",
      "lg = 0.01;                              #inter pole air gap in meters\n",
      "pi = 3.14;\n",
      "Mu = (4*pi*10**-7)\n",
      "Nipg = ((Bag*lg)/Mu);                          #Air gap\n",
      "print \"ampere turns for the air gap = %f\"%(Nipg)\n",
      "NipI = (Np+Nipg);                                #total interpole ampere\n",
      "print \"Total interpole ampere turns = %f\"%(NipI)\n",
      "Nip = (NipI/Ia);\n",
      "print \"Number of turns needed on each commutating pole = %f\"%(Nip)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Armature current = 1000.000000\n",
        "Number armature winding turns = 270.000000\n",
        "Number of armature turns per parallel path = 45.000000\n",
        "Number of armature ampere turns per pole = 7500.000000\n",
        "ampere turns for the air gap = 2388.535032\n",
        "Total interpole ampere turns = 9888.535032\n",
        "Number of turns needed on each commutating pole = 9.888535\n"
       ]
      }
     ],
     "prompt_number": 25
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.27  Page No : 128"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Given Data\n",
      "N = 960.;                           #speed in rpm\n",
      "F = 23.;                            #effictive load in kgf\n",
      "\n",
      "# Calculations and Results\n",
      "r = 45./2;                               #radius of the drum\n",
      "print \"radius of the drum = %fcm\"%(r)\n",
      "pi = 3.14;\n",
      "OP = (2*pi*N*F*r*9.81)/(60*100);\n",
      "print \"output power = %fW\"%(OP)\n",
      "\n",
      "Vi = 230.;                  #motor input in volts\n",
      "Ci = 28.;                       #input current in amperes\n",
      "IP = (Vi*Ci);\n",
      "print \"input power  = %fW\"%(IP)\n",
      "Effi = (OP/IP)*100;\n",
      "print \"Efficiency of the motor = %fpercent\"%(Effi)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "radius of the drum = 22.500000cm\n",
        "output power = 5101.043040W\n",
        "input power  = 6440.000000W\n",
        "Efficiency of the motor = 79.208743percent\n"
       ]
      }
     ],
     "prompt_number": 26
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.29  Page No : 145"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Given Data\n",
      "I = 440.;                      #input at no-load in watt\n",
      "V = 220.;                        #voltage in volts\n",
      "Ic = I/V;                      #input current at no-load in amperes\n",
      "i = 1;                    #input current in amperes\n",
      "A = 2;                      #current in amperes\n",
      "C = A-i;                    #armature current at no-load in amperes\n",
      "L = I-((((C)**2)*0.5)+(V*C));                #iron,friction and windage losses in watt\n",
      "a = 40;                         #motor current in amperes\n",
      "OP = (V*a);\n",
      "Ra = 0.5;\n",
      "\n",
      "# Calculations and Results\n",
      "Effi = (OP*100)/(OP+(((a+i)**2)*Ra)+(V*i)+L)\n",
      "print \"Efficiency as a generator when delivering 40A at 220V = %fpercent\"%(Effi)\n",
      "Eff = ((OP-(((a-i)**2)*Ra)-(V*C)-L)/OP)*100;\n",
      "print \"Efficiency as a motor when taking 40A from at 220V = %fpercent\"%(Eff)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Efficiency as a generator when delivering 40A at 220V = 87.301587percent\n",
        "Efficiency as a motor when taking 40A from at 220V = 86.363636percent\n"
       ]
      }
     ],
     "prompt_number": 27
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.30  Page No : 147"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Given Data\n",
      "V = 400.;                            #motor in volts\n",
      "Rf = 200.;                            #field resistance in ohms\n",
      "If = V/Rf;                          #current in amperes\n",
      "i = 5;                             #current at no load in amperes\n",
      "IP = V*i;                            #motor input at no load\n",
      "Ia = 3;                             #aramture current in amperes\n",
      "Ra = 0.5;                           #armature resistance in ohms\n",
      "\n",
      "# Calculations and Results\n",
      "L = IP-(((Ia)**2)*Ra)-(V*If);                     #iron,friction and windage in losses in watt\n",
      "print \"iron, friction and windage in losses = %fW\"%(L)\n",
      "At = 50.;                                        #armature total current in amperes\n",
      "A = At-2;                                       #armature current in amperes\n",
      "Ls = (((A)**2)*Ra)+(V*If)+L;                      #Losses\n",
      "Eff = (((V*At)-Ls)/(V*At))*100;\n",
      "print \"Efficiency of full load = %fpercent\"%(Eff)\n",
      "#flux is consmath.tant\n",
      "E1 = V-(Ia*Ra);                           #induced emf in the armature at no load\n",
      "E2 = V-(A*Ra);                             #induced emf in the armature at full load\n",
      "# math.since N1/N2 = E1/E2\n",
      "percentload = (1-(E2/E1))*100;\n",
      "print \"Percentage change in speed from no load to full load = %fpercent\"%(percentload)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "iron, friction and windage in losses = 1195.500000W\n",
        "Efficiency of full load = 84.262500percent\n",
        "Percentage change in speed from no load to full load = 5.646173percent\n"
       ]
      }
     ],
     "prompt_number": 29
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.31  Page No : 148"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Given Data\n",
      "Ra = 0.5;                #armature resistance in ohms\n",
      "Rf = 750.;               #field circuit resistance in ohms\n",
      "V = 500.;                       #voltage in volts\n",
      "\n",
      "# Calculations\n",
      "If = V/Rf;                          #current in amperes \n",
      "l = 3.;                          #line current in amperes\n",
      "i = 2.33;                          #current in motor in amperes\n",
      "I = 0.67;                         #current i amperes\n",
      "L = (V*l)-(((i)**2)*Ra)-(V*I);                         #Iron,friction and windage losses\n",
      "O = 20.;                               #generator \n",
      "OP = (O*1000)/V;                #output current of the generator under loaded condition in amperes\n",
      "Ia = I+OP;            #output in amperes\n",
      "Effi = (O*1000*100)/((O*1000)+(((Ia)**2)*Ra)+(V*I)+L);\n",
      "\n",
      "# Results\n",
      "print \"efficiency of the machine = %fpercent\"%(Effi)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "efficiency of the machine = 89.588435percent\n"
       ]
      }
     ],
     "prompt_number": 30
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.32  Page No : 149"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Given Data\n",
      "Ig = 25.;               #current of generator in amperes\n",
      "I = 30.;                   #current in motor in amperes\n",
      "Il = I-Ig;              #current in amperes\n",
      "Ra = 0.25;                #resistance in ohms\n",
      "Gl = ((Ig)**2)*Ra;                #loss in generator in watt\n",
      "M = ((I)**2)*Ra;                    #loss in motor in watt\n",
      "T = Gl+M;                   #total loss in watt\n",
      "V = 100.;             #voltage in volts\n",
      "P = V*Il;               #power supplied from mains in watt\n",
      "L = P-T;                  #iron,friction and windages losses in the two machines in ohms\n",
      "l = L/2;                   #iron,friction and windages losses in each machines in ohms\n",
      "IP = I*V;                    #input\n",
      "\n",
      "# Calculations and Results\n",
      "Eff = ((IP-M-l)/IP)*100;\n",
      "print \"Efficiency of the motor = %fpercent\"%(Eff)\n",
      "OP = Ig*V;                 #output\n",
      "Effi = ((OP)/(OP+Gl+l))*100;\n",
      "print \"Efficiency of the generator = %fpercent\"%(Effi)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Efficiency of the motor = 90.520833percent\n",
        "Efficiency of the generator = 92.059839percent\n"
       ]
      }
     ],
     "prompt_number": 31
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.33  Page No : 150"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Given Data\n",
      "V = 440.;                    #voltage in volts\n",
      "P = 200.*1000;               #power in watt\n",
      "Ig = P/V;              #rated current of each machine in amperes\n",
      "\n",
      "# Calculations\n",
      "#assume losses to be equal\n",
      "I = 90;              #addition currnet supply\n",
      "Effi = math.sqrt(Ig/(Ig+I))*100;\n",
      "\n",
      "# Results\n",
      "print \"approximate efficiency = %fpercent\"%(Effi)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "approximate efficiency = 91.363261percent\n"
       ]
      }
     ],
     "prompt_number": 32
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.34  Page No : 150"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Given Data\n",
      "Ig = 2000.;                             #output current of generator in amperes\n",
      "I = 380.;                               #Input current from supply mains in amperes\n",
      "\n",
      "# Calculations and Results\n",
      "Effi = math.sqrt(Ig/(Ig+I))*100;                  #Efficiency of generator assuming equal efficiencies of the two machines\n",
      "print \"Efficiences of the generator at full load assuming equal efficiencies = %fpercent\"%(Effi)\n",
      "S = 22.;                            #Shunt field current of generator\n",
      "G = Ig+S;                        #Armature current of generator in amperes\n",
      "R = 0.01;                               #resistance of the armature circuit of each machine in ohms\n",
      "Gc = ((G)**2)*R;                          #copper loss in arrmature circuit of generator in W\n",
      "V = 500.;                                #Voltage in volts\n",
      "L = V*S;                              #loss in the field circuit of the generator in W\n",
      "T = Ig+I;                            #total current suuply in amperes\n",
      "Sf = 17.;                                        #shunt field current of motor in amperes\n",
      "A = T-Sf;                              #armature current in motor in amperes\n",
      "Lc = ((A)**2)*R;                        #loss in armature circuit of motor in amperes\n",
      "Lf = V*Sf;                                 #loss in the shunt field circuit of motor in W\n",
      "Tin = V*I;                      #total input to motor and generator in W\n",
      "Ml = Tin-(Gc+L+Lc+Lf);                     #iron,friction and windage loss in both machines in W\n",
      "Me = Ml/2;                                   #iron,friction and windage loss in each machine in W\n",
      "p = 1000.;                     #power in kW\n",
      "OP = (Ig*V)/p;                        #full load output of the generator\n",
      "Eff = (p*100)/(p+((Gc+L+Me)/1000));\n",
      "print \"Efficiency of the generator at full load = %fpercent\"%(Eff)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Efficiences of the generator at full load assuming equal efficiencies = 91.669850percent\n",
        "Efficiency of the generator at full load = 91.846461percent\n"
       ]
      }
     ],
     "prompt_number": 33
    }
   ],
   "metadata": {}
  }
 ]
}