summaryrefslogtreecommitdiff
path: root/Engineering_Physics/chapter12.ipynb
blob: 35c30635a16643af370e94962612d12115f3be29 (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
{

 "metadata": {

  "name": "",

  "signature": "sha256:024efb73c06fed2399cd64a4d2a669b874446e3757757251d146f1996aec28e9"

 },

 "nbformat": 3,

 "nbformat_minor": 0,

 "worksheets": [

  {

   "cells": [

    {

     "cell_type": "heading",

     "level": 1,

     "metadata": {},

     "source": [

      "Chapter12:ELECTROMAGNETICS"

     ]

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex12.1:pg-322"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate electric flux\n",

      "#electric flux through a surface is phi=vector(E)*vector(s)\n",

      "#where vector E=2i+4j+7k,vector s=10j\n",

      "E=4 #E=4j\n",

      "s=10 #s=10j\n",

      "phi=E*s\n",

      "print \"electric flux is phi=\",phi,\"units\"\n",

      "#to calculate flux coming out of any face of the cube\n",

      "q=1          #charge in coulomb\n",

      "epsilon0=8.85*10**-12             #permittivity in free space in coul**2/N-m**2\n",

      "phi1=q/(6*epsilon0)\n",

      "print \"flux coming out of any face of the cube is phi1=\",\"{:.2e}\".format(phi1),\"N-m**2/coul**2\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "electric flux is phi= 40 units\n",

        "flux coming out of any face of the cube is phi1= 1.88e+10 N-m**2/coul**2\n"

       ]

      }

     ],

     "prompt_number": 1

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex12.2:pg-322"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate electric field at a point from centre of the shell\n",

      "q=0.2*10**-6 #charge\n",

      "r=3 #radius\n",

      "epsilon0=8.85*10**-12\n",

      "E=q/(4*math.pi*epsilon0*r**2)\n",

      "print \"electric field at a point from centre of the shell is E=\",round(E),\"N/coulomb\"\n",

      "#to calculate electric field at a point just outside the shell\n",

      "R=0.25 #radius\n",

      "E=q/(4*math.pi*epsilon0*R**2)\n",

      "print \"electric field at a point just outside the shell is E=\",\"{:.2e}\".format(E),\"N/coulomb\"\n",

      "#to calculate the electric field at a point inside the shell\n",

      "#when the point is situated inside the spherical shell,the electric field is zero\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "electric field at a point from centre of the shell is E= 200.0 N/coulomb\n",

        "electric field at a point just outside the shell is E= 2.88e+04 N/coulomb\n"

       ]

      }

     ],

     "prompt_number": 2

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex12.3:pg-323"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate electric field at a point on earth vertically below the wire\n",

      "lamda=10**-4 #wavelength in coulomb/m\n",

      "r=4 #radius in m\n",

      "epsilon0=8.854*10**-12\n",

      "E=2*lamda/(4*math.pi*epsilon0*r)\n",

      "print \"electric field at a point on earth vertically below the wire is E=\",\"{:.1e}\".format(E),\"N/coulomb\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "electric field at a point on earth vertically below the wire is E= 4.5e+05 N/coulomb\n"

       ]

      }

     ],

     "prompt_number": 4

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex12.4:pg-323"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate separation between those equipotential surfaces \n",

      "V=5 #potential difference\n",

      "epsilon0=8.85*10**-12 #permittivity of free space\n",

      "sigma=1*10**-7  #in c/m**2\n",

      "#electric field due to an infinite sheet of surface charge density is given by E=sigma/(2*epsilon0)                  eq(1)\n",

      "#E=V/d                    eq(2)\n",

      "#from eq(1) and eq(2),we get  \n",

      "d=(2*epsilon0*V)/sigma\n",

      "print \"separation between those equipotential surfaces is d=\",\"{:.2e}\".format(d),\"m\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "separation between those equipotential surfaces is d= 8.85e-04 m\n"

       ]

      }

     ],

     "prompt_number": 5

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex12.5:pg-324"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate force per unit area\n",

      "#force of attraction per unit area is given by F=(epsilon0*E**2)/2              eq(1)\n",

      "#E=V/d                            eq(2)\n",

      "epsilon0=8.85*10**-12 #permittivity  of free space\n",

      "d=1*10**-3 #distance\n",

      "V=100 #potential difference in volts\n",

      "#from eq(1) and eq(2),we get\n",

      "F=(epsilon0*V**2)/(2*d**2)\n",

      "print \"force per unit area is F=\",\"{:.2e}\".format(F),\"N/m**2\"\n",

      "#answer is given incorrect in the book ,F=4.425*10**-12\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "force per unit area is F= 4.42e-02 N/m**2\n"

       ]

      }

     ],

     "prompt_number": 6

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex12.6:pg-324"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate charge\n",

      "#let charge be q coulomb ,then the surface density of charge i.e. sigma=q/(4*math.pi*r**2)..............eq(1)\n",

      "#outward pull per unit area =sigma**2/(2*epsilon0)............eq(2)\n",

      "#put eq(1) in eq(2),we get q**2/(4*math.pi*r**2)**2*(2*epsilon0)..............eq(3)\n",

      "#pressure due to surface tension =4*T/r............eq(4)\n",

      "T=27\n",

      "r=1.5*10**-2\n",

      "epsilon0=8.85*10**-12\n",

      "#equate eq(3) and eq(4),we get\n",

      "q=math.sqrt(4*T*((4*math.pi*r**2)**2)*2*epsilon0/r)\n",

      "print \"charge is q=\",\"{:.3e}\".format(q),\"coulomb\"\n",

      "#answer is given wrong in the book,square of 4*math.pi*r**2 is not taken in the solution.\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "charge is q= 1.009e-06 coulomb\n"

       ]

      }

     ],

     "prompt_number": 8

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex12.7:pg-325"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate increase in radius \n",

      "q=4.8*10**-8         #charge in coulomb\n",

      "r=10*10**-2 #radius in m\n",

      "epsilon0=8.85*10**-12  #C**2/N-m**2\n",

      "P=10**5 #N/m**2\n",

      "dr=(q**2)/(96*((math.pi)**2)*(r**3)*epsilon0*P)\n",

      "print \"increase in radius is dr=\",\"{:.2e}\".format(dr),\"m\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "increase in radius is dr= 2.75e-09 m\n"

       ]

      }

     ],

     "prompt_number": 9

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex12.8:pg-340"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "#in page no.340,numbering is done wrongly,it should be like ex-8,ex-9,ex-10,ex-11,ex-12,ex-13,ex-14\n",

      "import math\n",

      "#to calculate average values of intensities of electric and magnetic fields of radiation\n",

      "#energy of lamp=1000 J/s\n",

      "#area illuminated =4*math.pi*r**2=16*math.pi m**2\n",

      "#energy radiated per unit area per second =1000/16*math.pi\n",

      "#from poynting theorem |s|=|E*H|=E*H           eq(1)\n",

      "s=1000/(16*math.pi)\n",

      "muo=4*math.pi*10**-7             #permeability of free space\n",

      "epsilon0=8.85*10**-12              #permittivity in free space\n",

      "#E/H=math.sqrt(muo/epsilon0)        eq(2)\n",

      "#from eq(1) and eq(2),we get\n",

      "E=math.sqrt(s*math.sqrt(muo/epsilon0))\n",

      "H=s/E\n",

      "print \"average value of intensity of electric fields of radiation is E=\",round(E,2),\"V/m\"\n",

      "print \"average value of intensity of magnetic fields of radiation is H=\",round(H,2),\"ampere-turn/m\"\n",

      "#answer is given wrong in the book E=48.87 V/m,solution of magnetic fields is not given in the book .\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "average value of intensity of electric fields of radiation is E= 86.58 V/m\n",

        "average value of intensity of magnetic fields of radiation is H= 0.23 ampere-turn/m\n"

       ]

      }

     ],

     "prompt_number": 10

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex12.9:pg-340"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate amplitudes of electric and magnetic fields of radiation\n",

      "#energy received by an electromagnetic wave per sec per unit area is given by    poynting vector |s|=|E*H|=E*H*sin 90 (becoz E is perpendicular to H)\n",

      "#it is given that energy received by earth's surface is\n",

      "s=1400.0               #|s|=2 cal min**-1 cm**-2\n",

      "muo=4.0*math.pi*10**-7 #permittivity of free space\n",

      "epsilon0=8.85*10**-12 #permeability of free space\n",

      "#E*H=1400                          eq(1)\n",

      "#E/H=math.sqrt(muo/epsilon0)               eq(2)\n",

      "#from eq(1) and eq(2) ,we get\n",

      "E=math.sqrt(s*math.sqrt(muo/epsilon0))\n",

      "#from eq(1) ,we get\n",

      "H=1400.0/E\n",

      "Eo=E*math.sqrt(2) # at distance 2 m\n",

      "Ho=H*math.sqrt(2) # at distance 2 m\n",

      "print \"amplitude of electric field is Eo=\",int(Eo),\"V/m\"\n",

      "print \"amplitude of magnetic field is Ho=\",round(Ho,3),\"amp-turn/m\"\n",

      "\n",

      "# The answers in the textbook are slightly different due to approximation\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "amplitude of electric field is Eo= 1027 V/m\n",

        "amplitude of magnetic field is Ho= 2.726 amp-turn/m\n"

       ]

      }

     ],

     "prompt_number": 16

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex12.10:pg-341"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "# no value to be found out , only equation to be written hence skipped following the TBC guidelines"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [],

     "prompt_number": 29

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex12.11:pg-341"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate skin depth \n",

      "f=10**8 #frequency\n",

      "sigma=3*10.0**7 #conductivity of the medium\n",

      "muo=4*math.pi*10**-7 #permeability of free space\n",

      "Del=math.sqrt(2/(2*math.pi*f*sigma*muo))\n",

      "print \"skin depth is Del=\",\"{:.1e}\".format(Del),\"cm\"\n",

      "\n",

      "# answer in book is wrong"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        " skin depth is Del= 9.2e-06 cm\n"

       ]

      }

     ],

     "prompt_number": 15

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex12.12:pg-341"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate frequency \n",

      "muo=4*math.pi*10**-7            #permeability of free space\n",

      "sigma=4.3  # in mhos/m\n",

      "Del=0.1     #skin depth in m\n",

      "f=2/(2*math.pi*muo*Del**2)\n",

      "print \"frequency is f=\",\"{:.2e}\".format(f),\"Hz\"\n",

      "#value of frequency is given incorrect in the book \n",

      "#show that for frequencies less than 10**8 ,it can be considered as good conductor\n",

      "epsilon=80*8.854*10**-12\n",

      "f=10**8                                    #frequency in Hz\n",

      "sigma=4.3\n",

      "#formula is sigma/(omega*epsilon)>4.3/(2*math.pi*10**8*80*epsilon)\n",

      "sigma1=sigma/(2*math.pi*f*epsilon)  #where sigma1=sigma/(omega*epsilon)\n",

      "print \"sigma1=\",round(sigma1,2),\"unitless\"\n",

      "#the ocean water to be good conductor ,the value of sigma/(omega*epsilon) should be greater than 1\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "frequency is f= 2.53e+07 Hz\n",

        "sigma1= 9.66 unitless\n"

       ]

      }

     ],

     "prompt_number": 16

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex12.13:pg-342"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to show that for frequency <10**9 Hz ,a sample of silicon will act like a good conductor\n",

      "sigma=200 #in mhos/m\n",

      "omega=2*math.pi*10**9 \n",

      "epsilon0=8.85*10**-12              #permittivity in free space\n",

      "epsilon=12*epsilon0 \n",

      "sigma1=sigma/(omega*epsilon)         #sigma1=sigma/(omega*epsilon)\n",

      "print \"sigma1=\",round(sigma1),\"unitless\"\n",

      "#if sigma/(omega*epsilon) is greater than 1 , silicon is a good conductor at frequency <10**9 Hz\n",

      "#to calculate penetration depth\n",

      "f=10**6 #frequency in Hz\n",

      "muo=4*math.pi*10**-7       #permeability of free space\n",

      "sigma=200\n",

      "Del=math.sqrt(2/(2*math.pi*f*muo*sigma))\n",

      "print \"penetration depth is del=\",round(Del*100,1),\"m\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "sigma1= 300.0 unitless\n",

        "penetration depth is del= 3.6 m\n"

       ]

      }

     ],

     "prompt_number": 25

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex12.14:pg-343"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate conduction current and displacement current densities \n",

      "sigma=10**-3        #conductivity in mhos/m\n",

      "E=4*10**-6        #where E=4*10**-6*math.sin(9*10**9t) v/m\n",

      "J=sigma*E\n",

      "print \"conduction current density is J=\",J,\"math.sin(9*10**9t)    A/m\"\n",

      "epsilon0=8.85*10**-12            #permittivity in free space\n",

      "epsilonr=2.45                    #relative permittivity\n",

      "#formula is epsilon0*epsilonr*(delE/delt)\n",

      "#delE/delt=4*10**-6*9*10**9*math.cos(9*10**9*t)\n",

      "Jd=epsilon0*epsilonr*4*10**-6*9*10**9\n",

      "print \"displacement current density is Jd=\",round(Jd,8),\"math.cos(9*10**9*t)  A/m**2\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "conduction current density is J= 4e-09 math.sin(9*10**9t)    A/m\n",

        "displacement current density is Jd= 7.8e-07 math.cos(9*10**9*t)  A/m**2\n"

       ]

      }

     ],

     "prompt_number": 23

    }

   ],

   "metadata": {}

  }

 ]

}