from math import pi
#given data :
E=4.0 #in V/m
Eta=120*pi #constant
#Formula : E/H=Eta
H=E/Eta #in A/m
print "Strength of magnetic field in free space = %0.4f A/m " %H
from math import pi
#given data :
H=5.2 #in mA/m
Eta=120*pi #constant
#Formula : E/H=Eta
E=H*10**-3*Eta #in V/m
print "Strength of Electric field in free space =",round(E),"V/m"
#given data :
I=20.0 #in A
Rr=100.0 #in Ohm
#Formula : Wr=I**2*R
Wr=I**2*Rr #in W
print "Radiated power = %0.f kW " %(Wr/1000)
from math import sqrt
#given data :
W=625.0 #in KW
r=30.0 #in Km
Erms=sqrt(90*W*1000)/(r*1000) #in V/m
print "Strength of Electric field at 30Km away = %0.f mV/m " %(Erms*1000)
from math import pi
#given data :
le=10.0 #in m
Irms=450.0 #in A
f=50.0 #in KHz
R=1.5 #in Ohm
lamda=300.0/(f/1000) #in m
Rr=160*(pi)**2*(le/lamda)**2 #in Ohm
print "Radiation resistance = %0.5f ohm" %Rr
Wr=Irms**2*Rr #in W
print "Radiated power = %0.2f Watts " %Wr
Eta=(Rr/(Rr+R))*100 #efficiency in %
print "Efficiency of antenna = %0.2f %%" %Eta
# Ans in the textbook is not accurate.
from math import pi
#given data :
le=50.0 #in m
f=100.0 #in MHz
lamda=300.0/(f) #in m
Rr=(160*(pi)**2)*(le/lamda)**2 #in Ohm
print "Radiation Resistance = %0.2f Mohm " %(Rr/10**6)
#Note : Answer in the book is wrong
from math import pi
#given data :
l=30 #in m
Irms=20 #in A
f=1 #in MHz
r=10 #in Km
r=r*1000 #in m
le=2*l/pi #in m
lamda=300/(f) #in m
Erms=120*pi*le*Irms/(lamda*r) #in V/m
print "Field strength at 10Km distance = %0.2e V/m " %Erms
#Note : Answer in the book is wrong
from math import pi
#given data :
Rl=1.0 #in ohm
#Formula : Rr=80*pi**2*(l/lamda)**2
#Given l=lamda/10
#l/lamda=1/10
Rr=80*pi**2*(1.0/10)**2 #in Ohm
print "Radiation resistance = %0.2f Ohm " %(Rr)
Eta=Rr/(Rr+Rl) #Unitless
print "Antenna Efficiency = %0.2f %% " %(Eta*100)
from math import sqrt
#given data :
r=100 #in Km
W=100 #in KW
Erms=sqrt(90*W*1000)/(r*1000) #in V/m
print "Strength of Electric Field = %0.2f V/m " %Erms
from math import pi
#given data :
le=200.0 #in m
Irms=200 #in A
f=300 #in KHz
r=10 #in Km
c=3*10**8 #speed of light i m/s
lamda=c/(f*1000) #in m
Erms=120*pi*le*Irms/(lamda*r*10**3) #in V/m
print "Field strength at 10Km distance = %0.4f V/m" %(Erms)
Rr=(160*(pi)**2)*(le/lamda)**2 #in Ohm
W=Irms**2*Rr #in Watts
print "Radiated Power = %0.2f MW " %(W/10**6)
#Note : Answer is wrong in the book. Unit of answer in the book is written mW instead of MW by mistake.
from math import pi
#given data :
#Formula : Rr=80*pi**2*(l/lamda)**2
#Given l=lamda/60
#l/lamda=1/60
Rr=80*pi**2*(1.0/60)**2 #in Ohm
print "Radiation resistance = %0.3f Ohm " %Rr
#given data :
r=10.0 #in Km
Erms=10.0 #in mV/m
r1=20.0 #in Km
#Formula : Erms=sqrt(90*W)/r #in V/m
#Let swrt(90*W)=a
a=Erms*r
Erms1=a/r1 #in mV/m
print "Field strength at 20Km distance = %0.f mV/m " %Erms1
from math import pi
#given data :
r=1.0 #in Km
r=1*10**3 #in m
l=1.0 #in m
Irms=10.0 #in A
f=5.0 #in MHz
c=3*10**8 #speed of light i m/s
lamda=c/(f*10**6) #in m
le=2*l/pi #in m
Erms=120*pi*le*Irms/(lamda*r) #in V/m
print "Field strength at 10Km distance = %0.4f V/m " %Erms
#Note : Answer in the book is wrong. Mistake during value putting.
from math import pi
#given data :
Irms=30.0 #in A
f=1.0 #in MHz
Erms=10.0 #in mV/m
Erms=Erms*10**-3 #in V/m
r=50.0 #in Km
r=r*10**3 #in m
c=3*10**8 #speed of light i m/s
lamda=c/(f*10**6) #in m
le=Erms*lamda*r/(120*pi*Irms) #in m
print "Effetive height of Antenna = %0.4f meter " %le
from sympy import symbols, solve
I, r = symbols('I r')
E = 10*I/r # V/m
#given data :
Erms_sqr = E**2
Wt = (Erms_sqr*r**2)/30
Rr = Wt/I**2 # ohm
print "Radiation resistance = %0.2f Ohm " %float(Rr)
#given data :
lamda=300/(50*10**-6) #in m
r=round(lamda)/(2*pi) #in m
print "Distance = %0.2e meter " %r
#Note : Answer in the book is wrong.
from math import sqrt
#given data :
r=2 #in Km
r=r*10**3 #in m
Wt=1 #in KW
Wt=Wt*10**3 #in Watt
Erms=sqrt(30*Wt)/r #in V/m
print "Field strength at 2Km distance = %0.3f mV/m " %(Erms*10**3)
from math import pi
#given data :
f=20.0 #in MHz
f=f*10**6 #in Hz
le=100.0 #in m
c=3*10**8 #speed of light in m/s
lamda=c/f #in m
Rr=160*(pi*le/lamda)**2 #in ohm
print "Radiation Resistance = %0.1f kohm " %(Rr/1000)
from math import sqrt, pi
#given data :
P=10.0 #in W/m**2
f=40.0 #in MHz
f=f*10**6 #in Hz
mu_r=4.0 #constant
epsilon_r=5 #constant
#Velocity of propagation
#formula : v=(1/sqrt(mu_o*epsilon_o))*(1/sqrt(mu_r*epsilon_r)) #in m/s
#1/sqrt(mu_o*epsilon_o)=c=speed of light=3*10**8 m/s
c=3*10**8 #speed of light in m/s
v=c*(1.0/sqrt(mu_r*epsilon_r)) #in m/s
print "Velocity of propagation = %0.1e m/s " %v
#Wavelength
lamda=v/f #in meter
print "Wavelength = %0.2f m " %lamda
#rms electric field
#Formula : E=P*sqrt(mu_o/epsilon_o)*sqrt(mu_r/epsilon_r) #in V/m
E=sqrt(1200*pi*sqrt(4.0/5)) #in V/m
Erms=sqrt(E**2/sqrt(2)) #in V/m
print "rms Electric Field = %0.2f V/m" %Erms
#Impedence of medium
Eta=(sqrt(2)*Erms)**2/P #in Ohm
print "Impedence of medium = %0.2f ohm " %Eta
from math import pi
from sympy import symbols, solve, N
#given data :
#Hfi = (Im*dlsin(theta)/(4*pi))*[cos(omega*t1)/r-omega*sin(omega*t1)/(c*r)]
lamda, r = symbols('lamda r')
#expr = 200.0/r**2-2*pi*f/c
expr = 200.0/r**2-2*pi/lamda/r # putting f/c = lamda
r = solve(expr, r)
print "r =",N(r[0],4)