summaryrefslogtreecommitdiff
path: root/Electrical_Circuit_Theory_And_Technology/chapter_33-checkpoint.ipynb
blob: 55e4e2b7e530996f11c6936eaecdd51ea455df5e (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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h1>Chapter 33: Thevenin\u2019s and Norton\u2019s theorems</h1>"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 1, page no. 578</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#determine (a) the current flowing in the capacitor, and (b) the p.d. across the 150 k\u0006ohmresistor.\n",
      "from __future__ import division\n",
      "import math\n",
      "import cmath\n",
      "#initializing  the  variables:\n",
      "rv  =  200;#  in  volts\n",
      "thetav  =  0;#  in  degrees\n",
      "R1  =  5000;#  in  ohm\n",
      "R2  =  20000;#  in  ohm\n",
      "R3  =  -1j*120000;#  in  ohm\n",
      "R4  =  150000;#  in  ohm\n",
      "\n",
      " #calculation:\n",
      " #voltage\n",
      "V  =  rv*math.cos(thetav*math.pi/180)  +  1j*rv*math.sin(thetav*math.pi/180)\n",
      " #Initially  the  (150-i120)kohm\u0006  impedance  is  removed  from  the    circuit  as  shown  in  Figure  33.13.\n",
      " #Note  that,  to  find  the  current  in  the  capacitor,  \n",
      "    #only  the  capacitor  need  have  been  initially  removed  from  the  circuit.  \n",
      "    #However,  removing  each  of  the  components  from  the  branch  through  \n",
      "    #which  the  current  is  required  will  often  result  in  a  simpler  solution.  \n",
      " #From  Figure  33.13,\n",
      " #current,  I1  \n",
      "I1  =  V/(R1  +  R2)\n",
      " #The  open-circuit  e.m.f.  E  is  equal  to  the  p.d.  across  the  20  k\u0006ohm  resistor,  i.e.\n",
      "E  =  I1*R2\n",
      " #Removing  the  V1  source  gives  the  network  shown  in  Figure  33.14.\n",
      " #The  impedance,  z,  looking  in at  the  open-circuited  terminals  is  given  by\n",
      "z  =  R1*R2/(R1  +  R2)\n",
      " #The  Th\u00b4evenin  equivalent  circuit  is  shown  in  Figure  33.15,  where  current  iL  is  given  by\n",
      "ZL  =  R3  +  R4\n",
      "IL  =  E/(ZL  +  z)\n",
      "ILmag  =  abs(IL)\n",
      " #current  flowing  in  the  capacitor\n",
      "Ic  =  ILmag\n",
      " #P.d.  across  the  150  kohm  resistor,\n",
      "Vr150  =  ILmag*R4\n",
      "\n",
      "\n",
      "#Results\n",
      "print  \"\\n\\n  Result  \\n\\n\"\n",
      "print  \"\\n(a)the  current  flowing  in  the  capacitor  is  \",round(Ic*1000,2),\" mA\"\n",
      "print  \"\\n(b)  the  p.d.  across  the  150  ohm  resistance  is  \",round(Vr150,2),\"  V\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "  Result  \n",
        "\n",
        "\n",
        "\n",
        "(a)the  current  flowing  in  the  capacitor  is   0.82  mA\n",
        "\n",
        "(b)  the  p.d.  across  the  150  ohm  resistance  is   122.93   V\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 2, page no. 579</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#determine the value of current I.\n",
      "from __future__ import division\n",
      "import math\n",
      "import cmath\n",
      "#initializing  the  variables:\n",
      "V1  =  20;#  in  volts\n",
      "V2  =  10;#  in  volts\n",
      "R1  =  2;#  in  ohm\n",
      "R2  =  1.5;#  in  ohm\n",
      "L  =  235E-6;#  in  Henry\n",
      "R4  =  3;#  in  ohm\n",
      "f  =  2000;#  in  Hz\n",
      "\n",
      " #calculation:\n",
      " #The  impedance  through  which  current  I  is  flowing  is  initially  removed  from  the  network,  as  shown  in  Figure  33.17.\n",
      " #From  Figure  33.17,\n",
      " #current,  I1  \n",
      "I1  =  (V1  -  V2)/(R1  +  R4)\n",
      " #the  open  circuit  e.m.f.  E\n",
      "E  =  V1  -  I1*R1\n",
      " #When  the  sources  of  e.m.f.  are  removed  from  the  circuit,  \n",
      "    #the  impedance,  z,  \u2018looking  in\u2019  at  the  break  is  given  by\n",
      "z  =  R1*R4/(R1  +  R4)\n",
      " #The  Th\u00b4evenin  equivalent  circuit  is  shown  in  Figure  33.18,  where  inductive  reactance,\n",
      "XL  =  2*math.pi*f*L\n",
      "R3  =  1j*XL\n",
      " #Hence  current\n",
      "I  =  E/(R2  +  R3  +  z)\n",
      "\n",
      "\n",
      "#Results\n",
      "print  \"\\n\\n  Result  \\n\\n\"\n",
      "print  \"\\n  the  current  I  is  \",round(I.real,2),\"  +  (\",round(I.imag,2),\")i  A\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "  Result  \n",
        "\n",
        "\n",
        "\n",
        "  the  current  I  is   2.7   +  ( -2.95 )i  A\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 3, page no. 580</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#determine the power dissipated in the 48 ohm resistor\n",
      "from __future__ import division\n",
      "import math\n",
      "import cmath\n",
      "#initializing  the  variables:\n",
      "rv  =  50;#  in  volts\n",
      "thetav  =  0;#  in  degrees\n",
      "R1  =  -1j*400;#  in  ohm\n",
      "R2  =  300;#  in  ohm\n",
      "R3  =  144j;#  in  ohm\n",
      "R4  =  48;#  in  ohm\n",
      "\n",
      " #calculation:\n",
      " #voltage\n",
      "V  =  rv*math.cos(thetav*math.pi/180)  +  1j*rv*math.sin(thetav*math.pi/180)\n",
      " #The  R3  and  R4  impedance  is  initially  removed  from  the  network  as  shown  in  Figure  33.20.\n",
      " #From  Figure  33.20,\n",
      " #current,  I\n",
      "i  =  V/(R1  +  R2)\n",
      " #the  open  circuit  e.m.f.  E\n",
      "E  =  i*R2\n",
      " #When  the  V  is  removed  from  the  circuit,  the  impedance,  z,  \u2018looking  in\u2019  at  the  break  is  given  by\n",
      "z  =  R1*R2/(R1  +  R2)\n",
      " #The  Th\u00b4evenin  equivalent  circuit  is  shown  in  Figure  33.21  connected  to  R#  and  R4,\n",
      " #Hence  current\n",
      "I  =  E/(R4  +  R3  +  z)\n",
      "Imag  =  abs(I)\n",
      " #the  power  dissipated  in  the  48  ohm  resistor\n",
      "Pr48  =  R4*Imag**2\n",
      "\n",
      "\n",
      "#Results\n",
      "print  \"\\n\\n  Result  \\n\\n\"\n",
      "print  \"\\n  the  power  dissipated  in  the  48  ohm  resistor  is  \",round(Pr48,2),\"  W\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "  Result  \n",
        "\n",
        "\n",
        "\n",
        "  the  power  dissipated  in  the  48  ohm  resistor  is   0.75   W"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 4, page no. 581</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#determine the current flowing in the 80 ohm resistor.\n",
      "from __future__ import division\n",
      "import math\n",
      "import cmath\n",
      "#initializing  the  variables:\n",
      "V  =  100;#  in  volts\n",
      "R1  =  5;#  in  ohm\n",
      "R2  =  20;#  in  ohm\n",
      "R3  =  46;#  in  ohm\n",
      "R4  =  50;#  in  ohm\n",
      "R5  =  15;#  in  ohm\n",
      "R6  =  60;#  in  ohm\n",
      "R7  =  16;#  in  ohm\n",
      "R8  =  80;#  in  ohm\n",
      "\n",
      "#calculation:\n",
      " #One  method  of  analysing  a  multi-branch  network  as  shown  in  Figure  33.22 \n",
      "    #is  to  use  Th\u00b4evenin\u2019s  theorem  on  one  part  of  the  network  at  a  time.  \n",
      "    #For  example,  the  part  of  the  circuit  to  the  left  of  AA  may  be  reduced  to  a  Th\u00b4evenin  equivalent  circuit.\n",
      " #From  Figure  33.23,\n",
      "E1  =  (R2/(R1  +  R2))*V\n",
      "z1  =  R1*R2/(R1  +  R2)\n",
      " #Thus  the  network  of  Figure  33.22  reduces  to  that  of  Figure  33.24.  \n",
      "    #The  part  of  the  network  shown  in  Figure  33.24  to  the  left  of  BB  may  be  reduced \n",
      "    #to  a  Th\u00b4evenin  equivalent  circuit,  where\n",
      "E2  =  (R4/(R3  +  R4  +  z1))*E1\n",
      "z2  =  R4*(z1  +  R3)/(R4  +  z1  +  R3)\n",
      " #Thus  the  original  network  reduces  to  that  shown  in  Figure  33.25.  \n",
      "    #The  part  of  the  network  shown  in  Figure  33.25  to  the  left  of  CC  may  be  reduced  \n",
      "    #to  a  Th\u00b4evenin  equivalent  circuit,  where\n",
      "E3  =  (R6/(R5  +  R6  +  z2))*E2\n",
      "z3  =  R6*(z2  +  R5)/(R5  +  z2  +  R6)\n",
      " #Thus  the  original  network  reduces  to  that  of  Figure  33.26, \n",
      "    #from  which  the  current  in  the  80  ohm  resistor  is  given  by\n",
      "I  =  E3/(z3  +  R7  +  R8)\n",
      "\n",
      "\n",
      "#Results\n",
      "print  \"\\n\\n  Result  \\n\\n\"\n",
      "print  \"\\n  the  current  flowing  in  the  80  ohm  resistor  is  \",round(I,2),\"  A\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "  Result  \n",
        "\n",
        "\n",
        "\n",
        "  the  current  flowing  in  the  80  ohm  resistor  is   0.2   A"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 5, page no. 582</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#determine (a) the magnitude of the current flowing in a \t(3.75 + j11) ohmimpedance connected across terminals AB, and\n",
      "#(b) the magnitude of the p.d. across the (3.75 + j11) ohmimpedance.\n",
      "from __future__ import division\n",
      "import math\n",
      "import cmath\n",
      "#initializing  the  variables:\n",
      "rv  =  24;#  in  volts\n",
      "thetav  =  0;#  in  degrees\n",
      "R1  =  -1j*3;#  in  ohm\n",
      "R2  =  4;#  in  ohm\n",
      "R3  =  3j;#  in  ohm\n",
      "\n",
      " #calculation:\n",
      " #voltage\n",
      "V  =  rv*math.cos(thetav*math.pi/180)  +  1j*rv*math.sin(thetav*math.pi/180)\n",
      " #Current  I1  shown  in  Figure  33.27  is  given  by\n",
      "I1  =  V/(R1  +  R2  +  R3)\n",
      " #The  Th\u00b4evenin  equivalent  voltage,  i.e.,  the  open-circuit  voltage  across  terminals  AB,  is  given  by\n",
      "E  =  I1*(R2  +  R3)\n",
      " #When  the  voltage  source  is  removed,  the  impedance  z  \u2018looking  in\u2019  at  AB  is  given  by\n",
      "z  =  (R2  +  R3)*R1/(R1  +  R2  +  R3)\n",
      " #Thus  the  Th\u00b4evenin  equivalent  circuit  is  as  shown  in  Figure  33.28.\n",
      " #when  (3.75  +  i11)  ohm  impedance  connected  across  terminals  AB, \n",
      "    #the  current  I  flowing  in  the  impedance  is  given  by\n",
      "R  =  3.75  +  11j;#  in  ohms\n",
      "I  =  E/(R  +  z)\n",
      "Imag  =  abs(I)\n",
      " #the  p.d.  across  the(  3.75  +  i11)ohm  impedance.\n",
      "VR  =  I*R\n",
      "VRmag  =  abs(VR)\n",
      "\n",
      "\n",
      "#Results\n",
      "print  \"\\n\\n  Result  \\n\\n\"\n",
      "print  \"\\n  (a)  the  current  I  flowing  in  the  (3.75  +  i11)  impedance  is  given  by  is  \",round(Imag,2),\"  A\"\n",
      "print  \"\\n  (b)  the  magnitude  of  the  p.d.  across  the  impedance  is  \",round(VRmag,2),\"  V\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "  Result  \n",
        "\n",
        "\n",
        "\n",
        "  (a)  the  current  I  flowing  in  the  (3.75  +  i11)  impedance  is  given  by  is   3.0   A\n",
        "\n",
        "  (b)  the  magnitude  of  the  p.d.  across  the  impedance  is   34.86   V"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 6, page no. 583</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#determine the current flowing in the capacitor of the network\n",
      "from __future__ import division\n",
      "import math\n",
      "import cmath\n",
      "#initializing  the  variables:\n",
      "rv  =  16.55;#  in  volts\n",
      "thetav  =  -22.62;#  in  degrees\n",
      "R1  =  4;#  in  ohm\n",
      "R2  =  1j*2;#  in  ohm\n",
      "R3  =  1j*6;#  in  ohm\n",
      "R4  =  3;#  in  ohm\n",
      "R5  =  5;#  in  ohm\n",
      "R6  =  -1*1j*8;#  in  ohm\n",
      "\n",
      " #calculation:\n",
      " #voltage\n",
      "V  =  rv*math.cos(thetav*math.pi/180)  +  1j*rv*math.sin(thetav*math.pi/180)\n",
      " #The  capacitor  is  removed  from  branch  AB,  as  shown  in  Figure  33.30.\n",
      " #Impedance,  Z\n",
      "Z1  =  R3  +  R4  +  R5\n",
      "Z  =  R1  +  (Z1*R2/(R2  +  Z1))\n",
      "I1  =  V/Z\n",
      "I2  =  (R2/(R2  +Z1))*I1\n",
      " #The  open-circuit  voltage,  E\n",
      "E  =  I2*R5\n",
      " #If  the  voltage  source  is  removed  from  Figure  33.30,  the  impedance,  z,  \u2018looking  in\u2019  at  AB  is  given  by\n",
      "z  =  R5*((R1*R2/(R1  +  R2))  +  R3  +  R4)/(R5  +  ((R1*R2/(R1  +  R2))  +  R3  +  R4))\n",
      " #The  Th\u00b4evenin  equivalent  circuit  is  shown  in  Figure  33.31,  \n",
      "    #where  the  current  flowing  in  the  capacitor,  I,  is  given  by\n",
      "I  =  E/(z  +  R6)\n",
      "Imag  =  abs(I)\n",
      "\n",
      "#Results\n",
      "print  \"\\n\\n  Result  \\n\\n\"\n",
      "print  \"\\n  the  current  flowing  in  the  capacitor  of  the  network  is  \",round(Imag,2),\"    A\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "  Result  \n",
        "\n",
        "\n",
        "\n",
        "  the  current  flowing  in  the  capacitor  of  the  network  is   0.43     A"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 7, page no. 584</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#determine the power dissipated by a 2 ohm resistor connected across PQ.\n",
      "from __future__ import division\n",
      "import math\n",
      "import cmath\n",
      "#initializing  the  variables:\n",
      "rv1  =  5;#  in  volts\n",
      "rv2  =  10;#  in  volts\n",
      "thetav1  =  45;#  in  degrees\n",
      "thetav2  =  0;#  in  degrees\n",
      "R1  =  8;#  in  ohm\n",
      "R2  =  5;#  in  ohm\n",
      "R3  =  3j;#  in  ohm\n",
      "R4  =  4;#  in  ohm\n",
      "\n",
      "#calculation:\n",
      " #voltage\n",
      "V1  =  rv1*math.cos(thetav1*math.pi/180)  +  1j*rv1*math.sin(thetav1*math.pi/180)\n",
      "V2  =  rv2*math.cos(thetav2*math.pi/180)  +  1j*rv2*math.sin(thetav2*math.pi/180)\n",
      " #Current  I1  shown  in  Figure  33.32  is  given  by\n",
      "I1  =  V2/(R2  +  R3  +  R4)\n",
      " #Hence  the  voltage  drop  across  the  5  ohm\u0006  resistor  is  given  by  VX  is  in  the  direction  shown  in  Figure  33.32,\n",
      "Vx  =  I1*R2\n",
      " #The  open-circuit  voltage  E  across  PQ  is  the  phasor  sum  of  V1,  Vx  and  V2,  as  shown  in  Figure  33.33.\n",
      "E  =  V2  -  V1  -  Vx\n",
      " #The  impedance,  z,  \u2018looking  in\u2019  at  terminals  PQ  with  the  voltage  sources  removed  is  given  by\n",
      "z  =  R1  +  R2*(R3  +  R4)/(R2  +  R3  +  R4)\n",
      " #The  Th\u00b4evenin  equivalent  circuit  is  shown  in  Figure  33.34  with  the  2  ohm  resistance  connected  across  terminals  PQ.\n",
      " #The  current  flowing  in  the  2  ohm\u0006  resistance  is  given  by\n",
      "R  =  2;#  in  ohms\n",
      "I  =  E/(z  +  R)\n",
      "Imag  =  abs(I)\n",
      " #power  P  dissipated  in  the  2  ohm\u0006  resistor  is  given  by\n",
      "Pr2  =  R*Imag**2\n",
      "\n",
      "\n",
      "#Results\n",
      "print  \"\\n\\n  Result  \\n\\n\"\n",
      "print  \"\\n  power  P  dissipated  in  the  2  ohm  resistor  is  \",round(Pr2,2),\"  W\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "  Result  \n",
        "\n",
        "\n",
        "\n",
        "  power  P  dissipated  in  the  2  ohm  resistor  is   0.07   W"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 8, page no. 585</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#determine the current flowing in the capacitor, and its direction\n",
      "from __future__ import division\n",
      "import math\n",
      "import cmath\n",
      "#initializing  the  variables:\n",
      "rv  =  30;#  in  volts\n",
      "thetav  =  0;#  in  degrees\n",
      "R1  =  15;#  in  ohm\n",
      "R2  =  40;#  in  ohm\n",
      "R3  =  20j;#  in  ohm\n",
      "R4  =  20;#  in  ohm\n",
      "R5  =  5j;#  in  ohm\n",
      "R6  =  5;#  in  ohm\n",
      "R7  =  -1j*25;#  in  ohm\n",
      "\n",
      " #calculation:\n",
      " #voltage\n",
      "V  =  rv*math.cos(thetav*math.pi/180)  +  1j*rv*math.sin(thetav*math.pi/180)\n",
      " #The  R7\u0006  is  initially  removed  from  the  network,  as  shown  in  Figure  33.36\n",
      "Z1  =  R1\n",
      "Z2  =  R2\n",
      "Z3  =  R3  +  R4\n",
      "Z4  =  R5  +  R6\n",
      " #P.d.  between  A  and  C,\n",
      "Vac  =  (Z1/(Z1  +  Z4))*V\n",
      " #P.d.  between  B  and  C,\n",
      "Vbc  =  (Z2/(Z2  +  Z3))*V\n",
      " #Assuming  that  point  A  is  at  a  higher  potential  than  point  B,  then  the  p.d.  between  A  and  B  is\n",
      "Vab  =  Vac  -  Vbc\n",
      " #the  open-circuit  voltage  across  AB  is  given  by\n",
      "E  =  Vab\n",
      " #Point  C  is  at  a  potential  of  V  .  Between  C  and  A  is  a  volt  drop  of  Vac.  Hence  the  voltage  at  point  A  is\n",
      "Va  =  V  -  Vac\n",
      " #Between  points  C  and  B  is  a  voltage  drop  of  Vbc.  Hence  the  voltage  at  point  B\n",
      "Vb  =  V  -  Vbc\n",
      " #Replacing  the  V  source  with  a  short-circuit  (i.e.,  zero  internal  impedance) \n",
      "    #gives  the  network  shown  in  Figure  33.37(a).  The  network  is  shown  redrawn  in  Figure  33.37(b)  \n",
      "    #and  simplified  in  Figure  33.37(c).  Hence  the  impedance,  z,  \u2018looking  in\u2019  at  terminals  AB  is  given  by\n",
      "z  =  Z1*Z4/(Z1  +  Z4)  +  Z2*Z3/(Z2  +  Z3)\n",
      " #The  Th\u00b4evenin  equivalent  circuit  is  shown  in  Figure  33.38,  where  current  I  is  given  by\n",
      "I  =  E/(z  +  R7)\n",
      "Imag  =  abs(I)\n",
      "\n",
      "\n",
      "#Results\n",
      "print  \"\\n\\n  Result  \\n\\n\"\n",
      "print  \"\\n    the  current  flowing  in  the  capacitor  is  \",round(Imag,2),\"  A  in  direction  from  B  to  A.\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "  Result  \n",
        "\n",
        "\n",
        "\n",
        "    the  current  flowing  in  the  capacitor  is   0.13   A  in  direction  from  B  to  A."
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 9, page no. 589</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#determine the value of current I in the circuit\n",
      "from __future__ import division\n",
      "import math\n",
      "import cmath\n",
      "#initializing  the  variables:\n",
      "V  =  5;#  in  volts\n",
      "R1  =  2;#  in  ohm\n",
      "R2  =  3;#  in  ohm\n",
      "R3  =  -1j*3;#  in  ohm\n",
      "R4  =  2.8;#  in  ohm\n",
      "\n",
      " #calculation:\n",
      " #The  branch  containing  the  R4  is  short-circuited,  as  shown  in  Figure  33.48.\n",
      " #The  R2  in  parallel  with  a  short-circuit  is  the  same  as  R2  in  parallel  with  0  ohm \n",
      "    #giving  an  equivalent  impedance  of\n",
      "Z1  =  R2*0/(R3  +  0)\n",
      " #Hence  the  network  reduces  to  that  shown  in  Figure  33.49,  where\n",
      "Isc  =  V/R1\n",
      " #If  the  Voltage  source  is  removed  from  the  network  the  input  impedance,  z,  \u2018looking-in\u2019  \n",
      "    #at  a  break  made  in  AB  of  Figure  33.48  gives\n",
      "z  =  R1*R2/(R1  +  R2)\n",
      " #The  Norton  equivalent  network  is  shown  in  Figure  33.51,  where  current  I  is  given  by\n",
      "I  =  (z/(z  +  R4  +  R3))*Isc\n",
      "\n",
      "\n",
      "#Results\n",
      "print  \"\\n\\n  Result  \\n\\n\"\n",
      "print  \"\\n    the  current  flowing  in  the  capacitor  is  \",round(I.real,2),\"  +  (\", round(I.imag,2),\")i  A\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "  Result  \n",
        "\n",
        "\n",
        "\n",
        "    the  current  flowing  in  the  capacitor  is   0.48   +  ( 0.36 )i  A"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 10, page no. 589</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#determine the current flowing in the inductive branch by using Norton\u2019s theorem\n",
      "from __future__ import division\n",
      "import math\n",
      "import cmath\n",
      "#initializing  the  variables:\n",
      "V1  =  20;#  in  volts\n",
      "V2  =  10;#  in  volts\n",
      "R1  =  2;#  in  ohm\n",
      "R2  =  1.5;#  in  ohm\n",
      "R3  =  2.95j;#  in  ohm\n",
      "R4  =  3;#  in  ohm\n",
      "\n",
      " #calculation:\n",
      " #The  inductive  branch  is  initially  short-circuited,  as  shown  in  Figure  33.53.\n",
      " #From  Figure  33.53,\n",
      "I1  =  V1/R1\n",
      "I2  =  V2/R4\n",
      "Isc  =  I1  +  I2\n",
      " #If  the  voltage  sources  are  removed,  the  impedance,  z,  \u2018looking  in\u2019  at  a  break  made  in  AB  is  given  by\n",
      "z  =  R1*R4/(R1  +  R4)\n",
      " #The  Norton  equivalent  network  is  shown  in  Figure  33.54,  where  current  I  is  given  by\n",
      "I  =  (z/(z  +  R2  +  R3))*Isc\n",
      "\n",
      "\n",
      "#Results\n",
      "print  \"\\n\\n  Result  \\n\\n\"\n",
      "print  \"\\n    the  current  flowing  in  the  inductive  branch  is  \",round(I.real,2),\"  +  (\",round(  I.imag,2),\")i  A\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "  Result  \n",
        "\n",
        "\n",
        "\n",
        "    the  current  flowing  in  the  inductive  branch  is   2.7   +  ( -2.95 )i  A"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 11, page no. 590</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#determine the current flowing in the inductive branch by using Norton\u2019s theorem\n",
      "from __future__ import division\n",
      "import math\n",
      "import cmath\n",
      "#initializing  the  variables:\n",
      "V  =  10;#  in  volts\n",
      "R1  =  1;#  in  ohm\n",
      "R2  =  4;#  in  ohm\n",
      "R3  =  4;#  in  ohm\n",
      "R4  =  -2j;#  in  ohm\n",
      "\n",
      "#calculation:\n",
      "Isc = V/R3\n",
      "z = 1/(1/R2 + 1/R3 + 1/R4)\n",
      "I = (z/(R1 + z))*Isc\n",
      "pd1 = abs(I)*R1\n",
      "\n",
      "#Results\n",
      "print  \"\\n\\n  Result  \\n\\n\"\n",
      "print  \"\\n the magnitude of the p.d. across the 1 ohm resistor is \",round(pd1, 2),\"V\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "  Result  \n",
        "\n",
        "\n",
        "\n",
        " the magnitude of the p.d. across the 1 ohm resistor is  1.58 V"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 12, page no. 591</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#determine the power dissipated in a 5 ohm resistor connected between A and B.\n",
      "from __future__ import division\n",
      "import math\n",
      "import cmath\n",
      "#initializing  the  variables:\n",
      "rv  =  20;#  in  volts\n",
      "thetav  =  0;#  in  degrees\n",
      "R1  =  2;#  in  ohm\n",
      "R2  =  4;#  in  ohm\n",
      "R3  =  3j;#  in  ohm\n",
      "R4  =  -1j*3;#  in  ohm\n",
      "\n",
      " #calculation:\n",
      " #voltage\n",
      "V  =  rv*math.cos(thetav*math.pi/180)  +  1j*rv*math.sin(thetav*math.pi/180)\n",
      " #Terminals  AB  are  initially  short-circuited,  as  shown  in  Figure  33.61.\n",
      " #The  circuit  impedance  Z  presented  to  the  voltage  source  is  given  by\n",
      "Z  =  R1  +  R4*(R2  +  R3)/(R2  +  R3  +  R4)\n",
      " #Thus  current  I  in  Figure  33.61  is  given  by\n",
      "I  =  V/Z\n",
      "Isc  =  ((R2  +  R3)/(R2  +  R3  +  R4))*I\n",
      " #Removing  the  voltage  source  of  Figure  33.60  gives  the  network  Figure  33.62  of  Figure  33.62. \n",
      "    #Impedance,  z,  \u2018looking  in\u2019  at  terminals  AB  is  given  by\n",
      "z  =  R4  +  R1*(R2  +  R3)/(R2  +  R3  +  R1)\n",
      " #The  Norton  equivalent  network  is  shown  in  Figure  33.63.\n",
      "R  =  5;#  in  ohms\n",
      " #Current  IL\n",
      "IL  =  (z/(z  +  R))*Isc\n",
      "ILmag  =  abs(IL)\n",
      " #the  power  dissipated  in  the  5  ohm  resistor  is\n",
      "Pr5  =  R*ILmag**2\n",
      "\n",
      "\n",
      "#Results\n",
      "print  \"\\n\\n  Result  \\n\\n\"\n",
      "print  \"\\n  the  power  dissipated  in  the  5  ohm  resistor  is  \",round(Pr5,2),\"  W\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "  Result  \n",
        "\n",
        "\n",
        "\n",
        "  the  power  dissipated  in  the  5  ohm  resistor  is   22.54   W"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 13, page no. 592</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#determine the magnitude of the current flowing in a 2 ohm resistor connected across PQ.\n",
      "from __future__ import division\n",
      "import math\n",
      "import numpy\n",
      "import cmath\n",
      "#initializing  the  variables:\n",
      "rv1  =  5;#  in  volts\n",
      "rv2  =  10;#  in  volts\n",
      "thetav1  =  45;#  in  degrees\n",
      "thetav2  =  0;#  in  degrees\n",
      "R1  =  8;#  in  ohm\n",
      "R2  =  5;#  in  ohm\n",
      "R3  =  3j;#  in  ohm\n",
      "R4  =  4;#  in  ohm\n",
      "\n",
      " #calculation:\n",
      " #voltage\n",
      "V1  =  rv1*math.cos(thetav1*math.pi/180)  +  1j*rv1*math.sin(thetav1*math.pi/180)\n",
      "V2  =  rv2*math.cos(thetav2*math.pi/180)  +  1j*rv2*math.sin(thetav2*math.pi/180)\n",
      " #Terminals  PQ  are  initially  short-circuited,  as  shown  in  Figure  33.65.\n",
      " #Currents  I1  and  I2  are  shown  labelled.  Kirchhoff\u2019s  laws  are  used.\n",
      " #For  loop  ABCD,  and  moving  anticlockwise,\n",
      " #I1*(R2  +  R3  +  R4)  +  I2*(R3  +  R4)  =  V2\n",
      " #For  loop  DPQC,  and  moving  clockwise,\n",
      " #R2*I1  -  R1*I2  =  V2  -  V1\n",
      " #Solving  Equations  by  using  determinants  gives\n",
      "d1  =  [[V2,  (R3  +  R4)],[(V2  -  V1),  -1*R1]]\n",
      "D1  =  numpy.linalg.det(d1)\n",
      "d2  =  [[(R2  +  R3  +  R4),  V2],[R2,  (V2  -  V1)]]\n",
      "D2  =  numpy.linalg.det(d2)\n",
      "d  =  [[(R2  +  R3  +  R4),  (R3  +  R4)],[R2,  -1*R1]]\n",
      "D  =  numpy.linalg.det(d)\n",
      "I1  =  D1/D\n",
      "I2  =  D2/D\n",
      " #the  short-circuit  current  Isc\n",
      "Isc  =  I2\n",
      " #The  impedance,  z,  \u2018looking  in\u2019  at  a  break  made  between  P  and  Q  is  given  by\n",
      "z  =  R1  +  R2*(R3  +  R4)/(R2  +  R3  +  R4)\n",
      " #The  Norton  equivalent  circuit  is  shown  in  Figure  33.66,  where  current  I  is  given  by\n",
      "R  =  2;#in  ohm\n",
      "I  =  (z/(z  +  R))*Isc\n",
      "Imag  =  abs(I)\n",
      "\n",
      "\n",
      "#Results\n",
      "print  \"\\n\\n  Result  \\n\\n\"\n",
      "print  \"\\n  the  magnitude  of  the  current  flowing  5  ohm  resistor  is  \",round(Imag,2),\"  A\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "  Result  \n",
        "\n",
        "\n",
        "\n",
        "  the  magnitude  of  the  current  flowing  5  ohm  resistor  is   0.19   A"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 15, page no. 595</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Determine the magnitude of the current flowing in the \t(1.8 + j4) ohm impedance connected between terminals A and B\n",
      "from __future__ import division\n",
      "import math\n",
      "import cmath\n",
      "#initializing  the  variables:\n",
      "E1  =  12;#  in  volts\n",
      "E2  =  24;#  in  volts\n",
      "Z1  =  3;#  in  ohm\n",
      "Z2  =  2;#  in  ohm\n",
      "R1  =  4j;#  in  ohm\n",
      "R2  =  1.8;#  in  ohm\n",
      "\n",
      "#calculation:\n",
      "Z3  =  R1  +  R2\n",
      " #For  the  branch  containing  the  E1  source,  conversion  to  a  Norton  equivalent  network  gives\n",
      "Isc1  =  E1/Z1\n",
      " #For  the  branch  containing  the  E2  source,  conversion  to  a  Norton  equivalent  circuit  gives\n",
      "Isc2  =  E2/Z2\n",
      " #Thus  Figure  33.73  shows  a  network  equivalent  to  Figure  33.72.  From  Figure  33.73,  \n",
      "    #the  total  short-circuit  current\n",
      "Isc  =  Isc1  +  Isc2\n",
      " #the  total  impedance  is  given  by\n",
      "z  =  Z1*Z2/(Z1  +  Z2)\n",
      " #Thus  Figure  33.73  simplifies  to  Figure  33.74.\n",
      " #The  open-circuit  voltage  across  AB  of  Figure  33.74,  E\n",
      "E  =  Isc*z\n",
      " #the  impedance  \u2018looking  in\u2019  at  AB,is  z\n",
      " #the  Th\u00b4evenin  equivalent  circuit  is  as  shown  in  Figure  33.75.\n",
      "R  =  1.8  +  4j;#  in  ohm\n",
      " #when  R  impedance  is  connected  to  terminals  AB  of  Figure  33.75,  the  current  I  flowing  is  given  by\n",
      "I  =  E/(z  +  R)\n",
      "Imag  =  abs(I)\n",
      "\n",
      "\n",
      "#Results\n",
      "print  \"\\n\\n  Result  \\n\\n\"\n",
      "print  \"\\n  the  magnitude  of  the  current  flowing  (1.8  +  i4)  ohm  resistor  is  \",round(Imag,2),\"  A\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "  Result  \n",
        "\n",
        "\n",
        "\n",
        "  the  magnitude  of  the  current  flowing  (1.8  +  i4)  ohm  resistor  is   3.84   A"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 16, page no. 596</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#determine the magnitude of the current flowing in the capacitive branch connected to terminals AB.\n",
      "from __future__ import division\n",
      "import math\n",
      "import cmath\n",
      "#initializing  the  variables:\n",
      "V1  =  5;#  in  volts\n",
      "V2  =  10;#  in  volts\n",
      "i  =  0.001;#  in  Amperes\n",
      "R1  =  1000;#  in  ohm\n",
      "R2  =  4000;#  in  ohm\n",
      "R3  =  2000;#  in  ohm\n",
      "R4  =  200;#  in  ohm\n",
      "R5  =  -1j*4000;#  in  ohm\n",
      "\n",
      " #calculation:  \n",
      " #For  the  branch  containing  the  V1  source,  conversion  to  a  Norton  equivalent  network  gives\n",
      "Isc1  =  V1/R1\n",
      "z1  =  R1\n",
      " #For  the  branch  containing  the  V2  source,  conversion  to  a  Norton  equivalent  circuit  gives\n",
      "Isc2  =  V2/R2\n",
      "z2  =  R2\n",
      " #Thus  the  circuit  of  Figure  33.76  converts  to  that  of  Figure  33.77.\n",
      " #The  above  two  Norton  equivalent  networks  shown  in  Figure  33.77  may  be  combined,  \n",
      "    #since  the  total  short-circuit  current  is\n",
      "Isc  =  Isc1  +  Isc2\n",
      " #the  total  impedance  is  given  by\n",
      "Z1  =  z1*z2/(z1  +  z2)\n",
      " #Both  of  the  Norton  equivalent  networks  shown  in  Figure  33.78  may  be  converted  to  Th\u00b4evenin  equivalent  circuits. \n",
      "    #Open-circuit  voltage  across  CD  is\n",
      "Ecd  =  Isc*Z1\n",
      " #the  impedance  \u2018looking  in\u2019  at  CD  is  Z1\n",
      " #Open-circuit  voltage  across  EF\n",
      "Eef  =  i*R3\n",
      " #the  impedance  \u2018looking  in\u2019  Figure  33.79  at  EF\n",
      "Z2  =  R3\n",
      " #Thus  Figure  33.78  converts  to  Figure  33.79.\n",
      " #Combining  the  two  Th\u00b4evenin  circuits  gives  e.m.f.\n",
      "E  =  Ecd  -  Eef\n",
      " #impedance  z\n",
      "z  =  Z1  +  Z2\n",
      " #the  Th\u00b4evenin  equivalent  circuit  for  terminals  AB  of  Figure  33.76  is  as  shown  in  Figure  33.80.\n",
      "Z3  =  R4  +  R5\n",
      " #If  an  impedance  Z3  is  connected  across  terminals  AB,  then  the  current  I  flowing  is  given  by\n",
      "I  =  E/(z  +  Z3)\n",
      "Imag  =  abs(I)\n",
      "\n",
      "\n",
      "#Results\n",
      "print  \"\\n\\n  Result  \\n\\n\"\n",
      "print  \"\\n  the  current  in  the  capacitive  branch  is  \",  Imag*1000,\"mA\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "  Result  \n",
        "\n",
        "\n",
        "\n",
        "  the  current  in  the  capacitive  branch  is   0.8 mA"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 17, page no. 597</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate the power dissipated in a \t(600 - j800) ohm impedance connected between A and B\n",
      "from __future__ import division\n",
      "import math\n",
      "import cmath\n",
      "#initializing  the  variables:\n",
      "V  =  5;#  in  volts\n",
      "i  =  0.004;#  in  Amperes\n",
      "R1  =  2000;#  in  ohm\n",
      "R2  =  1000j;#  in  ohm\n",
      "\n",
      "#calculation:  \n",
      " #Converting  the  Th\u00b4evenin  circuit  to  a  Norton  network  gives\n",
      "Isc1  =  V/R2\n",
      " #Thus  Figure  33.81  converts  to  that  shown  in  Figure  33.82.  \n",
      "    #The  two  Norton  equivalent  networks  may  be  combined,  giving\n",
      "Isc  =  Isc1  +  i\n",
      "z  =  R1*R2/(R1  +  R2)\n",
      " #This  results  in  the  equivalent  network  shown  in  Figure  33.83. \n",
      "    #Converting  to  an  equivalent  Th\u00b4evenin  circuit  gives  open  circuit  e.m.f.  across  AB,\n",
      "E  =  Isc*z\n",
      " #Thus  the  The\u00b4venin  equivalent  circuit  is  as  shown  in  Figure  33.84.\n",
      "R  =  600  -  800j;#  in  ohms\n",
      " #When  a  R  impedance  is  connected  across  AB,  the  current  I  flowing  is  given  by\n",
      "I  =  E/(z  +  R)\n",
      "Imag  =  abs(I)\n",
      " #the  power  dissipated  in  the  R  resistor  is\n",
      "PR  =  R.real*Imag**2\n",
      "\n",
      "\n",
      "#Results\n",
      "print  \"\\n\\n  Result  \\n\\n\"\n",
      "print  \"\\n  the  power  dissipated  in  the  (600  -  i800)  ohm  resistor  is  \",round(PR*1000,2),\"mW\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "  Result  \n",
        "\n",
        "\n",
        "\n",
        "  the  power  dissipated  in  the  (600  -  i800)  ohm  resistor  is   19.68 mW"
       ]
      }
     ],
     "prompt_number": 16
    }
   ],
   "metadata": {}
  }
 ]
}