from __future__ import division
#refer to fig 1.2(c) and given d.c operating points VGKQ=-2 V,VAKQ=250 V,IAQ=-1.2 mA
VAK2=300
print "VAK2 = %0.2f"%(VAK2)," volts" # value of anode voltage2
VAK1=170
print "VAK1 = %0.2f"%(VAK1)," volts" # value of anode voltage1
IA2=2*10**(-3)
print "IA2 = %0.4f"%(IA2)," ampere" # value of anode current2
IA1=0*10**(-3)
print "IA1 = %0.4f"%(IA1)," ampere" # value of anode current1
rP=(VAK2-VAK1)/(IA2-IA1)#anode resistance at VGK=VGKQ
print "resistance,rP =(VAK2-VAK1)/(IA2-IA1)=%0.2f"%(rP)," ohm" #calculation
VGK2=-2.5
print "VGK2 = %0.2f"%(VGK2)," volts" # value of grid voltage2
VGK3=-1.5
print "VGK1 = %0.2f"%(VGK3)," volts" # value of grid voltage1
VAK3=200
print "VAK3 = %0.2f"%(VAK3)," volts" # value of anode voltage1
u=(VAK2-VAK3)/(VGK2-VGK3)#amplification factor at IA=IAQ
print "amplification factor,u =(VAK2-VAK1)/(VGK2-VGK1)=%0.2f"%(u)," unitless " #calculation
IA4=2.2*10**(-3)
print "IA4 = %0.4f"%(IA4)," ampere" # value of anode current4
IA3=0.5*10**(-3)
print "IA1 = %0.4f"%(IA3)," ampere" # value of anode current1
gm=(IA4-IA3)/(VGK2-VGK3)# transconductance at VAK=VAKQ
print "transconductance,gm =(IAK4-IAK3)/(VGK2-VGK3)=%0.2f"%(gm)," ampere/volt " #calculation
#mistake of negative sign for answers for u(amplification factor) and gm(transconductance)in book
d=0.5*10**(-2)
print "d = %0.2f"%(d),"metre" #initializing value of distance b/w plates
l=2*10**(-2)
print "l = %0.2f"%(l),"metre" #initializing value of length of plates
L=20*10**(-2)
print "L = %0.2f"%(L),"metre" #initializing value of distance b/w centre of plates and screen
Va=2000
print "Va = %0.2f"%(Va),"volts" ##initializing value ofanode voltage
Vd=100
print "Vd = %0.2f"%(Vd),"volts" #initializing value of deflecting voltage
m=9.11*10**(-31)
print "m = %0.2e"%(m),"Kg" #mass of electron
q=1.6*10**(-19)
print "q = %0.2e"%(q),"coulomb" #charge on an electron
print "horizontal beam velocity,Vx =(2*Va*q/m)**(0.5) metre/second" #formula
Vx =(2*Va*q/m)**(0.5)
print "horizontal beam velocity,Vx =(2*Va*q/m)**(0.5)= %0.2e"%(Vx)," metre/second" #calculation
print "transit time,t1 =(l/Vx) second" #formula
t1=(l/Vx)
print "transit time,t1 =(l/Vx)= %0.2e"%(t1)," second" #calculation
print "vertical beam velocity,Vy =(q*Vd*l/d*m*Vx) metre/second" #formula
Vy=((q*Vd*l)/(d*m*Vx))
print "vertical beam velocity,Vy =(q*Vd*l/d*m*Vx)= %0.2e"%(Vy)," metre/second" #calculation
print "vertical displacement,D =((l*L*Vd)/(2*d*Va) metre" #formula
D =(l*L*Vd)/(2*d*Va)
print "vertical displacement,D =((l*L*Vd)/(2*d*Va)=%0.2f"%(D)," metre" #calculation
print "sensitivity of CRT,S =(0.5*l*L)/(d*Va) metre/volt" #formula
S =(0.5*l*L)/(d*Va)
print "sensitivity of CRT,S =(0.5*l*L)/(d*Va)=%0.1e"%(S)," metre/volt" #calculation
m=9.11*10**(-31)
print "m = %0.2e"%(m)," Kg" #mass of electron
q=1.6*10**(-19)
print "q = %0.2e"%(q)," coulomb" #charge on an electron
B=1.5*10**(-3)
print "B = %0.2e"%(B)+ " wb/m**2" #initializing value of magnetic field
l=5*10**(-2)
print "l = %0.2f"%(l)," metre" #initializing axial length of magnetic field
L=30*10**(-2)
print "L = %0.2f"%(L)," metre" #initializing value of distance of screen from centre of magnetic field
Va=10000
print "Va = %0.2f"%(Va)," volts" ##initializing value of anode voltage
print "horizontal beam velocity,Vx =(2*Va*q/m)**(0.5) metre/second" #formula
Vx =(2*Va*q/m)**(0.5)
print "horizontal beam velocity,Vx =(2*Va*q/m)**(0.5)= %0.2e"%(Vx)," metre/second" #calculation
print "radius,r =(m*Vx)/(B*q) metre" #formula
r =(m*Vx)/(B*q)
print "radius,r =(m*Vx)/(B*q)= %0.2f"%(r)," metre" #calculation
print "deflection,D =(L*l)/r) metre" #formula
D =(L*l)/r
print "deflection,D =(L*l)/r)=%0.2f"%(D)," metre" #calculation
from math import pi
q=1.6*10**(-19)
print "q = %0.2e"%(q),"coulomb" #charge on an electron
I=10
print "I = %0.2f"%(I),"Ampere" #initializing value of current
r=64.25
print "radius,r = %0.2f"%(r)," mils" #initializing value of radius of wire
def mils2metres(mils):
metres=(mils*2.54)/(1000*100)
return metres
r1=mils2metres(r)
print "r1 = %0.2f"%(r1)," metre"
n=5*10**(28)
print "n = %0.2e"%(n)," electrons/m**3" # electrons concentration in copper
A=(pi*r1**2) #formulae
print "cross sectional area,A =(pi*r1**2)= %0.2e"%(A)," square metre" #calculation
v=(I)/(A*q*n)#formulae(I=A*q*n*v)
print "drift velocity,v=(I)/(A*q*n)=%0.2e"%(v)," metre/second" #calculation
A=10*10**(-6)
p1=10**(-4)
p2=10**(3)
p3=10**(10)
l=1*10**(-2)# #initializations
print "cross sectional area,A =%0.2e"%(A),"merer square"
print "resitivity(rho),p1 =%0.2e"%(p1)," ohm-m"
print "resitivity(rho),p2 =%0.2f"%(p2)," ohm-m"
print "resitivity(rho),p3 =%0.2e"%(p3)," ohm-m"
print "conductor length,l =%0.2f"%(l)," metre"
print " resistance for copper,R = p1*l/A = %0.2f"%(p1*l/A),"ohm" #calculations for copper
print " resistance for silicon,R = p2*l/A = %0.2e"%(p2*l/A),"ohm" #calculations for silicon
print " resistance for glass,R = p3*l/A = %0.2e"%(p3*l/A),"ohm" #calculations for glass
ni = 1.45*10**10 #initializations
nV = 5*10**22 #initializations
un = 1500 #initializations
up = 475#initializations
T = 300 #initializations
I=10**(-6)
print "I = %0.2e"%(I),"Ampere" #initializing value of current
A=(50*10**(-4))**2# l=0.5 #initializations
q=1.59*10**(-19) #charge on an electron
print "intrinsic charge concentration,ni = %0.2e"%(ni)," /centimetre cube"
print "silicon atoms concntration, nV = %0.2e"%(nV)," /centimetre cube "
print "electron mobility,un = %0.2f"%(un)," cm.sq/V-s"
print "hole mobility,up = %0.2f"%(up),"cm.sq/V-s"
print "temperature,T = %0.2f"%(T),"K"
print "q = %0.2e"%(q),"coulomb" #charge on an electron
print "cross sectional area,A =%0.2e"%(A),"cm square"
print "conductor length,l =%0.2f"%(l),"cm"
N=nV/ni
print "relative concentration,N =nV/ni= %0.2e"%(N)," silicon atoms per electron -hole pair" #calculation
sigma=(1.59*10**(-19)*(1.45*10**10)*(1500+475))
print "intrinsic conductivityi,sigma =(1.59*10**(-19)*(1.45*10**10)*(1500+0475))= %0.2f"%(sigma)," (ohm-cm)**-1" #calculation
pi =(1/sigma)#formulae
print "resitivity(rho),pi =(1/sigma)=%0.2e"%(pi)," ohm-cm" #calculation
R=(2.22*10**5*0.5)/0.000025
print " resistance for silicon,R =((2.22*10**5*0.5)/0.000025) = %0.2e"%(R)," ohm" #calculations for silicon
V=I*R
print " voltage drop,V =I*R = %0.2f"%(V)," V" #calculations
ni = 1.45*10**10 #initializations
nV = 5*10**22 #initializations
un = 1500 #initializations
up = 0475#initializations
T = 300 #initializations
I=10**(-6)
print "I = %0.2e"%(I),"Ampere" #initializing value of current
A=(50*10**(-4))**2# l=0.5 #initializations
q=1.59*10**(-19) #charge on an electron
print "intrinsic charge concentration,ni = %0.2e"%(ni)," /centimetre cube"
print "silicon atoms concntration, nV = %0.2e"%(nV)," /centimetre cube "
print "electron mobility,un = %0.2f"%(un)," cm.sq/V-s"
print "hole mobility,up = %0.2f"%(up)," cm.sq/V-s"
print "temperature,T = %0.2f"%(T)," K"
print "q = %0.2f"%(q),"coulomb" #charge on an electron
print "cross sectional area,A =%0.2f"%(A)," cm square"
print "conductor length,l =%0.2f"%(l)," cm"
nD=nV/10**6#formulae
print "donor concentration,nD= nV/10**6=%0.2f"%(nD)," /cm.cube" #calculation
nn=nD#formulae
print "resulting mobile electron concentration,nn= nD=%0.2e"%(nn)," /cm.cube" #calculation
pn= ni**2/nD#formulae
print "resulting hole concentration,pn= ni**2/nD=%0.2e"%(pn)," /cm.cube" #calculation
sigma=q*nD*un#formulae
print "n-type semiconductor conductivity,sigma=q*nD*un= %0.2f"%(sigma)," (ohm-cm)**-1" #calculation
pn =(1/sigma)
print "doped silicon resitivity(rho),pn =(1/sigma)=%0.2f"%(pn)," ohm-cm" #calculation
R=(0.084*0.5)/A
print " resistance for silicon,R =((0.084*0.5)/A) = %0.2f"%(R)," ohm" #calculations for silicon
V=I*R
print " voltage drop,V =I*R = %0.2e"%(V)," V" #calculations
q=1.59*10**(-19) #charge on an electron
print "q = %0.2e"%(q),"coulomb" #charge on an electron
d=0.037
print "dimension of semiconductor,d=%0.2f"%(d)," cm"
A=(d**2) #area formulae for square shaped semiconductor
print "cross sectional area,A =d**2=%0.2e"%(A)," cm square"
x=10**(-4)
print "thickness,x =%0.2e"%(x)," cm"
x0=0
print "thickness,x0 =%0.f"%(x0)," cm"
p=9.22*10**(15)#
print "hole concentration at x,p= %0.2e"%(p)," /cm-cube" #calculation
p0=0#
print "hole concentration at x0,p0= %0.f"%(p0)," /cm-cube" #calculation
dp=(p-p0)#formulae
dx=(x-x0)#formulae
print " change in concentration at ,dp= %0.2e"%(dp)," /cm-cube" #calculation
print "change in thickness,dx= %0.2e"%(dx)," cm" #calculation
(dp/dx)==(p-p0)/(x-x0)#formulae
print " slope,(dp/dx) =(p-p0)/(x-x0)=%0.2e"%(dp/dx)," holes/cm-cube" #calculation
Dp=12
print "hole diffusion constant,Dp= %0.2f"%(Dp)," cm-sq/s" #calculation
Ip=A*q*Dp*(dp/dx)
print " hole diffusion current,Ip =A*q*Dp*(dp/dx)=%0.2f"%(Ip)," ampere" #calculation