# intrinsic properties
import math
#Variable declaration
T=300 # Temperature
mue=0.4 # Electron mobility
muh=0.2 # Hole mobility
e=1.6*10**-19 # electronic charge
eg=0.7*e # Band gap
m=9.1*10**-31 # Mass of electron
me=0.55 # electron effective mass
mh=0.37 # hole effective
h=6.626*10**-34 # Planck's constant
k=1.38*10**-23 # Boltzmann's constant
#Calculations
ni=2*(2*math.pi*k*T/(h**2))**(1.5)
ni=ni*(m**1.5)*(mh*me)**(3.0/4.0)
ni=ni*math.e**(-eg/(k*T))
sig=ni*e*(mue+muh)
rho=1/sig
# Result
print("\nThe intrinsic concentration ni=%.3f *10^13 /m^3"%(ni*10**-13))
print("\nIntrinsic Conductivity,Sigma =%.3f *10^-6 per m^3\n\nIntrinsic Resistivity, rho = %.2f*10^6 Ohm-m"%(sig*10**6,rho*10**-6))
# Fermi energy
import math
# variable declaration
ni=1.45*10**10 # intrinsic concentration
nd=10**16 # donor concentration
k=1.38*10**-23 # Boltzmann's constant
T=300 # Temperature
e=1.6*10**-19 # electronic charge
#Calculations
Ef=k*T*math.log(nd/ni)
Ef=Ef/e
#Result
print("The Fermi energy with respect to Ef in intrinsic Si = %.3f eV"%Ef)
# conductivity of intrinsic
import math
#Variable declarations
ni=2.5*10**19 # intrinsic concentration
mue=0.39 # electron mobility
muh=0.19 # hole mobility
l=10**-2 # length of rod
e=1.6*10**-19 # charge of an electron
# Calculations
sig=ni*e*(mue+muh)
R=l/(sig*10**-6)
#Result
print("The conductivity of intrinsic Ge is %.2f /ohm-m\nThe Resistance is %.0f"%(sig,R))
# conductivity of intrinsic Ge
import math
#Variable declaration
ni=1.5*10**16 # intrinsic concentration
mue=0.13 # electron mobility
muh=0.05 # hole mobility
e=1.6*10**-19 # electronic charge
#Calculations
sig=ni*e*(mue+muh)
#Result
print("The conductivity of intrinsic Ge is %.2f *10^-4 /ohm-m"%(sig*10**4))
# intrinsic conductivity and resistivity
import math
#variable declaration
ni=2.15*10**13 # intrinsic concentration
mue=3900 # electron mobility
muh=1900 # hole concentration
e=1.6*10**-19 # electronic charge
#calculation
sig=ni*e*(mue+muh)
r=1/sig
# Result
print("The conductivity of intrinsic Ge is %.2f *10^-2 /ohm-cm\nThe intrinsic resistivity is %.0f Ohm-cm"%(sig*10**2,r))
#answers in the book is wrong
# intrinsic conductivity and resistivity
import math
# variable declaration
ni=2.1*10**19 # intrinsic concentration
mue=0.4 # electron mobility
muh=0.2 # hole mobility
e=1.6*10**-19 # electronic charge
p=4.5*10**23 # boron density
# Calculation
sig=ni*e*(mue+muh)
r=p*e*muh
#Result
print("The conductivity of intrinsic Ge is %.3f *10^-2 /ohm-cm\nThe intrinsic resistivity is %.2f *10^4 per ohm-m"%(sig,r*10**-4))
# intrinsic conductivity and resistivity
import math
# variable declaration
n=5*10**28 # Atomic concentration
ni=1.45*10**13 # intrinsic concentration
mue=1.35 # electron mobility
muh=0.45 # hole mobility
e=1.6*10**-19 # electronic charge
p=4.5*10**23 # boron density
# calculation
sig=ni*e*(mue+muh)
rho=1/sig
r=rho*10**12
nd=n/10**9
p=(ni**2)/nd
sig2=nd*e*mue
#Result
print("\nThe intrinsic conductivity is %.2f *10^-6 /ohm-cm\n\nThe intrinsic resistivity is %.2f *10^-5 Ohm-m\n\nResistance = %.2f*10^7 Ohm\n\nDonar concentration is %.0f*10^19\n\nConcentration of hole is %.1f*10^6 m^-3\n\nConductivity = %.1f per ohm-m"%(sig*10**6,rho*10**-5,r*10**-17,nd*10**-19,p*10**-6,sig2))
# Conductivity, Intrinsic carrier concentration and band gap of Ge
import math
# Variable declaration
T=300 # Temperature
rho=2.12 # Resistivity
mue=0.36 # Electron mobility
muh=0.17 # Hole mobility
e=1.6*10**-19 # electronic charge
m=9.1*10**-31 # mass of electron
h=6.626*10**-34 # Planck's constant
k=1.38*10**-23 # Boltzmann's constant
# Calculations
sig=1/rho
ni=sig/(e*(muh+mue))
Nc=2*(2*math.pi*k*T/h**(2))**(1.5)
Nc=Nc*(0.5*m)**(1.5)
Nv=2*(2*math.pi*k*T/h**(2))**(1.5)
Nv=Nv*(0.37*m)**(1.5)
eg=2*k*T*math.log(math.sqrt(Nc*Nv)/ni)
eg=eg/e
# Result
print("\nConductivity = %.6f per Ohm-m\nIntrinsic carrier concentration, ni=%.5f*10^18"%(sig,ni*10**-18))
print("\nNc=%.3f*10^24\nNv=%.3f*10^24"%(Nc*10**-24,Nv*10**-24))
print("\nThe band gap of Ge is %.3f eV"%eg)
# carrier concentration
import math
# Variable declaration
e=1.6*10**-19 # Electronic charge
m=9.1*10**-31 # Mass of electron
h=6.62*10**-34 # Planck's constant
k=1.38*10**-23 # Boltzmann's constant
eg=0.7*e # Band gap energy
T=300 # Temperature
#Calculations
ni=2*(2*3.14*m*k*T/(h**(2)))**(1.5) # math.pi= 3.14
ni=ni*math.e**(-eg/(2*k*T))
#Result
print("The carrier concentration of an intrinsic semiconductor is = %.2f*10^18 per m^3"%(ni*10**-18))
# Carrier concentration
import math
# Variable declaration
e=1.6*10**-19 # Electronic charge
m=9.1*10**-31 # mass of electron
h=6.626*10**-34 # planck's constant
k=1.38*10**-23 # Boltzmann's constant
eg=1.1*e # Energy gap
mue=0.48 # Mobility of electron
muh=0.013 # Mobility of hole
T=300 # temperature
#Calculations
ni=2*(2*math.pi*m*k*T/(h**(2)))**(1.5)
ni=ni*math.e**(-eg/(2*k*T))
sig=ni*e*(mue+muh)
#Result
print("\nThe carrier concentration of an intrinsic semiconductor is = %.2f*10^16 per m^3\nThe electrical conductiivity of Si is %.2f*10^-3 per Ohm-m"%(ni*10**-16,sig*10**3))
# Fermi energy of Si
import math
# Variable declaration
e=1.6*10**-19 # ELectronic charge
eg=1.12 # Band gap
me=0.12 # Effective mass of electron
mh=0.28 # Effective mass of hole
T=300 # Temperature
k=1.38*10**-23 # Boltzmann's constant
# Calculations
ef=(eg/2)+(3*k*T/(4*e))*math.log(mh/me)
# Result
print("The Fermi energy of Si at 300 K is %.3f eV"%ef)
# Fermi level shift
import math
# Variable declaration
e=1.6*10**-19 # Electronic charge
eg=1*e # Energy gap
k=1.38*10**-23 # Boltzmann's constant
m=4.0 # hole to elctron mass ratio
# calculations
T=0.1*e*4/(3*k*math.log(m))
# Result
print("Temperature at which Fermi level is shifted 10%% is %.f K"%T)
# Answer in the book is wrong
# conductivity of Ge
import math
# variable declaration
e=1.6*10**-19 # electronic charge
ni=2.4*10**19 # intrinsic concentration
mue=0.39 # Electron mobility
muh=0.19 # hole mobility
# caclualtions
sig=ni*e*(mue+muh)
#Result
print("The conductivity of Ge at 300 K is %.2f per Ohm-m"%(math.floor(sig*100)/100))
# Fermi energy level position
import math
# variable declaration
e=1.6*10**-19 # electronic charge
T1=300 # Lower Temperature
T2=330 # Higher Temperature
eg=0.3 # Fermi level posiion at lower temperature
# Calculations
eg2=eg*T2/T1
#Result
print("E_c-E_f330=%.2f eV\n\nAt 330 K, the Fermi energy level lies %.2f eV, bellow the conduction band."%(eg2,eg2))
# conductivity of Ge
import math
# Variable declaration
e=1.6*10**-19 # Charge of electron
eg=0.72*e # Energy gap
t1=293.0 # lower temperature
t2=313.0 # higher temperature
k=1.38*10**-23 # Boltzmann's constant
# calculations
sig1=2
n=((t2/t1)**(3.0/2.0))*math.e**((eg/(2*k))*((1/t1)-(1/t2)))
sig2=sig1*n
#Result
print("The conductivity of Ge at 40°C is %.3f per Ohm-m"%sig2)
# intrinsic concentration of Si
import math
# Variable declaration
e=1.6*10**-19 # electronic charge
m=9.1*10**-31 # mass of electron
mm=0.31*m # effective mass of electron
h=6.626*10**-34 # Planck's constant
k=1.38*10**-23 # Boltzmann's constant
eg=1.1*e # Energy gap
T=300 # Temperature
# Calculations
ni=2*(2*math.pi*mm*k*T/(h**(2)))**(1.5)
ni=ni*math.e**(-eg/(2*k*T))
#Result
print("The intrinsic concentration of Si at %d K is %.4f * 10^15 electrons per m^3"%(T,ni*10**-15))
# drift mobility
import math
# Variable declaration
hc=0.55*10**-10 # Hall coefficient of Cu (modulus)
cc=5.9*10**7 # Conductivity of Cu
T=300 # Temperature
#Calculations
dm=hc*cc
#Result
print("The drift mobility is given by mu_d = %.1f * 10^-3 m^2/V-s"%(dm*10**3))
# concentration and averrage o of electron contributed per atom
import math
#Variable declaration
sig=5.9*10**7 # Resistivity
e=1.6*10**-19 # electronic charge
mu=3.2*10**-3 # electron drift mobility
d=8900 # Density
avg=6.022*10**23 # Avogadro's number
awt=63.5 # Atomic weight
#calculations
ni=sig/(e*mu)
n=avg*d*1000/awt
k=ni/n
#Result
print("Concentration of free electron in pure Cu is %.2f*10^28\nThe average number of electrons contributed per Cu atom is %.2f i.e. %.0f"%(n*10**-28,math.floor(k*100)/100,k))
# mobility of the Ge
import math
# Variable declaration
i=5*10**-3 # current through the specimen
v=1.35 # voltage across the specimen
l=0.01 # length of the sample
b=5*10**-3 # Breadth of the sample
t=10**-3 # Thickness of the sample
a=5*10**-6 # Area of the sample
vy=20*10**-3 # Hall voltage
H=0.45 # Magnetic field
# Calculations
rho=v*a/(l*i)
Ey=vy/t
j=i/a
k=Ey/(H*j)
Rh=3*math.pi*k/8
mu=Rh/rho
#Result
print("The mobility of the Ge sample is %.2f m^2/V-s"%mu)
#Hall potential difference
import math
#Variable declaration
I=200 # current flowing
H=1.5 # Applied magnetic field
n=8.4*10**28 # no of electrons per unit volume
d=1.0*10**-3 # thickness of the strip
e=1.6*10**-19 # electronic charge
# calculations
v=I*H/(n*d*e)
# Result
print("The Hall potential difference appearance between the ship is %.0f µv"%(v*10**6))
#carrier concentration and mobility of Si
import math
#Variable declaration
rh=3.66*10**-4 # Hall coefficient of specimen
rho=8.93*10**-3 # resistivity of thespecimen
e=1.6*10**-19 # electronic charge
#calculations
ni=1/(rh*e)
muh=rh/rho
#Result
print("the carrier concentration of Si doped specimen is %.3f *10^22 m^-3"%(ni*10**-22))
print("\n The mobility of Si doped specimen is %.5f m^2/V-s"%muh)
# #carrier concentration and electron mobility
import math
#Variable declaration
Rh=3.66*10**-11 # Hall coefficient
sig=112*10**7 # Conductivity
e=1.6*10**-19 # electronic charge
# Calculations
n=3*math.pi/(8*Rh*e)
mu=sig/(n*e)
# Result
print("\nThe concentration of electrons is %.0f*10^29 m^-3\nthe electron mobility at room temperature = %.3f m^2/V-s"%(n*10**-29,mu))
# Hall voltage
import math
# Variable declaration
I=50 # Current
B=1.5 # Magnetic field
t=0.5*10**-2 # Thickness of the slab
e=1.6*10**-19 # Electronic charge
d=2*10**-2 # Width of the slab
N=8.4*10**28 # Concentration of electron
# Calculations
v=B*I/(N*e*d)
# Result
print("The Hall voltage is %.2f *10^-7 V"%(v*10**7))
# relaxation time of electrons in metal
import math
# Variable declaration
rho=1.54*10**-8 # resistivity of metal
ni=5.8*10**28 # carrier concentration
m=9.1*10**-31 # mass of an electron
e=1.6*10**-19 # electronic charge
# Calculations
tau=m/(rho*ni*(e**2))
#Result
print("The relaxation time of electrons in metal is %.2f*10^-14 s"%(tau*10**14))
# mobility of electrons
import math
# variable declaration
sig=6.22*10**7 # conductivity of metal
n=5.9*10**28 # carrier concentration of electron
e=1.6*10**-19 # electronic charge
#calculation
mu=sig/(n*e)
# Result
print("The mobility of electrons in Si is %.2f*10^-3 m^2/V-s"%(mu*10**3))
# mobility of the electrons
import math
# Variable declaration
rho=0.1 # resistivity of metal
ni=10**20 # carrier concentration of electron
vd=1 # drift velocity
e=1.6*10**-19 # electronic charge
# calculations
mu=1/(rho*ni*e)
E=vd/mu
# Result
print("\nThe mobility of the electrons in material is %.3f m^2/V-s\nThe electric field is %.1f V/m"%(mu,E))
# mobility of electrons
import math
#variable declaration
sig=6.22*10**7 # conductivity of metal
n=5.9*10**28 #carrier concentration of electron
e=1.6*10**-19 # electronic charge
# calculations
mu=sig/(n*e)
# Result
print("The mobility of electrons in silver is %.2f*10^-3 m^2/V-s"%(mu*10**3))
# mobility of the electrons
import math
# Variable declaration
rho=0.1 # resistivity of metal
ni=10**20 # carrier concentration of electron
vd=1 # drift velocity
e=1.6*10**-19 # electronic charge
# calculations
mu=1/(rho*ni*e)
E=vd/mu
# Result
print("\nThe mobility of the electrons in material is %.3f m^2/V-s\nThe electric field is %.1f V/m"%(mu,E))
# relaxation time, mobility and conductivity
import math
#variable declaration
avg=6.023*10**23 # Avogadro's number
m=9.1*10**-31 # mass of electron
e=1.6*10**-19 # charge of an electron
d=8.92*10**3 # density of copper
rho=1.73*10**-8 # resistivity of copper
z=63.5 # Atomic weight of copper
# Calculations
n=avg*d/z
sig=1/rho
tau=sig*m/(n*(e**2))
mu=sig/(e*n)
#Result
print("\nThe relaxation time is %.2f *10^-11 s\nThe mobility of electrons in copper is %.2f m^2/V-s"%(tau*10**11,mu))
print("The conductivity of coppper is %.2f * 10^7 per Ohm-m\n"%(sig*10**-7))
# mobility of electrons and drift velocity
import math
#variable declaration
rho=1.54*10**-8 # resistivity of silver
E=100 # electric field along the wire
ni=5.8*10**28 # carrier concentration of electron
e=1.6*10**-19 # electronic charge
# calculations
mu=1/(rho*ni*e)
vd=mu*E
#Result
print("The mobility of electrons in silver is %.4f*10^-3 m^2/V-s\nThe drift velocity id %.5f m/s"%(mu*10**3,vd))
# relaxation time for electrons
import math
#variable declaration
rho=1.43*10**-8 # resistivity of metal
ni=6.5*10**28 # carrier concentration of electron
e=1.6*10**-19 # electronic charge
m=9.1*10**-31 # mass of an electron
# calculations
tau=m/(rho*ni*e**2)
# Result
print("The relaxation time for electrons in the metal is %.2f *10^-14 s"%(math.ceil(tau*10**16)/100))
# concentration, mobility and velocity of electron
import math
#variable declaration
R=60 # resistance of aluminium
rho=2.7*10**-8 # resistivity of aluminium
i=15 # current in the wire
l=5 # length of the aluminium wire
m=3 # number of free electron per atom
e=1.6*10**-19 # electronic charge
d=2.7*10**3 # density of aluminium
awt=26.98 # Atomic weight of aluminium
avg=6.023*10**23 # Avogadro's number
# calculations
n=m*avg*1000*d/awt
mu=1/(rho*n*e)
vd=mu*i*R*10**-3/l
# Result
print("Free electron concentration is %.3f * 10^29"%(n*10**-29))
print("\nThe mobility of electron in aluminium is %.4f*10^-3 m^2/v-s"%(mu*10**3))
print("\nThe drift velocity of the electron in Al is %.1f*10^-4 m/s"%(vd*10**4))
# Thermal and drift velocity of electron in copper
import math
# variable declaration
R=0.02 # resistance of the Cu
i=15 # current in the wire
mu=4.3*10**-3 # mobility of the free electron
l=2 # length of the Cu wire
k=1.38*10**-23 # Boltzmann's constant
m=9.1*10**-31 # mass of electron
T=300 # temperature
# Calculations
v=i*R
E=v/l
vd=E*mu
vth=math.sqrt(3*k*T/m)
# Result
print("\nThe thermal velocity of the free electrons in copper is %.3f mm/s"%(vth*10**-5))
print("The drift velocity of electrons in copper is %.3f mm/s"%(vd*10**3))