From 83c1bfceb1b681b4bb7253b47491be2d8b2014a1 Mon Sep 17 00:00:00 2001 From: debashisdeb Date: Fri, 20 Jun 2014 15:42:42 +0530 Subject: removing problem statements --- Elements_of_Electromagnetics/chapter_12.ipynb | 869 +++++++++++++------------- 1 file changed, 418 insertions(+), 451 deletions(-) (limited to 'Elements_of_Electromagnetics/chapter_12.ipynb') diff --git a/Elements_of_Electromagnetics/chapter_12.ipynb b/Elements_of_Electromagnetics/chapter_12.ipynb index b6ded6a6..e098f292 100644 --- a/Elements_of_Electromagnetics/chapter_12.ipynb +++ b/Elements_of_Electromagnetics/chapter_12.ipynb @@ -1,452 +1,419 @@ -{ - "metadata": { - "name": "chapter_12.ipynb" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Chapter 12: Waveguides

" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Example 12.1, Page number: 557

" - ] - }, - { - "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(mExample 12.3, Page number: 561

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

Example 12.4, Page number: 565

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

Example 12.5, Page number: 570

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

Example 12.6, Page number: 571

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

Example 12.8, Page number: 579

" - ] - }, - { - "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": {} - } - ] +{ + "metadata": { + "name": "", + "signature": "sha256:7e2f43e6e0f517c2aac74f69be1d132b3ab84b5c247c20e556eb69dbe9aedae5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Chapter 12: Waveguides

" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Example 12.1, Page number: 557

" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \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(mExample 12.3, Page number: 561

" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \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": [ + "

Example 12.4, Page number: 565

" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \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": [ + "

Example 12.5, Page number: 570

" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \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": [ + "

Example 12.6, Page number: 571

" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \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": [ + "

Example 12.8, Page number: 579

" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \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 -- cgit