summaryrefslogtreecommitdiff
path: root/Electric_Machines_by_Nagrath_&_Kothari/Chapter02.ipynb
blob: ada20973f2e5d5c70f2a21a7abf6159ddc2ecf63 (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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 02 : Magnetic Circuits and Induction"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.1, Page No 148"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "\n",
      "from pylab import *\n",
      "import math\n",
      "#initialisation of variables\n",
      "U_o=4*math.pi*10**-7\n",
      "U_r=6000\n",
      "l_g=0.0006\n",
      "l_c=.40\n",
      "A_c=.04*.04\n",
      "B_c=1.2\n",
      "N=600\n",
      "\n",
      "#Calculataions\n",
      "i=(1/(U_o*N))*(((B_c*l_c)/U_r)+(B_c*l_g))\n",
      "phi=B_c*A_c\n",
      "lmda=N*phi\n",
      "A_g=(.04+l_g)**2\n",
      "B_g=phi/A_g\n",
      "\n",
      "#Results\n",
      "print(\"Neglecting fringing,current(A)=%.2f ohm\" %i)\n",
      "print(\"Flux(Wb)=%.4f \" %phi)\n",
      "print(\"Flux linkages(Wb-turns)=%.2f \" %lmda)\n",
      "print(\"Fringing taken into account,current(A)=%.2f \" %B_g)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Neglecting fringing,current(A)=1.06 ohm\n",
        "Flux(Wb)=0.0019 \n",
        "Flux linkages(Wb-turns)=1.15 \n",
        "Fringing taken into account,current(A)=1.16 \n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.2, Page No 149"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "import math\n",
      "#Calculation of current reqd to produce flux in the given magnetic circuit.\n",
      "\n",
      "U_o=4*math.pi*10**-7\n",
      "U_r=4000\n",
      "N=600\n",
      "l_c=.30\n",
      "l_g=0\n",
      "dia=.02\n",
      "phi=.5*10**-3        #flux\n",
      "\n",
      "#Calculations\n",
      "A=(math.pi/4)*dia**2\n",
      "i=0;\n",
      "R=((l_c/U_r)+l_g)/(U_o*A)\n",
      "i=(phi*R)/N\n",
      "\n",
      "print(\"no air gap current(A) =%.4f \" %i)\n",
      "#l_g=0.001\n",
      "R=((l_c/U_r)+l_g)/(U_o*A)\n",
      "i=(phi*R)/N\n",
      "print(\"no air gap current(A) =%.4f \" %i)\n",
      "\n",
      "B_g=phi/A\n",
      "print(\"B(T) =%.4f \" %B_g)\n",
      "H_g=B_g/U_o\n",
      "\n",
      "AT_g=H_g*0.001\n",
      "\n",
      "print(\"AT_g =%.4f \" %AT_g)\n",
      "\n",
      "H_c=3000\n",
      "AT_c=H_c*0.30\n",
      "print(\"AT_c =%.4f \" %AT_c)\n",
      "\n",
      "i=(AT_g+AT_c)/N\n",
      "\n",
      "#Results\n",
      "print(\"from magnetisation data, current(A) =%.4f \" %i)\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "no air gap current(A) =0.1583 \n",
        "no air gap current(A) =0.1583 \n",
        "B(T) =1.5915 \n",
        "AT_g =1266.5148 \n",
        "AT_c =900.0000 \n",
        "from magnetisation data, current(A) =3.6109 \n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.3, Page No 149"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "#Determination of mmf of the exciting coil\n",
      "\n",
      "U_o=4*math.pi*10**-7\n",
      "A1=.0001\n",
      "A2=.0002\n",
      "l1=.025*10**-2\n",
      "l2=.02*10**-2\n",
      "phi=.75*10**-3\n",
      "\n",
      "#Calculations\n",
      "def reluctance(l,U_r,A):\n",
      "\tRe=l/(U_o*U_r*A)\n",
      "\treturn Re\n",
      "\n",
      "def mmf(R1,R2,R3):\n",
      "\tNi=phi*(R3+((R1*R2)/(R1+R2)))\n",
      "\treturn Ni\n",
      "\n",
      "R_g1=reluctance(l1,1,A1)\n",
      "R_g2=reluctance(l2,1,A1)\n",
      "R_g3=reluctance(l2,1,A2)\n",
      "print(\"when U_r=1,mmf(AT) =%.4f \" %mmf(R_g1,R_g2,R_g3))\n",
      "L1=l1*2*10**3\n",
      "L2=l2*10**3\n",
      "R_c1=reluctance(L1,5000,A1)\n",
      "R_c2=reluctance(L1,5000,A1)\n",
      "R_c3=reluctance(L2,5000,A2)\n",
      "\n",
      "#Results\n",
      "print(\"when U_r=5000,mmf(AT) =%.4f \" %mmf(R_c1+R_g1,R_c2+R_g2,R_c3+R_g3))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "when U_r=1,mmf(AT) =1259.9766 \n",
        "when U_r=5000,mmf(AT) =1680.3089 \n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.4 Page No 150"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variablesimport math\n",
      "# Exciting current calculation needed to setup reqd flux\n",
      "\n",
      "U_o=4*math.pi*10**-7\n",
      "A1=800*10**-6\n",
      "A2=600*10**-6\n",
      "l1=1*10**-3            #air gap length\n",
      "l2=160*10**-3          #length of central limb\n",
      "l3=400*10**-3          #length of side limb\n",
      "phi=.8*10**-3\n",
      "N=500\n",
      "\n",
      "#Calculations\n",
      "def fd(A):\n",
      "\tB=phi/A\n",
      "\treturn B\n",
      "\n",
      "def mmf(l,B):\n",
      "\tF=l/B\n",
      "\treturn F\n",
      "\n",
      "#air gap\n",
      "B_g=fd(A1)\n",
      "F_g=mmf(l1,B_g)/U_o\n",
      "print(\"F_g(AT) =%.4f \" %F_g)\n",
      "#central limb\n",
      "B_c=B_g\n",
      "F_c=mmf(l2,B_c)/10**-3\n",
      "print(\"F_c(AT)=%.4f \" %F_c)\n",
      "#outer limb                flux is divided into half\n",
      "B_o=fd(A2)/2\n",
      "F_o=mmf(l3,B_o)/(4*10**-3)\n",
      "print(\"F_o(AT)=%.4f \" %F_o)\n",
      "i=(F_g+F_c+F_o)/N            #    total mmf/no of turns\n",
      "\n",
      "#Results\n",
      "print(\"exciting current(A)=%.4f \" %i)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "F_g(AT) =795.7747 \n",
        "F_c(AT)=160.0000 \n",
        "F_o(AT)=150.0000 \n",
        "exciting current(A)=2.2115 \n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.5, Page No 151"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "# determination of excitation coil mmf\n",
      "U_o=4*math.pi*10**-7 \n",
      "A1=25*10**-4 \n",
      "A2=12.5*10**-4 \n",
      "A3=25*10**-4 \n",
      "l1=.5             #length of side limb(ab+cd)\n",
      "l2=.2           #length of central limb(ad)\n",
      "l3=.5             #length of side limb(dea)\n",
      "l4=.25*10**-3           #length of air gap\n",
      "phi=.75*10**-3 \n",
      "N=500 \n",
      "\n",
      "#Calculations\n",
      "def fd(A):\n",
      "\tB=phi/A\n",
      "\treturn B\n",
      "\t\n",
      "def flux(B,l):\n",
      "\tF=B*l/(U_o)\n",
      "\treturn F\n",
      "\t\n",
      "def fl(H,l):\n",
      "\tf=H*l\n",
      "\treturn f\n",
      "\n",
      "B_abcd=fd(A1) \n",
      "F_bc=flux(B_abcd,l4) \n",
      "print(\"B_abcd(T) =%.4f \" %B_abcd)\n",
      "H_ab=200                         #for cast iron for B=0.3\n",
      "F_abcd=fl(H_ab,l1) \n",
      "F_ad=F_abcd+F_bc \n",
      "H_ad=F_ad/l2 \n",
      "print(\"H_ad(AT/m) =%.4f \" %H_ad)\n",
      "B_ad=1.04                        #for cast iron for H=800\n",
      "phi_ad=B_ad*A2 \n",
      "phi_dea=phi+phi_ad \n",
      "B_dea=phi_dea/A3 \n",
      "H_dea=500                         #for cast iron for B=.82\n",
      "F_dea=H_dea*l3 \n",
      "F=F_dea+F_ad \n",
      "\n",
      "#Results\n",
      "print(\"reqd mmf(AT) =%.4f \" %F)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "B_abcd(T) =0.3000 \n",
        "H_ad(AT/m) =798.4155 \n",
        "reqd mmf(AT) =409.6831 \n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.7, Page No 152"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "#determination of self and mutual inductance b/w 2 coils\n",
      "\n",
      "U_o=4*math.pi*10**-7 \n",
      "U_r=1600 \n",
      "A1=4*10**-4 \n",
      "A2=4*10**-4 \n",
      "A0=2*10**-4 \n",
      "N1=500 \n",
      "N2=1000 \n",
      "\n",
      "#Calculations\n",
      "l1=.01*((6+0.5+1)*2+(4+2)) \n",
      "l2=.01*((3+0.5+1)*2+(4+2)) \n",
      "l0=.01*(4+2) \n",
      "\n",
      "def reluc(l,A):\n",
      "\tR=l/(U_o*U_r*A)\n",
      "\treturn R\n",
      "\t\n",
      "R1=reluc(l1,A1) \n",
      "R2=reluc(l2,A2) \n",
      "R0=reluc(l0,A0) \n",
      "\n",
      "def re(r0,r1,r2):\n",
      "\tre=r0+((r1*r2)/(r1+r2)) \n",
      "\treturn re\n",
      "\n",
      "print('coil 1 excited with 1A') \n",
      "R_1=re(R1,R0,R2) \n",
      "phi1=N1/R_1 \n",
      "phi2=phi1*R0/(R0+R2) \n",
      "L11=N1*phi1 \n",
      "print(\"self inductance(H) =%.4f \" %L11)\n",
      "M21=N2*phi2 \n",
      "print(\"mutual inductance(H) =%.4f \" %M21)\n",
      "print('coil 2 excited with 1A') \n",
      "R_2=re(R2,R0,R1) \n",
      "phi2=N2/R_2 \n",
      "L22=N2*phi2 \n",
      "print(\"self inductance(H) =%.4f \" %L22)\n",
      "M12=M21 \n",
      "\n",
      "#Results\n",
      "print(\"mutual inductance(H) =%.4f \" %M12)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "coil 1 excited with 1A\n",
        "self inductance(H) =0.7267 \n",
        "mutual inductance(H) =0.6460 \n",
        "coil 2 excited with 1A\n",
        "self inductance(H) =3.5529 \n",
        "mutual inductance(H) =0.6460 \n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.8 Page No 163"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "#determination of R_c,R_g,L,W_f\n",
      "\n",
      "U_o=4*math.pi*10**-7 \n",
      "U_r=6000 \n",
      "l_g=0.0006 \n",
      "l_c=.40 \n",
      "A_c=.04*.04 \n",
      "B_c=1.2 \n",
      "N=600 \n",
      "\n",
      "#Calculations\n",
      "def current(B_g):\n",
      "\ti=(1/(U_o*N))*(((B_c*l_c)/U_r)+(B_g*l_g))\n",
      "\treturn i\n",
      "\n",
      "print(\"neglecting fringing,current(A)= %.4f \" %current(B_c))\n",
      "\n",
      "phi=B_c*A_c \n",
      "print(\"flux(Wb)=%.4f \" %phi)\n",
      "\n",
      "def flux_linkage(phi):\n",
      "\tlmda=N*phi\n",
      "\treturn lmda\n",
      "\n",
      "print(\"flux linkages(Wb-turns)= %.4f \" %flux_linkage(phi))\n",
      "\n",
      "def reluc(l,U,A):\n",
      "\tR=l/(U_o*U*A)\n",
      "\treturn R\n",
      "R_c=reluc(l_c,U_r,A_c) \n",
      "print(\"R_c=%.4f \" %R_c)\n",
      "R_g=reluc(l_g,1,A_c) \n",
      "print(\"R_g=%.4f \" %R_g)\n",
      "\n",
      "L=N**2/(R_c+R_g) \n",
      "print(\"coil inductance(H)=%.4f \" %L)\n",
      "W_f=(N*phi)**2/(2*L) \n",
      "\n",
      "#Results\n",
      "print(\"energy stored in the magnetic field(J)=%.4f \" %W_f)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "neglecting fringing,current(A)= 1.0610 \n",
        "flux(Wb)=0.0019 \n",
        "flux linkages(Wb-turns)= 1.1520 \n",
        "R_c=33157.2798 \n",
        "R_g=298415.5183 \n",
        "coil inductance(H)=1.0857 \n",
        "energy stored in the magnetic field(J)=0.6112 \n"
       ]
      }
     ],
     "prompt_number": 7
    }
   ],
   "metadata": {}
  }
 ]
}