summaryrefslogtreecommitdiff
path: root/sample_notebooks/SaurabhBarot/ch2.ipynb
blob: 79ba56c5ced6fe564e096c8ecf49f13645c773d9 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:883876eb2a3f623c02ca3c86ebd8020a1b244805e7be4ab0f882af58fcdc4d16"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 2 : MAGNETIC CIRCUITS"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.1  Page No : 89"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "#INPUT DATA\n",
      "N = 2000.;\t\t\t#no of turns\n",
      "I = 10.;\t\t\t#current in A\n",
      "Rm = 25.;\t\t\t#mean radius in cm\n",
      "d = 6.;\t\t\t#diameter of each turn in cm\n",
      "\n",
      "#CALCULATIONS \n",
      "MMF = N*I;\t\t\t#magneto motive force in A\n",
      "l = 2*math.pi*(Rm/100);\t\t\t#circumference of coli in m\n",
      "u = (4*math.pi*10**-7);\t\t\t#permeability (U = Ur*U0)\n",
      "a = (math.pi*d*d*10**-4)/4;\n",
      "reluctance = (l/(a*u));\t\t\t#reluctance in At/Wb\n",
      "flux = (MMF)/(reluctance);\t\t\t#flux in Wb\n",
      "fluxdensity = (flux/a);\t\t\t#flux density in Wb/m**2 or tesla\n",
      "\n",
      "#OUTPUT\n",
      "print \"Thus MMF, flux, flux density  are %d A, %g Wb , %g Wb/m**2 or Tesla respectively \"%(MMF,flux,fluxdensity);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Thus MMF, flux, flux density  are 20000 A, 4.52389e-05 Wb , 0.016 Wb/m**2 or Tesla respectively \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.2  Page No : 90"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "#Chapter-2, Example 2.2, Page 90\n",
      "\n",
      "#INPUT DATA\n",
      "phi = 5*10**-2;\t\t\t#flux in wb\n",
      "a = 0.2;\t\t\t#area of cross-section in m**2\n",
      "lg = 1.2*10**-2;\t\t\t#length of air gap in m\n",
      "ur = 1;\t\t\t#permeability\n",
      "u = ur*4*math.pi*10**-7;\t\t\t#permeability\n",
      "\n",
      "#CALCULATIONS \n",
      "B = (phi/a);\t\t\t#flux density in wb/sq.m\n",
      "H = (B/(4*math.pi*10**-7*ur));\t\t\t#magnetic flux density in A/m\n",
      "S = lg/(a*u);\t\t\t#reluctance of air gap in A/wb\n",
      "permeance = 1/S;\t\t\t#permenace in A/wb\n",
      "mmf_in_airgap = phi*S;\t\t\t#mmf in A\n",
      "\n",
      "#OUTPUT\n",
      "print \"Thus B, H,S, permeance, MMF in air gap  are %1.2f Wb/sq.m, %g A/m ,%f A/wb ,\\\n",
      "%g Wb/A %d A  respectively \"%(B,H,S,permeance,mmf_in_airgap);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Thus B, H,S, permeance, MMF in air gap  are 0.25 Wb/sq.m, 198944 A/m ,47746.482928 A/wb ,2.0944e-05 Wb/A 2387 A  respectively \n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.3  Page No : 90"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "#INPUT DATA\n",
      "phi = 0.1*10**-3;\t\t\t#flux in wb\n",
      "a = 1.7*10**-4;\t\t\t#area of cross-section in m**2\n",
      "lg = 0.5*10**-3;\t\t\t#length of air gap in m\n",
      "Rm = 15./2;\t\t\t#radius of ring in cm\n",
      "u0 = 4*math.pi*10**-7;\t\t\t#permeability in free space in henry/m\n",
      "N = 1500.;\t\t\t#no of turns of ring\n",
      "\n",
      "#CALCULATIONS \n",
      "B = (phi/a);\t\t\t#flux density in wb/sq.m\n",
      "H = (B/(4*math.pi*10**-7));\t\t\t#magnetic flux density in A/m\n",
      "ampere_turns_provided_fo = H*lg;\n",
      "total_ampere_turns_provi = N*1;\n",
      "Available_for_iron_path = N-(H*lg);\n",
      "length_of_iron_path = (2*Rm*math.pi*10**-2)-(lg);\t\t\t#length of iron path in m\n",
      "H_for_iron_path = ((N-(H*lg)))/(length_of_iron_path);\n",
      "ur = (B/(u0*H_for_iron_path));\t\t\t#relative permeability of iron\n",
      "\n",
      "#OUTPUT\n",
      "print \"Thus relative permeability of iron is %d\"%(ur);\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Thus relative permeability of iron is 174\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.4  Page No : 91"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "#INPUT DATA\n",
      "li = 0.5;\t\t\t#iron path length in m\n",
      "lg = 10.**-3;\t\t\t#length of air gap in m\n",
      "phi = 0.9*10**-3;\t\t\t#flux in wb\n",
      "a = 6.66*10**-4;\t\t\t#area of cross-section of iron in m**2\n",
      "N = 400.;\t\t\t#no of turns \n",
      "\n",
      "#CALCULATIONS \n",
      "B = (phi/a);\t\t\t#flux density in wb/sq.m\n",
      "Hg = (B/(4*math.pi*10**-7));\t\t\t#magnetic flux density in A/m\n",
      "AT_required = Hg*lg;\t\t\t#AT required for air path\n",
      "Hi = 1000;\t\t\t#magnetic flux density in A/m\n",
      "AT_required_for_iron_pat = Hi*li;\n",
      "total_AT_required = (Hg*lg)+(Hi*li);\n",
      "I = ((Hg*lg)+(Hi*li))/(N);\n",
      "\n",
      "#OUTPUT\n",
      "print \"Thus exciting current required is %1.2f A\"%(I);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Thus exciting current required is 3.94 A\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.5  Page No : 92"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "#Chapter-2, Example 2.5, Page 92\n",
      "\n",
      "#INPUT DATA\n",
      "r = 0.01;\t\t\t#radius in m\n",
      "lg = 10.**-3;\t\t\t#length of air gap in m\n",
      "Rm = (30./2)*10**-2;\t\t\t#mean radius in m\n",
      "ur = 800.;\t\t\t#relative permeability of iron\n",
      "ur2 = 1.;\t\t\t#relative permeability of air gap\n",
      "N = 250.;\t\t\t#no of turns\n",
      "phi = 20000.*10**-8;\t\t\t#flux in Wb\n",
      "u0 = 4*math.pi*10**-7;\t\t\t#permeability in free space \n",
      "a = math.pi*(r)**2;\t\t\t#area of cross-section in m\n",
      "leakage_factor = 1.1\n",
      "\n",
      "#CALCULATIONS \n",
      "reluctance_of_air_gap = (lg/(u0*ur2*a));\t\t\t#reluctance of air gap in A/wb\n",
      "li = (math.pi*(2*r)-(lg));\t\t\t#length of iron path in m\n",
      "reluctance_of_iron_path = ((math.pi*0.3)-(lg))/(4*math.pi*10**-7*800*a);\t\t\t#in A/wb\n",
      "total_reluctance = reluctance_of_air_gap+reluctance_of_iron_path;\t\t\t#in A/wb\n",
      "MMF = phi*total_reluctance;\t\t\t#in Ampere turns\n",
      "current_required = (MMF)/(N);\t\t\t#in A\n",
      "\n",
      "#OUTPUT\n",
      "print \"Thus current required is %1.2f A \"%(current_required);\n",
      "#Including leakage\n",
      "\n",
      "#CALCULATIONS\n",
      "MMF_of_airgap = phi*reluctance_of_air_gap;\t\t\t#in A/wb\n",
      "Total_flux_in_ironpath = leakage_factor*phi;\t\t\t#in Wb\n",
      "MMF_of_ironpath = Total_flux_in_ironpath*reluctance_of_iron_path;\t\t\t#in A\n",
      "Total_MMF = MMF_of_ironpath+MMF_of_airgap;\t\t\t#in A/wb\n",
      "current_required2 = Total_MMF/(N);\t\t\t#in A\n",
      "\n",
      "#OUTPUT\n",
      "print \"Thus current required is %1.3f A\"%(current_required2);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Thus current required is 4.41 A \n",
        "Thus current required is 4.650 A\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.6  Page No : 93"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "#INPUT DATA\n",
      "l1 = 0.1;\t\t\t#length in m\n",
      "l2 = 0.18;\t\t\t#length in m\n",
      "l3 = 0.18;\t\t\t#length in m\n",
      "lg = 1.*10**-3;\t\t\t#airgap length in mm\n",
      "a1 = 6.25*10**-4;\t\t\t#area in m**2\n",
      "a2 = 3.*10**-4;\t\t\t#area in m**2\n",
      "ur = 800.;\t\t\t#relative permeability of iron path\n",
      "ur2 = 1.;\t\t\t#relative permeability in free space\n",
      "u0 = 4*math.pi*10**-7\n",
      "N = 600.;\n",
      "phi = 10.**-4;\t\t\t#airgap flux in Wb\n",
      "\n",
      "#CALCULATIONS \n",
      "#for the airgap\n",
      "Bg = (phi/(a1));\t\t\t#fluxdensity in Tesla\n",
      "Hg = (Bg/(u0*ur2));\t\t\t#magnetimath.sing force in A/m\n",
      "MMF1 = Hg*lg;\t\t\t#in A\n",
      "#for path I1\n",
      "B1 = 0.16;\t\t\t# flux density in tesla\n",
      "H1 = (B1/(ur*u0));\t\t\t#magnetimath.sing force in A/m\n",
      "MMF2 = H1*l1;\t\t\t#in A\n",
      "#math.since paths l2 and l3 are similar,the total flux divide equally between these two paths.Since these paths are in parallel,consider only one of them\n",
      "#for path l2\n",
      "flux = 50*10**-6;\t\t\t#flux in wb\n",
      "B2 = (flux/a2);\t\t\t#fluxdensity in tesla\n",
      "H2 = (B2/(ur*u0));\t\t\t#magnetimath.sing force in A/m\n",
      "MMF3 = H2*l2;\t\t\t#in A\n",
      "totalmmf = MMF1+MMF2+MMF3;\t\t\t#in A\n",
      "I = (totalmmf/N);\t\t\t#current required in A\n",
      "\n",
      "#OUTPUT\n",
      "print \"Thus current required is %1.3f A\"%(I);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Thus current required is 0.288 A\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.7  Page No : 95"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "#Chapter-2, Example 2.7, Page 95\n",
      "\n",
      "#INPUT DATA\n",
      "Dm = 0.1\t\t\t#diameter in m\n",
      "a = 10.**-3;\t\t\t#area of cross-section im m**2\n",
      "N = 150.;\t\t\t#no of turns\n",
      "ur = 800.;\t\t\t#permeability of iron ring\n",
      "B = 0.1;\t\t\t#in Wb/m**2\n",
      "u0 = 4*math.pi*10**-7;\t\t\t#permeability of free space\n",
      "\n",
      "#CALCULATIONS \n",
      "S = (math.pi*Dm)/(a*ur*u0);\t\t\t#reluctance\n",
      "I = (B*a*S)/(N);\t\t\t#current in A\n",
      "\n",
      "#OUTPUT\n",
      "print \"Thus current is %f A\"%(I);"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Thus current is 0.208333 A\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.8  Page No : 95"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "#INPUT DATA\n",
      "l = 0.3;\t\t\t#length in m\n",
      "d = 1.5*10**-2;\t\t\t#diameter in m\n",
      "N = 900;\t\t\t#no of turns\n",
      "ur = 1;\t\t\t#relative permeability in free space\n",
      "u0 = 4*math.pi*10**-7;\t\t\t#permeability in free space\n",
      "I = 5;\t\t\t#current in A\n",
      "\n",
      "#CALCULATIONS \n",
      "a = (math.pi*(d)**2/4);\t\t\t#in m**2\n",
      "S = (l)/(a*ur*u0);\t\t\t#reluctance\n",
      "\n",
      "#OUTPUT\n",
      "print \"Thus reluctance is %f A/wb\"%(S);\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Thus reluctance is 1350949115.231170 A/wb\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.9  Page No : 95"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "#INPUT DATA\n",
      "lg = 10**-3;\t\t\t#length of air gap in m\n",
      "B = 0.9;\t\t\t#flux density in wb/m**2\n",
      "li = 0.3;\t\t\t#length of ironpath in m\n",
      "Hi = 800;\t\t\t#magnetic flux density in AT/m\n",
      "u0 = 4*math.pi*10**-7;\t\t\t#permeabilty in free space\n",
      "\n",
      "#CALCULATIONS \n",
      "#for iron path\n",
      "MMF_required1 = Hi*li;\t\t\t#magnetic motive force in AT\n",
      "#for air gap\n",
      "MMF_required2 = (B/u0)*lg;\t\t\t#magnetic motive force in AT\n",
      "Totalmmf = MMF_required1+MMF_required2\n",
      "\n",
      "#OUTPUT\n",
      "print \"Thus total MMF required is %d AT\"%(Totalmmf);\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Thus total MMF required is 956 AT\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.10  Page No : 96"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "#INPUT DATA\n",
      "li = 0.5;\t\t\t#length of iron ring mean length in m\n",
      "N = 220;\t\t\t#no of turns\n",
      "I = 1.2;\t\t\t#current in A\n",
      "lg = 1.2*10**-3;\t\t\t#length of airgap in m\n",
      "ur = 350;\t\t\t#relative permeability of iron\n",
      "u0 = 4*math.pi*10**-7;\t\t\t#permeability in free space\n",
      "\n",
      "#CALCULATIONS \n",
      "MMF_produced = N*I;\n",
      "Si = li/(u0*ur);\t\t\t#reluctance of iron path\n",
      "Sg = lg/(u0);\t\t\t#reluctance of air gap\n",
      "S = Si+Sg;\t\t\t#total reluctance \n",
      "Flux_density = (MMF_produced)/(S);\n",
      "\n",
      "#OUTPUT\n",
      "print \"Thus fluxdensity is %1.3f Wb/m**2\"%(Flux_density);\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Thus fluxdensity is 0.126 Wb/m**2\n"
       ]
      }
     ],
     "prompt_number": 10
    }
   ],
   "metadata": {}
  }
 ]
}