summaryrefslogtreecommitdiff
path: root/Basic_Electrical_Engineering_with_Numerical_Problems/Chapter_03.ipynb
blob: 67873206aff181c4c06caa018ed21593db1e65c1 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:237766aed9f535966fc748c815f41de623178c7900cce0f2887b456d4abe99e9"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h1>Chapter 3: Electricity and its Fundamental Laws<h1>"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.1: Page 47"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "import math\n",
      "\n",
      "#given data:\n",
      "V = 230;    #  in  volts\n",
      "I = 10;     #  in  A\n",
      "\n",
      "# calculations:\n",
      "R = V/I;\n",
      "\n",
      "#Results\n",
      "print \"resistance  of  element,R =\", R,\"ohm\" "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "resistance  of  element,R = 23.0 ohm\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.2: Page 47"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "import math\n",
      "\n",
      "#given  data  :\n",
      "R1 = 0.5;   #  minimum  value  of  resistance  in  ohm\n",
      "R2 = 20;    #  maximum  value  of  resistance  in  ohm\n",
      "I  = 1.2;   #  current  in  A\n",
      "\n",
      "#Calculation\n",
      "V1 = I*R1;\n",
      "V2 = I*R2;\n",
      "\n",
      "#Results\n",
      "print  \"Voltage  drop  in  Ist  case,V1(V)=\",V1,\"volts and voltage  drop  in  IInd  case,V2(V)=\", V2,\"volts\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Voltage  drop  in  Ist  case,V1(V)= 0.6 volts and voltage  drop  in  IInd  case,V2(V)= 24.0 volts\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.3: Page 48"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "import math\n",
      "\n",
      "#given  data  :\n",
      "L  = 1000;  #  length  of  wire  in  cm\n",
      "d  = 0.14;  #  diameter  of  wire  in  cm\n",
      "R1 = 2.5*10**6;#  resistance  in  micro-ohm\n",
      "\n",
      "# calculations:\n",
      "a  = (math.pi*d**2)/4;  #  cross  section  area\n",
      "p  = (R1*a)/L;\n",
      "\n",
      "#Results\n",
      "print  \"the  specific  resistance,p =\", round(p,1),\" uOhm-cm\" \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the  specific  resistance,p = 38.5  uOhm-cm\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.4: Page 49"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "import math\n",
      "\n",
      "#given  data  :\n",
      "Rt1  = 54.3;#    resistance  in  ohm\n",
      "alfa = 0.0043;#  the  resistance  temperature  of  coeficient  in  per  degree  celcius\n",
      "t1   = 20;#  temperature  in  degree  celcius\n",
      "t2   = 40;#  temperature  in  degree  celcius\n",
      "\n",
      "# calculations\n",
      "Rt2  = (Rt1*(1+(alfa*t2)))/(1+(alfa*t1));\n",
      "\n",
      "#Results\n",
      "print  \"resistance  at  40 degC ,Rt2=\", Rt2,\" ohms\" "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "resistance  at  40 degC ,Rt2= 58.6  ohms\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.5: Page 50"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "import math\n",
      "\n",
      "#given  data  :\n",
      "r1=30;#    resistance  in  ohm\n",
      "r2=35;#    resistance  in  ohm\n",
      "r3=45;#    resistance  in  ohm\n",
      "V=220;\n",
      "\n",
      "# calculations:\n",
      "R=r1+r2+r3;\n",
      "I=V/R;\n",
      "\n",
      "#Results\n",
      "print  \"(a)total  resistance,R=\", R,\" ohm\"\n",
      "print  \"(b)current,I=\", I,\"A\" "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)total  resistance,R= 110  ohm\n",
        "(b)current,I= 2.0 A\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.6: Page 50"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "import math\n",
      "\n",
      "#given  data  :\n",
      "I=75;#  current  in  A\n",
      "R=0.15;#  resistance  in  ohm\n",
      "v=220;#  voltage  in  volts\n",
      "\n",
      "#calculations\n",
      "V1=I*R;#  voltage  drop  of  the  feeder  in  section  AB\n",
      "V2=I*R;#  voltage  drop  of  the  feeder  in  section  CD\n",
      "V_total=V1+V2;#  total  voltage  drop  in  the  lead  and  return  feeder\n",
      "V=v+V_total;\n",
      "\n",
      "#Results\n",
      "print  \"voltage  at  the  generating  station,V=\", V,\"volts\" "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "voltage  at  the  generating  station,V= 242.5 volts\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.7: Page 52"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "import math\n",
      "\n",
      "#given  data  :\n",
      "r1=6;#    resistance  in  ohm\n",
      "r2=10;#    resistance  in  ohm\n",
      "r3=15;#    resistance  in  ohm\n",
      "\n",
      "#calculations:\n",
      "r=(1/r1)+(1/r2)+(1/r3);\n",
      "R=1/r;\n",
      "\n",
      "#Results\n",
      "print  \"equivalent  resistance,R=\", R,\"ohm\" \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "equivalent  resistance,R= 3.0 ohm\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.8: Page 53"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "import math\n",
      "\n",
      "#given  data  :\n",
      "I=5;  #  current  in  A\n",
      "n=2;  #  number  of  resistance  in  parallel  of  section  BC\n",
      "r1=15;#    resistance  in  ohm\n",
      "r2=20;#    resistance  in  ohm\n",
      "r3=60;#    resistance  in  ohm\n",
      "r4=64;#    resistance  in  ohm\n",
      "r5=64;#    resistance  in  ohm\n",
      "r6=2.5;#    resistance  in  ohm\n",
      "\n",
      "#calculation\n",
      "R1=r4/n;#  equivalent  resistance  of  section  BC\n",
      "R2=(r1*r2*r3)/((r1*r2)+(r2*r3)+(r3*r1));#  equivalent  resistance  of  section  CD\n",
      "R=R1+R2+r6;#  equivalent  resistance  of  section  AD\n",
      "V=I*R;\n",
      "\n",
      "#Results\n",
      "print  \"voltage,V= \", V,\"volts\" \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "voltage,V=  210.0 volts\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.9: Page 53"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "import math\n",
      "\n",
      "#given  data  :\n",
      "V=240;#  voltage  in  volts\n",
      "r1=2;#  resistance  in  ohm\n",
      "r2=3;#  resistance  in  ohm\n",
      "r3=8.8;#  resistance  in  ohm\n",
      "r4=10;#  resistance  in  ohm\n",
      "r5=3;#  resistance  in  ohm\n",
      "\n",
      "# calculations:\n",
      "R1=(r1*r2)/(r1+r2);#  equivalent  resistance  of  parallel  branch\n",
      "R2=R1+r3;#  equivalent  resistance  of  section  ABC\n",
      "R3=(R2*r4)/(R2+r4);\n",
      "R=R3+r5;#  total  resistance  of  section  AD\n",
      "I=V/R;\n",
      "V1=I*r5;#  voltage  drop  across  r5\n",
      "V2=V-V1;#  voltage  drop  across  section  ABC\n",
      "I1=V2/r4;#  current  flowing  through  r4  resistance\n",
      "I2=I-I1;#  current  in  r3  resistance\n",
      "V3=I2*r3;#  voltage  drop  across  r3  resistance,  section  ABC\n",
      "V4=V2-V3;#  voltage  drop  between  section  AB\n",
      "I3=V4/r1;#  current  flowing  through  r1  resistance\n",
      "I4=V4/r2;#    current  flowing  through  r2  resistance\n",
      "\n",
      "#Results\n",
      "print  \"current  flowing  through  r1  (2  ohms)  resistance,I3  =\", I3,\" A\"\n",
      "print  \"current  flowing  through  r2  (3  ohms)resistance,I4    =\", I4,\" A\"\n",
      "print  \"total  resistance,R  =  \", R,\" ohm\"\n",
      "print  \"voltage  drop  across  r5(3  ohms)  resistance,V1  =\", V1,\" volts\"\n",
      "print  \"voltage  drop  across  section  ABC,V2  =  \", V2,\" volts\"\n",
      "print  \"voltage  drop  across  r3  resistance(8.8  ohms),V3  =  \",V3,\" Volts\"\n",
      "print  \"  voltage  drop  between  section  AB,V4  =  \", V4,\"volts\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "current  flowing  through  r1  (2  ohms)  resistance,I3  = 9.0  A\n",
        "current  flowing  through  r2  (3  ohms)resistance,I4    = 6.0  A\n",
        "total  resistance,R  =   8.0  ohm\n",
        "voltage  drop  across  r5(3  ohms)  resistance,V1  = 90.0  volts\n",
        "voltage  drop  across  section  ABC,V2  =   150.0  volts\n",
        "voltage  drop  across  r3  resistance(8.8  ohms),V3  =   132.0  Volts\n",
        "  voltage  drop  between  section  AB,V4  =   18.0 volts\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.10: Page 54"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "import math\n",
      "\n",
      "#given  data  :\n",
      "I=44;#  current  in  A\n",
      "r1=6;#  resistance  in  ohm\n",
      "r2=12;#  resistance  in  ohm\n",
      "r3=18;#  resistance  in  ohmr1\n",
      "\n",
      "# calculation:\n",
      "a=(1/r1)+(1/r2)+(1/r3);\n",
      "R=1/a;\n",
      "V=I*R;\n",
      "i1=V/r1;\n",
      "i2=V/r2;\n",
      "i3=V/r3;\n",
      "\n",
      "#Results\n",
      "print  \"current  in  6  ohm  resistance,i1  =  \",i1,\"A\" \n",
      "print  \"current  in  12  ohm  resistance,i2 =  \",i2,\"A\"\n",
      "print  \"current  in  18  ohm  resistance,i3 =  \",i3,\"A\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "current  in  6  ohm  resistance,i1  =   24.0 A\n",
        "current  in  12  ohm  resistance,i2 =   12.0 A\n",
        "current  in  18  ohm  resistance,i3 =   8.0 A\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 3.11: Page 55"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "import math\n",
      "\n",
      "#given:\n",
      "t=15  #TOTAL  CURRENT  IN  AMPERES\n",
      "i1=2  #CURRENT  THROUGH  UNKNOWN  RESISTANCE\n",
      "R1=15#in  ohms\n",
      "R2=50/2#in  ohms\n",
      "\n",
      "# calculations:\n",
      "x=(t-i1)*((R1*R2)/(R1+2*R2))#unknown  resistance  in  ohms)\n",
      "PD=i1*x#in  volts\n",
      "RX=((1/R1)+(1/(2*R2))+(1/x))#\n",
      "R=1/RX\n",
      "i5=  PD/(2*R2)#current  in  5  ohms  resistance\n",
      "i15=PD/R1#current  in  15  ohms  resistance\n",
      "\n",
      "\n",
      "#Results\n",
      "print  \"(a)unknown  resistance  in  ohms =\", x\n",
      "print  \"(b)potential  drop  across  the  circuit  in  volts  is =\", PD\n",
      "print  \"(c)current  in  5  ohms  resistance  in  ampere =\",i5,\"\\n and current  in  15  ohms  resistance  in  ampere =\", i15\n",
      "print  \"(d)total  resistance  of  the  circuit  in  ohms =\",R"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)unknown  resistance  in  ohms = 75.0\n",
        "(b)potential  drop  across  the  circuit  in  volts  is = 150.0\n",
        "(c)current  in  5  ohms  resistance  in  ampere = 3.0 \n",
        " and current  in  15  ohms  resistance  in  ampere = 10.0\n",
        "(d)total  resistance  of  the  circuit  in  ohms = 10.0\n"
       ]
      }
     ],
     "prompt_number": 7
    }
   ],
   "metadata": {}
  }
 ]
}