# speed of electon in electric field
import math
#Variable declaration
V=10.0
d=5*10**-2
t=50*10**-9
T=10**-7
x=1.76*10**11
#Calculations and Results
#(1)
eps=V/(d*T)
a=x*eps
v=a*t**2/2
print("(1)\nVelocity, v = %.1f*10^5 m/s\n"%(v/100000))
#(2)
x1=(a/6)*(t**3)
print("\n(2)\ndistance, x=%.3f cm\n"%(x1*100))
#(3)
x2=0.05
t1=(x2/(a/6))**(1.0/3)
v1=(a/2)*t1**2
print("\n(3)\nspeed with which the electron strikes the positive plate,\nv = %.2f*10^6 m/sec"%(v1/10**6))
# speed of electron and position of applied AC voltage point
import math
#Variable declaration
e=1.6*10**-19 # C
m=9.1*10**-31 # kg
Vmax=1.5 # v
d=8*10**-3 # m
#Calculations
w=2*math.pi*60*10**6 # rad/sec
Max_Vel=2*e*Vmax/(m*d*w)
Max_Vel=math.ceil(Max_Vel*10**-3)
#Result
print("The Maximum value of Velocity is, \ndx/dt=%.2f*10^5 m/sec"%(Max_Vel/100))
# effect of electric field on electron
import math
#Variable declaration
eps=(2000.0)/3 # V/cm
e=1.6*10**-19 # C
m=9.1*10**-31 # kg
v= 10**7 # dy/dt=v m/sec
#Calculations and Result
#(1)
t=v*m/(e*eps*100)
t=math.floor(t*10**11)
t=t/10
print("\n(1)\nTime ,t = %.1f*10^-10 sec\n"%t)
t=t*10**-10
#(2)
y=(e*eps*100*t**2)/(2*m)
print("\n(2)\nDistance travelled by electron , y = %.5f m\n"%y)
#(3)
pd=eps*100*y
print("\n(3)\nPotential Drop = %.1f Volts"%pd)
# calculation of potential
import math
#Variable declaration
V0=10.0 # volts siince energy is 10ev
xm=2.0
#Calculations
theta=math.pi/4
V=(2*V0*math.sin(2*theta))/xm
#Result
print("V = %.0fd Volts"%V)
# Application of magnetic field on electron
import math
#Variable declaration
B=0.03 # wb/m^2
m=9.1*10**-31 # kg
V=2*10**5
e=1.6*10**-19 # C
#Calculations
R=(2*m*V/e)**(0.5)
R=math.floor(R*100/B)
#OAC is a right angled triangle
oa=R
oc=3.0
ac=math.sqrt((oa)**2-(oc)**2)
#Result
print("Radius of the circle, R=%.0f cm"%R)
print("AD=%d cm"%(oa-ac))
# calculation of transit time
import math
#Variable declaration
m=9.1*10**-31 # kg
V=100.0
e=1.6*10**-19 # C
d=5*10**-2 # m
t=10**-8 # sec
t1=0.01*10**-6 # sec
#Calculations
d1=(e*V*t**2)/(m*d*2)
d2=(5-d1*100)
v1=e*V*t1/(m*d)
v1=math.ceil(v1/10**4)
t2=(d2*10**-2)/(v1*10**4)
#Result
print("d1 = %.3f*10^-2m\nd2 = %.2f*10^-2m"%(d1*100,d2))
print("\nVelocity of Electron,v = %.2f*10^6m/s"%(v1/100))
print("\nt2 = %.1f*10^-8 sec"%(t2*10**8))
print("\nTotal transit time = t1 + t2 = %.1f*10^-8 sec"%((t1/10**-8)+t2*10**8))
# time of flight under electric field
import math
#Variable declaration
V=1000.0 # volt
d=0.01 # m
e=1.6*10**-19 # C
m=9.1*10**-31 # kg
#Calculations
eps=V/d
t=math.sqrt((2*m*d)/(e*eps))
#Result
print("t = %.2f * 10^-9 sec"%(t*10**10))
# velocity of electron
import math
#Variable declaration
V=1000.0 # volt
e=1.6*10**-19 # C
m=9.1*10**-31 # kg
#Calculations
Vf=math.sqrt((2*e*V)/m)
#Result
print("V_final = %.2f * 10^6 m/sec"%(Vf/10**6))
# application of electric and magnetic field
import math
#Variable declaration
k=1.76*10**11 # e/m in C/kg
eps=10**4
B=0.01
#Calculations
Xmax=2*eps*math.pi/((B**2)*k)
#Result
print("Xmax = %.3f cm"%(Xmax*100))
# distance travelled in helical path
import math
#Variable declaration
Energy=50.0 # eV
V0=Energy # Volts
e=1.6*10**-19 # c
m=9.1*10**-31 # kg
#Calculations
v0=math.sqrt(2*e*V0/m)
v0=math.ceil(v0/10**5)
v0=(v0/10)*10**6
t=(35.5*10**-12)/(2*10**-3)
#Components of velocities are
v1=v0*math.cos(10*math.pi/180)
v2=v0*math.cos(20*math.pi/180)
x=v1-v2
d=x*t
#Result
print("Velocity, v0 = %.0f m/s"%v0)
print("\nDistance, d = %.4f cm"%(d*100))
# Deflection sensitivity
import math
#Variable declaration
l=2.0 # cm
D=18.0 # cm
s=0.5 # cm
va1=500.0 # volts
va2=1000 # Volts
va3=1500.0 # Volts
#(a)
ds1=l*D/(2*s*va1) # Deflection Sensitivity
#(b)
ds2=l*D/(2*s*va2)
# (c)
ds3=l*D/(2*s*va3)
#Result
print("(a)Va=%dV\nDeflection Sensitivity S_E=%.3f cm/V "%(va1,ds1))
print("\n\n(b)Va=%dV\nDeflection Sensitivity S_E=%.3f cm/V"%(va2,ds2))
print("\n(c)Va=%dV\nDeflection Sensitivity S_E=%.3f cm/V"%(va3,ds3))
# displacement angle and velocity of electron in CRT
import math
#Variable declaration
l=2.0 # cm
D=24.0 # cm
s=0.5 # cm
Vd=30.0 # Volts
Va=1000.0 # Volts
e=1.6*10**-19 # C
m=9.1*10**-31 # kg
#Calculations and Results
#(a)
d=Vd*l*D/(2*s*Va)
print("\n(a)\nDeflection Produce, d=%.2f cm\n"%d)
#(b)
theta=(math.atan(d/D))*(180/math.pi)
print("\n(b)\nTheta=%.2f°"%theta)
#(c)
v=math.sqrt(2*e*Va/m)
vr=v/math.cos(theta*math.pi/180)
print("\n\n(c)\nResultant Velocity, Vr = %.2f *10^6 m/sec"%(vr/10**6))
# Calculation of transverse magnetic field
import math
#Variable declaration
l=1.27 # cm
D=19.4 # cm
s=0.475 # cm
Va=400.0 # volts
v=30.0 # volt
e=1.6*10**-19 # C
m=9.1*10**-31 # kg
#Calculations
Se=l*D*10**-2/(2*s*Va)
Se=math.ceil(Se*10**5)
x=math.sqrt(m/e)
B=(x*0.65*30*math.sqrt(2*Va))/(l*D)
#Result
print("S_E = %.2f mm/v"%(Se/100))
print("\nB = %.2f*10^-5 wb/m^2"%(B*10**5))#answer not matches with given answer
# effect of earths magnetic filed on deflection in CRT
import math
#Variable declaration
v0=1.19*10**7 # m/sec
B=0.6*10**-4 # wb/m^2
v=400.0
#Calculations
#Radius of the circle described by the electron due to earth magnetic field
R=3.37*10**-6*math.sqrt(v)/B
y=math.sqrt((112)**2-20**2)
y=112-y
#Result
print("Radius of Circle, R = %.2fm"%R)
print("\ndeflection of the electron on the screen, y = %.1f cm"%y)