summaryrefslogtreecommitdiff
path: root/Fundamental_Electrical_and_Electronic_Principles/ch4.ipynb
blob: ffd2b0b93a2ef77db8f8b6779e91e79476de781e (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:354118d2fca7350165cb8c5d000bd36293e8da69f0cbb274034a02640d69b2e6"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 4: Magnetic Fields and Circuits"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.1, Page 116"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "A = 6e-04;                  # Cross-sectional area of pole face, metre-square\n",
      "phi = 30e-06;              # Flux, Wb\n",
      "\n",
      "#Calculations\n",
      "B = phi/A;                  # Flux density, T\n",
      "\n",
      "#Result\n",
      "print \"The flux density at the pole face = %2d mT\"%(B/1e-03)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The flux density at the pole face = 50 mT\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.2, Page 116"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "A = 45e-06;                    # Cross sectional area of pole face, metre-square\n",
      "B = 0.6;                      # Flux density, T\n",
      "\n",
      "#Calculations\n",
      "# Using formula B = phi/A, solving for phi\n",
      "phi = B*A;                   # Flux, Wb\n",
      "\n",
      "#Result\n",
      "print \"The flux produced by pole face = %2d micro-wWb\"%(phi/1e-06);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The flux produced by pole face = 27 micro-wWb\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.3, Page 117"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "N = 1500;                      # Number of turns in a coil\n",
      "A = 5e-04;                     # Cross- sectional area of of coil, metre-square\n",
      "phi = 0.2e-03;                 # Flux, Wb\n",
      "I = 0.75;                      # Coil-current, A\n",
      "\n",
      "#Calculations\n",
      "# Since m.m.f is the product of the current and the number of turns, therefore, we have\n",
      "F = N*I;                      # Magnetomotive force, At\n",
      "B = phi/A;                    # Flux density, T\n",
      "\n",
      "#Result\n",
      "print \"The m.m.f and flux density produced are %4d At and %3.1f T respectively\"%(F, B);\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The m.m.f and flux density produced are 1125 At and 0.4 T respectively\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.4, Page 117"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "N = 600;                      # Number of turns in a coil\n",
      "F = 1500.;                      # Magnetomotive force, At\n",
      "\n",
      "#Calculations\n",
      "# Since magnetomotive force,F = N*I, solving for I\n",
      "I = F/N;                      # Excitation-current, A\n",
      "\n",
      "#Result\n",
      "print \"The excitation current required = %3.1f A\"%I;\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The excitation current required = 2.5 A\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.5, Page 118"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "I = 0.4;                  # Current, A\n",
      "N = 550;                  # Number of turns in a coil\n",
      "d = 8e-02;                # Diameter, m\n",
      "l = (math.pi*d);              # Average length of the magnetic circuit, m\n",
      "\n",
      "#Calculations\n",
      "# Since magnetic field strength is defined as the mmf per metre length of the magnetic circuit, therefore, we have\n",
      "H = (N*I)/l;                # Magnetic field strength, At/m\n",
      "\n",
      "#Result\n",
      "print \"The magnetic field strength inside the toroid = %6.2f At/m\"%H\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The magnetic field strength inside the toroid = 875.35 At/m\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.6, Page 120"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "A = 15e-04;                   # Cross-sectional area of core, metre-square\n",
      "mew_r1 = 65;                  # Relative permeability of core\n",
      "phi_1 = 2e-04;                # Flux, Wb\n",
      "mew_r2 = 800.;                 # Changed relative permeability of core\n",
      "\n",
      "#Calculations\n",
      "B_1 = phi_1/A;                # Flux density, T\n",
      "mew_r = mew_r2/mew_r1;        # Relative permeability of core\n",
      "# Since cross-sectional area of core A remains constant, therefore, we have mew_r = B_1/B_2 , solving for B_2\n",
      "B_2 = mew_r*B_1;              #  New flux density, T\n",
      "# Since B_2 = phi_2/A, solving for phi_2\n",
      "phi_2 = B_2*A;                # New flux, Wb\n",
      "\n",
      "#Result\n",
      "print \"The new flux and flux density are %5.3f mWb and %5.3f T respectively\"%(phi_2/1e-03, B_2);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The new flux and flux density are 2.462 mWb and 1.641 T respectively\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.7, Page 120"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "r = 0.04;                           # Mean radius of torod, m\n",
      "A = 3e-04;                          # Csa of toroid, m^2\n",
      "mew_o = 4*(math.pi)*1e-07;              # Permeability of free space\n",
      "mew_r = 150;                        # Relative permeability of toroid\n",
      "N = 900;                            # Number of turns on coil\n",
      "I = 1.5;                            # Coil current, A\n",
      "l = 2*(math.pi)*r;                      # Effective length of toroid, m\n",
      "\n",
      "#Calculations&Results\n",
      "# Part (a)\n",
      "# Since m.m.f is the product of the current and the number of turns, therefore, we have\n",
      "F = N*I;                            # Magnetomotive force, At\n",
      "print \"The m.m.f of toroid = %4d At\"%F\n",
      "\n",
      "# Part (b)\n",
      "# Since magnetic field strength is defined as the mmf per metre length of the magnetic circuit, therefore, we have\n",
      "H = F/l;                               # Magnetic field strength, At/m\n",
      "print \"The magnetic field strength = %6.1f At/m\"%H;\n",
      "\n",
      "# Part (c)\n",
      "B = (mew_r*mew_o*H);                   # Flux density, T\n",
      "phi = B*A;                             # Flux, Wb\n",
      "print \"The flux and flux density are %6.2f micro-weber and %6.4f T respectively\"%(phi/1e-06,B)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The m.m.f of toroid = 1350 At\n",
        "The magnetic field strength = 5371.5 At/m\n",
        "The flux and flux density are 303.75 micro-weber and 1.0125 T respectively\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.8, Page 120"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "r = 3e-02;                            # Radius of toroid, m\n",
      "A = 4.5e-04;                          # Cross-sectional area of toroid, metre-square\n",
      "N = 500;                              # Number of turns \n",
      "phi = 250e-06;                        # Flux, Wb\n",
      "mew_o = 4*(math.pi)*(1e-07);              # Permeability of free space\n",
      "mew_r = 300;                          # Relative permeability\n",
      "\n",
      "#Calculations\n",
      "l = 2*(math.pi)*r;                        # Effective length, m\n",
      "B = phi/A;                            # Flux density, T\n",
      "# Since B = (mew_r)*(mew_o)*H, solving for H\n",
      "H = B /((mew_r)*(mew_o));              # Magnetic field strength, At/m\n",
      "# Since H = F/l, solving for F\n",
      "F = H*l;                               # Magnetomotive force, At\n",
      "# Since mmf,F = N*I, solving for I\n",
      "I = F/N;                               # Electric current, A\n",
      "\n",
      "#Result\n",
      "print \"The value of current needs to be passed through the coil = %4.2f A\"%I\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of current needs to be passed through the coil = 0.56 A\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.9, Page 121"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "# Part (a)\n",
      "I = 0.2;                    # Electric current, A\n",
      "l = 5e-02;                  # Effective length, m\n",
      "A = 7e-04;                  # Cross-sectional area, metre-square\n",
      "d = 0.5e-03;                # Diameter, m\n",
      "mew_r = 1;                  #Relative permeability for wood\n",
      "\n",
      "#Calculations\n",
      "mew_o = 4*(math.pi)*1e-07;      # Permeability for free space\n",
      "N = l/d;                    # Number of turns \n",
      "# Since mmf is the product of the current and the number of turns, therefore, we have\n",
      "F = N*I;                     # Magnetomotive force, At\n",
      "# Part (b)\n",
      "# Since magnetic field strength is defined as the mmf per metre length of the magnetic circuit, therefore, we have\n",
      "H = F/l;                               # Magnetic field strength, At/m\n",
      "B = ( mew_r * mew_o * H );             #  Flux density, T\n",
      "# Part (c)\n",
      "phi = B * A;                           # Flux, Wb\n",
      "\n",
      "#Result\n",
      "print \"The mmf produced = %2d At\"%F\n",
      "print \"The flux density produced = %3d micro-tesla\"%(B/1e-06);\n",
      "print \"The flux produced = %5.3f micro-weber\"%(phi/1e-06);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The mmf produced = 20 At\n",
        "The flux density produced = 502 micro-tesla\n",
        "The flux produced = 0.352 micro-weber\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.10, Page 125"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "N = 1000;                                     # Number of turns on coil\n",
      "r = 0.1;                                      # Mean radius of toroid, m\n",
      "phi = 0.1775e-03;                             # Flux density(value from graph), Wb\n",
      "A = math.pi*1e-04;                               # Csa of toroid, m^2\n",
      "H = 88;                                       # Magnetic field strength(value from graph), At/m\n",
      "B = phi/A;                                    # Flux density, T\n",
      "\n",
      "#Calculations&Results\n",
      "# Part (a)\n",
      "l = 2*math.pi*r;                                  # Effective length of toroid, m\n",
      "# Since H = (N*I)/l, solving for I\n",
      "I = (H*l)/N ;                                 # Electric current in coil, A\n",
      "print \"Coil current = %4.1f mA\"%(I/1e-03);\n",
      "\n",
      "# Part (b)\n",
      "mew_o = 4*(math.pi)*1e-07;                        # Permeability for free space\n",
      "# Since B = mew_o * mew_r * H, solving for mew_r\n",
      "mew_r = B/(mew_o*H);                         #Relative permeability of toroid\n",
      "print \"The relative permeability of toroid = %4d\"%mew_r;\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Coil current = 55.3 mA\n",
        "The relative permeability of toroid = 5109\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.11, Page 125"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "mew_o = 4*(math.pi)*1e-07;          # Permeability for free space\n",
      "l = 0.15;                       # Mean length, m\n",
      "N = 2500;                      # Number of turns\n",
      "I = 0.3;                       # Electric current, A\n",
      "\n",
      "#Calculations\n",
      "# Since magnetic field strength is defined as the mmf per metre length of the magnetic circuit, therefore, we have\n",
      "H = (N*I)/l;                   # Magnetic field strength, At/m\n",
      "B = 0.75;                      # Flux density( value taken from graph ), T\n",
      "# Since B = ( mew_r * mew_o * H ), solving for mew_r\n",
      "mew_r = B/(mew_o * H);               # Relative permeability\n",
      "\n",
      "#Results\n",
      "print \"The flux density of given toroid = %3.2f T \"%B\n",
      "print \"The relative permeability of given toroid = %5.1f\"%mew_r\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The flux density of given toroid = 0.75 T \n",
        "The relative permeability of given toroid = 119.4\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.12, Page 126"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "mew_o = 4*(math.pi)*1e-07;              # Permeability for free space\n",
      "l = 0.1875;                         # Mean length, m\n",
      "A = 8e-05;                          # Cross- sectional area of of coil, metre-square\n",
      "N = 750;                            # Number of turns\n",
      "phi = 112e-06;                      # Flux, Wb\n",
      "l_gap = 0.5e-03;                    # Average length of the magnetic circuit,m\n",
      "B = phi/A;                          # Flux density, Wb\n",
      "H = 2000;                           # Magnetic field strength( value taken from graph ), At/m\n",
      "\n",
      "#Calculations\n",
      "F_Fe = H*l;                         # The m.m.f in the iron part of the circuit, At\n",
      "# Since F = I*N, solving for I\n",
      "I = F_Fe/N;                         # Coil current under normal conditions, A\n",
      "# Since B = mew_o * H_gap, solving for H_gap\n",
      "H_gap = B/mew_o;                    # Magnetic field strength, At/m\n",
      "# Since H_gap = F_gap/l_gap, solving for F_gap\n",
      "F_gap = H_gap * l_gap;              # The mmf in the air part of the circuit, At\n",
      "F = F_Fe + F_gap;                  # Total circuit mmf, At\n",
      "I_new = F/N;                       # Current required to maintain the flux at its original value, A\n",
      "\n",
      "#Results\n",
      "print \"The coil current required to produce a flux of %3d micro-weber in the toroid = %3.1f A \"%(phi/1e-06, I);\n",
      "print \"Current required to maintain the flux at its original value = %5.3f A\"%(I_new);\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The coil current required to produce a flux of 112 micro-weber in the toroid = 0.5 A \n",
        "Current required to maintain the flux at its original value = 1.243 A\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.13, Page 127"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "l_A = 0.25;                  # Mean length of circuit A, m\n",
      "l_B = 0.15;                  # Mean length of circuit A, m\n",
      "A_A = 11.5e-04;              # Cross-sectional area of circuit A, metre-square\n",
      "A_B = 12e-04;                # Cross-sectional area of circuit B, metre-square\n",
      "phi = 1.5e-03;               # Flux, Wb\n",
      "N = 1000;                    # Number of turns\n",
      "\n",
      "#Calculations\n",
      "B_A = phi/A_A;              # Flux density linked with circuit A, T\n",
      "B_B = phi/A_B;              # Flux density linked with circuit B, T\n",
      "H_A = 1470;                 # Magnetic field strength of circuit A( value taken from graph ), At/m\n",
      "H_B = 845;                  # Magnetic field strength of circuit B( value taken from graph ), At/m\n",
      "# Since H = F/l, solving for F \n",
      "F_A = H_A * l_A;                # Magnetic field strength of circuit A, At/m\n",
      "F_B = H_B * l_B;                # Magnetic field strength of circuit B, At/m\n",
      "F = F_A + F_B;                   # Total circuit m.m.f, At/m\n",
      "I = F/N;                          # Coil current, A\n",
      "\n",
      "#Result\n",
      "print \"Coil current in the magnetic circuit = %5.3f A\"%I\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Coil current in the magnetic circuit = 0.494 A\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.14, Page 130"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "A = 8e-04;                                # Cross-sectional area, metre-square\n",
      "d = 24e-02;                               # Mean diameter of iron ring, m \n",
      "phi = 1.2e-03;                            # Flux, Wb\n",
      "mew_r = 1200;                             # Relative permeability\n",
      "mew_o = 4*(math.pi)*1e-07;                   # Permeability for free space\n",
      "mew_air = 1;                             # Permeability for air\n",
      "l_gap = 3e-03;                           # Mean length, m\n",
      "\n",
      "#Calculations\n",
      "l_Fe = (math.pi) * d;                        # Mean length of iron circuit, m\n",
      "S_Fe = l_Fe/(mew_r * mew_o *A);          # Reluctance of iron circuit, At/Wb\n",
      "S_gap = l_gap/(mew_air * mew_o *A);        # Reluctance of gap, At/Wb\n",
      "S = S_Fe + S_gap;                        # Total circuit reluctance, At/Wb\n",
      "# Since phi = F/S, solving for F\n",
      "F = phi*S;                               # Magnetomotive force, At\n",
      "\n",
      "#Result\n",
      "print \"The required mmf = %5.1f At\"%F\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The required mmf = 4331.0 At\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.15, Page 130"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "N = 500;                                       # Number of turns on first section's coil\n",
      "phi = 2e-03;                                   # Flux produced by first section, Wb\n",
      "l_1 = 85e-02;                                  # Length of first section, m\n",
      "l_2 = 65e-02;                                  # Length of second section, m\n",
      "l_3 = 0.1e-02;                                 # Length of third section, m\n",
      "A_1 = 10e-04;                                  # Csa of first section, m^2\n",
      "A_2 = 15e-04;                                  # Csa of second section, m^2\n",
      "A_3 = 12.5e-04;                                # Csa of second section, m^2\n",
      "mew_o = 4*(math.pi)*1e-07;                         # Permeability for free space\n",
      "mew_r1 = 600;                                  # Relative permeability of first section\n",
      "mew_r2 = 950;                                  # Relative permeability of second section\n",
      "mew_r3 = 1;                                    # Relative permeability of third section\n",
      "\n",
      "#Calculations&Results\n",
      "# Part (a)\n",
      "S_1 = l_1/(mew_r1 * mew_o * A_1);              # Reluctance of first section, At/Wb\n",
      "S_2 = l_2/(mew_r2 * mew_o * A_2);              # Reluctance of first section, At/Wb\n",
      "S_3 = l_3/(mew_r3 * mew_o * A_3);              # Reluctance of first section, At/Wb\n",
      "S = S_1 + S_2 + S_3;                           # Total reluctance of the circuit, At/Wb\n",
      "print \"Total reluctance of the circuit = %4.2fe+06 At/Wb\"%(S*1e-06);\n",
      "\n",
      "# Part (b)\n",
      "# Since phi = F/S, solving for F\n",
      "F = phi*S;                                    # Magnetomotive force, At\n",
      "# Since F = N*I, solving for I\n",
      "I = F/N;                                      # Electric current in first section, A\n",
      "print \"Electric current in first section = %4.2f A\"%I\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Total reluctance of the circuit = 2.13e+06 At/Wb\n",
        "Electric current in first section = 8.51 A\n"
       ]
      }
     ],
     "prompt_number": 16
    }
   ],
   "metadata": {}
  }
 ]
}