summaryrefslogtreecommitdiff
path: root/Elements_of_Electromagnetics
diff options
context:
space:
mode:
authorJovina Dsouza2014-06-18 12:43:07 +0530
committerJovina Dsouza2014-06-18 12:43:07 +0530
commit206d0358703aa05d5d7315900fe1d054c2817ddc (patch)
treef2403e29f3aded0caf7a2434ea50dd507f6545e2 /Elements_of_Electromagnetics
parentc6f0d6aeb95beaf41e4b679e78bb42c4ffe45a40 (diff)
downloadPython-Textbook-Companions-206d0358703aa05d5d7315900fe1d054c2817ddc.tar.gz
Python-Textbook-Companions-206d0358703aa05d5d7315900fe1d054c2817ddc.tar.bz2
Python-Textbook-Companions-206d0358703aa05d5d7315900fe1d054c2817ddc.zip
adding book
Diffstat (limited to 'Elements_of_Electromagnetics')
-rw-r--r--Elements_of_Electromagnetics/README.txt10
-rw-r--r--Elements_of_Electromagnetics/chapter_1.ipynb420
-rw-r--r--Elements_of_Electromagnetics/chapter_10.ipynb566
-rw-r--r--Elements_of_Electromagnetics/chapter_11.ipynb673
-rw-r--r--Elements_of_Electromagnetics/chapter_12.ipynb452
-rw-r--r--Elements_of_Electromagnetics/chapter_13.ipynb428
-rw-r--r--Elements_of_Electromagnetics/chapter_14.ipynb172
-rw-r--r--Elements_of_Electromagnetics/chapter_2.ipynb318
-rw-r--r--Elements_of_Electromagnetics/chapter_3.ipynb389
-rw-r--r--Elements_of_Electromagnetics/chapter_4.ipynb699
-rw-r--r--Elements_of_Electromagnetics/chapter_5.ipynb523
-rw-r--r--Elements_of_Electromagnetics/chapter_6.ipynb80
-rw-r--r--Elements_of_Electromagnetics/chapter_7.ipynb224
-rw-r--r--Elements_of_Electromagnetics/chapter_8.ipynb454
-rw-r--r--Elements_of_Electromagnetics/chapter_9.ipynb200
-rw-r--r--Elements_of_Electromagnetics/screenshots/I(0,t)I(l,t).pngbin0 -> 7376 bytes
-rw-r--r--Elements_of_Electromagnetics/screenshots/cospropogatingwave.pngbin0 -> 21804 bytes
-rw-r--r--Elements_of_Electromagnetics/screenshots/vectors.pngbin0 -> 51938 bytes
18 files changed, 5608 insertions, 0 deletions
diff --git a/Elements_of_Electromagnetics/README.txt b/Elements_of_Electromagnetics/README.txt
new file mode 100644
index 00000000..d2a7204f
--- /dev/null
+++ b/Elements_of_Electromagnetics/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Vishal MV
+Course: others
+College/Institute/Organization: Indian Institute of Engineering Bombay
+Department/Designation: Physics
+Book Title: Elements of Electromagnetics
+Author: M. N. O. Sadiku
+Publisher: Oxford University Press
+Year of publication: 2001
+Isbn: 195686233
+Edition: 3rd \ No newline at end of file
diff --git a/Elements_of_Electromagnetics/chapter_1.ipynb b/Elements_of_Electromagnetics/chapter_1.ipynb
new file mode 100644
index 00000000..ae4e75b3
--- /dev/null
+++ b/Elements_of_Electromagnetics/chapter_1.ipynb
@@ -0,0 +1,420 @@
+{
+ "metadata": {
+ "name": "chapter_1.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 1: Vector Analysis<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 1.1, Page number: 8<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "If A= 1Oa_x - 4a_y + 6a_z and B == 2a_x + a_y, find: \n",
+ "(a) the component of A along a_y ,\n",
+ "(b) the magnitude of 3A - B,\n",
+ "(c) a unit vector along A + 2B. '''\n",
+ "\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "A=array([10,-4,6]) \n",
+ "B=array([2,1,0])\n",
+ "ax=array([1,0,0]) #Unit vector along x direction\n",
+ "ay=array([0,1,0]) #Unit vector along y direction\n",
+ "az=array([0,0,1]) #Unit vector along z direction\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Ay=dot(A,ay) #Component of A along y direction\n",
+ "l=scipy.sqrt(dot(3*A-B,3*A-B)) #Magnitude of the vector 3A-B\n",
+ "\n",
+ " #Defining the x,y and z components of the unit vector along A+2B\n",
+ " \n",
+ "ux=round(dot(A+2*B,ax)/scipy.sqrt(dot(A+2*B,A+2*B)),4)\n",
+ "uy=round(dot(A+2*B,ay)/scipy.sqrt(dot(A+2*B,A+2*B)),4)\n",
+ "uz=round(dot(A+2*B,az)/scipy.sqrt(dot(A+2*B,A+2*B)),4)\n",
+ "\n",
+ "u=array([ux,uy,uz])\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'The component of A along y direction is',Ay\n",
+ "print 'Magnitude of 3A-B =',round(l,2)\n",
+ "print 'Unit vector along A+2B is',u"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The component of A along y direction is -4\n",
+ "Magnitude of 3A-B = 35.74\n",
+ "Unit vector along A+2B is [ 0.9113 -0.1302 0.3906]\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 1.2, Page number: 9<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Points P and Q are located at (0, 2, 4) and (- 3, 1, 5). Calculate \n",
+ "(a) The position vector P \n",
+ "(b) The distance vector from P to Q \n",
+ "(c) The distance between P and Q \n",
+ "(d) A vector parallel to PQ with magntude of 10 '''\n",
+ "\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "P=array([0,2,4]) \n",
+ "Q=array([-3,1,5])\n",
+ "ax=array([1,0,0]) #Unit vector along x direction\n",
+ "ay=array([0,1,0]) #Unit vector along y direction\n",
+ "az=array([0,0,1]) #Unit vector along z direction\n",
+ "origin=array([0,0,0]) #Defining the origin\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "PosP=P-origin #The position vector P\n",
+ "Dpq=Q-P #The distance vector from P to Q\n",
+ "l=scipy.sqrt(dot(Dpq,Dpq)) #Magnitude of the distance vector from P to Q\n",
+ "\n",
+ " #Defining the x,y and z components of the unit vector along Dpq\n",
+ " \n",
+ "ux=round(dot(Dpq,ax)/l,4)\n",
+ "uy=round(dot(Dpq,ay)/l,4)\n",
+ "uz=round(dot(Dpq,az)/l,4)\n",
+ "\n",
+ "vect=array([ux*10,uy*10,uz*10]) #Vector parallel to PQ with magntude of 10\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'The position vector P is',PosP\n",
+ "print 'The distance vector from P to Q is',Dpq\n",
+ "print 'The distance between P and Q is',round(l,3)\n",
+ "print 'Vector parallel to PQ with magntude of 10 is',vect"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The position vector P is [0 2 4]\n",
+ "The distance vector from P to Q is [-3 -1 1]\n",
+ "The distance between P and Q is 3.317\n",
+ "Vector parallel to PQ with magntude of 10 is [-9.045 -3.015 3.015]\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 1.3, Page number: 10<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A river flows southeast at 10 km/hr and a boat flows upon it \n",
+ "with its bow pointed in the direction of travel. A man walks upon\n",
+ "the deck at 2 km/hr in a direction to the right and perpendicular\n",
+ "to the direction of the boat's movement. \n",
+ "Find the velocity of the man with respect to the earth. '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "vriver=10 #Speed of river in km/hr\n",
+ "vman=2 #Speed of man relative to boat in km/hr\n",
+ "ax=array([1,0,0]) #Unit vector along x direction\n",
+ "ay=array([0,1,0]) #Unit vector along y direction\n",
+ "az=array([0,0,1]) #Unit vector along z direction\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ " #Velocity of boat\n",
+ "\n",
+ "Vboat=vriver*(scipy.cos(scipy.pi/4)*ax- \n",
+ " scipy.sin(scipy.pi/4)*ay) \n",
+ " \n",
+ " #Relative velocity of man with respect to boat\n",
+ "\n",
+ "Vrelman=vman*(-scipy.cos(scipy.pi/4)*ax- \n",
+ " scipy.sin(scipy.pi/4)*ay) \n",
+ " \n",
+ " #Absolute velocity of man\n",
+ " \n",
+ "Vabs=Vboat+Vrelman\n",
+ " \n",
+ "mag=scipy.sqrt(dot(Vabs,Vabs)) #Magnitude of the velocity of man\n",
+ "Vabsx=dot(Vabs,ax) #X component of absolute velocity\n",
+ "Vabsy=dot(Vabs,ay) #Y component of absolute velocity\n",
+ "angle=scipy.arctan(Vabsy/Vabsx)*180/scipy.pi #Angle made with east in degrees\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'The velocity of the man is',round(mag,1),'km/hr at an angle of'\n",
+ "print -round(angle,1),'degrees south of east'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of the man is 10.2 km/hr at an angle of\n",
+ "56.3 degrees south of east\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 1.4, Page number: 17<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Given vectors A = 3a_x + 4a_y + a_z and B = 2a_y - 5a_z , \n",
+ "find the angle between A and B. '''\n",
+ " \n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "A=array([3,4,1])\n",
+ "B=array([0,2,-5])\n",
+ "ax=array([1,0,0]) #Unit vector along x direction\n",
+ "ay=array([0,1,0]) #Unit vector along y direction\n",
+ "az=array([0,0,1]) #Unit vector along z direction\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "magA=scipy.sqrt(dot(A,A)) #Magnitude of A\n",
+ "magB=scipy.sqrt(dot(B,B)) #Magnitude of B\n",
+ "angle=scipy.arccos(dot(A,B)/(magA*magB)) #Angle between A and B in radians\n",
+ "angled=angle*180/scipy.pi #Angle between A and B in degrees\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'The angle between A and B =',round(angled,2),'degrees'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The angle between A and B = 83.73 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 1.5, Page number: 17<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Three field quantities are given by \n",
+ "P = 2a_x - a_z \n",
+ "Q = 2a_x - a_y + 2a_z \n",
+ "R = 2a_x - 3a_y + a_z\n",
+ "\n",
+ "Determine \n",
+ "\n",
+ "(a) (P + Q) X (P - Q) \n",
+ "(b) Q.(R X P)\n",
+ "(c) P.(Q X R)\n",
+ "(d) Sin(theta_QR) \n",
+ "(e) P X (Q X R) \n",
+ "(f) A unit vector perpendicular to both Q and R \n",
+ "(g) The component of P along Q '''\n",
+ "\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "P=array([2,0,-1])\n",
+ "Q=array([2,-1,2])\n",
+ "R=array([2,-3,1])\n",
+ "ax=array([1,0,0]) #Unit vector along x direction\n",
+ "ay=array([0,1,0]) #Unit vector along y direction\n",
+ "az=array([0,0,1]) #Unit vector along z direction\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "ansa=cross((P+Q),(P-Q))\n",
+ "ansb=dot(Q,cross(R,P))\n",
+ "ansc=dot(P,cross(Q,R))\n",
+ "lqxr=scipy.sqrt(dot(cross(Q,R),cross(Q,R))) #Magnitude of QXR\n",
+ "lq=scipy.sqrt(dot(Q,Q)) #Magnitude of Q\n",
+ "lr=scipy.sqrt(dot(R,R)) #Magnitude of R\n",
+ "ansd=lqxr/(lq*lr)\n",
+ "anse=cross(P,cross(Q,R))\n",
+ "\n",
+ "#Finding unit vector perpendicular to Q and R\n",
+ "\n",
+ "ux=dot(cross(Q,R),ax)/lqxr #X component of the unit vector\n",
+ "uy=dot(cross(Q,R),ay)/lqxr #Y component of the unit vector\n",
+ "uz=dot(cross(Q,R),az)/lqxr #Z component of the unit vector\n",
+ "\n",
+ "ansf=array([round(ux,3),round(uy,3),round(uz,3)])\n",
+ "\n",
+ "ansg=round((float(dot(P,Q))/dot(Q,Q)),4)*Q\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print '(P+Q)X(P-Q) =',ansa\n",
+ "print 'Q.(R X P) =',ansb\n",
+ "print 'P.(Q X R) =',ansc\n",
+ "print 'Sin(theta_QR) =',round(ansd,4)\n",
+ "print 'P X (Q X R) =',anse\n",
+ "print 'A unit vector perpendicular to both Q and R =',ansf\n",
+ "print 'The component of P along Q =',ansg\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(P+Q)X(P-Q) = [ 2 12 4]\n",
+ "Q.(R X P) = 14\n",
+ "P.(Q X R) = 14\n",
+ "Sin(theta_QR) = 0.5976\n",
+ "P X (Q X R) = [2 3 4]\n",
+ "A unit vector perpendicular to both Q and R = [ 0.745 0.298 -0.596]\n",
+ "The component of P along Q = [ 0.4444 -0.2222 0.4444]\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 1.7, Page number: 21<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Show that points P1(5,2,-4), P2(1,1,2), and P3( -3,0,8) all \n",
+ "lie on a straight line. Determine the shortest distance between \n",
+ "the line and point P4(3,- 1,0). '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "P1=array([5,2,-4])\n",
+ "P2=array([1,1,2])\n",
+ "P3=array([-3,0,8])\n",
+ "P4=array([3,-1,0])\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "R12=P2-P1; #Distance vector from P1 to P2\n",
+ "R13=P3-P1; #Distance vector from P1 to P3\n",
+ "R14=P4-P1; #Distance vector from P1 to P4\n",
+ "s=cross(R12,R13)\n",
+ "x=cross(R14,R12)\n",
+ "d=scipy.sqrt(dot(x,x))/scipy.sqrt(dot(R12,R12)) #Distance from line to P4 \n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'The cross product of the distance vectors R12 and R14 =',s\n",
+ "print 'So they are along same direction and hence P1, P2 and P3 are collinear.'\n",
+ "print 'The shortest distance from the line to point P4 =',round(d,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The cross product of the distance vectors R12 and R14 = [0 0 0]\n",
+ "So they are along same direction and hence P1, P2 and P3 are collinear.\n",
+ "The shortest distance from the line to point P4 = 2.426\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elements_of_Electromagnetics/chapter_10.ipynb b/Elements_of_Electromagnetics/chapter_10.ipynb
new file mode 100644
index 00000000..ed7744f3
--- /dev/null
+++ b/Elements_of_Electromagnetics/chapter_10.ipynb
@@ -0,0 +1,566 @@
+{
+ "metadata": {
+ "name": "chapter_10.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 10: Electromagnetic Wave Propagation<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.1, Page number: 416<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "The elcctric field in free space is given by \n",
+ "E=50 cos(10^8t + Bx) a_y V/m \n",
+ "(a) Find the direction of wave propagation. \n",
+ "(b) Calculate B and the time it takes to travel a distance of lambda/2. \n",
+ "(c) Sketch the wave at t = 0, T/4, and T/2. '''\n",
+ "\n",
+ "import scipy\n",
+ "from pylab import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "w=10**8 \n",
+ "c=3.0*10**8\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "T=2*scipy.pi/w #timeperiod of the wave in sec\n",
+ "B=(w/c) #in rad/m\n",
+ "lam=2*scipy.pi/B #wavelength in m\n",
+ "t1=lam*10**9/(2*c) #time taken to travel half the wavelength in ns \n",
+ "\n",
+ "x=arange(-6*scipy.pi,6*scipy.pi,0.1)\n",
+ "\n",
+ "t=0\n",
+ "E=50*scipy.cos(10**8*t+x*w/c)\n",
+ "\n",
+ "subplot(3,1,1)\n",
+ "xlabel(\"x\")\n",
+ "ylabel(\"E for t=0\")\n",
+ "plot(x,E,'r')\n",
+ "\n",
+ "subplot(3,1,2)\n",
+ "t=T/4\n",
+ "E=50*scipy.cos(10**8*t+x*w/c)\n",
+ "xlabel(\"x\")\n",
+ "ylabel(\"E for t=T/4\")\n",
+ "plot(x,E)\n",
+ "\n",
+ "subplot(3,1,3)\n",
+ "t=T/2\n",
+ "E=50*scipy.cos(10**8*t+x*w/c)\n",
+ "xlabel(\"x\")\n",
+ "ylabel(\"E for t=T/2\")\n",
+ "plot(x,E,'g')\n",
+ "show()\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'Since the argument of cosine function is positive, '\n",
+ "print 'the wave is propagating in the negative x direction.'\n",
+ "print' B =',round(B,4),'rad/m'\n",
+ "print 'Time taken to travel a distance of lambda/2 =',round(t1,2),'n sec'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEICAYAAABF82P+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXlcVNX7xz+DG5bmhjurggyLMqgsmho7pCIq+hVzK7EU\nNVyyfmYlZmXhjpZroqlZmaXigoIimyaoWCjhlii448aObM/vj5MTKOswM/fOcN6vF6/g0sz5cL1z\nn3vOeZ7PIyEiAofD4XA4L6AjtAAOh8PhiBMeIDgcDodTKTxAcDgcDqdSeIDgcDgcTqXwAMHhcDic\nSuEBgsPhcDiVIliAyMvLw6RJk9CjRw9YWloiISEBOTk58PHxgaGhIYYPH47c3Fyh5HE4HE6DR7AA\nERQUBENDQyQnJyM5ORlSqRTr16+HoaEhrl69Cn19fWzYsEEoeRwOh9PgESxAHDt2DAsWLICuri4a\nN26MVq1aITExEf7+/mjWrBkmT56MhIQEoeRxOBxOg0ciRCX1rVu34ObmBkdHR6SmpmLkyJEIDAyE\nVCrF5cuXoauri/z8fFhYWODmzZv/iZVI1C2Vw+FwtAJFbvWCzCAKCwtx5coV+Pr6Ijo6GikpKdi9\ne3et/gAiEv1XUFCQ4Bq4Tq6T6+Qan38piiABwtTUFObm5vD29kbz5s0xduxYHDlyBHZ2dkhNTQUA\npKamws7OTgh5HA6Hw4GAexBmZmZISEhAWVkZDh06BDc3Nzg4OCA0NBQFBQUIDQ2Fo6OjUPI4HA6n\nwdNYqIGXL1+OiRMnorCwEG5ubvDz80NZWRnGjx8Pc3Nz9O7dG8HBwULJqxdOTk5CS6gVXKdy4TqV\niybo1ASN9UGQTWpFkUgktVtPu3ABiI8HXnsNaNU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lib.figure.Figure at 0x60587d0>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Since the argument of cosine function is positive, \n",
+ "the wave is propagating in the negative x direction.\n",
+ " B = 0.3333 rad/m\n",
+ "Time taken to travel a distance of lambda/2 = 31.42 n sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.2, Page number: 428<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A lossy dielectric has an intrinsic impedance of 200 /30degree ohms at\n",
+ "a particular frequency. If, at that frequency, the plane wave propagating \n",
+ "through the dielectric has the magnetic field component \n",
+ "\n",
+ "H = 10 e^-ax cos(wt-0.5x)a_y A/m \n",
+ "find E and a. Determine the skin depth and wave polarization. '''\n",
+ "\n",
+ "import cmath\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Ho=10 \n",
+ "n=200*scipy.exp(1)**(1j*scipy.pi/6) \n",
+ "b=0.5\n",
+ "\n",
+ "#Calclations\n",
+ "\n",
+ "Eo=n*Ho #amplitude of electric field in kV/m\n",
+ "P=scipy.arctan(scipy.sqrt(3)) \n",
+ "a=b*((scipy.sqrt(((1+(scipy.tan(P))**2)**0.5)-1))/(scipy.sqrt(((1+(scipy.tan(P)\n",
+ ")**2)**0.5)+1)))\n",
+ "delta=1/a\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'E has the same form as H except for amplitude and phase.'\n",
+ "print 'The amplitude and phase of E =',Eo,'kV/m'\n",
+ "print '= magnitude of 2000 and angle of pi/6'\n",
+ "print 'a =',round(a,4),'Np/m'\n",
+ "print 'Skin depth =',round(delta,3),'m'\n",
+ "print 'The polarization of wave is in z direction since it has an z component.'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "E has the same form as H except for amplitude and phase.\n",
+ "The amplitude and phase of E = (1732.05080757+1000j) kV/m\n",
+ "= magnitude of 2000 and angle of pi/6\n",
+ "a = 0.2887 Np/m\n",
+ "Skin depth = 3.464 m\n",
+ "The polarization of wave is in z direction since it has an z component.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.3, Page number: 430<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "In a loss]ess medium for which eta = 60 pi, mu_r = 1 and \n",
+ "H= -0.1 Cos(Wt - z)a_x + 0.5 sin(wt - z)a_y A/m, \n",
+ "calculate epison_r, w and E. '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "B=1\n",
+ "n=60*scipy.pi \n",
+ "Ur=1 #relative permeability\n",
+ "Eo=10**-9/(36*scipy.pi) #permittivity of free space\n",
+ "Uo=4*scipy.pi*10**-7 #permeability of free space\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Er=Uo*Ur/(n**2*Eo) #relative permittivity\n",
+ "w=B/scipy.sqrt(Eo*Er*Uo*Ur) #in rad/sec\n",
+ "eps=Eo*Er #permittivity of the medium in Farad/m\n",
+ "H1o=-0.1\n",
+ "H2o=0.5\n",
+ "Ex=H2o/(eps*w) #amplitude of x component of E in V/m\n",
+ "Ey=H1o/(eps*w) #amplitude of y component of E in V/m\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'er =',Er\n",
+ "print 'w =',w,'rad/sec'\n",
+ "print 'E =',round(Ex,2),'sin(wt-z)ax +',round(-Ey,2),'cos(wt-z)ay V/m'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "er = 4.0\n",
+ "w = 150000000.0 rad/sec\n",
+ "E = 94.25 sin(wt-z)ax + 18.85 cos(wt-z)ay V/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.4, Page number: 432<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A uniform plane wave propagating in a medium has \n",
+ "E = 2e^(-az) sin(10^8t-Bz)a_y V/m. \n",
+ "If the medium is characterized by epsilon_r=1, mu_r=20 and sigma=3 mhos/m, \n",
+ "find a,B and H. '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "E=2 #amplitude of E in V/m\n",
+ "sigma=3 #in mhos/m\n",
+ "w=10**8 #in rad/sec\n",
+ "Ur=20 #relative permeability\n",
+ "Eo=10**-9/(36*scipy.pi) #permittivity of free space in Farad/m\n",
+ "Er=1 #relative permittivity\n",
+ "Uo=4*scipy.pi*10**-7 #permeability of free space\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "a=round(scipy.sqrt(Uo*Ur*w*sigma/2),1) #in Np/m\n",
+ "B=a #rad/m\n",
+ "theta=scipy.arctan(sigma/(w*Eo*Er))*0.5 #in radians\n",
+ "thetad=round(theta*180/scipy.pi,0) #in degrees\n",
+ "H=E/(scipy.sqrt(Uo*Ur*w/sigma))*10**3 #amplitude of H in mA/m\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'alpha =',a,'Np/m'\n",
+ "print 'beta =',B,'rad/m'\n",
+ "print 'H =',round(H,1),'e^ (',a,'z ) sin(wt - Bz -',thetad,') mA/m'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "alpha = 61.4 Np/m\n",
+ "beta = 61.4 rad/m\n",
+ "H = 69.1 e^ ( 61.4 z ) sin(wt - Bz - 45.0 ) mA/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.6, Page number: 434<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "For the copper coaxial cable of Figure 7.12, let a = 2 mm, b = 6 mm\n",
+ "and t = 1 mm. Calculate the resistance of 2 m length of the cablc at dc\n",
+ "and at 100 MHz. '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ " \n",
+ "a=2*10**-3 #in m\n",
+ "b=6*10**-3 #in m \n",
+ "t=10**-3 #in m\n",
+ "l=2 #in m\n",
+ "c=5.8*10**7 #conductivity in seimens\n",
+ "f=100*10**6 #frequency in Hz\n",
+ "mu=4*scipy.pi*10**-7 #permeability of free space\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Ri=l/(c*scipy.pi*a*a) #dc resistance of inner cable in ohms\n",
+ "Ro=l/(c*scipy.pi*((b+t)**2-b**2)) #dc resistance of outer cable in ohms\n",
+ "Rdc=Ro+Ri #total dc resistance in ohms\n",
+ "\n",
+ "Ria=round(l/(2*scipy.pi*a)*scipy.sqrt(scipy.pi*f*mu/c),1)\n",
+ "Roa=round(l/(2*scipy.pi*b)*scipy.sqrt(scipy.pi*f*mu/c),4)\n",
+ "Rac=Ria+Roa #ac resistance in ohms\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'Rdc =',round(Rdc*10**3,3),'m ohms'\n",
+ "print 'Rac =',round(Rac,4),'ohms'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rdc = 3.588 m ohms\n",
+ "Rac = 0.5384 ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.7, Page number: 439<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "In a nonmagnetic medium \n",
+ "E= 4 sin (2pi X 10^7t - 0.8x) a_z V/m \n",
+ "Find\n",
+ "(a) epsilon_r,eta\n",
+ "(b) The time-average power carried by the wave \n",
+ "(c) The total power crossing 100 cm^2 of plane 2x + y = 5 '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "ax=array([1,0,0]) #Unit vector along x direction\n",
+ "ay=array([0,1,0]) #Unit vector along y direction\n",
+ "az=array([0,0,1]) #Unit vector along z direction\n",
+ "a=0 #alpha in m^-1\n",
+ "b=0.8 #beta in m^-1\n",
+ "Eo=10**-9/(36*scipy.pi) #permittivity of free space in farad/m\n",
+ "Uo=4*scipy.pi*10**-7 #permeability of free space\n",
+ "Ur=1 #relative permeability of medium\n",
+ "w=2*scipy.pi*10**7 #omega in rad/s\n",
+ "Eamp=4 #amplitude of the field in V/m\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Er=b**2/(Uo*Eo*w*w) #relative permittivity of the medium\n",
+ "n=scipy.sqrt(Uo/(Eo*Er)) #eta in ohms\n",
+ "Pav=Eamp**2/(2*n)*ax #average power in W/m^2\n",
+ "an=(2*ax+ay)/scipy.sqrt(5) #normal to the plane\n",
+ "S=100*10**-4*an #area in m^2\n",
+ "P=dot(Pav,S)*10**6 #power through the plane in micro W\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'Er=',round(Er,2)\n",
+ "print 'eta= ',round(n,1),'ohms'\n",
+ "print 'The time-average power =',round(dot(Pav,ax)*10**3,0),'ax mW/m^2'\n",
+ "print 'The total power crossing 100 cm^2 of the plane =',round(P,2),'micro W'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Er= 14.59\n",
+ "eta= 98.7 ohms\n",
+ "The time-average power = 81.0 ax mW/m^2\n",
+ "The total power crossing 100 cm^2 of the plane = 725.0 micro W\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 10.10, Page number: 458<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "An EM wave travels in free space with the electric field component \n",
+ "E =:100 e^j(0.866x-0.5z) ax V/m \n",
+ "Determine \n",
+ "(a) w and lambda\n",
+ "(b) The magnetic field component \n",
+ "(c) The time average power in the wave '''\n",
+ "\n",
+ "import scipy \n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "ax=array([1,0,0]) #Unit vector along x direction\n",
+ "ay=array([0,1,0]) #Unit vector along y direction\n",
+ "az=array([0,0,1]) #Unit vector along z direction\n",
+ "kx=0 #in m^-1\n",
+ "ky=0.866 #in m^-1\n",
+ "kz=0.5 #in m^-1\n",
+ "Eo=10**-9/(36*scipy.pi) #permittivity of free space in farad/m\n",
+ "Uo=4*scipy.pi*10**-7 #permeability of free space\n",
+ "c=1/(scipy.sqrt(Uo*Eo)) #speed of light in m/s\n",
+ "kvect=kx*ax+ky*ay+kz*az #propogation vector in m^-1\n",
+ "Eo=100 #amplitude of electric field\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "k=round(scipy.sqrt(kx*kx+ky*ky+kz*kz),0) #magnitude of k in m^-1\n",
+ "w=k*c #omega in rad/sec\n",
+ "lam=2*scipy.pi/k #wavelength in m\n",
+ "Ho=cross(kvect,Eo*ax*10)/(Uo*w) #amplitude of magnetic field in mA/m\n",
+ "Hoy=round(dot(Ho,ay),2) #y component of Ho\n",
+ "Hoz=round(dot(Ho,az),1) #z component of Ho\n",
+ "Hr=array([0,Hoy,Hoz]) #Ho with components rounded off\n",
+ "P=Eo**2/(2*120*scipy.pi)*kvect #average power in W/m^2\n",
+ "Py=round(dot(P,ay),2) #y component of P\n",
+ "Pz=round(dot(P,az),3) #z component of P\n",
+ "Pr=array([0,Py,Pz]) #P with components rounded off\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'w =',w,'rad/sec'\n",
+ "print 'lambda =',round(lam,3),'m'\n",
+ "print 'The magnetic field component =',Hr,'e^j(0.866x-0.5z) mA/m'\n",
+ "print 'The time average power in the wave =',Pr,'W/m^2'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "w = 300000000.0 rad/sec\n",
+ "lambda = 6.283 m\n",
+ "The magnetic field component = [ 0. 1.33 -2.3 ] e^j(0.866x-0.5z) mA/m\n",
+ "The time average power in the wave = [ 0. 11.49 6.631] W/m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.11, Page number: 459"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A uniform plane wave in air with \n",
+ "\u001f\u001d",
+ "E = 8 cos(wt - 4x - 3z) ay V/m \n",
+ "\u001f\u001d",
+ "is incident on a dielectric slah (z>= 0) with mur= 1.0\u001f epsilonr = 2.5\u001f ,sigma=0. Find \n",
+ "(a) The polarization of the wave \n",
+ "(b) The angle of incidence \n",
+ "(c) The reflected E field \n",
+ "(d) The transmitted H field '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "ax=array([1,0,0]) #Unit vector along x direction\n",
+ "ay=array([0,1,0]) #Unit vector along y direction\n",
+ "az=array([0,0,1]) #Unit vector along z direction\n",
+ "Ei=8 #incident wave amplitude\n",
+ "k=5 #propogation constant\n",
+ "Eo=10**-9/36*scipy.pi #permittivity of free space\n",
+ "Erel=2.5 #relative permittivity\n",
+ "muo=4*scipy.pi*10**-7 #permeability of free space\n",
+ "mur=1 #relative permeability\n",
+ "c=3*10**8 #speed of light\n",
+ "etao=377\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "w=k*c #frequency in rad\n",
+ "theta=scipy.arctan(4/3.0) #angle of incidence in rad\n",
+ "eta1=etao\n",
+ "eta2=377/scipy.sqrt(2.5)\n",
+ "thetai=scipy.arcsin(sin(theta)/scipy.sqrt(2.5))\n",
+ "gamm=(eta2*cos(theta)-eta1*cos(thetai))/(eta2*cos(theta)+eta1*cos(thetai))\n",
+ "Er=Ei*gamm #reflected E field amplitude in V/m\n",
+ "kt=w*scipy.sqrt(mur*Erel)/c\n",
+ "tao=2*eta2*cos(theta)/((eta2*cos(theta)+eta1*cos(thetai)))\n",
+ "Et=tao*Ei*ay\n",
+ "Ht=cross((4*ax+6.819*az)/(eta2*kt),Et)*10**3\n",
+ "Htx=round(dot(Ht,ax),2)\n",
+ "Hty=round(dot(Ht,ay),2)\n",
+ "Htz=round(dot(Ht,az),2)\n",
+ "Htc=array([Htx,Hty,Htz]) #transmitted H field amplitude\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'Polarisation is perpendicular polarization'\n",
+ "print 'Angle of incidence is ',round(180*theta/scipy.pi,2),'degrees'\n",
+ "print 'Er =',round(Er,3),'cos(',w,'t - 4x + 3z) V/m'\n",
+ "print 'Ht =',Htc,'cos(',w,'t - 4x - 6.819z) mA/m'\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Polarisation is perpendicular polarization\n",
+ "Angle of incidence is 53.13 degrees\n",
+ "Er = -3.112 cos( 1500000000 t - 4x + 3z) V/m\n",
+ "Ht = [-17.68 0. 10.37] cos( 1500000000 t - 4x - 6.819z) mA/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elements_of_Electromagnetics/chapter_11.ipynb b/Elements_of_Electromagnetics/chapter_11.ipynb
new file mode 100644
index 00000000..28188144
--- /dev/null
+++ b/Elements_of_Electromagnetics/chapter_11.ipynb
@@ -0,0 +1,673 @@
+{
+ "metadata": {
+ "name": "chapter_11.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 11: Transmission Lines<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.1, Page number: 482<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "An air line has characteristic impedance of 70 ohms and phase constant\n",
+ "of 3 rad/m at 100 MHz. Calculate the inductance per meter and the \n",
+ "capacitance per meter of the line. '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R=0\n",
+ "G=0\n",
+ "a=0\n",
+ "Ro=70 #characteristic impedence in ohms\n",
+ "B=3 #phase constant in rad/sec\n",
+ "f=100*10**6 #frequency in Hz\n",
+ "w=2*scipy.pi*f #omega in rad/sec\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "C=B/(w*Ro) #capacitance in F/m\n",
+ "L=Ro*Ro*C #inductance in H/m\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'inductance per meter =',round(L*10**9,1),'nH/m'\n",
+ "print 'capacitance per meter =',round(C*10**12,1),'pF/m'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "inductance per meter = 334.2 nH/m\n",
+ "capacitance per meter = 68.2 pF/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.2, Page number: 483<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A distortion less line has Z_o = 60 ohms, a = 20 mNp/m, u = 0.6c, where c\n",
+ "is the speed of light in a vacuum. Find R, L, G, C and lambda at 100 MHz. '''\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Zo=60 #in ohms\n",
+ "a=20*10**-3 #in Np/m\n",
+ "u=0.6*3*10**8 #in m/sec\n",
+ "f=100*10**6 #in Hz\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "R=a*Zo #resistance in ohms/m\n",
+ "L=Zo/u #inductance in H/m\n",
+ "G=a*a/R #conductivity in S/m\n",
+ "C=1/(u*Zo) #capacitance in F/m\n",
+ "lam=u/f #wavelentgh in m\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'R =',R,'ohm/m'\n",
+ "print 'L =',round(L*10**9,0),'nH/m'\n",
+ "print 'G =',round(G*10**6,0),'micro S/m'\n",
+ "print 'C =',round(C*10**12,2),'pF/m'\n",
+ "print 'lambda =',lam,'m'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "R = 1.2 ohm/m\n",
+ "L = 333.0 nH/m\n",
+ "G = 333.0 micro S/m\n",
+ "C = 92.59 pF/m\n",
+ "lambda = 1.8 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.3, Page number: 490<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A certain transmission line operating at w = 10^6 rad/sec has a=8 dB/m,\n",
+ "B = 1 rad/m, and Zo = 60 + j40 ohms, and is 2 m long. If the line is \n",
+ "connected to a source of 10/0 V, Zg = 40 ohms and terminated by a load of\n",
+ "20 + j50 ohms, deternline \n",
+ "\n",
+ "(a) The input impedance \n",
+ "(b) The sending-end current \n",
+ "(c) The current at the middle of the line '''\n",
+ "\n",
+ "import scipy\n",
+ "import cmath\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "w=10**6 #omega in rad/sec\n",
+ "B=1 #phase factor in rad/m\n",
+ "a=8.0/8.686 #alpha in Np/m\n",
+ "Y=a+1j #in m^-1\n",
+ "l=2 #length in m\n",
+ "Vg=10 #source voltage in volts\n",
+ "Zo=60+40j #in ohms\n",
+ "Zg=40 #in ohms\n",
+ "Zl=20+50j #load impedance in ohms\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "s=scipy.tanh(Y*l)\n",
+ "Zin=Zo*(Zl+Zo*s)/(Zo+Zl*s) #input impedance in ohms\n",
+ "Zinr=round(Zin.real,2) #real part of Zin rounded to 2 decimal places\n",
+ "Zini=round(Zin.imag,2) #imaginary part of Zin rounded to 2 decimal places\n",
+ "Io=Vg/(Zin+Zg) #in A\n",
+ "absIo=round(abs(Io),6) #absolute value of Io rounded to 6 decimal place\n",
+ "Ior=Io.real #real part of Io\n",
+ "Ioi=Io.imag #imaginary part of Io\n",
+ "angIo=scipy.arctan(Ioi/Ior)*180/scipy.pi \n",
+ " #in degrees\n",
+ "Vo=Zin*Io\n",
+ "Vop=(Vo+Zo*Io)/2\n",
+ "Vom =(Vo-Zo*Io)/2\n",
+ "Im=((Vop*scipy.e**(-Y)/Zo))-((Vom*scipy.e**Y)/Zo)\n",
+ " #current at the middle in A\n",
+ "absIm=round(abs(Im),5) #absolute value of Im rounded to 6 decimal place\n",
+ "Imr=Im.real #real part of Im \n",
+ "Imi=Im.imag #imaginary part of Im\n",
+ "angIm=360+scipy.arctan(Imi/Imr)*180/scipy.pi \n",
+ " #in degrees\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'The input impedance =',Zinr,'+',Zini,'j ohms'\n",
+ "print 'The sending-end current is'\n",
+ "print 'mod =',absIo*10**3,'mA, angle =',round(angIo,2),'degrees'\n",
+ "print 'The current at the middle is'\n",
+ "print 'mod =',absIm*10**3,'mA, angle =',round(angIm,0),'degrees'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The input impedance = 60.25 + 38.79 j ohms\n",
+ "The sending-end current is\n",
+ "mod = 93.03 mA, angle = -21.15 degrees\n",
+ "The current at the middle is\n",
+ "mod = 34.92 mA, angle = 281.0 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.4, Page number: 499<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A 30-m long loss less transmission line with Zo = 50 ohms operating at 2 MHz\n",
+ "is terminated with a load Zl = 60 + j40 ohms. If u = 0.6c on the line, find \n",
+ "\n",
+ "(a)The reflection coefficient r \n",
+ "(b)The standing wave ratio s \n",
+ "(c)The input impedance '''\n",
+ "\n",
+ "import scipy\n",
+ "import cmath\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "l=30 #length in m\n",
+ "Zo=50 #in ohms\n",
+ "f=2*10**6 #frequency in Hz\n",
+ "Zl=60+40j #load impedence in ohms\n",
+ "u=0.6*3*10**8 #in m/s\n",
+ "w=2*scipy.pi*f #omega in rad/sec\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "T=(Zl-Zo)/(Zl+Zo) #reflection coefficient\n",
+ "ang=scipy.arctan(T.imag/T.real)*180/scipy.pi #argument of T is degrees\n",
+ "s=(1+abs(T))/(1-abs(T)) #standing wave ratio \n",
+ "B=w/u #propogation vector in m^-1\n",
+ "Zin=Zo*(Zl+Zo*scipy.tan(B*l)*1j)/(Zo+Zl*scipy.tan(B*l)*1j)\n",
+ "Zinr=round(Zin.real,2) #real part of Zin rounded to 2 decimal places\n",
+ "Zini=round(Zin.imag,2) #imaginary part of Zin rounded to 2 decimal places\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'The reflection coefficient is'\n",
+ "print 'mod =',round(abs(T),4),'angle =',round(ang,0),'degrees'\n",
+ "print 'The standing wave ratio s =',round(s,3)\n",
+ "print 'The input impedance =',Zinr,'+',Zini,'j ohms'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reflection coefficient is\n",
+ "mod = 0.3523 angle = 56.0 degrees\n",
+ "The standing wave ratio s = 2.088\n",
+ "The input impedance = 23.97 + 1.35 j ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.5, Page number: 501<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A 100 + j150-ohms load is connected to a 75-ohm lossless line. Find: \n",
+ "\n",
+ "(a) r \n",
+ "(b) s \n",
+ "(c) The load admittance Yl\n",
+ "(d) Zin at O.4 lambda from the load \n",
+ "(e) The locations of V max and V min with respect to the load if the line is\n",
+ "O.6 lambda long \n",
+ "(f) Zin at the generator '''\n",
+ "\n",
+ "\n",
+ "import scipy\n",
+ "import cmath\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Zl=100+150j #load impedance in ohms\n",
+ "Zo=75 #impedance of line in ohms\n",
+ "B=2*scipy.pi \n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "T=(Zl-Zo)/(Zl+Zo)\n",
+ "angT=scipy.arctan(T.imag/T.real)*180/scipy.pi \n",
+ "s=(1+abs(T))/(1-abs(T))\n",
+ "Yl=(1/Zl)*10**3 #admittance in mS\n",
+ "Ylr=round(Yl.real,2) #real part of Yl rounded to 2 decimal places\n",
+ "Yli=round(Yl.imag,2) #imaginary part of Yl rounded to 2 decimal places\n",
+ "l1=0.4\n",
+ "Zin=Zo*(Zl+Zo*scipy.tan(B*l1)*1j)/(Zo+Zl*scipy.tan(B*l1)*1j)\n",
+ "Zinr=round(Zin.real,2) #real part of Zin rounded to 2 decimal places\n",
+ "Zini=round(Zin.imag,2) #imaginary part of Zin rounded to 2 decimal places\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'r is mod =',round(abs(T),3),',angle =',round(angT,0),'degrees'\n",
+ "print 's =',round(s,2)\n",
+ "print 'The load admittance Yl =',Ylr,'+',Yli,'j mS'\n",
+ "print 'Zin at O.4 lambda from the load =',Zinr,'+',Zini,'j ohms'\n",
+ "#part (e) and (f) don't require computations"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "r is mod = 0.66 ,angle = 40.0 degrees\n",
+ "s = 4.88\n",
+ "The load admittance Yl = 3.08 + -4.62 j mS\n",
+ "Zin at O.4 lambda from the load = 21.96 + 47.61 j ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.6, Page number: 509<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "With an unknown load connected to a slotted air line, s = 2 is recorded by \n",
+ "a standing wave indicator and minima are found at 11 cm, 19 cm, . . . on \n",
+ "the scale. When the load is replaced by a short circuit, the minima are at\n",
+ "16 cm, 24 cm,. . . . If Zo = 50 ohms, calculate lambda,f, and ZL '''\n",
+ "\n",
+ "import scipy\n",
+ "import cmath\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "s=2\n",
+ "l1=11 \n",
+ "l2=19\n",
+ "ma=24 \n",
+ "mi=16\n",
+ "u=3*10**8 #speed of wave in m/s\n",
+ "Zo=50 #in ohms\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "l=(l2-l1)*2 #lambda in cm\n",
+ "f=(u/l)*10**-7 #frequency in GHz\n",
+ "L=(24-19)/l #Let us assume load is at 24cm\n",
+ "zl=1.4+0.75j # by smith chart\n",
+ "Zl=Zo*zl #ZL in ohms\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'lambda =',l,'cm'\n",
+ "print 'f =',f,'GHz'\n",
+ "print 'ZL =',Zl,'ohms'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lambda = 16 cm\n",
+ "f = 1.875 GHz\n",
+ "ZL = (70+37.5j) ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.7, Page number: 510<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Antenna with impedance 40 + j30 ohms is to be matched to a 100-ohm lossless \n",
+ "line with a shorted stub. Determine \n",
+ "(a) The required stub admittance \n",
+ "(b) The distance between the stub and the antenna \n",
+ "(c) The stub length \n",
+ "(d) The standing wave ratio on each ratio of the system '''\n",
+ "\n",
+ "import scipy\n",
+ "import cmath\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Zo=100 #in ohms\n",
+ "Zl=40+30j #in ohms\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Yo=1.0/Zo #in S\n",
+ "yl=Zo/Zl\n",
+ "ys1=1.04j #By smith chart\n",
+ "ys2=-1.04j #By smith chart\n",
+ "Ys1=Yo*ys1 #in S\n",
+ "Ys2=Yo*ys2 #in S\n",
+ "la=round(0.5-(62-(-39))/720.0,2) #in units of lambda\n",
+ "lb=round((62-39)/720.0,3) #in units of lambda\n",
+ "da=round(88/720.0,4) #in units of lambda\n",
+ "db=round(272/720.0,4) #in units of lambda\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'The required stub admittance values in mS are',Ys1*1000,'and',Ys2*1000\n",
+ "print 'The distance between stub and antenna at A =',la,'in units of lambda'\n",
+ "print 'The distance between stub and antenna at B =',lb,'in units of lambda'\n",
+ "print 'The stub lengths =',da,'and',db,'in units of lambda'\n",
+ "print 'Part (d) is done using smith chart'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required stub admittance values in mS are 10.4j and -10.4j\n",
+ "The distance between stub and antenna at A = 0.36 in units of lambda\n",
+ "The distance between stub and antenna at B = 0.032 in units of lambda\n",
+ "The stub lengths = 0.1222 and 0.3778 in units of lambda\n",
+ "Part (d) is done using smith chart\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 11.9, Page number: 521"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A 75 ohm transmission line of length 60 m is terminated by a 100 ohm load. If a rectangular \n",
+ "pulse of width 5 micro sec and magnitude 4V is sent out by the generator connected to the line, \n",
+ "sketch I(0, t) and I( l, t) for 0 < t < 15 microS. Take Zg = 25 ohm and u = 0.1 c. '''\n",
+ "\n",
+ "import scipy\n",
+ "import matplotlib.pyplot as plt\n",
+ "\n",
+ "#Variable Declarataion\n",
+ "\n",
+ "zo=75 #in ohms\n",
+ "zg=25 #in ohms\n",
+ "zl=100 #in ohms\n",
+ "vg=4 #in volts\n",
+ "l=60 #in m\n",
+ "c=3*10**8 #speed of light in m/s\n",
+ "u=0.1*c #in m/s\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "gammag=(zg-zo)/(zg+zo)\n",
+ "gammal=(zl-zo)/(zl+zo)\n",
+ "Vo=zo*vg/(zo+zg) #in V\n",
+ "t1=l/u #in micro sec\n",
+ "Io=vg/(zo+zg) #in mA\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "t1=[0,4,5,8,9,12,13,15]\n",
+ "I1=[40,31.43,-8.571,-7.959,0.6123,0.5685,-0.0438,-0.438]\n",
+ "fig = plt.figure()\n",
+ "ax = fig.add_subplot(111)\n",
+ "ax.step(t1,I1,where='post')\n",
+ "ax.set_xlabel('Time (micro s)')\n",
+ "ax.set_ylabel(r'I(0,t) in mA')\n",
+ "plt.show()\n",
+ "\n",
+ "t2=[0,2,6,7,10,11,14]\n",
+ "I2=[0,34.3,31.9,-2.46,-2.28,0.176,0.176]\n",
+ "fig = plt.figure()\n",
+ "ax = fig.add_subplot(111)\n",
+ "ax.step(t2,I2,where='post')\n",
+ "ax.set_xlabel('Time (micro s)')\n",
+ "ax.set_ylabel(r'I(l,t) in mA')\n",
+ "plt.show()\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEMCAYAAADeYiHoAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGzFJREFUeJzt3X1wVNXhxvFn0SZgQUQtIMaQFCibgJAFQhIYwqqAVYxh\nFEaiQEdCRaryoradsdRGfzO0Gq1CLQlVY0dRUaqOjIIg6vJSQjaY2CImApUIqMibms0kwRDP7w+G\nLSEnDeTt3pDvZ2ZnsjfZex83sk/OuWfveowxRgAAnKaT0wEAAO5EQQAArCgIAIAVBQEAsKIgAABW\nFAQAwMrRgqitrZXP51NaWpokKRQKKT09XdHR0Zo0aZIqKiqcjAcAHZqjBbF48WLFx8fL4/FIknJy\nchQdHa1du3YpKipKubm5TsYDgA7NsYLYv3+/Vq9erVmzZunke/WCwaAyMzMVGRmpmTNnqqCgwKl4\nANDhne/UgRcsWKDs7GyVl5eHtxUWFsrr9UqSvF6vgsFgvcedHG0AAM7O2V44w5ERxFtvvaWePXvK\n5/PVCXym4Y0xrr/94Q9/cDzDmdyk9pGzvTyf5Ox4OdtDRmOadkUlR0YQW7Zs0apVq7R69WpVV1er\nvLxc06dPV2JiokpKSuTz+VRSUqLExEQn4gEA5NAIYtGiRdq3b5/27NmjFStW6Oq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YEVB\nAACsKAgAgBUFAQCwoiAAAFYUBADAioIAAFhREAAAKwoCAGBFQQAArCgIAIAVBQEAsKIgAABWFAQA\nwIqCAABYnVVBVFRU6IUXXtDEiRNbKw8AwCUaLYhjx47p9ddf15QpU9SnTx+99957uvPOO5t94H37\n9umqq67SoEGD5Pf79dJLL0mSQqGQ0tPTFR0drUmTJqmioqLZxwIAnD2PMcbYvrF27Vq9/PLLev/9\n9+X3+zVlyhTdc889Kisra5EDHzhwQAcOHFBCQoIOHz6skSNH6l//+pdycnK0b98+PfbYY7rvvvsU\nExOj+++//7+BPR41EBku4fFI/IoAd2nKa2eDI4jrrrtOR48e1datW/X8888rLS1NHo+n2SFP6t27\ntxISEiRJl156qQYNGqTCwkIFg0FlZmYqMjJSM2fOVEFBQYsdEwBw5s5v6BtFRUV6+eWXNXbsWPXr\n109TpkxRbW1tq4TYvXu3duzYoZEjR+r222+X1+uVJHm9XgWDwXo/n5WVFf7a7/fL7/e3Si4AaK8C\ngYACgUCz9tHgFNNJxhht2bJFL7/8sl577TUNHTpUN910k+64445mHfikUCgkv9+vBx98MHzuYefO\nnercubMqKysVFxenzz///L+BmWJyPaaYAPdp0SmmU3c6evRoPfXUU9q/f7/uvfdebd26tckhT1VT\nU6Obb75Z06dPV3p6uiQpMTFRJSUlkqSSkhIlJia2yLEAAGfnjJa5Hj58WG+99ZbefPNNhUKhFlnm\naoxRZmamBg8erPnz54e3JyUlKS8vT1VVVcrLy1NycnKzjwUAOHuNTjFlZWXp1Vdflc/nU0RERHj7\nc88916wDb968WampqRoyZEj45Pcf//hHjR49WtOmTVNxcbGGDRum5cuXq2vXrv8NzBST6zHFBLhP\nU147Gy2IQYMGqbi4uE45OImCcD8KAnCfVjkHMXr0aOXn5zc5FACgfWp0BFFcXKzU1FRddNFFuuii\ni048yOPRv//97zYJeDpGEO7HCAJwn6a8djb4PoiTpk6dqqeeekopKSmumWYCALS+Rguie/fuysjI\noBwAoINptCBSU1M1adIkTZ48Wd27d5d0Y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UA5oNkYQAAArRhAAACsK\nAgBgRUEAAKwoCACAFQUBALCiIAAAVv8PIrVuLX2NSRcAAAAASUVORK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x5f89c90>"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEMCAYAAADJQLEhAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHKVJREFUeJzt3Xlw1PXh//HXoiRAWRBECBiSMFw5OLLGsAkMmcUK2tgQ\nqDI19WBIam1ia2mEsWOpBp3SagZBqYKjxo6DIRWPQquAOHUFBHOYcBjDkUoQbQyXkI0JkYT9/eGX\n/IjkDpvPZ/k8HzOZ2d1kP/sib/J57ed6r83r9XoFALCsXkYHAAAYiyIAAIujCADA4igCALA4igAA\nLI4iAACL82kRnD17Vk6nU9HR0YqLi9OKFSskSVlZWQoODpbD4ZDD4dDmzZt9GQMA0Aabr68jqK2t\nVb9+/VRfX6+YmBi9/fbbys3Nld1uV2Zmpi9fGgDQAT7fNdSvXz9JUk1NjRoaGhQYGChJ4jo2ADCH\nq339AufPn5fD4VBpaalWrlypkJAQSdKqVau0fv16zZ07VxkZGbLb7c2eZ7PZfB0NAK5InX6j7e0h\nhw8f9kZERHiLi4u9VVVV3vPnz3tPnz7tve+++7zZ2dmX/HwPRvOJxx57zOgI3eLP+f05u9dLfqP5\ne/6urDt77KyhsLAwJSYmKj8/X0OHDpXNZtPAgQP1wAMP6O233+6pGACAH/BpEZw4cUKnT5+WJJ08\neVLvvfeekpOTVVlZKUlqaGhQbm6uEhMTfRkDANAGnx4jqKys1Pz589XY2KigoCAtWrRIw4cP1733\n3qvdu3crICBACQkJSk9P92UMQyxf7tLSpUan6A7/zd+/v0tZWUan6DqXy2V0hG4hv//x+emjXWWz\n2fz6zCKbTfLj+H6N3z2srCvrTq4sBgCLowgAwOIoAgCwOIoAACyOIgAAi6MIAMDiKAIAsDiKAAAs\nj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Hfeg9frVVBQkEaNGqU333xTXq9X586du+TdvPT95HUVFRVdznLHHXcoLy9P\nX331lSTpm2++uSTn9ddfr8DAQBUUFKiurk55eXmXzFbr9XpVUVGhqVOn6umnn1ZlZWVT6Xz++eca\nP358lzMCF1AE8EsX3glfvF/+4tsX/8wP7z///PP64IMPmg787tq165LlR0dHN5sO/YfLae2d+IXH\nR40apUceeUR33323oqOjtXz58hZzrVmzRtnZ2UpISNC0adMumS21sbFR99xzjyZNmqQf//jHysrK\natrK2b9/vxwOR4s5gM7g9FGgFfHx8dqyZYsGDBhgdJRL1NfXa+rUqSoqKmL3ELqNLQKgFffdd59e\ne+01o2O0aMOGDUpJSaEEcFmwRQAAFscWAQBYHEUAABZHEQCAxVEEAGBxFAEAWBxFAAAW9/8AjjI6\n8BSLXDoAAAAASUVORK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x6342070>"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.10, Page number: 527<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A certain microstrip line has fused quartz (Er=3.8) as a substrate. \n",
+ "If the ratio of line width to substrate thickness is w/h = 4.5, determine \n",
+ "\n",
+ "(a) The effective relative permittivity of the substrate \n",
+ "(b) The characteristic impedance of the line \n",
+ "(c) The wavelength of the line at 10 GHz '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Er=3.8 #relative permittivity\n",
+ "c=3*10**8 #speed of wave in m/s\n",
+ "r=4.5 #ratio of line width to substrate thickness\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Eeff=((Er+1)/2)+((Er-1)/(2*(1+12/r)**0.5))\n",
+ "Zo=(120*scipy.pi)/((r+1.393+(0.667*scipy.log(r+1.444)))*((Eeff)**0.5))\n",
+ "f=10**10\n",
+ "l=c/(f*scipy.sqrt(Eeff))\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'The effective relative permittivity of the substrate =',round(Eeff,3)\n",
+ "print 'The characteristic impedance of the line =',round(Zo,2),'ohms'\n",
+ "print 'The wavelength of the line at 10 GHz =',round(l*1000,2),'mm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The effective relative permittivity of the substrate = 3.131\n",
+ "The characteristic impedance of the line = 30.08 ohms\n",
+ "The wavelength of the line at 10 GHz = 16.95 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 11.11, Page number: 527<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "At 10 GHz, a microstrip line has the following parameters: \n",
+ "h = 1 mm \n",
+ "w = 0.8 mm \n",
+ "Er = 6.6 \n",
+ "tan(theta) = 10^-4 \n",
+ "sigma_r = 5.8 X 10^7 S/m \n",
+ "Calculate the attenuation due to conduction loss and dielectric loss. '''\n",
+ "\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "h=1 #in mm\n",
+ "w=0.8 #in mm\n",
+ "Er=6.6 #relative permittivity\n",
+ "P=scipy.arctan(0.0001) \n",
+ "c=5.8*10**7 #conductivity in S/m\n",
+ "f=10**10 #frequency in Hz\n",
+ "mu=4*scipy.pi*10**-7 #permeability of free space\n",
+ "C=3*10**8 #speed of wave in m/s\n",
+ "r=w/h\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Ee=((Er+1)/2.0)+((Er-1)/(2.0*(1+12/r)**0.5))\n",
+ "Zo=(120.0*scipy.pi)/((r+1.393+(0.667*scipy.log(r+1.444)))*((Ee)**0.5))\n",
+ "Rs=scipy.sqrt((scipy.pi*f*mu)/c)\n",
+ "ac=8.686*Rs/(w*(10**-3)*Zo)\n",
+ "l=C/(f*(Ee)**0.5)\n",
+ "ad=27.3*(Ee-1)*Er*scipy.tan(P)/((Er-1)*Ee*l)\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'attenuation due to conduction loss =',round(ac,2),'dB/m'\n",
+ "print 'attenuation due to dielectric loss =',round(ad,3),'dB/m'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "attenuation due to conduction loss = 4.35 dB/m\n",
+ "attenuation due to dielectric loss = 0.177 dB/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elements_of_Electromagnetics/chapter_12.ipynb b/Elements_of_Electromagnetics/chapter_12.ipynb
new file mode 100644
index 00000000..b6ded6a6
--- /dev/null
+++ b/Elements_of_Electromagnetics/chapter_12.ipynb
@@ -0,0 +1,452 @@
+{
+ "metadata": {
+ "name": "chapter_12.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 12: Waveguides<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.1, Page number: 557<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "'''\n",
+ "A rectangular waveguide with dimensions a = 2.5 cm, b = 1 cm is to \n",
+ "operate below 15.1 GHz. How many TE and TM modes can the waveguide transmit\n",
+ "if the guide is filled with a medium characterized by sigma = 0, epsilon = 4\n",
+ "epsilon_o,mu_r = 1? Calculate the cutoff frequencies of the modes. '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "a=2.5*10**-2 #in m\n",
+ "b=1*10**-2 #in m\n",
+ "c=0\n",
+ "Ur=1 #relative permeability\n",
+ "Er=4 #relative permittivity\n",
+ "C=3*10**8 #speed of wave in m/s\n",
+ "fc=0\n",
+ "m=0\n",
+ "n=0\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "while (fc*10**-9 < 15.1) :\n",
+ " fc = (C/(4*a))*scipy.sqrt(m**2+(a*n/b)**2)\n",
+ " if (( fc*10**-9) < 15.1) :\n",
+ " n=n+1\n",
+ " else:\n",
+ " print 'Maximum value of n is ',n-1\n",
+ "\n",
+ "nmax=n-1 \n",
+ "fc=0\n",
+ "m=0\n",
+ "n=0\n",
+ "while(fc*10**-9 < 15.1):\n",
+ " fc =(C/(4*a))*scipy.sqrt(m**2+(a*n/b)**2)\n",
+ " if((fc*10**-9) < 15.1):\n",
+ " m=m+1\n",
+ " else:\n",
+ " print 'Maximum value of m is ',m-1 \n",
+ "\n",
+ "mmax=m-1\n",
+ "m=0\n",
+ "while(m<mmax+1):\n",
+ " n=0\n",
+ " while(n<nmax+1):\n",
+ " p=(C/(4*a))*scipy.sqrt(m**2+(a*n/b)**2)\n",
+ " if((p*10**-9) < 15.1) :\n",
+ " print m,n,'transmission mode is possible'\n",
+ " print 'frequency is',round(p*10**-9,2),'GHz'\n",
+ " else:\n",
+ " print m,n,'transmission mode is not possible'\n",
+ " n=n+1\n",
+ " \n",
+ " m=m+1\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum value of n is 2\n",
+ "Maximum value of m is 5\n",
+ "0 0 transmission mode is possible\n",
+ "frequency is 0.0 GHz\n",
+ "0 1 transmission mode is possible\n",
+ "frequency is 7.5 GHz\n",
+ "0 2 transmission mode is possible\n",
+ "frequency is 15.0 GHz\n",
+ "1 0 transmission mode is possible\n",
+ "frequency is 3.0 GHz\n",
+ "1 1 transmission mode is possible\n",
+ "frequency is 8.08 GHz\n",
+ "1 2 transmission mode is not possible\n",
+ "2 0 transmission mode is possible\n",
+ "frequency is 6.0 GHz\n",
+ "2 1 transmission mode is possible\n",
+ "frequency is 9.6 GHz\n",
+ "2 2 transmission mode is not possible\n",
+ "3 0 transmission mode is possible\n",
+ "frequency is 9.0 GHz\n",
+ "3 1 transmission mode is possible\n",
+ "frequency is 11.72 GHz\n",
+ "3 2 transmission mode is not possible\n",
+ "4 0 transmission mode is possible\n",
+ "frequency is 12.0 GHz\n",
+ "4 1 transmission mode is possible\n",
+ "frequency is 14.15 GHz\n",
+ "4 2 transmission mode is not possible\n",
+ "5 0 transmission mode is possible\n",
+ "frequency is 15.0 GHz\n",
+ "5 1 transmission mode is not possible\n",
+ "5 2 transmission mode is not possible\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.3, Page number: 561<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "In a rectangular waveguide for which a = 1.5 cm, b = 0.8 cm, sigma = 0, \n",
+ "mu = mu_o and epsilon = 4epsilon_o,\n",
+ "\n",
+ "Hx=2sin(pi x/a) cos(3pi y/b)sin(pi X 10^11t - Bz) A/m\n",
+ "\n",
+ "Determine \n",
+ "(a) The mode of operation \n",
+ "(b) The cutoff frequency \n",
+ "(c) The phase constant B \n",
+ "(d) The propagation constant gamma\n",
+ "(e) The intrinsic wave impedance eta '''\n",
+ "\n",
+ "import scipy\n",
+ "import cmath\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "a=1.5*10**-2 #in m\n",
+ "b=0.8*10**-2 #in m\n",
+ "c=0\n",
+ "Uo=4*scipy.pi*10**-7 #permeability of free space\n",
+ "Ur=1 #relative permeability\n",
+ "Eo=10**-9/(36*scipy.pi) #permittivity of free space\n",
+ "Er=4 #relative permittivity\n",
+ "C=3*10**8 #speed of light in m/s\n",
+ "w=scipy.pi*10**11 #omega in rad/s\n",
+ "m=1\n",
+ "n=3\n",
+ "u=C/2 #speed of wave in m/s\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "f=w/(2*scipy.pi) #frequency of wave in Hz\n",
+ "fc=u*((m*m)/(a*a)+(n*n)/(b*b))**0.5/2 #cutoff frequency in Hz\n",
+ "B=w*scipy.sqrt(1-(fc/f)**2)/u #phase constant in rad/m\n",
+ "eta=377/scipy.sqrt(Er)*scipy.sqrt(1-(fc/f)**2) #intrinsic wave impedance in ohm\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'The cutoff frequency =',round(fc*10**-9,2),'GHz'\n",
+ "print 'The phase constant =',round(B,2),'rad/m'\n",
+ "print 'The propagation constant =',round(B,2),'j /m'\n",
+ "print 'The intrinsic wave impedance =',round(eta,1),'ohms'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The cutoff frequency = 28.57 GHz\n",
+ "The phase constant = 1718.93 rad/m\n",
+ "The propagation constant = 1718.93 j /m\n",
+ "The intrinsic wave impedance = 154.7 ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.4, Page number: 565<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A standard air-filled rectangular waveguide with dimensions a = 8.636 cm,\n",
+ "b = 4.318 cm is fed by a 4-GHz carrier from a coaxial cable. Determine if a \n",
+ "TE_10 mode will be propagated. If so, calculate the phase velocity and \n",
+ "the group velocity. '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "a=8.636*10**-2 #in m\n",
+ "b=4.318*10**-2 #in m\n",
+ "f=4*10**9 #in Hz\n",
+ "u=3*10**8 #speed of wave in m/s\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "fc=u/(2*a)\n",
+ "if(f>fc):\n",
+ " print 'As f>fc, TE10 mode will propogate'\n",
+ "else:\n",
+ " print 'It will not propogate'\n",
+ "\n",
+ "Up=u/scipy.sqrt(1-(fc/f)**2) #phase velocity in m/s\n",
+ "Ug=u*u/Up #group velocity in m/s\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'Phase velocity =',round(Up*10**-6,0),'Mm/s'\n",
+ "print 'Group velocity =',round(Ug*10**-6,1),'Mm/s'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "As f>fc, TE10 mode will propogate\n",
+ "Phase velocity = 333.0 Mm/s\n",
+ "Group velocity = 270.2 Mm/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.5, Page number: 570<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "An air-filled rectangular waveguide of dimensions a = 4 cm, b = 2 cm \n",
+ "transports energy in the dominant mode at a rate of 2 mW. If the frequency of\n",
+ "operation is lO GHz. Determine the peak value of the electric field \n",
+ "in the waveguide. '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f=10*10**9 #frequency of operation in Hz\n",
+ "a=4*10**-2 #in m\n",
+ "b=2*10**-2 #in m\n",
+ "u=3*10**8 #velocity in m/s\n",
+ "Pavg=2*10**-3 #average power in W\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "fc=u/(2*a) #cutoff frequency in Hz\n",
+ "n=377/scipy.sqrt(1-(fc/f)**2) #intrinsic wave impedance in ohms\n",
+ "E=scipy.sqrt(4*n*Pavg/(a*b)) #peak value of electric field in V/m\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'Peak value of electric field =',round(E,2),'V/m'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Peak value of electric field = 63.77 V/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.6, Page number: 571<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A copper-plated waveguide (sigma_e = 5.8 X 10 7 S/m) operating at 4.8 GHz \n",
+ "is supposed to deliver a minimum power of 1.2 kW to an antenna. If the guide\n",
+ "is fillcd with polystyrene (sigma = 10^17 S/m, epsilon = 2.55 epsilon_o) and\n",
+ "its dimensions are a = 4.2 cm, b = 2.6 cm, calculate the power dissipated in \n",
+ "a length 60 cm of the guide in the TE_10 mode. '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "cc=5.8*10**7 #in S/m\n",
+ "f=4.8*10**9 #in Hz\n",
+ "c=10**-17 #in S/m\n",
+ "Uo=4*scipy.pi*10**-7 #permeability of free space\n",
+ "Eo=10**-9/(36*scipy.pi) #permittivity of free space\n",
+ "Er=2.55 #relative permittivity\n",
+ "z=60*10**-2 #in m\n",
+ "l=4.2*10**-2 #in m\n",
+ "b=2.6*10**-2 #in m\n",
+ "P=1.2*10**3 #in W\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "n=377/scipy.sqrt(Er)\n",
+ "u=3*10**8/scipy.sqrt(Er)\n",
+ "fc=u/(2*l)\n",
+ "ad=c*n/(2*scipy.sqrt(1-(fc/f)**2))\n",
+ "Rs=scipy.sqrt(scipy.pi*f*Uo/cc)\n",
+ "ac=2*Rs*(0.5+(b/l)*(fc/f)**2)/(b*n*scipy.sqrt(1-(fc/f)**2))\n",
+ "a=ac\n",
+ "Pd=P*(scipy.e**(2*a*z)-1)\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'power dissipated =',round(Pd,3),'W'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "power dissipated = 6.096 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 12.8, Page number: 579<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "An air-filled resonant cavity with dimensions a = 5 cm, b = 4 cm, and \n",
+ "c = 10 cm is made of copper (sigma_e = 5.8 X 10^7 mhos/m). Find \n",
+ "(a) The five lowest order modes \n",
+ "(b) The quality factor for TE_101 mode '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ " \n",
+ "a=5*10**-2 #in m\n",
+ "b=4*10**-2 #in m\n",
+ "c=10*10**-2 #in m\n",
+ "C=5.8*10**7 #in mhos/m\n",
+ "Uo=4*scipy.pi*10**-7 #permeability of free space\n",
+ "u=3*10**8 #speed of wave in m/s\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "def f(m,n,p):\n",
+ " fr=scipy.sqrt((m/a)**2+(n/b)**2+(p/c)**2)*u/2 #resonant frequency in Hz\n",
+ " print round(fr*10**-9,3)\n",
+ " \n",
+ "\n",
+ "f101=3.35*10**9\n",
+ "d=scipy.sqrt(1/(scipy.pi*f101*Uo*C))\n",
+ "Q=(a*a+c*c)*a*b*c/(d*(2*b*(a**3+c**3)+a*c*(a*a+c*c))) #quality factor\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'Thus the five lowest order modes in ascending order are '\n",
+ "print 'TE101, frequency in GHz ='\n",
+ "f(1,0,1)\n",
+ "print 'TE011, frequency in GHz ='\n",
+ "f(0,1,1)\n",
+ "print 'TE102, frequency in GHz ='\n",
+ "f(1,0,2)\n",
+ "print 'TE110, frequency in GHz ='\n",
+ "f(1,1,0)\n",
+ "print 'TE111 or TM111, frequency in GHz ='\n",
+ "f(1,1,1)\n",
+ "print 'Quality factor =',round(Q,0)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thus the five lowest order modes in ascending order are \n",
+ "TE101, frequency in GHz =\n",
+ "3.354\n",
+ "TE011, frequency in GHz =\n",
+ "4.039\n",
+ "TE102, frequency in GHz =\n",
+ "4.243\n",
+ "TE110, frequency in GHz =\n",
+ "4.802\n",
+ "TE111 or TM111, frequency in GHz =\n",
+ "5.031\n",
+ "Quality factor = 14358.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elements_of_Electromagnetics/chapter_13.ipynb b/Elements_of_Electromagnetics/chapter_13.ipynb
new file mode 100644
index 00000000..0aaf4534
--- /dev/null
+++ b/Elements_of_Electromagnetics/chapter_13.ipynb
@@ -0,0 +1,428 @@
+{
+ "metadata": {
+ "name": "chapter_13.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 13: Antennas<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.1, Page number: 601<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A magnetic field strength of 5 muA/m is required at a point on theta = pi/2,\n",
+ "2 km from an antenna in air. Neglecting ohmic loss, how much power must \n",
+ "the antenna transmit if it is \n",
+ "\n",
+ "(a) A Hertzian dipole of length lambda/25?\n",
+ "(b) A half-wave dipole? \n",
+ "(c) A quarter-wave monopole? \n",
+ "(d) A 10-turn loop antenna of radius Po = lambda/20? '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "H=5*10**-6 #magnetic field strentgh in A/m\n",
+ "theta=scipy.pi/2 \n",
+ "r=2*10**3 #distance in m\n",
+ "Bdl=2*scipy.pi/25\n",
+ "N=10 #number of turns\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Ia=4*scipy.pi*r*H/(Bdl*scipy.sin(theta)) #current for part (a) in A\n",
+ "Pa=40*scipy.pi**2*(1/25.0)**2*Ia**2 #power for part (a) in W\n",
+ "def pow(Io,Rrad):\n",
+ " P=0.5*Io**2*Rrad\n",
+ " print round(P*10**3,0),'mW'\n",
+ "\n",
+ "denom=scipy.cos(scipy.pi*scipy.cos(theta)/2) \n",
+ "Ib=H*2*scipy.pi*r*scipy.sin(theta)/denom #current for part (b) in A\n",
+ "Rradb=73 #wave impedance in ohms for (b)\n",
+ "Ic=Ib #current for part (c) in A\n",
+ "Rradc=36.56 #wave impedance in ohms for (c)\n",
+ "Id=H*r*400/(10*scipy.pi**2) #current for part (d) in A\n",
+ "Rradd=320*scipy.pi**6*N**2/20**4 #wave impedance in ohms for (d)\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'The power transmitted in mW if antenna is ;'\n",
+ "print '(a) A Hertzian dipole of length lambda/25 =','\\n',round(Pa*10**3,0),'mW'\n",
+ "print '(b) A half-wave dipole ='\n",
+ "pow(Ib,Rradb)\n",
+ "print '(c) A quarter-wave monopole ='\n",
+ "pow(Ic,Rradc)\n",
+ "print '(d) A 10-turn loop antenna of radius Po = lambda/20 ='\n",
+ "pow(Id,Rradd)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The power transmitted in mW if antenna is ;\n",
+ "(a) A Hertzian dipole of length lambda/25 = \n",
+ "158.0 mW\n",
+ "(b) A half-wave dipole =\n",
+ "144.0 mW\n",
+ "(c) A quarter-wave monopole =\n",
+ "72.0 mW\n",
+ "(d) A 10-turn loop antenna of radius Po = lambda/20 =\n",
+ "158.0 mW\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.2, Page number: 603<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "An electric field strength of 10 micro V/m is to be measured at an observation \n",
+ "point theta=pi/2, 500 km from a half-wave (resonant) dipole antenna operating\n",
+ "in air at 50 MHz. \n",
+ "(a) What is the length of the dipole? \n",
+ "(b) Calculate the current that must be fed to the antenna. \n",
+ "(c) Find the average power radiated by the antenna. \n",
+ "(d) If a transmission line with Zo = 75 ohms is connected to the antenna,\n",
+ "determine the standing wave ratio. '''\n",
+ "\n",
+ "import scipy\n",
+ "import cmath\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "c=3*10**8 #speed of wave in m/s\n",
+ "f=50*10**6 #frequency in Hz\n",
+ "E=10*10**-6 #field strength in V/m\n",
+ "theta=scipy.pi/2\n",
+ "r=500*10**3 #distance in m\n",
+ "eta=120*scipy.pi #wave impedance in ohms\n",
+ "Rrad=73 #in ohms\n",
+ "Zo=75 #in ohms\n",
+ "Zl=73+42.5j\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "l=c/(2*f)\n",
+ "I=E*2*r*scipy.pi*sin(theta)/(eta*(cos((scipy.pi/2)*cos(theta))))\n",
+ "P=0.5*I**2*Rrad\n",
+ "T=(Zl-Zo)/(Zl+Zo)\n",
+ "s=(1+abs(T))/(1-abs(T))\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'The length of the dipole =',l,'m'\n",
+ "print 'The current that must be fed to the antenna =',round(I*10**3,2),'mA'\n",
+ "print 'The average power radiated by the antenna =',round(P*10**3,1),'mW'\n",
+ "print 'The standing wave ratio =',round(s,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The length of the dipole = 3 m\n",
+ "The current that must be fed to the antenna = 83.33 mA\n",
+ "The average power radiated by the antenna = 253.5 mW\n",
+ "The standing wave ratio = 1.7636\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.4, Page number: 610<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Determine the electric field intensity at a distance of 10 km from an antenna \n",
+ "having a directive gain of 5 dB and radiating a total power of 20 kW. '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "G=5\n",
+ "r=10*10**3 #in m\n",
+ "P=20*10**3 #power in W\n",
+ "n=120*scipy.pi #wave impedance in ohms\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Gd=10**(G/10.0)\n",
+ "E=scipy.sqrt(n*Gd*P/(2*scipy.pi*r*r)) #field intensity in V/m\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'electric field intensity =',round(E,4),'V/m'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "electric field intensity = 0.1948 V/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.5, Page number: 611<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "The radiation intensity of a certain antenna is \n",
+ "\n",
+ "U(theta,phi) = 2sin(theta) sin^3(phi) , 0<theta<pi,0<phi<pi\n",
+ " = 0, elsewhere\n",
+ "\n",
+ "Determine the directivity of the antenna. '''\n",
+ "\n",
+ "import scipy\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Umax=2.0\n",
+ "\n",
+ "def U(phi,theta):\n",
+ " s=2*scipy.sin(theta)*(scipy.sin(phi))**3/(4.0*scipy.pi)\n",
+ " return s\n",
+ " \n",
+ "#Calculations\n",
+ "\n",
+ "if __name__ == '__main__':\n",
+ " \n",
+ " Uav,er=scipy.integrate.dblquad(lambda theta,phi:U(phi,theta)*scipy.sin(theta), \n",
+ " 0, scipy.pi, lambda theta: 0, lambda theta: scipy.pi)\n",
+ "\n",
+ "D=Umax/Uav #Directivity\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'directivity of the antenna =',D"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "directivity of the antenna = 6.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.8, Page number: 624<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Find the maximum effective area of a lamba/2 wire dipole operating at 30 MHz.\n",
+ "How much power is received with an incident plane wave of strength 2 mV/m.'''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "c=3*10**8 #speed of wave in m/s\n",
+ "f=30*10**6 #frequency in Hz\n",
+ "E=2*10**-3 #field strength in V/m\n",
+ "n=120*scipy.pi\n",
+ "R=73 \n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "l=c/f #wavelength in m\n",
+ "Gdmax=round(n/(scipy.pi*R),2) \n",
+ "Amax=(l**2/(4*scipy.pi))*Gdmax #maximum effective area in m^2\n",
+ "Pr=(E*E*Amax)/(2*n) #power received in W\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'maximum effective area =',round(Amax,2),'m^2'\n",
+ "print 'power received =',round(Pr*10**9,2),'nW'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum effective area = 13.05 m^2\n",
+ "power received = 69.24 nW\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.9, Page number: 624<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "The transmitting and receiving antennas are separated by a distance of \n",
+ "200 lambda and have directive gains of 25 and 18 dB, respectively. If 5 mW\n",
+ "of power is to be received, calculate the minimum transmitted power. '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Gt=25 #in dB\n",
+ "Gr=18 #in dB\n",
+ "r=200 #in units of lambda\n",
+ "Pr=5*10**-3 #power received in W\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Gdt=10**(Gt/10.0) \n",
+ "Gdr=10**(Gr/10.0)\n",
+ "Pt=Pr*(4*scipy.pi*r)**2/(Gdr*Gdt)\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'minimum transmitted power =',round(Pt,3),'W'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum transmitted power = 1.583 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 13.10, Page number: 627<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "An S-band radar transmitting at 3 GHz radiates 200 kW. Determine the signal\n",
+ "power density at ranges 100 and 400 nautical miles if the effective area of \n",
+ "the radar antenna is 9 m^2 . With a 20-m^2 target at 300 nautical miles, \n",
+ "calculate the power of the reflected signal at the radar. '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "c=3*(10)**8 #speed of wave in m/s\n",
+ "f=3.0*(10)**9 #frequency in Hz\n",
+ "Aet=9 #effective area in m^2\n",
+ "r1=1.852*(10)**5 #distance in m\n",
+ "r2=4*r1 #distance in m\n",
+ "r3=5.556*10**5 #distance in m\n",
+ "Pr=200*(10)**3 #in W\n",
+ "a=20 #target area in m^2\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "l=c/f #wavelength in m\n",
+ "Gdt=4*scipy.pi*Aet/(l*l)\n",
+ "P1=Gdt*Pr/(4*scipy.pi*r1*r1) #power at 100 nmiles in W/m^2\n",
+ "P2=Gdt*Pr/(4*scipy.pi*r2*r2) #power at 400 nmiles in W/m^2\n",
+ "Pr=Aet*a*Gdt*Pr/(4*scipy.pi*r3*r3)**2 #power of reflected signal in W\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'Signal power density at 100 nautical miles =',round(P1*1000,3),'mW/m^2'\n",
+ "print 'Signal power density at 400 nautical miles =',round(P2*1000,3),'mW/m^2'\n",
+ "print 'Power of reflected signal =',round(Pr*10**12,5),'pico W'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Signal power density at 100 nautical miles = 5.248 mW/m^2\n",
+ "Signal power density at 400 nautical miles = 0.328 mW/m^2\n",
+ "Power of reflected signal = 0.02706 pico W\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elements_of_Electromagnetics/chapter_14.ipynb b/Elements_of_Electromagnetics/chapter_14.ipynb
new file mode 100644
index 00000000..1a5d389b
--- /dev/null
+++ b/Elements_of_Electromagnetics/chapter_14.ipynb
@@ -0,0 +1,172 @@
+{
+ "metadata": {
+ "name": "chapter_14.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 14: Modern Topics<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.1, Page number: 643<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "The following S-parameters are obtained for a microwave transistor operating \n",
+ "at 2.5 GHz: S11 = 0.85 / 30\u00b0 ,S12 = 0.07 /56\u00b0 , S21 = 1.68 /120\u00b0 , \n",
+ "S22 = O.85 /-40 . Determine the input reflection coefficient when ZL=Zo=75 ohm. '''\n",
+ "\n",
+ "import scipy\n",
+ "import cmath\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "S11=0.85*scipy.e**(-30j*scipy.pi/180)\n",
+ "S12=0.07*scipy.e**(56j*scipy.pi/180)\n",
+ "S21=1.68*scipy.e**(120j*scipy.pi/180)\n",
+ "S22=0.85*scipy.e**(-40j*scipy.pi/180)\n",
+ "Zl=75 \n",
+ "Zo=75\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Tl=(Zl-Zo)/(Zl+Zo)\n",
+ "Ti=S11+(S12*S21*Tl)/(1-S22*Tl) #reflection coefficient\n",
+ "Timod=abs(Ti) #mod of Ti\n",
+ "Tiang=scipy.arctan(Ti.imag/Ti.real)*180/scipy.pi #argument of Ti in degrees\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'input reflection coefficient =',Timod,'/',Tiang,'degrees'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input reflection coefficient = 0.85 / -30.0 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.2, Page number: 654<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A step-index fiber has a core diameter of 80 micro m, a core refractive index \n",
+ "of 1.62, and a numerical aperture of 0.21. Calculate: \n",
+ "(a) the acceptance angle, (b) the refractive index that the fiber can \n",
+ "propagate at a wavelength of 0.8 micro m, (c) the number of modes that the\n",
+ "fiber can propagate at a wavelength of 0.8 micro m.'''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "d=80*(10)**-6 #diameter in m\n",
+ "n1=1.62 #core refractive index\n",
+ "NA=0.21 #numerical aperture\n",
+ "L=8*(10)**-7 #wavelength in m\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "P=scipy.arcsin(NA)*180/scipy.pi #acceptance angle\n",
+ "n2=scipy.sqrt(n1**2-NA**2) #refractive index\n",
+ "V=(scipy.pi*d/L)*scipy.sqrt(n1**2-n2**2)\n",
+ "N=V**2/2 #number of modes\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'Acceptance angle =',round(P,2),'degrees'\n",
+ "print 'Refractive index =',round(n2,3)\n",
+ "print 'No. of modes =',round(N,0)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Acceptance angle = 12.12 degrees\n",
+ "Refractive index = 1.606\n",
+ "No. of modes = 2176.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 14.3, Page number: 655<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Light pulses propagate through a fiber cable with an attenuation of 0.25 dB/km.\n",
+ "Determine the distance through which the power of pulses is reduced by 40%. '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "a=0.25 #in dB/km\n",
+ "P=1-0.4 #strength of pulse im %\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "l=(10/a)*scipy.log(1/P)/scipy.log(10) #distance in km\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'distance through which the power is reduced by 40% =',round(l,3),'km'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "distance through which the power is reduced by 40% = 8.874 km\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elements_of_Electromagnetics/chapter_2.ipynb b/Elements_of_Electromagnetics/chapter_2.ipynb
new file mode 100644
index 00000000..042db1c8
--- /dev/null
+++ b/Elements_of_Electromagnetics/chapter_2.ipynb
@@ -0,0 +1,318 @@
+{
+ "metadata": {
+ "name": "chapter_2.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 2: Coordinate Systems and Transformation<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.1, Page number: 36<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Given point P(-2,6,3) and vector A = y a_x + (x+z) a_y ,\n",
+ "express P and A in cylindrical and spherical coordinates.\n",
+ "Evaluate A at P in the Cartesian, cylindrical, and spherical systems. '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "x=-2\n",
+ "y=6\n",
+ "z=3 \n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "r=scipy.sqrt(x**2+y**2)\n",
+ "phi=scipy.arctan(-y/x) #phi in radians in 1st quadrant\n",
+ "phid=180-(phi*180/scipy.pi) #phi in degrees in second quadrant\n",
+ "phic=scipy.pi*phid/180.0 #phi in radians in second quadrant\n",
+ "R=scipy.sqrt(x**2+y**2+z**2) \n",
+ "theta=scipy.arctan(r/z) \n",
+ "\n",
+ " #P in cylindrical coordinates\n",
+ " \n",
+ "Pcyl=array([round(r,2),round(phid,2),z]) \n",
+ "\n",
+ " #P in spherical coordinates\n",
+ " \n",
+ "Psph=array([round(R,2),round(theta*180/scipy.pi,2),\n",
+ " round(phid,2)]) \n",
+ "\n",
+ " #Vector A in cylindrical coordinate system\n",
+ "\n",
+ "Xc=r*scipy.cos(phic)\n",
+ "Yc=r*scipy.sin(phic)\n",
+ "Zc=z \n",
+ "Ar=Yc*scipy.cos(phic)+(Xc+Zc)*scipy.sin(phic)\n",
+ "Aphi=-Yc*scipy.sin(phic)+(Xc+Zc)*scipy.cos(phic)\n",
+ "Az=0\n",
+ "Acyl=array([round(Ar,4),round(Aphi,3),Az])\n",
+ "\n",
+ " #Vector A in spherical coordinate system\n",
+ "\n",
+ "Xs=R*scipy.cos(phic)*scipy.sin(theta)\n",
+ "Ys=R*scipy.sin(phic)*scipy.sin(theta)\n",
+ "Zs=R*scipy.cos(theta)\n",
+ "AR=Ys*scipy.sin(theta)*scipy.cos(phic)+(Xs+Zs)*scipy.sin(theta)*scipy.sin(phic) \n",
+ "Ath=Ys*scipy.cos(theta)*scipy.cos(phic)+(Xs+Zs)*scipy.cos(theta)*scipy.sin(phic) \n",
+ "Aph=-Ys*scipy.sin(phic)+(Xs+Zs)*scipy.cos(phic)\n",
+ "Asph=array([round(AR,4),round(Ath,4),round(Aph,3)])\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'P in cylindrical coordinates =',Pcyl\n",
+ "print 'P in spherical coordinates =',Psph\n",
+ "print 'A in cylindrical coordinates =',Acyl\n",
+ "print 'A in spherical coordinates =',Asph"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "P in cylindrical coordinates = [ 6.32 108.43 3. ]\n",
+ "P in spherical coordinates = [ 7. 64.62 108.43]\n",
+ "A in cylindrical coordinates = [-0.9487 -6.008 0. ]\n",
+ "A in spherical coordinates = [-0.8571 -0.4066 -6.008 ]\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.2, Page number: 39<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Express vector B = 10/R a_r+ r cos(theta) a_(theta) + a(phi)\n",
+ "in Cartesian and cylindrical coordinates. \n",
+ "Find B (- 3, 4, 0) and B (5, pi/2, - 2). '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ " \n",
+ "#Variable Declaration\n",
+ "\n",
+ "x=-3\n",
+ "y=4\n",
+ "z=0\n",
+ "p=5\n",
+ "phi=scipy.pi/2 \n",
+ "Zc=-2\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ " #B in cartesian coordinates\n",
+ "\n",
+ "R=scipy.sqrt(x**2+y**2+z**2)\n",
+ "r=scipy.sqrt(x**2+y**2) \n",
+ "P=scipy.arcsin(r/R) #in radians\n",
+ "Q=scipy.arccos(x/r) #in radians \n",
+ "f=10/R \n",
+ "Bx=f*scipy.sin(P)*scipy.cos(Q)+R*(scipy.cos(P))**2*scipy.cos(Q)-scipy.sin(Q) \n",
+ "By=f*scipy.sin(P)*scipy.sin(Q)+R*(scipy.cos(P))**2*scipy.sin(Q)+scipy.cos(Q) \n",
+ "Bz=f*scipy.cos(P)-R*scipy.cos(P)*scipy.sin(P) \n",
+ "Bcart=array([round(Bx,0),round(By,0),round(-Bz,0)])\n",
+ "\n",
+ " #B in cylindrical coordinates\n",
+ " \n",
+ "Rc=sqrt(p**2+Zc**2) \n",
+ "Pc=scipy.arccos(Zc/Rc) #in radians\n",
+ "Br=(10/Rc)*scipy.sin(Pc)+Rc*(scipy.cos(Pc))**2 \n",
+ "Bp=1 \n",
+ "Bzc=(10/Rc)*scipy.cos(Pc)-Rc*scipy.cos(Pc)*scipy.sin(Pc) \n",
+ "Bcyl=array([round(Br,3),Bp,round(Bzc,3)])\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'B(-3,4,0) in cartesian coordinates is',Bcart\n",
+ "print 'B(5,pi/2,-2) in cylindrical coordinates is',Bcyl"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "B(-3,4,0) in cartesian coordinates is [-2. 1. 0.]\n",
+ "B(5,pi/2,-2) in cylindrical coordinates is [ 2.467 1. 1.167]\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.3, Page number: 44<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Two uniform vector fields are gIven by E=-5a_p+10a_phi+3a_z and\n",
+ "F=a_p+2a_phi-6a_z. Calculate \n",
+ "(a) |E X F|\n",
+ "(b) The vector component of E at P(5, pi/2, 3) parallel to the line x=2, z=3 \n",
+ "(c) The angle E makes with the surface z = 3 at P '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "E=array([-5,10,3]) #in cylindrical coordinates\n",
+ "F=array([1,2,-6]) #in cylindrical coordinates\n",
+ "P=array([5,scipy.pi/2,3]) #in cylindrical coordinates\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "exf=cross(E,F)\n",
+ "ansa=scipy.sqrt(dot(exf,exf)) #|EXF|\n",
+ "ay=array([round(scipy.sin(scipy.pi/2),0),\n",
+ " round(scipy.cos(scipy.pi/2),0),0])\n",
+ "ansb=dot(E,ay)*ay\n",
+ "modE=scipy.sqrt(dot(E,E))\n",
+ "az=array([0,0,1])\n",
+ "thetaEz=(180/scipy.pi)*arccos(dot(E,az)/modE) #in degrees\n",
+ "ansc=90-thetaEz #in degrees\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print '|EXF| =',round(ansa,2)\n",
+ "print 'The vector component of E at P parallel to the line x=2,z=3 =',ansb,','\n",
+ "print 'in spherical coordinates'\n",
+ "print 'The angle E makes with the surface z = 3 at P =',round(ansc,2),'degrees'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "|EXF| = 74.06\n",
+ "The vector component of E at P parallel to the line x=2,z=3 = [-5. -0. -0.] ,\n",
+ "in spherical coordinates\n",
+ "The angle E makes with the surface z = 3 at P = 15.02 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 2.4, Page number: 45<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " '''\n",
+ "Given a vector field \n",
+ "D = r*sin(phi)a_r-(1/r)*sin(theta)*cos(phi)a_theta+ r^2*a_phi, determine\n",
+ "(a) D at P(10,150\u00b0,330\u00b0) \n",
+ "(b) The component of D tangential to the spherical surface r = 10 at P \n",
+ "(c) A unit vector at P perpendicular to D and tangential to the cone 0 = 150\u00b0 '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "aR=array([1,0,0]) #Unit vector along radial direction\n",
+ "ath=array([0,1,0]) #Unit vector along theta direction\n",
+ "aph=array([0,0,1]) #Unit vector along phi direction\n",
+ "P=array([10,scipy.pi*150/180,scipy.pi*330/180])\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "r=dot(P,aR)\n",
+ "q=dot(P,aph)\n",
+ "p=dot(P,ath)\n",
+ "R=r*scipy.sin(q)\n",
+ "Ph=-scipy.sin(p)*scipy.cos(q)/r\n",
+ "Q=r*r\n",
+ "D=array([R,Ph,Q]) #D at P(10,150\u00b0,330\u00b0)\n",
+ "rDr=round(dot(aR,D),0) #radial component of D\n",
+ "rDth=round(dot(-ath,D),3) #theta component of D\n",
+ "rDph=round(dot(aph,D),0) #phi component of D\n",
+ "\n",
+ "Dn=array([r*scipy.sin(q),0,0]) #Component of D normal to surface r=10\n",
+ "Dt=D-Dn #Component of D tangential to surface r=10\n",
+ "Dtr=round(dot(aR,Dt),0) #radial component of Dt\n",
+ "Dtth=round(dot(-ath,Dt),3) #theta component of Dt\n",
+ "Dtph=round(dot(aph,Dt),0) #phi component of Dt\n",
+ "rDt=array([Dtr,Dtth,Dtph])\n",
+ "\n",
+ " #Unit vector normal to D and tangential to cone theta=45 degrees\n",
+ "\n",
+ "U=cross(D,ath)\n",
+ "u=U/scipy.sqrt(dot(U,U)) \n",
+ "ru=array([round(dot(aR,u),4),round(dot(ath,u),4),round(dot(aph,u),4)])\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'D at P(10,150\u00b0,330\u00b0) = [',rDr,' ',rDth,' ',rDph,']'\n",
+ "print 'The component of D tangential to the spherical surface r = 10 at P ='\n",
+ "print '[',Dtr,' ',Dtth,' ',Dtph,']'\n",
+ "print 'A unit vector at P perpendicular to D and tangential to cone 0 = 150\u00b0 ='\n",
+ "print ru"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "D at P(10,150\u00b0,330\u00b0) = [ -5.0 0.043 100.0 ]\n",
+ "The component of D tangential to the spherical surface r = 10 at P =\n",
+ "[ 0.0 0.043 100.0 ]\n",
+ "A unit vector at P perpendicular to D and tangential to cone 0 = 150\u00b0 =\n",
+ "[-0.9988 0. -0.0499]\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elements_of_Electromagnetics/chapter_3.ipynb b/Elements_of_Electromagnetics/chapter_3.ipynb
new file mode 100644
index 00000000..88c80683
--- /dev/null
+++ b/Elements_of_Electromagnetics/chapter_3.ipynb
@@ -0,0 +1,389 @@
+{
+ "metadata": {
+ "name": "chapter_3.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 3: Vector Calculus<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.1, Page number: 58<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Consider the object shown in Figure 3.7. Calculate \n",
+ "(a) The distance BC \n",
+ "(b) The distance CD \n",
+ "(c) The surface area ABCD \n",
+ "(d) The surface area ABO \n",
+ "(e) The surface area AOFD \n",
+ "(f) The volume ABDCFO '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "A=array([5,0,0])\n",
+ "B=array([0,5,0])\n",
+ "C=array([0,5,10])\n",
+ "D=array([5,0,10])\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ " #A,B,C,D in cylindrical coordinates\n",
+ " \n",
+ "A=array([5,0,0])\n",
+ "B=array([5,scipy.pi,0])\n",
+ "C=array([5,scipy.pi,10])\n",
+ "D=array([5,0,10])\n",
+ "\n",
+ "p=5\n",
+ "\n",
+ "def BC(z): \n",
+ " return 1\n",
+ "ansa, erra = scipy.integrate.quad(BC, 0, 10)\n",
+ " \n",
+ "def CD(phi): \n",
+ " return p\n",
+ "ansb, errb = scipy.integrate.quad(CD, 0, scipy.pi/2)\n",
+ "ansbb=ansb/scipy.pi #answer in multiples of pi\n",
+ "\n",
+ "def ABCD(phi,z): \n",
+ " return p\n",
+ "ansc, errc = scipy.integrate.dblquad(lambda z , phi: ABCD(phi,z), \n",
+ " 0, scipy.pi/2, lambda z: 0, lambda z: 10) \n",
+ "anscc=ansc/scipy.pi #answer in multiples of pi\n",
+ " \n",
+ "def ABO(phi,rho): \n",
+ " return rho\n",
+ "ansd, errd = scipy.integrate.dblquad(lambda rho , phi: ABO(phi,rho), \n",
+ " 0, scipy.pi/2, lambda rho: 0, lambda rho: 5)\n",
+ "ansdd=ansd/scipy.pi #answer in multiples of pi\n",
+ "\n",
+ "def AOFD(rho,z): \n",
+ " return 1\n",
+ "anse, erre = scipy.integrate.dblquad(lambda z , rho: AOFD(rho,z), \n",
+ " 0, 10, lambda z: 0, lambda z: 5)\n",
+ " \n",
+ "def ABDCFO(z,phi,rho):\n",
+ " return rho\n",
+ "ansf, errf=scipy.integrate.tplquad(ABDCFO,0,5,lambda rho:0,\n",
+ " lambda rho:scipy.pi/2,lambda rho,phi:0,lambda rho,phi:10)\n",
+ "ansff=ansf/scipy.pi #answer in multiples of pi\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'The distance BC =',ansa\n",
+ "print 'The distance CD =',ansbb,'pi'\n",
+ "print 'The surface area ABCD =',anscc,'pi'\n",
+ "print 'The surface area ABO =',ansdd,'pi'\n",
+ "print 'The surface area AOFD =',anse\n",
+ "print 'The volume ABDCFO =',ansff,'pi'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The distance BC = 10.0\n",
+ "The distance CD = 2.5 pi\n",
+ "The surface area ABCD = 25.0 pi\n",
+ "The surface area ABO = 6.25 pi\n",
+ "The surface area AOFD = 50.0\n",
+ "The volume ABDCFO = 62.5 pi\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.2, Page number: 61<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Given that F = x^2 a_x - xza_y - y^2 a_z , calculate the \n",
+ "circulation of F around the (closed) path shown in Figure 3.10. '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "import scipy.integrate\n",
+ "from fractions import Fraction\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "ax=array([1,0,0]) #Unit vector along x direction\n",
+ "ay=array([0,1,0]) #Unit vector along y direction\n",
+ "az=array([0,0,1]) #Unit vector along z direction\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "def C1(x): \n",
+ " return x**2\n",
+ "seg1, err1 = scipy.integrate.quad(C1, 1, 0) #segment 1\n",
+ "Seg1=Fraction(seg1).limit_denominator(100) #converting to fraction\n",
+ "\n",
+ "def C2(y): \n",
+ " return 0\n",
+ "seg2, err2 = scipy.integrate.quad(C2, 0, 1) #segment 2\n",
+ "\n",
+ "def C3(x): \n",
+ " return (x**2-1)\n",
+ "seg3, err3 = scipy.integrate.quad(C3, 0, 1) #segment 3\n",
+ "Seg3=Fraction(seg3).limit_denominator(100) #converting to fraction\n",
+ "\n",
+ "def C4(y): \n",
+ " return (-y-y**2)\n",
+ "seg4, err4 = scipy.integrate.quad(C4, 1, 0) #segment 4\n",
+ "Seg4=Fraction(seg4).limit_denominator(100) #converting to fraction\n",
+ "\n",
+ "seg=Seg1+seg2+Seg3+Seg4 #total circulation around path\n",
+ "Seg=Fraction(seg).limit_denominator(100) #converting to fraction\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'F along segment 1 is',Seg1\n",
+ "print 'F along segment 2 is',seg2\n",
+ "print 'F along segment 3 is',Seg3\n",
+ "print 'F along segment 4 is',Seg4\n",
+ "print 'Circulation of F around the path is',Seg"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "F along segment 1 is -1/3\n",
+ "F along segment 2 is 0.0\n",
+ "F along segment 3 is -2/3\n",
+ "F along segment 4 is 5/6\n",
+ "Circulation of F around the path is -1/6\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.4, Page number: 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Given W = x^2 y^2 + xyz, compute VW and the direction derivative dW/dl in the direction \n",
+ "3a_x + 4a_y + 12a_z at (2, -1, 0). '''\n",
+ "\n",
+ "import scipy\n",
+ "from fractions import Fraction\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "ax=array([1,0,0]) #Unit vector along x direction\n",
+ "ay=array([0,1,0]) #Unit vector along y direction\n",
+ "az=array([0,0,1]) #Unit vector along z direction\n",
+ "Al=array([3,4,12])\n",
+ "x=2\n",
+ "y=-1\n",
+ "z=0\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "gradW=(2*x*y**2+y*z)*ax+(2*x**2*y+x*z)*ay+(x*y)*az\n",
+ "gradWl=Fraction(dot(gradW,Al)/scipy.sqrt(dot(Al,Al))).limit_denominator(1000)\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'dW/dl =',gradWl\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "dW/dl = -44/13\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.7, Page number: 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "If G(r) = lOe^-2z(pa_p + a_z\u001f), determine the flux of G out of the entire surface of the cylinder \n",
+ "p = 1, 0 < Z < 1. Confirm the result using the divergence theorem. '''\n",
+ "\n",
+ "import scipy\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "ap=array([1,0,0]) #Unit vector along radial direction\n",
+ "az=array([0,0,1]) #Unit vector along z direction\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "def psi1(phi,p): \n",
+ " return 10*scipy.e**(-2)*p\n",
+ "psit, errt = scipy.integrate.dblquad(lambda p , phi: psi1(phi,p), #flux through top\n",
+ " 0, 2*scipy.pi, lambda p: 0, lambda p: 1) \n",
+ "\n",
+ "def psi2(phi,p): \n",
+ " return -10*p\n",
+ "psib, errb = scipy.integrate.dblquad(lambda p , phi: psi2(phi,p), #flux through bottom\n",
+ " 0, 2*scipy.pi, lambda p: 0, lambda p: 1) \n",
+ "\n",
+ "def psi3(phi,z): \n",
+ " return 10*scipy.exp(-2*z)\n",
+ "psis, errs = scipy.integrate.dblquad(lambda z , phi: psi3(phi,z), #flux through side\n",
+ " 0, scipy.pi*2, lambda z: 0, lambda z: 1) \n",
+ "\n",
+ "psi=psit+psib+psis #total flux through cylinder\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'The total flux through the cylinder is',psi\n",
+ "print 'The total flux through cylinder using divergence theorem is also 0'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total flux through the cylinder is 0.0\n",
+ "The total flux through cylinder using divergence theorem is also 0\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 3.9, Page number: 81<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "If A = p cos(phi) a_p + sin(phi)a_phi, evaluate closed integral A\u00b7dl\n",
+ "around the path shown in Figure 3.22. \n",
+ "Confirm this using Stokes's theorem. '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "ap=array([1,0,0]) #Unit vector along radial direction\n",
+ "ath=array([0,1,0]) #Unit vector along theta direction\n",
+ "aph=array([0,0,1]) #Unit vector along phi direction\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ " #segment 1\n",
+ "def ab(phi): \n",
+ " return 2*scipy.sin(phi)\n",
+ "seg1,err1 = scipy.integrate.quad(ab,scipy.pi*60/180,scipy.pi*30/180) \n",
+ "\n",
+ " #segment 2\n",
+ "def bc(p): \n",
+ " return p*scipy.cos(scipy.pi*30/180)\n",
+ "seg2,err2 = scipy.integrate.quad(bc,2,5) \n",
+ "\n",
+ " #segment 3\n",
+ "def cd(phi): \n",
+ " return 5*scipy.sin(phi)\n",
+ "seg3,err3 = scipy.integrate.quad(cd,-scipy.pi*30/180,scipy.pi*60/180)\n",
+ "\n",
+ " #segment 4\n",
+ "def da(p): \n",
+ " return p*scipy.cos(scipy.pi*60/180)\n",
+ "seg4,err4 = scipy.integrate.quad(da,5,2)\n",
+ "\n",
+ "I1=seg1+seg2+seg3+seg4\n",
+ "\n",
+ " #using stoke's theorem\n",
+ "\n",
+ "def curlA(phi,p): \n",
+ " return ((1+p)*scipy.sin(phi))\n",
+ "I2, err = scipy.integrate.dblquad(lambda p , phi: curlA(phi,p), \n",
+ " scipy.pi*30/180, scipy.pi*60/180, lambda p: 2, lambda p: 5)\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'The integral calculated segment wise =',round(I1,3)\n",
+ "print 'The integral calculated using Stokes Theorem =',round(I2,3)\n",
+ "print 'Since I1 = I2, Stokes theorem is verified'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The integral calculated segment wise = 4.941\n",
+ "The integral calculated using Stokes Theorem = 4.941\n",
+ "Since I1 = I2, Stokes theorem is verified\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elements_of_Electromagnetics/chapter_4.ipynb b/Elements_of_Electromagnetics/chapter_4.ipynb
new file mode 100644
index 00000000..14ac4af2
--- /dev/null
+++ b/Elements_of_Electromagnetics/chapter_4.ipynb
@@ -0,0 +1,699 @@
+{
+ "metadata": {
+ "name": "chapter_4.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 4: Electrostatic Fields<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.1, Page number: 107<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Point charges 1 mC and -2 mC are located at (3,2,-1) and (-1,-1,4),\n",
+ "respectively. Calculate the electric force on a 10 nC charge located\n",
+ "at (0,3,1) and the electric field intensity at that point. '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "ax=array([1,0,0]) #Unit vector along x direction\n",
+ "ay=array([0,1,0]) #Unit vector along y direction\n",
+ "az=array([0,0,1]) #Unit vector along z direction\n",
+ "Q1=1*10**-3 #charge 1 at (-1,-1,4) in C\n",
+ "Q2=-2*10**-3 #charge 2 at (3,2,-1) in C\n",
+ "Q=10*10**-9 #charge 3 at (0,3,1) in C\n",
+ "P1=array([0,3,1])-array([3,2,-1]) #distance vector from charge 3 to 1\n",
+ "P2=array([0,3,1])-array([-1,-1,4]) #distance vector from charge 3 to 2\n",
+ "e=10**-9/(36*scipy.pi) #permittivity in Farad/m \n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "modP1=scipy.sqrt(dot(P1,P1))\n",
+ "modP2=scipy.sqrt(dot(P2,P2))\n",
+ "F1=(Q*Q1)*P1*10**3/(4*scipy.pi*e*modP1**3) #force on charge 3 by 1 in mN\n",
+ "F2=(Q*Q2)*P2*10**3/(4*scipy.pi*e*modP2**3) #force on charge 3 by 2 in mN\n",
+ "\n",
+ " #Total force on charge 3\n",
+ " \n",
+ "Fx=round(dot(F1+F2,ax),3)\n",
+ "Fy=round(dot(F1+F2,ay),3)\n",
+ "Fz=round(dot(F1+F2,az),3)\n",
+ "F=array([Fx,Fy,Fz]) #Total force in mN\n",
+ "E=(10**-6)*(F/Q) #Electric field in kV/m\n",
+ "\n",
+ "#Results \n",
+ "\n",
+ "print 'Total force on charge at (0,3,1) =',F,'in mN'\n",
+ "print 'Electric field at (0,3,1) =',E,'kV/m'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total force on charge at (0,3,1) = [-6.512 -3.713 7.509] in mN\n",
+ "Electric field at (0,3,1) = [-651.2 -371.3 750.9] kV/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.3, Page number: 109"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A practical application of electrostatics is in electrostatic separation of solids. For example, \n",
+ "Florida phosphate ore, consisting of small panicles of quartz and phosphate rock, can be \n",
+ "separated into its components by applying a uniform electric field as in Figure 4.4. Assum- \n",
+ "ing zero initial velocity and displacement, determine the separation between the particles \n",
+ "after falling 80 cm. Take E = 500 kV/m and Q/m = 9 microC/kg for both positively and neg- \n",
+ "atively charged particles. '''\n",
+ "\n",
+ "import scipy\n",
+ "#Variable Declaration\n",
+ "\n",
+ "E=500*10**3 #electric field in V/m\n",
+ "Qm=9*10**-6 #Q/m in C/kg\n",
+ "y=0.8 #distance fallen in m\n",
+ "g=9.8 #acceleration due to gravity in m/s^2\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "t=scipy.sqrt(2*y/g) #time taken to fall in seconds\n",
+ "x=Qm*E*t**2/2 #half the separation between particles in m\n",
+ "sep=2*x #separation between particles in m\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'The separation between particles is',round(sep*100,2),'cm'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The separation between particles is 73.47 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.5, Page number: 120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "The finite sheet 0 <= x <= 1, 0 <= y <= 1 on the z = 0 plane has a charge density \n",
+ "Ps=xy(x^2 + y^2 + 25)^3/2 nC/m^2 . Find \n",
+ "\u001f\u001d",
+ "(a) The total charge on the sheet \n",
+ "(b) The e1ectric field at (0, 0, 5) \n",
+ "(c) The force experienced by a -1 mC charge located at (0, 0, 5) '''\n",
+ "\n",
+ "import scipy\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Eo=10**-9/(36*scipy.pi) #permittivity of free space\n",
+ "ax=array([1,0,0]) #Unit vector along x direction\n",
+ "ay=array([0,1,0]) #Unit vector along y direction\n",
+ "az=array([0,0,1]) #Unit vector along z direction\n",
+ "q=-1 #charge in mC\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "def charge(x,y): \n",
+ " return x*y*(x**2+y**2+25)**(1.5)\n",
+ "Q, errq = scipy.integrate.dblquad(lambda y , x: charge(x,y), #total charge in nC\n",
+ " 0, 1, lambda y: 0, lambda y: 1) \n",
+ "\n",
+ "d=(4*scipy.pi*Eo*(x**2+y**2+25)**(1.5))\n",
+ "\n",
+ "def elecx(x,y): \n",
+ " return 10**-9*x*y*(x**2+y**2+25)**(1.5)*(-x)/d #x component of electric field\n",
+ "Ex, errx = scipy.integrate.dblquad(lambda y , x: elecx(x,y), \n",
+ " 0, 1, lambda y: 0, lambda y: 1) \n",
+ "\n",
+ "def elecy(x,y): \n",
+ " return 10**-9*x*y*(x**2+y**2+25)**(1.5)*(-y)/d #y component of electric field\n",
+ "Ey, erry = scipy.integrate.dblquad(lambda y , x: elecy(x,y), \n",
+ " 0, 1, lambda y: 0, lambda y: 1) \n",
+ "\n",
+ "def elecz(x,y): \n",
+ " return 10**-9*x*y*(5)/(4*scipy.pi*Eo) #z component of electric field\n",
+ "Ez, errz = scipy.integrate.dblquad(lambda y , x: elecz(x,y), \n",
+ " 0, 1, lambda y: 0, lambda y: 1) \n",
+ "\n",
+ "E=array([round(Ex,1),round(Ey,1),round(Ez,2)]) #electric field in V/m\n",
+ "\n",
+ "F=q*E #force in mN \n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'Total charge =',round(Q,2),'nC'\n",
+ "print 'Electric field at (0,0,5) =',E,'V/m'\n",
+ "print 'Force experienced by -1mC =',F,'mN'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total charge = 33.15 nC\n",
+ "Electric field at (0,0,5) = [ -1.5 -1.5 11.25] V/m\n",
+ "Force experienced by -1mC = [ 1.5 1.5 -11.25] mN\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.6, Page number: 121<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Planes x=2 and y=-3, respectively, carry charges 10 nC/m^2 and 15 nC/m^2 .\n",
+ "If the line x=0, z=2 carries charge 10 pi nC/m, calculate E at (1,1,-1)\n",
+ "due to the three charge distributions. '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "ax=array([1,0,0]) #Unit vector along x direction\n",
+ "ay=array([0,1,0]) #Unit vector along y direction\n",
+ "az=array([0,0,1]) #Unit vector along z direction\n",
+ "ps1=10*10**-9 #Surface charge density of plane 1\n",
+ "ps2=15*10**-9 #Surface charge density of plane 2\n",
+ "pl=10*scipy.pi*10**-9 #charge density of line\n",
+ "e=(10**-9)/(36*scipy.pi) #permittivity of free space in Farad/m\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "E1=(ps1/(2*e))*-ax/scipy.pi #field due to plane 1 in multiples of pi in V/m\n",
+ "E2=(ps2/(2*e))*ay/scipy.pi #field due to plane 2 in multiples of pi in V/m\n",
+ "\n",
+ " #field due to line charge in multiples of pi in V/m\n",
+ " \n",
+ "a=(ax-3*az) \n",
+ "moda=scipy.sqrt(dot((ax-3*az),(ax-3*az)))\n",
+ "e3=(pl/(2*scipy.pi*e*moda**2))*a\n",
+ "E3=array([dot(e3,ax)/scipy.pi,0,dot(e3,az)/scipy.pi])\n",
+ "\n",
+ " #total field in multiples of pi in V/m\n",
+ " \n",
+ "E=E1+E2+E3 \n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'The total electric field at (1,1,-1) =',E,'Pi V/m'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total electric field at (1,1,-1) = [-162. 270. -54.] Pi V/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.7, Page number: 123<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Determine D at (4, 0, 3) if there is a point charge - 5pi mC\n",
+ "at (4, 0, 0) and a line charge 3pi mC/m along the y-axis. '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "ax=array([1,0,0]) #Unit vector along x direction\n",
+ "ay=array([0,1,0]) #Unit vector along y direction\n",
+ "az=array([0,0,1]) #Unit vector along z direction\n",
+ "Q=-5*scipy.pi*10**-3 #charge at (4,0,0) in C\n",
+ "pl=3*scipy.pi*10**-3 #charge density of line charge in C/m\n",
+ "r=array([4,0,3]) #point where D is to be found \n",
+ "rp=array([4,0,0]) #position of point charge\n",
+ "\n",
+ "#Calculations \n",
+ "\n",
+ "R=r-rp \n",
+ "modR=scipy.sqrt(dot(R,R)) \n",
+ "Dq=(Q*R)/(4*scipy.pi*modR**3) #flux density due to point charge in C/m^2\n",
+ "p=scipy.sqrt(dot(r,r))\n",
+ "ap=r/p \n",
+ "Dl=(pl/(2*scipy.pi*p))*ap #flux density due to line charge in C/m^2\n",
+ "D=(Dq+Dl)*10**6 #total flux density in micro C/m^2\n",
+ "Dz=round(dot(D,az),0)\n",
+ "Dx=round(dot(D,ax),0)\n",
+ "Dy=round(dot(D,ay),0)\n",
+ "Dround=array([Dx,Dy,Dz]) #value of D rounded to 0 decimal points\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'D at (4,0,0) due to point charge and line charge =',Dround,'micro C/m^2'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "D at (4,0,0) due to point charge and line charge = [ 240. 0. 41.] micro C/m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.8, Page number: 130<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Given that D = zp cos^2(phi) a_z C/m^2 , calculate the charge density \n",
+ "at (1,pi/4, 3) and the total charge enclosed by the cylinder of \n",
+ "radius 1 m with -2< Z <2 m. '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "import scipy.integrate\n",
+ "from fractions import Fraction\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "ap=array([1,0,0]) #Unit vector along rho direction\n",
+ "aph=array([0,1,0]) #Unit vector along phi direction\n",
+ "az=array([0,0,1]) #Unit vector along z direction\n",
+ "point=array([1,scipy.pi/4,3])\n",
+ "p1=0\n",
+ "p2=1\n",
+ "ph1=0\n",
+ "ph2=2*scipy.pi\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "pointp=dot(point,ap)\n",
+ "pointph=dot(point,aph)\n",
+ "pv=pointp*scipy.cos(pointph)**2 #charge density at (1,pi/4,3) in C/m^3\n",
+ "\n",
+ "def ctop(phi,p): \n",
+ " return 2*p**2*(scipy.cos(phi)**2)\n",
+ "psya, erra = scipy.integrate.dblquad(lambda p , phi: ctop(phi,p), \n",
+ " ph1, ph2, lambda p: p1, lambda p: p2)\n",
+ "\n",
+ "def cbot(phi,p): \n",
+ " return 2*p**2*(scipy.cos(phi)**2)\n",
+ "psyb, errb = scipy.integrate.dblquad(lambda p , phi: cbot(phi,p), \n",
+ " ph1, ph2, lambda p: p1, lambda p: p2)\n",
+ " \n",
+ "psy=psya+psyb #Charge in C\n",
+ "psyp=psy/scipy.pi #Charge in multiples of Pi in C\n",
+ "psyf=Fraction(psyp).limit_denominator(100) #converting to fraction\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'Charge density at (1,pi/4,3) =',pv,'C/m^3'\n",
+ "print 'Total charge enclosed by the cylinder =',psyf,'Pi C'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Charge density at (1,pi/4,3) = 0.5 C/m^3\n",
+ "Total charge enclosed by the cylinder = 4/3 Pi C\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.10, Page number: 136<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Two point charges -4 micro C and 5 micro C are located at (2, -1, 3) \n",
+ "and (0, 4, -2), respectively. Find the potential at (1, 0, 1) \n",
+ "assuming zero potential at infinity. '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Q1=-4 #charge 1 in micro C\n",
+ "Q2=5 #charge 2 in micro C\n",
+ "e=10**-9/(36*scipy.pi) #permittivity of free space in Farad/m \n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "R1=array([1,0,1])-array([2,-1,3]) #distance vector from (1,0,1) to charge 1\n",
+ "R2=array([1,0,1])-array([0,4,-2]) #distance vector from (1,0,1) to charge 2\n",
+ "modR1=scipy.sqrt(dot(R1,R1))\n",
+ "modR2=scipy.sqrt(dot(R2,R2)) \n",
+ "V=10**-9*((Q1/modR1)+(Q2/modR2))/(4*scipy.pi*e) #potential in kV\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'The potential at (1, 0, 1) =',round(V,3),'kV'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The potential at (1, 0, 1) = -5.872 kV\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 4.11, Page number: 136"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A point charge 5 nC is located at (-3, 4, 0) while line y = 1, z = 1 carries uniform charge \n",
+ "2 nC/m. \n",
+ "\u001f\u001d",
+ "(a) If V = 0V at O(0, 0, 0), find V at A(5, 0, ]). \n",
+ "(b) If V = 100V at B(1, 2, 1), find V at C(-2, 5, 3). \n",
+ "(c) If V = -5V at O, find V_BC '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Eo=10**-9/(36*scipy.pi) #permittivity of free space\n",
+ "Vo=0 #potential at O in V\n",
+ "Vb=100 #potential at B in V\n",
+ "po=scipy.sqrt(2)\n",
+ "ro=5\n",
+ "pa=1\n",
+ "ra=9\n",
+ "pb=1\n",
+ "rb=scipy.sqrt(21)\n",
+ "pc=scipy.sqrt(20)\n",
+ "rc=scipy.sqrt(11)\n",
+ "pl=2*10**-9 #charge density of the line in C/m\n",
+ "Q=5*10**-9 #point charge at (-3,4,0) in C\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Va=Vo-(-pl*scipy.log(po/pa)/(2*scipy.pi*Eo)+Q*(ra-ro)/(4*scipy.pi*Eo*ra*ro))\n",
+ "Vc=Vb+(-pl*scipy.log(pc/pb)/(2*scipy.pi*Eo)+Q*(rb-rc)/(4*scipy.pi*Eo*rb*rc))\n",
+ "Vbc=Vc-Vb\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'Va =',round(Va,3),'V'\n",
+ "print 'Vc =',round(Vc,3),'V'\n",
+ "print 'Vbc =',round(Vbc,3),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Va = 8.477 V\n",
+ "Vc = 49.825 V\n",
+ "Vbc = -50.175 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.12, Page number: 140<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Given the potential V = (10/r**2)sin(theta)cos(phi), \n",
+ "(a) Find the electric flux density D at (2, pi/2, 0). \n",
+ "(b) Calculate the work done in moving a 10 micro C charge from \n",
+ "point A( 1, 30\u00b0, 120\u00b0) to B( 4, 90\u00b0, 60\u00b0). '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "ar=array([1,0,0]) #Unit vector along radial direction\n",
+ "ath=array([0,1,0]) #Unit vector along theta direction\n",
+ "aph=array([0,0,1]) #Unit vector along phi direction\n",
+ "e=(10**-9)/(36*scipy.pi) #permittivity of free space in Farad/m\n",
+ "\n",
+ " #The point (2, pi/2, 0)\n",
+ "r=2\n",
+ "th=scipy.pi/2\n",
+ "ph=0\n",
+ " #Point A\n",
+ "ra=1\n",
+ "tha=scipy.pi*30/180\n",
+ "pha=scipy.pi*120/180\n",
+ " #Point B\n",
+ "rb=4\n",
+ "thb=scipy.pi/2\n",
+ "phb=scipy.pi*60/180\n",
+ "\n",
+ "q=10*10**-6 \n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Er=(20.0/r**3)*scipy.sin(th)*scipy.cos(ph) #Radial component of E in V/m\n",
+ "Eth=-(10/r**3)*scipy.cos(th)*scipy.cos(ph) #Theta component of E in V/m\n",
+ "Eph=(10/r**3)*scipy.sin(ph) #Phi component of E in V/m\n",
+ "E=array([Er,Eth,Eph])\n",
+ "D=E*e*10**12 #Electric flux density D in pC/m^2\n",
+ "Dr=round(dot(D,ar),1) #Radial component of D in V/m rounded to 1 decimal\n",
+ "Dth=round(dot(D,ath),0) #Theta component of D in pC/m^2 rounded to 0 decimal\n",
+ "Dph=round(dot(D,aph),0) #Phi component of D in pC/m^2 rounded to 0 decimal\n",
+ "Dc=array([Dr,Dth,Dph]) #Rounded D in pC/m^2\n",
+ "\n",
+ "Va=10*scipy.sin(tha)*cos(pha)/ra**2 #potential at point A in V\n",
+ "Vb=10*scipy.sin(thb)*cos(phb)/rb**2 #potential at point B in V\n",
+ "W=q*(Vb-Va)*10**6 #work done in micro J\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'The electric flux density D at (2, pi/2, 0) =',Dc,'pC/m^2'\n",
+ "print 'Work done in moving the charge =',W,'micro J'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The electric flux density D at (2, pi/2, 0) = [ 22.1 -0. 0. ] pC/m^2\n",
+ "Work done in moving the charge = 28.125 micro J\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.13, Page number: 145<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Two dipoles with dipole moments -5 a_z nC/m and 9 a_z nC/m are\n",
+ "located at points (0,0,-2) and (0,0,3), respectively.\n",
+ "Find the potential at the origin. '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "p1=-5*10**-9 #dipole moment of dipole 1 in C/m\n",
+ "p2=9*10**-9 #dipole moment of dipole 2 in C/m\n",
+ "z1=2 #z component of position vector of dipole 1\n",
+ "z2=-3 #z component of position vector of dipole 2\n",
+ "e=10**-9/(36*scipy.pi) #permittivity of free space in Farad/m\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "V=(1/(4*scipy.pi*e))*((p1*abs(z1)/z1**3)+(p2*abs(z2)/z2**3))\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'Potential at origin =',V, 'V'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Potential at origin = -20.25 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 4.14, Page number: 148<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Three point charges - 1 nC, 4 nC, and 3 nC are located at (0, 0, 0), \n",
+ "(0, 0, 1), and (1, 0, 0), respectively. Find the energy in the system. '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Q1=-1*10**-9 #Charge 1 in C\n",
+ "Q2=4*10**-9 #Charge 2 in C\n",
+ "Q3=3*10**-9 #Charge 3 in C\n",
+ "e=10**-9/(36*scipy.pi) #permittivity of free space in farad/m\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "V1=(1/(4*scipy.pi*e)*(Q2+Q3))\n",
+ "V2=(1/(4*scipy.pi*e)*(Q1+Q3/(2**.5)))\n",
+ "V3=(1/(4*scipy.pi*e)*(Q1+Q2/(2**.5)))\n",
+ "W=0.5*((V1*Q1)+(V2*Q2)+(V3*Q3))*10**9 #Energy in nJ\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'Energy in the system =',round(W,2),'nJ'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Energy in the system = 13.37 nJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elements_of_Electromagnetics/chapter_5.ipynb b/Elements_of_Electromagnetics/chapter_5.ipynb
new file mode 100644
index 00000000..882e9145
--- /dev/null
+++ b/Elements_of_Electromagnetics/chapter_5.ipynb
@@ -0,0 +1,523 @@
+{
+ "metadata": {
+ "name": "chapter_5.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 5: Electric Fields in Material Space<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.1, Page number: 167<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "If the current density J=1/r^3(2cos(theta) a_r + sin(theta) a_t) Ampere/m^2,\n",
+ "calculate the current passing through\n",
+ "(a) A hemispherical shell of radius 20 cm.\n",
+ "(b) A spherical shell of radius 10 cm. '''\n",
+ "\n",
+ "import scipy\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "r1= 0.2 # radius of hemispherical shell in metres\n",
+ "r2= 0.1 # radius of spherical shell in metres\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Calculation of current through hemispherical shell \n",
+ "\n",
+ "def J1(phi,theta):\n",
+ "\ts1=(1/r1)*(2* scipy.cos(theta)* scipy.sin(theta))\n",
+ "\treturn s1\n",
+ "\n",
+ "if __name__ == '__main__':\n",
+ "\n",
+ " I1, error = scipy.integrate.dblquad(lambda theta , phi: J1(phi,theta), \n",
+ " 0, 2*scipy.pi, lambda theta: 0, lambda theta: scipy.pi/2) \n",
+ "\t \n",
+ "#Calculation of current through spherical shell \n",
+ "\n",
+ "def J2(phi,theta):\n",
+ "\ts2=(1/r2)*(2* scipy.cos(theta)* scipy.sin(theta))\n",
+ "\treturn s2\n",
+ "\n",
+ "if __name__ == '__main__':\n",
+ "\n",
+ " I2, error = scipy.integrate.dblquad(lambda theta , phi: J1(phi,theta), \n",
+ " 0, 2*scipy.pi, lambda theta: 0, lambda theta: scipy.pi) \n",
+ "\t \n",
+ "#Results\n",
+ "\n",
+ "print 'Current through hemispherical shell=',round(I1,1),'A' \n",
+ "print 'Current through spherical shell=',round(I2,0),'A'\n",
+ "\t"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current through hemispherical shell= 31.4 A\n",
+ "Current through spherical shell= 0.0 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.2, Page number: 168<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A typical example of convective charge transport is found \n",
+ "in the Van de Graaff generator where charge is transported \n",
+ "on a moving belt from the base to the dome.\n",
+ "If a surface charge density 10^7 C/m^2 is transported at a velocity of 2 m/s, \n",
+ "calculate the charge collected in 5 s. Take the width of the belt as 10 cm. '''\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "ps=10**-7 #Surface charge density of the belt in Couloumb/metre^2\n",
+ "u=2 #Speed of the belt in metres/sec\n",
+ "w=0.1 #Width of the belt in metres\n",
+ "t=5 #Time taken in seconds \n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "I=ps*u*w #Current in amperes\n",
+ "Q=I*t*10**9 #Charge collected in 5 seconds in nano Coloumbs\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"The charge collected in 5 seconds is \",Q,\"nC\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The charge collected in 5 seconds is 100.0 nC\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.3, Page number: 169<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A wire of diameter 1mm and conductivity 5X10^7 S/m has 10^29 \n",
+ "free electrons/m^3 when an electric field of 10mV /m is applied. Determine \n",
+ "(a) The charge density of free electrons \n",
+ "(b) The current density \n",
+ "(c) The current in the wire \n",
+ "(d) The drift velocity of the electrons. \n",
+ "Take the electronic charge as e = -1.6X10^-19 C. '''\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "n=10**29 #Number density of electrons in m^-3\n",
+ "e=-1.6*10**-19 #Electronic charge in Coloumbs\n",
+ "sigma=5*10**7 #Current density in S/m\n",
+ "E=10**-2 #Electric Field in V/m\n",
+ "S=(3.14*10**-6)/4 #Cross sectional area of the wire in m^2\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "pv=n*e #Charge density of free electrons in C/m^3\n",
+ "J=sigma*E*10**-3 #Current density in kA/m^2\n",
+ "I=J*S*10**3 #Current in amperes\n",
+ "u=J*10**3/pv #Drift velocity in m/s\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print \"The charge density is \",pv,\"C/m^3\" \n",
+ "print \"The current density is \",J,\"kA/m^2\" \n",
+ "print \"The current is \",round(I,3), \"A\"\n",
+ "print \"The drift velocity is \",-u,\"m/s\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The charge density is -16000000000.0 C/m^3\n",
+ "The current density is 500.0 kA/m^2\n",
+ "The current is 0.393 A\n",
+ "The drift velocity is 3.125e-05 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.4, Page number: 170<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A lead (sigma=5X10^6 S/m) bar of square cross section has a\n",
+ "hole bored along its length of 4 cm so that its cross section \n",
+ "becomes a square of side 3 cm with a hole of diameter 1 cm \n",
+ "drilled through the centre,\n",
+ "Find the resistance between the square ends. '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "l=4 #Length of the lead bar in m\n",
+ "d=3 #Width of the lead bar in cm\n",
+ "r=0.5 #Radius of the hole drilled in cm\n",
+ "sigma=5*10**6 #Conductivity of the bar in S/m\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "S=(d**2-(scipy.pi*r**2)) #Cross sectional area in cm^2\n",
+ "R=l/(S*sigma*10**-4) #Resistance in ohms\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'The resistance between the square ends is',round(R*10**6),'micro ohms'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance between the square ends is 974.0 micro ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.6, Page number: 177<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "The electric field intensity in polystyrene (epsilon_r= 2.55) filling\n",
+ "the space between the plates of a parallel-plate capacitor is 10 kV/m. \n",
+ "The distance between the plates is 1.5 mm. Calculate: \n",
+ "(a) D \n",
+ "(b) P \n",
+ "(c) The surface charge density of free charge on the plates \n",
+ "(d) The surface density of polarization charge \n",
+ "(e) The potential difference between the plates '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "e0=10**-9/(36*scipy.pi) #permittivity of free space in Farad/m\n",
+ "er=2.55 #relative permittivity (dimensionless)\n",
+ "E=10*10**3 #Electric field in V/m\n",
+ "chi=er-1.0 #Electric susceptibility (dimensionless)\n",
+ "d=1.5 #Distance between plates in mm\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "D=e0*er*E*10**9 #D in nC/m^2\n",
+ "\n",
+ "P=chi*e0*E*10**9 #P in nC/m^2\n",
+ "\n",
+ "ps=D #The surface charge density of \n",
+ " #free charge in nC/m^2\n",
+ " \n",
+ "pps =P #The surface charge density of\n",
+ " #polarization charge in nC/m^2\n",
+ " \n",
+ "V=E*d*10**-3 #The potential difference between \n",
+ " #the plates in volts\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'D =',round(D,2),'nC/m^2'\n",
+ "print 'P =',round(P,0),'nC/m^2'\n",
+ "print 'Surface charge density of free charge =',round(ps,2),'nC/m^2'\n",
+ "print 'Surface charge density of polarization charge =',round(pps,0),'nC/m^2'\n",
+ "print 'The potential difference between the plates =',V,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "D = 225.47 nC/m^2\n",
+ "P = 137.0 nC/m^2\n",
+ "Surface charge density of free charge = 225.47 nC/m^2\n",
+ "Surface charge density of polarization charge = 137.0 nC/m^2\n",
+ "The potential difference between the plates = 15.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.7, Page number: 178<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A dielectric sphere (epsilon_r = 5.7) of radius 10 cm \n",
+ "has a point charge 2 pC placed at its center. \n",
+ "Calculate: \n",
+ "(a)The surface density of polarization charge on\n",
+ " the surface of the sphere \n",
+ "(b)The force exerted by the charge on a -4 pC \n",
+ " point charge placed on the sphere '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "e0=10**-9/(36*scipy.pi) #permittivity of free space\n",
+ " #in Farad/m\n",
+ " \n",
+ "er=5.7 #relative permittivity\n",
+ " #(dimensionless)\n",
+ " \n",
+ "chi=er-1 #Electric susceptibility\n",
+ " #(dimensionless)\n",
+ " \n",
+ "r=0.1 #radius of sphere in m\n",
+ "\n",
+ "q1=2 #charge on sphere in pC\n",
+ "\n",
+ "q2=-4 #value of point charge in pC\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "E=q1/(4*scipy.pi*e0*er*r**2) #Electric field on the\n",
+ " #sphere in pV/m\n",
+ " \n",
+ "P=chi*e0*E #Polarisation in pC/m^2\n",
+ "\n",
+ "pps=P #The surface density of polarization \n",
+ " #charge in pC/m^2\n",
+ " \n",
+ "F=(q1*q2*10**-12)/(4*scipy.pi*e0*er*r**2) #Force exerted on point charge in pN\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'The surface density of polarization'\n",
+ "print 'charge on the surface of the sphere =',round(pps,2),'pC/m^2'\n",
+ "print 'Force exerted on -4 pC charge =',round(F,3),'pN in the radial direction'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The surface density of polarization\n",
+ "charge on the surface of the sphere = 13.12 pC/m^2\n",
+ "Force exerted on -4 pC charge = -1.263 pN in the radial direction\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.9, Page number: 188<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Two extensive homogeneous isotropic dielectrics meet on \n",
+ "plane z = O. For z >=0, epsilon_r1 = 4 and for z <= 0, \n",
+ "epsilon_r2 = 3. A uniform electric field E1= 5 a_x - 2 a_y + 3 a_z kV/m \n",
+ "exists for z >= O. Find \n",
+ "(a) E2 for z <= 0 \n",
+ "(b) The angles El and E2 make with the interface \n",
+ "(c) The energy densities in J/m^3 in both dielectrics \n",
+ "(d) The energy within a cube of side 2 m centered at (3,4,-5) '''\n",
+ "\n",
+ "#Variable Declarartion\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "an=array([0,0,1]) #Unit vector normal to the interface\n",
+ "E1=array([5,-2,3]) #Electric field for z >=0 in kV/m\n",
+ "e_r1=4 #Relative permittivity for z >=0 (dimensionless)\n",
+ "e_r2=3 #Relative permittivity for z <=0 (dimensionless)\n",
+ "e0=(10**-9)/(36*scipy.pi) #Permittivity of free space in Farad/m\n",
+ "V=2*2*2 #Volume of cube placed in region 2 in m^3\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "E1n=array([0,0,dot(E1,an)]) #The normal component of E1 in kV/m\n",
+ "E1t=E1-E1n #Transverse component of E1 in kV/m\n",
+ "E2t=E1t #Transverse component of E2 in kV/m\n",
+ "E2n=e_r1*E1n/e_r2 #Normal Component of E2 in kV/m\n",
+ "E2=E2n+E2t #The total field E2 in kV/m\n",
+ "\n",
+ "theta1= 90- 180*scipy.arccos(dot(E1,an)/ #Angle between E1 and \n",
+ " scipy.sqrt(dot(E1,E1)))/scipy.pi #interface in degrees\n",
+ " \n",
+ "theta2= 90- 180*scipy.arccos(dot(E2,an)/ #Angle between E2 and \n",
+ " scipy.sqrt(dot(E2,E2)))/scipy.pi #interface in degrees\n",
+ "\n",
+ "\n",
+ "We1= 0.5*e0*e_r1*dot(E1,E1)*10**6 # The energy density of E1 in J/m^3\n",
+ "We2= 0.5*e0*e_r2*dot(E2,E2)*10**6 # The energy density of E2 in J/m^3\n",
+ "W= We2*V # The energy within the cube in J\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'The electric field for the region z <=0 is',E2,'kV/m'\n",
+ "print 'The angle E1 makes with the boundary is',round(theta1,1),'degrees'\n",
+ "print 'The angle E2 makes with the boundary is',round(theta2,1),'degrees'\n",
+ "print 'The energy density in dielectric 1 is',round(We1*10**6,0),'J/m^3'\n",
+ "print 'The energy density in dielectric 2 is',round(We2*10**6,0),'J/m^3'\n",
+ "print 'The energy within the cube is',round(W*1000,3),'mJ'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The electric field for the region z <=0 is [ 5 -2 4] kV/m\n",
+ "The angle E1 makes with the boundary is 29.1 degrees\n",
+ "The angle E2 makes with the boundary is 36.6 degrees\n",
+ "The energy density in dielectric 1 is 672.0 J/m^3\n",
+ "The energy density in dielectric 2 is 597.0 J/m^3\n",
+ "The energy within the cube is 4.775 mJ\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 5.10, Page number: 190<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Region y <= 0 consists of a perfect conductor while region y >= 0 \n",
+ "is a dielectric medium (epsilon_1r = 2). If there is a surface charge\n",
+ "of 2 nC/m^2 on the conductor, determine E and D at \n",
+ "(a) A(3, -2,2) \n",
+ "(b) B(-4, 1,5) '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "e=(10**-9)/(36*scipy.pi) #Permittivity of free space in Farad/m\n",
+ "er=2 #Relative permittivity (dimensionless)\n",
+ "ps=2 #Surface charge in nC/m^2\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Point A is in the region y <=0. Hence E=D=0\n",
+ "#For point B which is in the region y >=0,\n",
+ "\n",
+ "Dn=ps #Displacement current in nC/m^2\n",
+ "En=Dn*10**-9/(e*er) #Electric Field\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'E at point A= 0'\n",
+ "print 'D at point A= 0'\n",
+ "print 'E at point B=',round(En,2),'V/m along positive y direction'\n",
+ "print 'D at point B=',Dn,'nC/m^2 along positive y direction'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "E at point A= 0\n",
+ "D at point A= 0\n",
+ "E at point B= 113.1 V/m along positive y direction\n",
+ "D at point B= 2 nC/m^2 along positive y direction\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elements_of_Electromagnetics/chapter_6.ipynb b/Elements_of_Electromagnetics/chapter_6.ipynb
new file mode 100644
index 00000000..21f353b6
--- /dev/null
+++ b/Elements_of_Electromagnetics/chapter_6.ipynb
@@ -0,0 +1,80 @@
+{
+ "metadata": {
+ "name": "chapter_6.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 6: Electrostatic Boundary Value Problems<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 6.12, Page number: 238<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Determine the capacitance of each of the capacitors in Figure 6.20.\n",
+ "Take epsilon_r1 = 4, epsilon_r2 = 6, d = 5 mm, S = 30 cm^2 '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "e0=10**-9/(36*scipy.pi) #Permittivity of free space in Farad/m\n",
+ "er1=4 #Relative permittivity of material 1 (dimensionless)\n",
+ "er2=6 #Relative permittivity of material 2 (dimensionless)\n",
+ "d=5*10** -3 #The spacing between the capacitor plates in m\n",
+ "S=30*10** -4 #The surface area of the plates\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Calculation for Capacitor 1\n",
+ "\n",
+ "C1=e0*er1*S*2/d #Capacitance in Farads\n",
+ "C2=e0*er2*S*2/d #Capacitance in Farads\n",
+ "Ca=C1*C2/(C1+C2) #Total capacitance in Farads\n",
+ "\n",
+ "#Calculation for Capacitor 2\n",
+ "\n",
+ "C1= e0*er1*S/(2*d) #Capacitance in Farads\n",
+ "C2= e0*er2*S/(2*d) #Capacitance in Farads\n",
+ "Cb= C1+C2 #Total capacitance in Farads\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'The capacitance of capacitor 1 =',round(Ca*10**12,2),'pF'\n",
+ "print 'The capacitance of capacitor 2 =',round(Cb*10**12,2),'pF'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The capacitance of capacitor 1 = 25.46 pF\n",
+ "The capacitance of capacitor 2 = 26.53 pF\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elements_of_Electromagnetics/chapter_7.ipynb b/Elements_of_Electromagnetics/chapter_7.ipynb
new file mode 100644
index 00000000..0c96dd8d
--- /dev/null
+++ b/Elements_of_Electromagnetics/chapter_7.ipynb
@@ -0,0 +1,224 @@
+{
+ "metadata": {
+ "name": "chapter_7.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 7: Magnetostatic Fields<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.1, Page number: 266<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "The conducting triangular loop in Figure 7.6(a) carries a current of lOA.\n",
+ "Find H at (0, 0, 5) due to side 1 of the loop. '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "p=5 #Distance from side 1 of loop to (0,0,5) in m\n",
+ "l=2 #Length of the side in m\n",
+ "I=10 #Current through loop in A\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "a1=scipy.arccos(l/(scipy.sqrt(l**2+p**2))) #Angle in radians\n",
+ "a2=scipy.pi/2 #Angle in radians\n",
+ "H=I*(scipy.cos(a1)-scipy.cos(a2))/(4*scipy.pi*p) #Field Intensity in A/m\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'H=',round(H*1000,1),'mA/m in the negative y direction'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "H= 59.1 mA/m in the negative y direction\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.2, Page number: 268<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ " Find H at (-3, 4, 0) due to the current filament shown in Figure 7.7 (a). '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "ax=array([1,0,0]) #Unit vector along x direction\n",
+ "ay=array([0,1,0]) #Unit vector along y direction\n",
+ "az=array([0,0,1]) #Unit vector along z direction\n",
+ "a1=scipy.arccos(0)\n",
+ "a2=scipy.arccos(1)\n",
+ "b1=scipy.arccos(0.6)\n",
+ "b2=scipy.arccos(1)\n",
+ "p1=5\n",
+ "p2=4\n",
+ "I1=3 #current in A\n",
+ "I2=3 #current in A\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "Hz=I1/(4*scipy.pi*p1)*(cos(a2)-cos(a1))*array([0.8,0.6,0])\n",
+ "Hx=I2/(4*scipy.pi*p2)*(cos(b2)-cos(b1))*array([0,0,1])\n",
+ "Hzcyl=-I1/(4*scipy.pi*p1)*array([0,1,0])\n",
+ "Hzx=round(dot(Hz,ax),4)\n",
+ "Hzy=round(dot(Hz,ay),5)\n",
+ "Hxz=round(dot(Hx,az),5)\n",
+ "Hxr=array([0,0,Hxz])\n",
+ "Hzr=array([Hzx,Hzy,0])\n",
+ "Hzcyly=round(dot(Hzcyl,ay),5)\n",
+ "Hzcylr=array([0,Hzcyly,0])\n",
+ "Hcart=(Hxr+Hzr)*10**3 #H in cartesian coordinates in mA \n",
+ "Hcyl=(Hxr+Hzcylr)*10**3 #H in cylindrical coordinates in mA\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'H at (-3, 4, 0) in cartesian coordnates =',Hcart,'mA/m'\n",
+ "print 'H at (-3, 4, 0) in cylindrical coordnates =',Hcyl,'mA/m'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "H at (-3, 4, 0) in cartesian coordnates = [ 38.2 28.65 23.87] mA/m\n",
+ "H at (-3, 4, 0) in cylindrical coordnates = [ 0. -47.75 23.87] mA/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.5, Page number: 279<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Planes z=0 and z=4 carry current K=-10a_x A/m and K=10a_x A/m, respectively. \n",
+ "Determine H at \n",
+ "(a) (1,1,1) \n",
+ "(b) (0,-3,10) '''\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "i0=-10 #current through plane z=0 in A/m\n",
+ "i4=10 #current through plane z=4 in A/m\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "H0a=0.5*i0*-1 #H in positive Y direction in A/m\n",
+ "H4a=0.5*i4*-1*-1 #H in positive Y direction in A/m\n",
+ "Ha=H0a+H4a #H at (1,1,1) in A/m \n",
+ "H0b=0.5*i0*-1 #H in positive Y direction in A/m\n",
+ "H4b=0.5*i4*-1 #H in negative Y direction in A/m\n",
+ "Hb=H0b+H4b #H at (0,-3,10) in A/m\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'H at (1,1,1) =',Ha,'A/m'\n",
+ "print 'H at (0,-3,10) =',Hb,'A/m'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "H at (1,1,1) = 10.0 A/m\n",
+ "H at (0,-3,10) = 0.0 A/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 7.7, Page number: 287<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Given the magnetic vector potential A=-p^2/4 a_z Wb/m, calculate \n",
+ "the total magnetic flux crossing the surface phi=pi/2, 1 <= p <= 2 m,\n",
+ "0 <= Z <= 5 m. '''\n",
+ "\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "def B(z,p): \n",
+ " return 0.5*p\n",
+ "psy, err = scipy.integrate.dblquad(lambda p , z: B(z,p), \n",
+ " 0, 5, lambda p: 1, lambda p: 2)\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'Total magnetic flux crossing the surface phi=pi/2 is',psy,'Wb'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total magnetic flux crossing the surface phi=pi/2 is 3.75 Wb\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elements_of_Electromagnetics/chapter_8.ipynb b/Elements_of_Electromagnetics/chapter_8.ipynb
new file mode 100644
index 00000000..e9adf8d2
--- /dev/null
+++ b/Elements_of_Electromagnetics/chapter_8.ipynb
@@ -0,0 +1,454 @@
+{
+ "metadata": {
+ "name": "chapter_8.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 8: Magnetic Forces, Materials and Devices<h1>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.1, Page number: 308<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A charged particle of mass 2 kg and charge 3 C starts at point (1,-2,0)\n",
+ "with velocity 4a_x+3a_z m/s in an electric field 12a_x+10a_y V/m.\n",
+ "At time t=1s, determine \n",
+ "(a) The acceleration of the particle \n",
+ "(b) Its velocity \n",
+ "(c) Its kinetic energy \n",
+ "(d) Its position '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "m=2 #mass in kg\n",
+ "q=3 #charge in C\n",
+ "v=array([4,0,3]) #initial velocity in m/s\n",
+ "E=array([12,10,0]) #electric field in V/m\n",
+ "t=1 #time in sec\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "a=q*E/m #acceleration in m/s^2 after 1 sec\n",
+ "u=array([18*t+4,15*t,3]) #velocity in m/s after 1 sec\n",
+ "modofu=scipy.sqrt(dot(u,u))\n",
+ "KE=0.5*m*(modofu)**2 #kinetic energy in J at t=1 sec\n",
+ "s=array([9*t**2+4*t+1,7.5*t**2-2,3*t]) #position after 1 sec in m\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'At time t=1 sec,'\n",
+ "print' The acceleration of the particle =',a,'m/s^2'\n",
+ "print 'Its velocity =',u,'m/s' \n",
+ "print 'Its kinetic energy =',KE,'J'\n",
+ "print 'Its position =',s,'m'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "At time t=1 sec,\n",
+ " The acceleration of the particle = [18 15 0] m/s^2\n",
+ "Its velocity = [22 15 3] m/s\n",
+ "Its kinetic energy = 718.0 J\n",
+ "Its position = [ 14. 5.5 3. ] m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.6, Page number: 322"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A small current loop L1 with magnetic moment 5a_z A/m^2 is located at the origin while \n",
+ "another small loop current I2 with magnetic moment 3a_y A/m^2 is located at (4, - 3, 10). \n",
+ "Determine the torque on L2 . '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "ar=array([1,0,0]) #Unit vector along radial direction\n",
+ "ath=array([0,1,0]) #Unit vector along theta direction\n",
+ "aph=array([0,0,1]) #Unit vector along phi direction \n",
+ "x=4\n",
+ "y=-3\n",
+ "z=10\n",
+ "muo=4*scipy.pi*10**-7 #permeability of free space\n",
+ "m1=5 #magnetic moment in A/m^2\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "r=scipy.sqrt(x**2+y**2+z**2)\n",
+ "p=scipy.sqrt(x**2+y**2)\n",
+ "sinphi=y/p\n",
+ "cosphi=x/p\n",
+ "sintheta=1/scipy.sqrt(5)\n",
+ "costheta=2/scipy.sqrt(5)\n",
+ "B1=muo*m1*(2*costheta*ar+sintheta*ath)/(4*scipy.pi*r**3)\n",
+ "m2=3*(sintheta*sinphi*ar+costheta*sinphi*ath+cosphi*aph)\n",
+ "T2=cross(m2,B1)*10**9\n",
+ "T2x=round(dot(T2,ar),3)\n",
+ "T2y=round(dot(T2,ath),3)\n",
+ "T2z=round(dot(T2,aph),3)\n",
+ "T2r=array([T2x,T2y,T2z]) #torque in nNm\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'Torque T2 =',T2r,'nNm'\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Torque T2 = [-0.384 1.536 0.902]\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.7, Page number: 330"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Region 0 < Z < 2 m is occupied by an infinite slab of permeable material (mur = 2.5). If \n",
+ "B = IOy ax - 5x ay mWb/m^2 within the slab, determine: (a) J, (b) Jb, (c) M, (d) Kb on \n",
+ "z=0 '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "muo=4*scipy.pi*10**-7 #permeability of free space\n",
+ "mur=2 #relative permeability\n",
+ "ax=array([1,0,0]) #Unit vector along x direction\n",
+ "ay=array([0,1,0]) #Unit vector along y direction\n",
+ "az=array([0,0,1]) #Unit vector along z direction\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "J=(-5-10)*10**-6/(4*scipy.pi*10**-7*2.5) #in kA/m^2\n",
+ "Jb=1.5*J #in kA/m^2\n",
+ "MbyB=(1.5)*10**4/(4*scipy.pi*2.5) \n",
+ "Mv=MbyB*10*10**-3*ax+MbyB*5*10**-3*ay\n",
+ "Kb=cross(az,Mv)\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'J =',round(J,3),'kA/m^2'\n",
+ "print 'Jb =',round(Jb,3),'kA/m^2'\n",
+ "print 'M =(',round(dot(Mv,ax),3),'y,',round(dot(Mv,ay),3),'x, 0) kA/m'\n",
+ "print 'Kb =(',round(dot(Kb,ax),3),'x,',round(dot(Kb,ay),3),'y, 0) kA/m' \n",
+ " \n",
+ "\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "J = -4.775 kA/m^2\n",
+ "Jb = -7.162 kA/m^2\n",
+ "M =( 4.775 y, 2.387 x, 0) kA/m\n",
+ "Kb =( -2.387 x, 4.775 y, 0) kA/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.8, Page number: 332<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Given that H=-2a_x + 6a_y + 4 a_z A/m in region y - x - 2 <= 0 where \n",
+ "mu_1=5mu_0 , calculate \n",
+ "(a) M_1 and B_1 \n",
+ "(b) H_2 and B_2 in region y - x - 2 >= 0 where mu_2=2mu_0 '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "ax=array([1,0,0]) #Unit vector along x direction\n",
+ "ay=array([0,1,0]) #Unit vector along y direction\n",
+ "az=array([0,0,1]) #Unit vector along z direction \n",
+ "H1=array([-2,6,4]) #in A/m\n",
+ "mu0=4*scipy.pi*10**-7 #permeability of free space\n",
+ "mur1=5 #relative permeabililty in region 1\n",
+ "mur2=2 #relative permeabililty in region 2\n",
+ "an=array([-1,1,0])/scipy.sqrt(2)\n",
+ "\n",
+ "#Calculatios\n",
+ "\n",
+ "mu1=mu0*mur1\n",
+ "mu2=mu0*mur2\n",
+ "M1=(mur1-1)*H1 # magnetisation in region 1 in A/m\n",
+ "B1=mu1*H1*10**6 # field in micro Wb/m^2\n",
+ "B1x=round(dot(B1,ax),2) # x component of B1\n",
+ "B1y=round(dot(B1,ay),1) # y component of B1\n",
+ "B1z=round(dot(B1,az),2) # z component of B1\n",
+ "B1r=array([B1x,B1y,B1z]) # B1 rounded to 2 decimal places\n",
+ "H1n=dot(H1,an)*an \n",
+ "H1t=H1-H1n\n",
+ "H2t=H1t # using transverse boundary condition\n",
+ "H2n=(mu1/mu2)*H1n # using normal boundary condition\n",
+ "H2=H2t+H2n # in A/m\n",
+ "B2=mu2*H2*10**6 # field in micro Wb/m^2\n",
+ "B2x=round(dot(B2,ax),2) # x component of B2\n",
+ "B2y=round(dot(B2,ay),2) # y component of B2\n",
+ "B2z=round(dot(B2,az),2) # z component of B2\n",
+ "B2r=array([B2x,B2y,B2z]) # B2 rounded to 2 decimal places\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'M1= ',M1,'A/m'\n",
+ "print 'B1= ',B1r,'micro Wb/m^2'\n",
+ "print 'H2= ',H2,'A/m'\n",
+ "print 'B2= ',B2r,'micro Wb/m^2'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "M1= [-8 24 16] A/m\n",
+ "B1= [-12.57 37.7 25.13] micro Wb/m^2\n",
+ "H2= [ -8. 12. 4.] A/m\n",
+ "B2= [-20.11 30.16 10.05] micro Wb/m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.14, Page number: 350<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "The toroidal core of Figure 8.26(a) has p_o = 10 cm and a circular cross \n",
+ "section with a = 1 cm. If the core is made of steel (mu = 1000mu_o) and \n",
+ "has a coil with 200 turns. calculate the amount of current that will\n",
+ "produce a flux of 0.5 mWb in the core. '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "p=10*10**-2 #in m\n",
+ "a=1*10**-2 #in m\n",
+ "Ur=1000 #relative permeability\n",
+ "Uo=4*scipy.pi*10**-7 #permeability of free space\n",
+ "n=200 #number of turns\n",
+ "phi=0.5*10**-3 #flux in the core in Wb\n",
+ "U=Uo*Ur #permeability of steel core\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "I=phi*2*scipy.pi*p/(U*n*scipy.pi*a*a) #current in A\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'The current that will produce a flux of 0.5 mWb =',round(I,3),'A'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current that will produce a flux of 0.5 mWb = 3.979 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.15, Page number: 351<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "In the magnetic circuit of Figure 8.27, calculate the current in the coil \n",
+ "that will produce a magnetic flux density of 1.5 Wb/m^2 in the air gap\n",
+ "assuming that mu_1 = 50 mu_o and that all branches have the same\n",
+ "cross-sectional area of 10 cm^2 . '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Uo=4*scipy.pi*10**-7 #permeability of free space\n",
+ "Ur=50 #relative permeability of coil\n",
+ "l1=30*10**-2\n",
+ "s=10*10**-4 \n",
+ "l3=9*10**-2\n",
+ "la=1*10**-2 \n",
+ "B=1.5 #flux density in Wb/m^2\n",
+ "N=400 #number of turns\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "R1=l1/(Uo*Ur*s)\n",
+ "R2=R1\n",
+ "R3=l3/(Uo*Ur*s)\n",
+ "Ra=la/(Uo*s)\n",
+ "R=R1*R2/(R1+R2)\n",
+ "Req=R3+Ra+R\n",
+ "I=B*s*Req/N #current in A\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'The current required =',round(I,3),'A'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current required = 44.165 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 8.16, Page number: 353<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A U-shaped electromagnet shown in Figure 8.29 is designed to lift a \n",
+ "400-kg mass (which includes the mass of the keeper). The iron\n",
+ "yoke (mu_r = 3000) has a cross section of 40 cm^2 and mean length of 50 cm,\n",
+ "and the air gaps are each 0.1 mm long. Neglecting the reluctance of \n",
+ "the keeper, calculate the number of turns in the coil when\n",
+ "the excitation current is 1 A. '''\n",
+ "\n",
+ "import scipy\n",
+ "from numpy import *\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "m=400 #mass in kg\n",
+ "g=9.8 #acceleration due to gravity in m/s^2\n",
+ "Ur=3000 #relative permeability of the iron yoke\n",
+ "Uo=4*scipy.pi*10**-7 #permeability of free space\n",
+ "S=40*10**-4 #cross sectional area of iron yoke in m^2\n",
+ "la=1*10**-4 #air gaps in m\n",
+ "li=50*10**-2 #mean length of yoke in m\n",
+ "I=1 #excitation current in A \n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "B=scipy.sqrt(m*g*Uo/S) #field in Wb/m^2\n",
+ "Ra=2*la/(Uo*S) \n",
+ "Ri=li/(Uo*Ur*S) \n",
+ "N=(Ra+Ri)/(Ra*Uo)*B*la #number of turns\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'The nmber of turns in the coil when the excitation current is 1 A ='\n",
+ "print round(N,0)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The nmber of turns in the coil when the excitation current is 1 A =\n",
+ "162.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elements_of_Electromagnetics/chapter_9.ipynb b/Elements_of_Electromagnetics/chapter_9.ipynb
new file mode 100644
index 00000000..02dee160
--- /dev/null
+++ b/Elements_of_Electromagnetics/chapter_9.ipynb
@@ -0,0 +1,200 @@
+{
+ "metadata": {
+ "name": "chapter_9.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h1>Chapter 9: Maxwells Equations<h1>"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.1, Page number: 375"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "A conducting bar can slide freely over two conducting rails as shown in Figure 9_6. Calcu- \n",
+ "late the induced voltage in the bar \n",
+ "(a) If the bar is stationed at y = 8 cm and B = 4 cos(10^6t) az mWb/m^2 \n",
+ "(b) If the bar slides at a velocity u = 20ay m/s and B = 4az. m Wb/m 2 \n",
+ "(c) If the bar slides at a velocity u = 20ay m/s and B = 4cos(10^6t - y) az\u001f mWb/m^2 '''\n",
+ "\n",
+ "import scipy\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "u2=20\n",
+ "B2=4\n",
+ "l=0.06\n",
+ "#Calculations\n",
+ "\n",
+ "def ansa(x,y): \n",
+ " return 4*10**3\n",
+ "Va, erra = scipy.integrate.dblquad(lambda y , x: ansa(x,y), #in V \n",
+ " 0, 0.06, lambda y: 0, lambda y: 0.08)\n",
+ "\n",
+ "Vb=-u2*B2*l #in mV\n",
+ "\n",
+ "def ansc(x,y): \n",
+ " return 4\n",
+ "psic, errc = scipy.integrate.dblquad(lambda y , x: ansc(x,y), #in mWb \n",
+ " 0, 0.06, lambda y: 0, lambda y: 1)\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'Va =',Va,'sin(10^6t) V'\n",
+ "print 'Vb =',Vb,'mV'\n",
+ "print 'Vc= ',psic*10**3,'cos(10^6t-y) -',psic*10**3,'cos(10^6t) V'\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Va = 19.2 sin(10^6t) V\n",
+ "Vb = -4.8 mV\n",
+ "Vc= 240.0 cos(10^6t-y) - 240.0 cos(10^6t) V\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 9.3, Page number: 379"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "The magnetic circuit of Figure 9.8 has a uniform cross section of 10^-3 m^2 . If the circuit is \n",
+ "energized by a current I1(t) = 3 sin(100pit) A in the coil of N1 = 200 turns, find the emf \n",
+ "induced in the coil of N2 = 100 turns. Assume that mu = 500 muo '''\n",
+ "\n",
+ "import scipy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "n1=200\n",
+ "n2=100 \n",
+ "S=10**-3 #cross section in m^2\n",
+ "muo=4*scipy.pi*10**-7 #permeabiility of free space\n",
+ "mur=500 #relative permeability\n",
+ "r=10*10**-3 #radius in m\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "psiI=n1*muo*mur*S/(2*scipy.pi*r)\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print 'V2 =',psiI*n2*300*scipy.pi,'cos(100pi t) V'\n",
+ "print '= 6Pi cos(100pi t) V'\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V2 = 188.495559215 cos(100pi t) V\n",
+ "= 6Pi cos(100pi t) V\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "<h3>Example 9.5, Page number: 393<h3>"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "'''\n",
+ "Evaluate the complex numbers \n",
+ " \n",
+ "(a) Zl=(j(3-j4)*)/(-I+j6)(2+j)^2 \n",
+ "(b) Z2=((1+j)/(4-j8))^1/2 '''\n",
+ "\n",
+ "import scipy\n",
+ "import cmath\n",
+ "from numpy import *\n",
+ "\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "z3=1j\n",
+ "z4=3+4j \n",
+ "z5=-1+6j \n",
+ "z6=3+4j\n",
+ "z7=1+1j\n",
+ "z8=4-8j\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "z1=(z3*z4/(z5*z6))\n",
+ "z2=scipy.sqrt(z7/z8)\n",
+ "z1r=round(z1.real,4) #real part of z1 rounded to 4 decimal places\n",
+ "z1i=round(z1.imag,4) #imaginary part of z1 rounded to 4 decimal places\n",
+ "z2r=round(z2.real,4) #real part of z2 rounded to 4 decimal places\n",
+ "z2i=round(z2.imag,4) #imaginary part of z2 rounded to 4 decimal places\n",
+ "\n",
+ "absz2=round(abs(z2),4) #absolute value of z2 rounded to 4 decimal places\n",
+ "\n",
+ "ang=scipy.arctan(z2i/z2r)*180/scipy.pi #in degrees\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print 'z1 =',z1r,'+',z1i,'j'\n",
+ "print 'z2 ='\n",
+ "print 'mod =',absz2,'and angle=',round(ang,1),'degrees'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "z1 = 0.1622 + -0.027 j\n",
+ "z2 =\n",
+ "mod = 0.3976 and angle= 54.2 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elements_of_Electromagnetics/screenshots/I(0,t)I(l,t).png b/Elements_of_Electromagnetics/screenshots/I(0,t)I(l,t).png
new file mode 100644
index 00000000..903afeb8
--- /dev/null
+++ b/Elements_of_Electromagnetics/screenshots/I(0,t)I(l,t).png
Binary files differ
diff --git a/Elements_of_Electromagnetics/screenshots/cospropogatingwave.png b/Elements_of_Electromagnetics/screenshots/cospropogatingwave.png
new file mode 100644
index 00000000..271a2fbc
--- /dev/null
+++ b/Elements_of_Electromagnetics/screenshots/cospropogatingwave.png
Binary files differ
diff --git a/Elements_of_Electromagnetics/screenshots/vectors.png b/Elements_of_Electromagnetics/screenshots/vectors.png
new file mode 100644
index 00000000..6fade91b
--- /dev/null
+++ b/Elements_of_Electromagnetics/screenshots/vectors.png
Binary files differ