{ "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": {} } ] }