summaryrefslogtreecommitdiff
path: root/Engineering_Physics_Malik/Chapter_18.ipynb
blob: de6fffda467077c6d60584ca3a9943ec1fea2a37 (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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 18: Magnetic Properties of Solids"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.1, Page 18.21"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import *\n",
      "\n",
      "# Given \n",
      "r = 0.53e-10 # radius of orbit in m\n",
      "f = 6.6e15 # frequency of revolution in Hz\n",
      "h = 6.6e-34 # Planck constant in J sec\n",
      "e = 1.6e-19 # charge on an electron in C\n",
      "m = 9.1e-31 # mass of electron in kg\n",
      "\n",
      "#Calculations\n",
      "M = e * f * pi * r**2\n",
      "mu = (e * h) / (4 * pi * m) \n",
      "\n",
      "#Result\n",
      "print \"Magnetic moment is %.3e Am^2\\nBohr magneton is %.2e J/T\"%(M,mu)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Magnetic moment is 9.319e-24 Am^2\n",
        "Bohr magneton is 9.23e-24 J/T\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.2, Page 18.21"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import *\n",
      "\n",
      "# Given \n",
      "X = -4.2e-6 # magnetic susceptibility\n",
      "H = 1.19e5 # magnetic field in A/m\n",
      "mu_ = 4 * pi * 1e-7 # magnetic permeability of space\n",
      "\n",
      "#Calculations\n",
      "I = X * H\n",
      "B = mu_ * (H + I)\n",
      "mur = (1 + I/H)\n",
      "\n",
      "#Results\n",
      "print \"Magnetisation is %.2f A/m\\nFlux density is %.3f T\\nRelative permeability is %.2f\"%(I,B,mur)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Magnetisation is -0.50 A/m\n",
        "Flux density is 0.150 T\n",
        "Relative permeability is 1.00\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.3, Page 18.22"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "# Given \n",
      "X = 1.2e-5 # magnetic susceptibility of magnesium\n",
      "\n",
      "#Calculations\n",
      "p = 100 * X\n",
      "\n",
      "#Result\n",
      "print \"Percentage increase in magnetic induction is %.4f percent\"%p"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Percentage increase in magnetic induction is 0.0012 percent\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.4, Page 18.22"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import *\n",
      "\n",
      "# Given \n",
      "X = -0.4e-5 # magnetic susceptibility of material\n",
      "H = 1e4 # magnetic field in A/m\n",
      "mu_ = 4 * pi * 1e-7 # magnetic permittivity of space\n",
      "\n",
      "#Calculations\n",
      "I = X * H\n",
      "B = mu_ * (H + I)\n",
      "\n",
      "#Result\n",
      "print \"Magnetisation is %.2f A/m\\nMagnetic flux density is %f T\"%(I,B)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Magnetisation is -0.04 A/m\n",
        "Magnetic flux density is 0.012566 T\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.5, Page 18.23"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import *\n",
      "\n",
      "# Given \n",
      "X = 2.3e-5 # magnetic susceptibility of aluminium\n",
      "mu_ = 4 * pi * 1e-7 # magnetic permeability of space\n",
      "\n",
      "#Calculations\n",
      "mur = 1 + X\n",
      "mu = mu_ * mur\n",
      "\n",
      "#Result\n",
      "print \"Permeability of aluminium is %.2e N/A^2\"%mu"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Permeability of aluminium is 1.26e-06 N/A^2\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.6, Page 18.23"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import pi\n",
      "\n",
      "# Given \n",
      "X = 9.4e-2 # magnetic susceptibility\n",
      "mu_ = 4 * pi * 1e-7 # magnetic permeability of space\n",
      "\n",
      "#Calculations\n",
      "mu_r = 1 + X\n",
      "mu = mu_ * mu_r\n",
      "\n",
      "#Results\n",
      "print \"Absolute permeability is %.2e N/A^2\\nRelative permeability is %.3f\"%(mu,mu_r)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Absolute permeability is 1.37e-06 N/A^2\n",
        "Relative permeability is 1.094\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.7, Page 18.23"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import *\n",
      "\n",
      "# Given \n",
      "mu = 0.126 # maximum value of the permeability in N/A^2\n",
      "mu_ = 4 * pi * 1e-7 # magnetic permeability of space\n",
      "\n",
      "#Calculations\n",
      "mu_r = mu / mu_\n",
      "X = mu_r - 1\n",
      "\n",
      "#Results\n",
      "print \"Magnetic susceptibility is %.f\\nRelative permeability is %e\"%(X,mu_r)\n",
      "#Answers differ due to rounding off values"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Magnetic susceptibility is 100267\n",
        "Relative permeability is 1.002676e+05\n"
       ]
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.8, Page 18.24"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import pi\n",
      "\n",
      "# Given \n",
      "r = 0.6e-10 # radius of the atom\n",
      "N = 28e26 # no. of electron in per m^3\n",
      "mu_ = 4 * pi * 1e-7 # magnetic permeability of space\n",
      "Z = 2 # atomic no. of helium\n",
      "m = 9.1e-31 # mass of an electron in kg\n",
      "e = 1.6e-19 # charge on an electron in C\n",
      "\n",
      "#Calculations\n",
      "Chi = -(mu_ * Z * N * r**2 * e**2) / (6 * m)\n",
      "\n",
      "#Result\n",
      "print \"Diamagnetic susceptibility is %.3e\"%Chi"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Diamagnetic susceptibility is -1.188e-07\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.9, Page 18.24"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import pi\n",
      "\n",
      "# Given \n",
      "H = 1e3 # magnetisation field in A/m\n",
      "phi = 2e-5 # magnetic flux in Weber\n",
      "a = 0.2e-4 # area of cross section in m^2\n",
      "mu_ = 4 * pi * 1e-7 # magnetic permeability of space\n",
      "\n",
      "#Calculations\n",
      "B = phi / a\n",
      "mu = B / H\n",
      "X = mu / mu_ - 1\n",
      "\n",
      "#Results\n",
      "print \"Permeability is %.e N/A^2\\nSusceptibility is %.3f\"%(mu,X)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Permeability is 1e-03 N/A^2\n",
        "Susceptibility is 794.775\n"
       ]
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.10, Page 18.24"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "# Given \n",
      "l = 1 # length of iron rod in m\n",
      "a = 4e-4 # area in m^2\n",
      "mu = 50e-4 # permeability of iron in H/m\n",
      "Phi = 4e-4 # magnetic flux in Weber\n",
      "\n",
      "#Calculations\n",
      "B = Phi / a\n",
      "NI = B / mu\n",
      "\n",
      "#Result\n",
      "print \"Number of ampere turns is %d A/m\"%NI"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Number of ampere turns is 200 A/m\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.11, Page 18.25"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import *\n",
      "\n",
      "# Given \n",
      "n = 200 # no. of turns \n",
      "l = 0.5 # the mean length of iron wire in m\n",
      "phi = 4e-4 # magnetic flux in Weber\n",
      "a = 4e-4 # area of cross section in m^2\n",
      "mu = 6.5e-4 # permeability of iron in wb/Am\n",
      "mu_ = 4 * pi * 1e-7 # magnetic permeability of space\n",
      "\n",
      "#Calculations\n",
      "B = phi / a\n",
      "N = n / l\n",
      "I = B / (mu * N)\n",
      "\n",
      "#Result\n",
      "print \"Current through the winding is %.2f A\"%I"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Current through the winding is 3.85 A\n"
       ]
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.12, Page 18.25"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import pi\n",
      "\n",
      "# Given \n",
      "X = -5.6e-6 # magnetic susceptibility of material\n",
      "a = 2.55e-10 # lattice constant in m\n",
      "H = 1e4 # magnetic field in A/m\n",
      "mu_ = 4 * pi * 1e-7 # magnetic permittivity of space\n",
      "m = 9.1e-31 # mass of electron in kg\n",
      "e = 1.6e-19 # charge in an electron in C\n",
      "\n",
      "#Calculations\n",
      "N = 2 / a**3\n",
      "z = 1 \n",
      "R = ((-X * 6 * m) / (mu_ * z * e**2 * N))**(1./2)\n",
      "\n",
      "#Result\n",
      "print \"Radius of  atom is %.2f A\"%(R * 1e10)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Radius of  atom is 0.89 A\n"
       ]
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.13, Page 18.25"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import pi\n",
      "\n",
      "# Given \n",
      "N = 6.5e25 # no. of atom per m^3\n",
      "T = 300 # room temperature in K\n",
      "mu_ = 4 * pi * 1e-7 # magnetic permittivity of space\n",
      "k = 1.38e-23 # Boltzmann's constant in J/K\n",
      "m = 9.1e-31 # mass of electron in kg\n",
      "e = 1.6e-19 # charge in an electron in C\n",
      "h = 6.62e-34 # Planck constant in J sec\n",
      "\n",
      "#Calculations\n",
      "M = (e * h) / (4 * pi * m)\n",
      "X = (mu_ * N * M**2) / (3 * k * T)\n",
      "\n",
      "#Result\n",
      "print \"Susceptibility is %.3e\"%X"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Susceptibility is 5.642e-07\n"
       ]
      }
     ],
     "prompt_number": 24
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.14, Page 18.26"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import *\n",
      "\n",
      "# Given \n",
      "w = 168.5 # molecular weight \n",
      "d = 4370 # density of material in kg/m^3\n",
      "H = 2e5 # magnetic field in A/m\n",
      "T = 300 # room temperature in K\n",
      "mu_ = 4 * pi * 1e-7 # magnetic permittivity of space]\n",
      "NA = 6.02e26 # Avogadro no. in per kg\n",
      "mu_b = 9.24e-24 # Bohr magnetons in Am^2\n",
      "k = 1.38e-23 # Boltzmann's constant in J/K\n",
      "\n",
      "#Calculations\n",
      "N = d * NA / w\n",
      "X = (mu_ * N * (2 * mu_b)**2) / (3 * k * T)\n",
      "I = X * H\n",
      "\n",
      "#Result\n",
      "print \"Magnetisation is %.2f A/m\"%I"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Magnetisation is 107.89 A/m\n"
       ]
      }
     ],
     "prompt_number": 25
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.15, Page 18.26"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "# Given that\n",
      "A = 2500 # area of hysteresis loop \n",
      "m = 10000 # weight in kg\n",
      "d = 7.5 # density of material in g/cm^3\n",
      "f = 50 # frequency in Hz\n",
      "\n",
      "#Calculations\n",
      "E = f * A * 3600\n",
      "V = m / d\n",
      "L = E * V\n",
      "\n",
      "#Result\n",
      "print \"Total loss of energy per hour is %.e ergs\"%L"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Total loss of energy per hour is 6e+11 ergs\n"
       ]
      }
     ],
     "prompt_number": 26
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.16, Page 18.27"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "# Given \n",
      "H = 5e3 # coercivity in A/m\n",
      "l = 0.10 # length of solenoid in m\n",
      "n = 50 # no. of turns \n",
      "\n",
      "#Calculations\n",
      "N = n / l\n",
      "i = H / N\n",
      "\n",
      "#Result\n",
      "print \"Current in solenoid should be %d A\"%i"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Current in solenoid should be 10 A\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.17, Page 18.27"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "# Given \n",
      "l = 0.50 # length of iron rod in m\n",
      "a = 4e-4 # area of cross section of rod in m^2\n",
      "mu = 65e-4 # permeability of iron in H/m\n",
      "fi = 4e-5 # flux in weber \n",
      "\n",
      "#Calculations\n",
      "B = fi / a\n",
      "H = B / mu\n",
      "N = H * l\n",
      "\n",
      "#Result\n",
      "print \"Number of turns are %.2f\"%N"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Number of turns are 7.69\n"
       ]
      }
     ],
     "prompt_number": 27
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.18, Page 18.27"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import *\n",
      "\n",
      "# Given \n",
      "H = 600 # magnetic flux in A/m\n",
      "a = 0.2e-4 # area of cross section of rod in m^2\n",
      "phi = 2.4e-5 # flux in weber \n",
      "mu_ = 4*pi * 1e-7 # permeability of space in N/A^2\n",
      "\n",
      "#Calculations\n",
      "B = phi / a\n",
      "mu = B / H\n",
      "X = mu / mu_ - 1\n",
      "\n",
      "#Result\n",
      "print \"Permeability is %.3f N/A^2\\nSusceptibility is %.f\"%(mu,X)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Permeability is 0.002 N/A^2\n",
        "Susceptibility is 1591\n"
       ]
      }
     ],
     "prompt_number": 28
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.19, Page 18.28"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import *\n",
      "\n",
      "# Given \n",
      "X = 9.5e-9 # susceptibility of medium \n",
      "mu_ = 4*pi * 1e-7 # permeability of space in N/A^2\n",
      "\n",
      "#Calculations\n",
      "mu = mu_ * (1 + X)\n",
      "mu_r = mu / mu_\n",
      "\n",
      "#Result\n",
      "print \"Relative permeability is 1 + %.3e\"%(mu_r -1)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Relative permeability is 1 + 9.500e-09\n"
       ]
      }
     ],
     "prompt_number": 32
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.20, Page 18.28"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "# Given \n",
      "a = 250. # area of the B-H loop in J/m^3\n",
      "f = 50. # frequency in Hz\n",
      "d = 7.5e3 # density of iron in kg/m^3\n",
      "m = 100. # mass of core in kg\n",
      "\n",
      "#Calculations\n",
      "V = m / d\n",
      "n = 3600 * f\n",
      "A = a * V * n\n",
      "\n",
      "\n",
      "#Result\n",
      "print \"Energy loss per hour is %.3e J\"%A\n",
      "#Answer varies due to rounding-off values"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Energy loss per hour is 6.000e+05 J\n"
       ]
      }
     ],
     "prompt_number": 37
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.21, Page 18.28"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "# Given \n",
      "B_max = 1.375 # maximum value of B in Wb/m^2\n",
      "a = 0.513 # area of the loop in cm^2\n",
      "k = 1000 # value of 1 cm on x axis in A/m\n",
      "k_ = 1 # value of 1 cm on y axis in Wb/m^2\n",
      "B = 1.375 # alternating magnetic flux density in Wb/m^2\n",
      "v = 1e-3 # volume of specimen in m^3\n",
      "f = 50 # frequency in Hz\n",
      "\n",
      "#Calculations\n",
      "K = a * k * k_\n",
      "L = K * v * f\n",
      "\n",
      "#Result\n",
      "print \"Hysteresis loss per sec is %.2f W\"%L"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Hysteresis loss per sec is 25.65 W\n"
       ]
      }
     ],
     "prompt_number": 38
    }
   ],
   "metadata": {}
  }
 ]
}