# Variable Declaration
Theeta = 60 # Angle of incidence (degrees)
# Calculation
import math # Math Library
vg = math.sin(Theeta*math.pi/180) # (X vc) Velocity of EM wave in parallel direction (m/S)
vn = math.cos(Theeta*math.pi/180) # (X vc) Velocity of EM wave in normal direction (m/s)
# Result
print "Velocity of EM wave in parallel direction, vg =",round(vg,2),"* vc"
print "Velocity of EM wave in normal direction, vn =",round(vn,2),"* vc"
# Variable Declaration
Theeta = 60 # Angle of incidence (degrees)
# Calculation
import math # Math Library
Lambda_g = 1/math.sin(Theeta*math.pi/180) # (* Lambda) Wavelength of EM wave in parallel direction (m)
Lambda_n = 1/math.cos(Theeta*math.pi/180) # (* Lambda) Wavelength of EM wave in normal direction (m)
# Result
print "Wavelength of EM wave in parallel direction, Lambda_g =",round(Lambda_g,2),"* Lambda"
print "Wavelength of EM wave in normal direction, Lambda_n =",round(Lambda_n,2),"* Lambda"
# Variable Declaration
Theeta = 60 # Angle of incidence (degrees)
# Calculation
import math # Math Library
vp = 1/math.sin(Theeta*math.pi/180) # (* vc) Phase velocity of EM wave (m/s)
# Result
print "The phase velocity of EM wave, vp =",round(vp,2),"* vc"
# Variable Declaration
a = 5.1 # Dimension 1 of rectangular waveguide (cm)
b = 2.4 # Dimension 2 of rectangular waveguide (cm)
m = 2 # Number of half wavelengths
# Calculation
import math # Math Library
Lambda = 2*a/m # Cutoff wavelength of rectangular waveguide (cm)
# Result
print "The cutoff wavelength of rectangular waveguide, Lambda =",round(Lambda,1),"cm"
# Variable Declaration
a = 5.1 # Dimension 1 of rectangular waveguide (cm)
b = 2.4 # Dimension 2 of rectangular waveguide (cm)
m = 1 # Constant m for TE10 mode
n = 0 # Constant n for TE10 mode
# Calculation
import math # Math Library
fc = 1.5*pow(10,8)*math.sqrt(pow(m/a,2)+pow(n/b,2)) # Cutoff frequency of dominant mode (TE10) of rectangular waveguide (Hz)
# Result
print "The cutoff frequency of dominant mode (TE10) of rectangular waveguide, fc =",round(fc/pow(10,7),2),"GHz"
# Variable Declaration
a = 5.1 # Dimension 1 of rectangular waveguide (cm)
b = 2.4 # Dimension 2 of rectangular waveguide (cm)
m1 = 0 # Constant m for TE01 mode
n1 = 1 # Constant n for TE01 mode
m2 = 2 # Constant m for TE20 mode
n2 = 0 # Constant n for TE20 mode
m3 = 0 # Constant m for TE02 mode
n3 = 2 # Constant n for TE02 mode
# Calculation
import math # Math Library
f1 = 1.5*pow(10,8)*math.sqrt(pow(m1/a,2)+pow(n1/b,2)) # Cutoff frequency of TE01 of rectangular waveguide (Hz)
f2 = 1.5*pow(10,8)*math.sqrt(pow(m2/a,2)+pow(n2/b,2)) # Cutoff frequency of TE20 of rectangular waveguide (Hz)
f3 = 1.5*pow(10,8)*math.sqrt(pow(m3/a,2)+pow(n3/b,2)) # Cutoff frequency of TE02 of rectangular waveguide (Hz)
# Result
print "The frequency of TE01 mode of rectangular waveguide, f1 =",round(f1/pow(10,7),2),"GHz"
print "The frequency of TE20 mode of rectangular waveguide, f2 =",round(f2/pow(10,7),2),"GHz"
print "The frequency of TE02 mode of rectangular waveguide, f3 =",round(f3/pow(10,7),2),"GHz"
print "Hence the lowest frequency except dominant mode is, f =",round(min(f1,f2,f3)/pow(10,7),2),"GHz"
# Variable Declaration
a = 3.00 # Plane Separation of rectangular waveguide (cm)
c = 3.00*pow(10,8) # Speed of light in vacuum (m/s)
f = 6.00*pow(10,9) # Operating frequency (Hz)
m = 1.00 # Constant m for dominant mode
# Calculation
import math # Math Library
Lambda = c/f * 100 # Operating Wavelength (cm)
Lambda_o = 2*a/m # Cutoff Wavelength (cm)
Lambda_p = Lambda/math.sqrt(1-pow(Lambda/Lambda_o,2)) # Guide Wavelength (cm)
vg = c*math.sqrt(1-pow(Lambda/Lambda_o,2)) # Group velocity (m/s)
vp = c/math.sqrt(1-pow(Lambda/Lambda_o,2)) # Phase velocity (m/s)
# Result
print "(a) Cutoff Wavelength, Lambda_o =",round(Lambda_o),"cm"
print "(b) Guide Wavelength, Lambda_p =",round(Lambda_p,2),"cm"
print "(c) Group Velocity, vg =",round(vg/pow(10,8),2),"*10^(8) m/s"
print " Phase Velocity, vp =",round(vp/pow(10,8),2),"*10^(8) m/s"
# Variable Declaration
a = 6.00 # Plane Separation of rectangular waveguide (cm)
c = 3.00*pow(10,8) # Speed of light in vacuum (m/s)
f = 10.00*pow(10,9) # Operating frequency (Hz)
m1 = 1# Dimensional Constant
m2 = 2# Dimensional Constant
m3 = 3# Dimensional Constant
m4 = 4# Dimensional Constant
# Calculation
import math # Math Library
Lambda = c/f * 100 # Operating Wavelength (cm)
Lambda_o1 = 2*a/m1 # Wavelength (cm)
Lambda_o2 = 2*a/m2 # Wavelength (cm)
Lambda_o3 = 2*a/m3 # Wavelength (cm)
Lambda_o4 = 2*a/m4 # Wavelength (cm)
Lambda_p = Lambda/math.sqrt(1-pow(Lambda/Lambda_o3,2)) # Guide Wavelength (cm)
# Result
print "(a) For m = 1, Lambda_o =",round(Lambda_o1),"cm"
print " For m = 2, Lambda_o =",round(Lambda_o2),"cm"
print " For m = 3, Lambda_o =",round(Lambda_o3),"cm"
print " For m = 4, Lambda_o =",round(Lambda_o4),"cm"
print " Hence The largest value of m = 3"
print "(b) Guide Wavelength, Lambda_p =",round(Lambda_p,2),"cm"
# Variable Declaration
Lambda = 2.00 # Wavelength of travelling wave (cm)
Lambda_o = 4.00 # Cutoff wavelength (cm)
# Calculation
import math # Math Library
Zo = 377/math.sqrt(1-pow(Lambda/Lambda_o,2)) # Characteristic impedance of the given waveguide (Ohms)
# Result
print "The characteristic impedance of the given waveguide, Zo =",round(Zo),"Ohms"
# Variable Declaration
m = 1 # Constant m for TM11 mode
n = 1 # Constant n for TM11 mode
# Calculation
import math # Math Library
Lambda_o = 2/math.sqrt(pow(m,2)+pow(2*n,2)) # (* a) Cutoff wavelength with b=a/2 (m)
# Result
print "Cutoff wavelength of standard rectangular waveguides, Lambda_o =",round(Lambda_o,3),"* a "
# Variable Declaration
rho1 = 0.553 # Constant from Example 12.7
rho2 = 0.661 # Constant from Example 12.8
# Calculation
import math # Math Library
Zo1 = 120*math.pi/rho1 # Characteristic Wave Impedance (Ohms)
Zo2 = 120*math.pi/rho2 # Characteristic Wave Impedance (Ohms)
# Result
print "Ex.12.7 : Characteristic Wave Impedance, Zo1 =",round(Zo1),"Ohms"
print "Ex.12.8 : Characteristic Wave Impedance, Zo2 =",round(Zo2),"Ohms"
# Variable Declaration
a = 4.5 # Dimension 1 of rectangular waveguide (cm)
b = 3.0 # Dimension 2 of rectangular waveguide (cm)
c = 3.00*pow(10,8) # Speed of light in vacuum (m/s)
f = 9.00*pow(10,9) # Operating frequency (Hz)
m1 = 1 # Constant m for TE10 mode
n1 = 0 # Constant n for TE10 mode
m2 = 1 # Constant m for TM11 mode
n2 = 1 # Constant n for TM11 mode
# Calculation
import math # Math Library
Lambda = c/f * 100 # Operating Wavelength (cm)
Lambda_o1 = 2*a/m1 # Cutoff Wavelength (cm)
Lambda_p1 = Lambda/math.sqrt(1-pow(Lambda/Lambda_o1,2)) # Guide Wavelength (cm)
vg1 = c*math.sqrt(1-pow(Lambda/Lambda_o1,2)) # Group velocity (m/s)
vp1 = c/math.sqrt(1-pow(Lambda/Lambda_o1,2)) # Phase velocity (m/s)
Zo1 = 120*math.pi/math.sqrt(1-pow(Lambda/Lambda_o1,2)) # Characteristic Wave Impedance (Ohms)
Lambda_o2 = 2/math.sqrt(pow(m2/a,2)+pow(n2/b,2)) # Cutoff Wavelength (cm)
Lambda_p2 = Lambda/math.sqrt(1-pow(Lambda/Lambda_o2,2)) # Guide Wavelength (cm)
vg2 = c*math.sqrt(1-pow(Lambda/Lambda_o2,2)) # Group velocity (m/s)
vp2 = c/math.sqrt(1-pow(Lambda/Lambda_o2,2)) # Phase velocity (m/s)
Zo2 = 120*math.pi*math.sqrt(1-pow(Lambda/Lambda_o2,2)) # Characteristic Wave Impedance (Ohms)
# Result
print "(a) For TE10 mode :"
print "Cutoff Wavelength, Lambda_o =",round(Lambda_o1),"cm"
print "Guide Wavelength, Lambda_p =",round(Lambda_p1,2),"cm"
print "Group Velocity, vg =",round(vg1/pow(10,8),2),"*10^(8) m/s"
print "Phase Velocity, vp =",round(vp1/pow(10,8),2),"*10^(8) m/s"
print "Characteristic Wave Impedance, Zo =",round(Zo1,1),"Ohms"
print "(b) For TM11 mode :"
print "Cutoff Wavelength, Lambda_o =",round(Lambda_o2),"cm"
print "Guide Wavelength, Lambda_p =",round(Lambda_p2,1),"cm"
print "Group Velocity, vg =",round(vg2/pow(10,8),2),"*10^(8) m/s"
print "Phase Velocity, vp =",round(vp2/pow(10,8),2),"*10^(8) m/s"
print "Characteristic Wave Impedance, Zo =",round(Zo2),"Ohms"
# Variable Declaration
a = 3 # Width of rectangular waveguide (cm)
c = 3.00*pow(10,8) # Speed of light in vacuum (m/s)
m = 1 # Constant m for dominant mode
Zo = 500 # Characteristic wave impedance (Ohms)
# Calculation
import math # Math Library
Lambda_o = 2*a/m # Cutoff Wavelength (cm)
Lambda = pow(1-pow(120*math.pi/Zo,2),0.5)*Lambda_o # Operating wavelength (cm)
f = c/Lambda # Operating Frequency (Hz)
# Result
print "Operating Frequency, f =",round(f/pow(10,7),2),"GHz"
# Example 12.14
# Calculate the cutoff wavelength,
# Variable Declaration
r = 2.00 # Diameter of circular waveguide (cm)
c = 3.00*pow(10,8) # Speed of light in vacuum (m/s)
f = 10.00*pow(10,9) # Operating frequency (Hz)
kr = 1.84 # Constant from Table 12.2
# Calculation
import math # Math Library
Lambda = c/f * 100 # Operating Wavelength (cm)
Lambda_o = 2*math.pi*r/kr # Cutoff Wavelength (cm)
Lambda_p = Lambda/math.sqrt(1-pow(Lambda/Lambda_o,2)) # Guide Wavelength (cm)
Zo = 120*math.pi/math.sqrt(1-pow(Lambda/Lambda_o,2)) # Characteristic Wave Impedance (Ohms)
# Result
print "Cutoff Wavelength, Lambda_o =",round(Lambda_o,2),"cm"
print "Guide Wavelength, Lambda_p =",round(Lambda_p,2),"cm"
print "Characteristic Wave Impedance, Zo =",round(Zo),"Ohms"
# Variable Declaration
r = 1 # Diameter(assumption) of circular waveguide (cm)
m = 1 # Constant m for dominant mode
kr = 1.84 # Constant from Table 12.2
# Calculation
import math # Math Library
Lambda_o1 = 2*math.pi*r/kr # Cutoff Wavelength for circular waveguide (cm)
Lambda_o2 = Lambda_o1 # Cutoff Wavelength for rectangular waveguide (cm)
a = Lambda_o2*m/2 # Dimensional Variable
Ac = math.pi*pow(r,2) # Cross Sectional Area of Circular Waveguide (m^2)
Ar = pow(a,2)/2 # Cross Sectional Area of Rectangular Waveguide (m^2)
R = Ac/Ar # Ratio
# Result
print "Ratio, Ac/Ar =",round(R,2)
# Variable Declaration
a = 1.00 # Dimension 1 of rectangular waveguide (cm)
b = 0.50 # Dimension 2 of rectangular waveguide (cm)
m = 1 # Constant m for dominant mode
del1 = 25.00 # Length of waveguide (cm)
c = 3.00*pow(10,8)# Speed of light in vacuum (m/s)
f = 1.00*pow(10,9)# Operating frequency (Hz)
# Calculation
import math # Math Library
Lambda_o = 2 * a/m # Cutoff Wavelength (cm)
Lambda = c/f * 100 # Operating Wavelength (cm)
A_dB = 54.5 * del1/Lambda_o # Voltage attenuation of waveguide in dominant mode (dB)
# Result
if Lambda_o<Lambda : print "The waveguide is operating below cutoff"
print "Voltage attenuation of waveguide in dominant mode, A_dB =",round(A_dB),"dB"