# Mobility ofelectrons
import math
#variable declaration
rho=1.73*10**-8 # Resistivity of copper
z=63.5 # atomic weight of copper
d=8.92*10**3 # density of copper
avg=6.023*10**26 # Avogadro's number
e=1.6*10**-19 # charge of an electron
m=9.11*10**-31 # mass of an electron
#variable declaration
n=avg*d/z
sig=1/rho
tau=sig*m/(n*e**2)
mu=sig/(n*e)
#Result
print("Mobility of electrons in copper is %.2f *10^-3 m^2/V-s"%(mu*10**3))
# Resistivity of copper
import math
#variable declaration
r=1.85*10**-10 # radius of the sodium atom
t=3*10**-14 # mean free time of sodium atom
m=9.11*10**-31 # mass of electron
e=1.6*10**-19 # charge of an atom
n= 2.0 # No of atoms per unit cell
#calculations
a=r*(4.0/math.sqrt(3.0))
a= math.floor(a*10**12)/10**12
ne=n/a**3
ne= math.ceil(ne*10**-26)/10**-26
rho=m/(ne*t*e**2)
#Result
print("Resistivity of copper is %.3f*10^-8 Ohm-m"%(rho*10**8))
# Electrical resistivity of sodium
import math
#variable declaration
t=3.1*10**14 # mean free time of electron
m=9.11*10**-31 # mass of an electron
e=1.6*10**-19 # charge of an electron
n=25.33*10**27 # no of electrons per unit volume
#calculations
rho=m/(n*t*e**2)
#Result
print("The electric resistivity of sodium at 0°C is %.3f*10^-36 Ohm-m"%(rho*10**36))
# mobility of the electron
import math
#variable declaration
t=3.4*10**-14 # relaxation time of conduction electrons
m=9.11*10**-31 # mass of electron
e=1.6*10**-19 # charge of electron
n=5.8*10**28 # no of force electrons per unit volume
#calculations
rho=m/(n*t*e**2)
print("\nThe electric resistivity of material is %.3f*10^-8 Ohm-m"%(rho*10**8))
mu=e*t/m
print("\nThe mobility of the electron in a metal is %.2f*10^-3 m^2/v-s"%(mu*10**3))
# drift velocity
import math
#variable declaration
rho=1.54*10**-8 # resistivity of silver
E=100 # electric field along the wire
n=5.8*10**28 # carrier concentration of electron
e=1.6*10**-19 # charge on electron
#calculation
mu=1/(rho*n*e)
vd=mu*E
#Result
print("\nMobility of electron in silvetr is %.4f*10^-3 m^2/v-s\n\nThe drift velocity of the electron in silver is %.5f m/s "%(mu*10**3,vd))
# mobility ofelectron
import math
#variable declaration
d=10.5*10**3 # density of silver
sig=6.8*10**7 # conductivity of silver
wt=107.9 # atomic weight of silver
e=1.609*10**-19 # charge of electron
avg=6.023*10**26 # avogadro's number
#calculations
n=avg*d/wt
mu=sig/(n*e)
#Result
print("The mobility of electron is %.2f *10^-2 m^2.V/s"%(mu*10**2))
#Lorentz number
import math
#variable declaration
sig=5.87*10**7 # electrical conductivity of copper
k=390.0 # thermal conductivity of copper
T=293.0 # temperature
#calculation
L=k/(sig*T)
#Result
print("The Lorentz number is %.3f *10^-8 W.Ohm/K^2"%(L*10**8))
#Lorentz number
import math
#variable declaration
t=1*10**-14 # relaxation time
T=300 # temperature
m=9.1*10**-31 # mass of electron
e=1.6*10**-19 # charge of electron
n=6*10**28 # electron concentration
#calculations
sig=(n*t*e**2)/m
k=1.38*10**-23
k1=n*math.pi**2*k**2*T*t/(3*m)
L=k1/(sig*T)
#Result
print("\nThe electrical conductivity is %.4f * 10^7/ohm-m"%(sig*10**-7))
print("\n\nThermal conductivity is %.2f W/m-k"%k1)
print("\n\nThe Lorentz number is %.4f *10^-8 W.Ohm/k^2"%(L*10**8))
# Electrical conductivity
import math
#variable declaration
d=8900 # Density of copper
cu=63.5 # Atomic weight of Cu
t=10**-14 # Relaxation time
avg=6.022*10**23 # Avogadro's number
m=9.1*10**-31 # mass of electron
e=1.6*10**-19 # charge of electron
#Calculations
n=avg*d*1000/cu
sig=(n*t*e**2)/m
print("The electrical conductivity is %.3f *10^7 /Ohm-m"%(sig*10**-7))
# Drift velocity of electrons
import math
#variable declaration
rho=1.6*10**-8 # resistivity of the silver piece
e=1.603*10**-19 # charge of an electron
fe=5.5*e # energy of the silver
avg=6.023*10**23 # avogadro's number
d=1.05*10**4 # density of silver
wt=107.9*10**-3 # atomic weight of silver
m=9.1*10**-31 # mass of electron
c=3*10**8 # speed of light
#calculations
sig=1/rho
n=avg*d/wt
t=sig*m/(n*e**2)
lam=c*t
vd=sig*100/(n*e)
#Result
print("\nThe conductivity of silver piece is %.2f*10^7 per Ohm-m\n\nThe relaxation time is %.2f*10^-14 s"%(sig*10**-7,t*10**14))
print("\nThe drift velocity of electrons in the silver piece is %.2f m/s"%(math.floor(vd*100)/100))
# resistivityy of the copper
import math
#variable declaration
r1=1.7*10**-8 # resistivity of copper at T1
t2=300.0 # temperature(T1)
t1=700.0+273 # temperature(T2)
#calculation
r2=r1*math.sqrt((t1/t2))
print("The resistivityy of the copper wire is %.4f*10^-8 Ohm-m"%(r2*10**8))
# Relaxation time, Drift velocity, Fermi velocity, mean free path
import math
#variable declarations
rho=1.54*10**-8 # Resistivity
e=1.6*10**-19 # charge of electron
ef=5.5*e # Fermi energy
n=5.8*10**28 # concentration of electrons
m=9.1*10**-31 # mass of electron
#(i)
t=m/(rho*n*e**2)
mu=e*t/m
print("\n(i)\nThe relaxation time is %.2f*10^-14 s\nThe mobility of the electrons is %.4f *10^-3 m^2/V-s"%(t*10**14,mu*10**3))
#(ii)
vd=e*t*100/m
print("\n\n(ii)\nthe drift velocity of elctron is %.5f m/s"%vd)
#(iii)
vf=math.sqrt(2*ef/m)
print("\n\n(iii)\nFermi velocity is %.2f*10^6 m/s"%(vf*10**-6))
#(iv)
lam=vf*t
print("\n\n(iv)\nThe mean free path is %.3f*10^-8 m"%(lam*10**8))