#Example 2.1
#Find probability of an electronic state
#Given
dE1=0.1 #eV
dE2=-0.1 #eV
k=8.61*10**-5 #Boltzman constant
T=300 #K
#Calcualtion
import math
FE1=1/(1+math.exp(dE1/(k*T)))
FE2=1/(1+math.exp(dE2/(k*T)))
#Result
print"Probability when the energy of the state is above 0.1 eV",round(FE1,2)
print"Probability when the energy of the state is below 0.1 eV",round(FE2,2)
#Calculate the temprature at which there is 1 percent probability
#that a state of 0.30 eV below the fermi energy level will not contain electrons.
import math
#Exa 2.2
Ef=6.25 #EV fermi energy level
dE=-0.30 #eV
k=8.61*10**-5 #Boltzman constant
fE=0.99
#calculation
#From the probability formula fE=1/(1+math.exp(dE/(k*T)))
T=(dE)/(k*math.log(1/fE-1))
#result
print"The Temprature is",round(T,1),"K"
#Example 2.3
#Determine the fraction of total no. of electron
#Given
Eg=0.72 #eV
Ef=0.5*Eg
dE=Eg-Ef #eV
k=8.61*10**-5 #Boltzman constant
T=300 #K
#Calcualtion
import math
N=1/(1+math.exp(dE/(k*T)))
#Result
print"the fraction of total no. of electron is ",round(N,9)
#Example 2.4
#Calculate the wave length
import math
#Given
E=300*1.602*10**-19 #eV Energy
m=9.108*10**-31 #kg, mass of electron
h=6.626*10**-34 #Planck constant
#Calculation
v=math.sqrt(2*E/m)
lam=h*v/E
#Result
print"The wavwlength is",round(lam*10**10,3),"A"
#Exa 2.5
#Find the ratio of electron to hole concentration ratio
#given data
ni=1.4*10**18 #in atoms/m**3
Nd=1.4*10**24 #in atoms/m**3
n=Nd #in atoms/m**3
#Calculation
p=ni**2/n #in atoms/m**3
ratio=n/p #unitless
#Result
print"Ratio of electron to hole concentration : ",round(ratio,2)
#Example 2.7
#Calculate the magnitude of current
#Given
n=10**24 #Electron density
e=1.6*10**-19 #Electron charge
v=0.015 #m/s drift velocity
A=10**-4 #m**2 area
#Calculation
I=n*e*v/A
#Result
print"The magnitude of current is",round(I/10**8,2),"A"
#Exa 2.8
#calculate (i) Relaxation time (ii)Resistivity of conductor (iii) velocity of electron
#given data
Ef=5.5 #in eV
MUe=7.04*10**-3 #in m**2/V-s
n=5.8*10**28 #in m**-3
e=1.6*10**-19 #constant
m=9.1*10**-31 #in Kg
#calculation
#part (i)
import math
tau=MUe*m/e #in sec
rho=1/(n*e*MUe) #in ohm-m
vF=math.sqrt(2*Ef*1.6*10**-19/m)
#Result
print"Relaxation time in sec : ",tau,"s"
print"Resistivity of conductor in ohm-m : ",round(rho,11),"ohm m"
print"velocity of electron with fermi energy is ",round(vF,0),"m/s"
#Example 2.9
#Find (i)the valence electrons per unit volume (ii) mobility
#Given
rho=1.73*10**-8 #resistivity
Tav=2.42*10**-14 #Average Time
e=1.6*10**-19 #constant
m=9.1*10**-31 #in Kg
#Calculation
n=m/(e**2*Tav*rho)
mu=(e*Tav)/m
#Result
print"NO. of free electrons are",round(n,-26)
print"mobility of electrons is",round(mu,3),"m**2/Vs"
#Example 2.10
#calculate Relaxation time and drift velocity
Ef=100 #in V/m Applied electric field
n=6*10**28 #in m**-3
e=1.6*10**-19 #constant electronic charge
m=9.1*10**-31 #in Kg mass of electron
rho=1.5*10**-8 #Density
#calculation
import math
tau=m/(n*e**2*rho) #in sec
vF=e*Ef*tau/m
#Result
print"Relaxation time in sec : ",round(tau,16),"s"
print"velocity of electron with fermi energy is ",round(vF,1),"m/s"
#Exampl 2.11
#Determine charge density, current density ,Current flowing in the wire, Electron drift velocity
#Given
d=0.002 #m, diameter of pipe
s=5.8*10**7 #Conductivity S/m
mu=0.0032 #m**2/Vs, Electron mobility
e=1.6*10**-19 #constant electronic charge
m=9.1*10**-31 #in Kg mass of electron
E=0.02 #V/m Electric field
#Calculation
import math
#From eq 2.62
n=s/(e*mu)
J=s*E
I=J*(math.pi*d**2/4.0)
v=mu*E
#Result
print"Charge density is",round(n,-26),"m**-3"
print"current density is",round(J,6),"A/m**2"
print"curret flowing is",round(I,3),"A"
print"electron drift velocityis",round(v,6),"m/s"
#example 2.12
#calculate the drift velocity and time
#Given
rho=0.5 #ohm-m Resistivity
J=100 #A/m**2 Current density
mue=0.4 #m**2/Vs Electron mobility
d=10*10**-6 #m distance
#calculation
Ve=mue*J*rho
t=d/Ve
#Result
print"The drift velocity is ",Ve,"m/s"
print"Time taken by the electron is",round(t,8),"s"
#Example 2.13
#Calculate drift velocity and time
#Given
e=1.6*10**-19 #constant electronic charge
m=9.1*10**-31 #in Kg mass of electron
rho=0.039 #ohm-cm resistivity
mu=3600 #cm**2/Vs Carrier mobility
ni=2.5*10**13
#Calculation
Nd=(1/(rho*e*mu))
n=Nd
p=(ni**2/n)
#Result
print"Concentration of electron is",round(n,-14),"/cm**3"
print"Concentration of holes is",round(p,0),"/cm**3"
#Example 2.14
#Determine concentration of holes and electrons
#Given
rho=5.32 #kg/m**3, density
Aw=72.6 #kg/K kmol atomic weight
ni=2.5*10**13
di=10**8 #Donor impurity
e=1.6*10**-19 #Electronic charge
mue=0.38 #m**/Vs
muh=0.18 #m**/Vs
#CAlculation
N=6.023*10**23*rho/Aw #No 0f germanium atoms per cm**3
Nd=N/di
n=Nd
p=(ni**2/n)
s=n*e*mue*10**4
#Result
print"Concentration of electrons is",round(n,-12),"atoms/cm**3"
print"Concentration of holes is",round(p,-10),"atoms/cm**3"
if n > p:
print"Conductivity of N-type germanium",round(s*100,1),"/ohm-m"
else:
print "Calculate p-type germanium conductivity"
#Example 2.15
#Calculate the density and drift velocity
#Given
e=1.6*10**-19 #Electronic charge
mue=0.39 #m**/Vs
muh=0.19 #m**/Vs
rhoi=0.47 #ohm-m, intrinsic resistivity
E=10**4 #Electric field
#Calculation
sigmai=1/rhoi
ni=sigmai/(e*(mue+muh))
Vn=mue*E
Vh=muh*E
#Result
print"Density of electrons is",round(ni,-17),"/m**3"
print"Drift velocity for electrons",round(Vn,0),"m/s"
print"Drift velocity for holes",round(Vh,0),"m/s"
#Example 2.16
#Calculate conductivity
#Given
i=10**7 #IMpurity in Ge atom
ni=2.5*10**13 #/cm**3
N=4.4*10**22 #No. of atoms of Ge
mue=3800 #cm**2/Vs
muh=1800 #cm**2/Vs
e=1.6*10**-19 #Electronic charge
E=400 #Electric field
#Calculation
sigmai=ni*e*(mue+muh)
Nd=N/i
n=Nd
p=ni**2/(Nd)
sigman=e*Nd*mue
print"Intrinsic conductivity of Ge is ",sigmai,"ohm-cm**-1"
print"Conductivity of N type Ge semiconductor is",round(sigman,2),"ohm-cm**-1"
#Example 2.17
#(i)Electron drift velocity & hole drift velocity .
#(ii)Intrinsic Conductivity of Ge,(iii)The total current .
#Given
V=10 #Volt
l=0.025 #m, length
w=0.004 #m width
t=0.0015 #m thickness
ni=2.5*10**19 #/cm**3
mue=0.38 #m**2/Vs
muh=0.18 #m**2/Vs
e=1.6*10**-19 #Electronic charge
E=400 #Electric field
#Calculation
E=V/l
Ve=mue*E
Vh=muh*E
sigmai=ni*e*(mue+muh)
I=sigmai*E*w*t
#Result
print"(i)Electron drift velocity is ",Ve,"m/s"
print" hole drift velocity is ",Vh,"m/s"
print"(ii)Intrinsic Conductivity of Ge is",sigmai,"ohm-m**-1"
print"(iii)The total current is ",I*1000,"mA"
#Example 2.18
#What is ratio of electrons to holes
#Given
Ie=3/4.0 #Current due to electron
Ih=1-Ie #Current due to holes
Vh=1 #Hole velocity
Ve=3 #Electron velocity 3 times the hole velocity
#ccalculation
R=(Ie*Vh/(Ih*Ve))
#Result
print"The ratio of electrons to holes drift velocity is ",R
#Exa 2.19
#Find the diffusion coefficients of electrons and holes
#given data
e=1.6*10**-19 #in coulamb
T=300 #in Kelvin
MUh=0.025 #in m**2/V-s
MUe=0.17 #in m**2/V-s
k=1.38*10**-23 #in J/K
De=MUe*k*T/e #in cm**2/s
Dh=MUh*k*T/e #in cm**2/s
#Result
print"Diffusion constant of electron is ",round(De*10000,2),"(in cm**2/s)"
print"Diffusion constant of hole is ",round(Dh*10000,2),"(in cm**2/s)"
#Example 2.20
#Find intrinsic carries cncentration and conductivity
import math
#Given
N=3*10**25 #No of atoms
e=1.6*10**-19
Eg=1.1*e #eV
k=1.38*10**-23 #j/k boltzman's constant
T=300 #K
mue=0.14
muh=0.05
#Calculation
ni=N*math.exp(-Eg/(2*k*T))
sigma=ni*e*(mue+muh)
#Result
print"The intrinsic carries concentration is ",round(ni,-14),"/m**3"
print"The conductivity of Si is ",round(sigma,5),"S/m"
#Example 2.21
#Find the effective density
#Given
a=1.5 #a=me/mo
T=300 #K
#calculation
#from eq. 2.29
Nc=4.82*10**21*(a)**(1.5)*T**(1.5)
#Result
print"The effective density is",round(Nc,-23),"/m**3"
#Example 2.22
#Calculate the intrinsic concentration
#Given
a=0.07 #a=me/mo
b=0.4 #b=mh/mo
T=300 #K
Eg=0.7 #eV
k=8.62*10**-5 # Boltzman constant
#calculation
import math
#From eq 2.101
ni=math.sqrt(2.33*10**43*(a*b)**(1.5)*T**3*math.exp(-Eg/(k*T)))
#Result
print"The intrinsic concentration of charge carrier is",round(ni,-16),"/m**3"
#Example 2.23
#Find the value of absolute temprature
#Given
C=5*10**28 #atom/m**3, concentration of Si atoms
DL=2*10**8 #Doping level
m=1
me=m
#calculation
Nd=C/DL
nc=Nd
T=((nc/(4.82*10**21))*(m/me)**(1.5))**(2/3.0)
#Result
print"The absolute temprature is",round(T,2),"K"
#Example 2.24
#Determine the effective density
#Given
T1=300.0 #K temprature
T2=400.0
k=1.38*10**-23 #J/k
m=1.25*9.107*10**-31
h=6.625*10**-34
dE=0.3 #eV
k_=8.62*10**-5
#calculation
import math
nc1=2*(2*math.pi*m*k*T1/(h**2))**(1.5)
n1=nc1*math.exp(-(0.3/(k_*T1)))
nc2=2*(2*math.pi*m*k*T2/(h**2))**(1.5)
n2=nc2*math.exp(-(0.3/(k_*T2)))
#result
print"The effective density at temprature 300 K is",round(n1,-19),"/m**3"
print"The effective density at temprature 400 K is",round(n2,-19),"/m**3"
#example 2.25
#determine the position of intrinsic fermi level
import math
#Given
T=300.0
k=8.62*10**-5 #J/k
m=9.107*10**-31
me=0.6*m
mh=0.4*m
#calculation
dE=-3*k*T*math.log((me/mh)**(1))/4.0 #dE=Ef-Emidgap
#Result
print"The position of fermi level is",round(dE,4),"eV"
#example 2.26
#determine the position of intrinsic fermi level
#Given
T=300.0
Eg=0.72 #eV Energy gap
k=8.62*10**-5 #J/k
me=1
mh=5.0
#calculation
#from Ef=Ec-kTlog(nc/Nd)
import math
dE=(Eg/2.0)-3*k*T*math.log(me/mh)/4.0 #dE=Ef-Emidgap
#Result
print"The position of fermi level is",round(dE,4),"eV"
#example 2.27
#determine the position of intrinsic fermi level
#Given
T1=300.0
T2=350
Eg=0.24 #eV Energy gap
#calculation
#from Ef=Ev+kTlog(nc/Nd)
import math
dE=(T2/T1)*Eg
#Result
print"The position of fermi level is",round(dE,4),"eV"
#Example 2.28
#determine the position of intrinsic fermi level
#Given
T1=300.0
T2=400
Eg=0.27 #eV Energy gap
#calculation
import math
dE=(T2/T1)*Eg
#Result
print"The position of fermi level is",round(dE,4),"eV"
##Example 2.29
#determine the position of intrinsic fermi level
#Given
dE1=0.3 #eV Energy gap
kT=0.026 #eV
#calculation
import math
x=math.exp(-dE1/kT) #x=Nd/nc
y=5 #y=Nd2/Nd1
dE2=-math.log(y)*kT+dE1
#Result
print"The position of fermi level is",round(dE2,3),"eV"
##Example 2.30
#determine the position of intrinsic fermi level
#Given
dE1=0.39 #eV Energy gap
kT=0.026 #eV
#calculation
import math
x=math.exp(-dE1/kT) #x=NA1/nV
y=3 #y=NA2/NA1
dE2=((dE1/kT)-math.log(y))*kT
#Result
print"The position of fermi level is",round(dE2,2),"eV"
#example 2.31
#Determine electron density and mobility
#Given
rho=1 #ohm-m Resistivity
Rh=100.0 #cm**3/coulomb
e=1.6*10**-19
#calculation
con=1/rho #Conductivity
R=1/Rh #Charge density
ED=R*10**6/e
mu=con/(R*10**6)
#Result
print"The electron density is",ED,"/m**3"
print"The mobility is %.e"%mu,"/m**3"
#Example 2.32
#Calculate Hall Voltage
#Given
w=0.1 #m width
t=0.01 #m thickness
F=0.6 #T, field
Rh=3.8*10**-4 #Hall Coefficient
I=10 #mA
#calculation
Vh=(Rh*F*I/w)
#Result
print"Hall Voltage is",Vh*1000,"micro V"
#Exa 2.33
#What is magnitude of Hall Voltage
#given data
e=1.6*10**-19 #in coulamb
ND=10**17 #in cm**-3
Bz=0.1 #in Wb/m**2
w=4 #in mm
d=4 #in mm
Ex=5 #in V/cm
MUe=3800 #in cm**2/V-s
#calculation
v=MUe*Ex #in cm/s
v=v*10**-2 #in m/s
VH=Bz*v*d #in mV
#Result
print"Magnitude of hall voltage is",VH,"mV"
#Exa 2.34
#What is magnitude of hall voltage
#given data
e=1.6*10**-19 #in coulamb
ND=10**21 #in m**-3
Bz=0.2 #in T
d=4 #in mm
d=d*10**-3 #in meter
J=600 #in A/m**2
n=ND #in m**-3
#calculation
#formula : VH*w/(B*I)=1/(n*e)
VH=Bz*J*d/(n*e) #in V
#Result
print"Magnitude of hall voltage is ",VH*10**3,"mV"
#Exa 2.35
#Calculate hall angle
#given data
e=1.6*10**-19 #in coulamb
rho=0.00912 #in ohm-m
B=0.48 #in Wb/m**2
RH=3.55*10**-4 #in m**3-coulamb**-1
SIGMA=1/rho #in (ohm=m)**-1
#calculation
import math
THETAh=math.atan(SIGMA*B*RH) #in Degree
#result
print"Hall angle is",round(THETAh*180/3.14,4),"degree"