# Chapter 12: Waveguides

### Example 12.1, Page number: 557

In [1]:
from __future__ import division

import scipy

#Variable Declaration

a=2.5*10**-2     #in m
b=1*10**-2       #in m
c=0
Ur=1             #relative permeability
Er=4             #relative permittivity
C=3*10**8        #speed of wave in m/s
fc=0
m=0
n=0

#Calculations

while (fc*10**-9 < 15.1) :
fc = (C/(4*a))*scipy.sqrt(m**2+(a*n/b)**2)
if (( fc*10**-9) < 15.1) :
n=n+1
else:
print 'Maximum value of n is ',n-1

nmax=n-1
fc=0
m=0
n=0
while(fc*10**-9 < 15.1):
fc =(C/(4*a))*scipy.sqrt(m**2+(a*n/b)**2)
if((fc*10**-9) < 15.1):
m=m+1
else:
print 'Maximum value of m is ',m-1

mmax=m-1
m=0
while(m<mmax+1):
n=0
while(n<nmax+1):
p=(C/(4*a))*scipy.sqrt(m**2+(a*n/b)**2)
if((p*10**-9) < 15.1) :
print m,n,'transmission mode is possible'
print 'frequency is',round(p*10**-9,2),'GHz'
else:
print m,n,'transmission mode is not possible'
n=n+1

m=m+1


Maximum value of n is  2
Maximum value of m is  5
0 0 transmission mode is possible
frequency is 0.0 GHz
0 1 transmission mode is possible
frequency is 7.5 GHz
0 2 transmission mode is possible
frequency is 15.0 GHz
1 0 transmission mode is possible
frequency is 3.0 GHz
1 1 transmission mode is possible
frequency is 8.08 GHz
1 2 transmission mode is not possible
2 0 transmission mode is possible
frequency is 6.0 GHz
2 1 transmission mode is possible
frequency is 9.6 GHz
2 2 transmission mode is not possible
3 0 transmission mode is possible
frequency is 9.0 GHz
3 1 transmission mode is possible
frequency is 11.72 GHz
3 2 transmission mode is not possible
4 0 transmission mode is possible
frequency is 12.0 GHz
4 1 transmission mode is possible
frequency is 14.15 GHz
4 2 transmission mode is not possible
5 0 transmission mode is possible
frequency is 15.0 GHz
5 1 transmission mode is not possible
5 2 transmission mode is not possible


### Example 12.3, Page number: 561

In [2]:

import scipy
import cmath
from numpy import *

#Variable Declaration

a=1.5*10**-2              #in m
b=0.8*10**-2              #in m
c=0
Uo=4*scipy.pi*10**-7      #permeability of free space
Ur=1                      #relative permeability
Eo=10**-9/(36*scipy.pi)   #permittivity of free space
Er=4                      #relative permittivity
C=3*10**8                 #speed of light in m/s
m=1
n=3
u=C/2                     #speed of wave in m/s

#Calculations

f=w/(2*scipy.pi)                                #frequency of wave in Hz
fc=u*((m*m)/(a*a)+(n*n)/(b*b))**0.5/2           #cutoff frequency in Hz
eta=377/scipy.sqrt(Er)*scipy.sqrt(1-(fc/f)**2)  #intrinsic wave impedance in ohm

#Results

print 'The cutoff frequency =',round(fc*10**-9,2),'GHz'
print 'The propagation constant =',round(B,2),'j /m'
print 'The intrinsic wave impedance =',round(eta,1),'ohms'

The cutoff frequency = 28.57 GHz
The phase constant = 1718.93 rad/m
The propagation constant = 1718.93 j /m
The intrinsic wave impedance = 154.7 ohms


### Example 12.4, Page number: 565

In [3]:

import scipy

#Variable Declaration

a=8.636*10**-2    #in m
b=4.318*10**-2    #in m
f=4*10**9         #in Hz
u=3*10**8         #speed of wave in m/s

#Calculations

fc=u/(2*a)
if(f>fc):
print 'As f>fc, TE10 mode will propogate'
else:
print 'It will not propogate'

Up=u/scipy.sqrt(1-(fc/f)**2)    #phase velocity in m/s
Ug=u*u/Up                       #group velocity in m/s

#Results

print 'Phase velocity =',round(Up*10**-6,0),'Mm/s'
print 'Group velocity =',round(Ug*10**-6,1),'Mm/s'

As f>fc, TE10 mode will propogate
Phase velocity = 333.0 Mm/s
Group velocity = 270.2 Mm/s


### Example 12.5, Page number: 570

In [4]:


import scipy

#Variable Declaration

f=10*10**9          #frequency of operation in Hz
a=4*10**-2          #in m
b=2*10**-2          #in m
u=3*10**8           #velocity in m/s
Pavg=2*10**-3       #average power in W

#Calculations

fc=u/(2*a)                      #cutoff frequency in Hz
n=377/scipy.sqrt(1-(fc/f)**2)   #intrinsic wave impedance in ohms
E=scipy.sqrt(4*n*Pavg/(a*b))    #peak value of electric field in V/m

#Result

print 'Peak value of electric field =',round(E,2),'V/m'

Peak value of electric field = 63.77 V/m


### Example 12.6, Page number: 571

In [5]:


import scipy

#Variable declaration

cc=5.8*10**7             #in S/m
f=4.8*10**9              #in Hz
c=10**-17                #in S/m
Uo=4*scipy.pi*10**-7     #permeability of free space
Eo=10**-9/(36*scipy.pi)  #permittivity of free space
Er=2.55                  #relative permittivity
z=60*10**-2              #in m
l=4.2*10**-2             #in m
b=2.6*10**-2             #in m
P=1.2*10**3              #in W

#Calculations

n=377/scipy.sqrt(Er)
u=3*10**8/scipy.sqrt(Er)
fc=u/(2*l)
Rs=scipy.sqrt(scipy.pi*f*Uo/cc)
ac=2*Rs*(0.5+(b/l)*(fc/f)**2)/(b*n*scipy.sqrt(1-(fc/f)**2))
a=ac
Pd=P*(scipy.e**(2*a*z)-1)

#Result

print 'power dissipated =',round(Pd,3),'W'

power dissipated = 6.096 W


### Example 12.8, Page number: 579

In [6]:


import scipy

#Variable Declaration

a=5*10**-2              #in m
b=4*10**-2              #in m
c=10*10**-2             #in m
C=5.8*10**7             #in mhos/m
Uo=4*scipy.pi*10**-7    #permeability of free space
u=3*10**8               #speed of wave in m/s

#Calculations

def f(m,n,p):
fr=scipy.sqrt((m/a)**2+(n/b)**2+(p/c)**2)*u/2     #resonant frequency in Hz
print round(fr*10**-9,3)

f101=3.35*10**9
d=scipy.sqrt(1/(scipy.pi*f101*Uo*C))
Q=(a*a+c*c)*a*b*c/(d*(2*b*(a**3+c**3)+a*c*(a*a+c*c))) #quality factor

#Results

print 'Thus the five lowest order modes in ascending order are '
print 'TE101, frequency in GHz ='
f(1,0,1)
print 'TE011, frequency in GHz ='
f(0,1,1)
print 'TE102, frequency in GHz ='
f(1,0,2)
print 'TE110, frequency in GHz ='
f(1,1,0)
print 'TE111 or TM111, frequency in GHz ='
f(1,1,1)
print 'Quality factor =',round(Q,0)

Thus the five lowest order modes in ascending order are
TE101, frequency in GHz =
3.354
TE011, frequency in GHz =
4.039
TE102, frequency in GHz =
4.243
TE110, frequency in GHz =
4.802
TE111 or TM111, frequency in GHz =
5.031
Quality factor = 14358.0