#Variable declaration
rho_s = 10.5*10**3 #density of silver(kg/m^3)
Na = 6.02*10**26 #Avogadro's number
Ma = 107.9 #atomic weight of silver
sigma = 6.8*10**7 #conductivity(/ohm-m)
e = 1.6*10**-19 #charge of an electron(C)
#Calculations
n = (rho_s*Na)/Ma
u = sigma/(n*e)
#Results
print "Density of electrons =",round((n/1E+28),2),"*10^28"
print "Mobility of electrons =",round((u/1E-2),3),"*10^-2 m^2/V-s"
#Variable declaration
den = 8.92*10**3 #density(kg/m^3)
rho = 1.73*10**-8 #resistivity of copper(ohm-m)
Ma = 63.5 #atomic weight
e = 1.6*10**-19 #charge of an electron(C)
Na = 6.02*10**26 #Avogadro's number
m = 9.1*10**-31 #mass of an electron(kg)
#Calculations
n = (den*Na)/Ma
u = 1/(rho*n*e)
tou = m/(n*e**2*rho)
#Results
print "Mobility of electrons =",round((u/1E-2),3),"*10^-2 m/V-s"
print "Average time of collision of electrons =",round((tou/1E-14),2),"*10^-14 s"
#Variable declaration
P = 1.54*10**-8 #resistivity(ohm-m)
n = 5.8*10**28 #no. of electrons per m^3
m = 9.108*10**-31 #mass of an elecron(kg)
e = 1.602*10**-19 #charge of an electron(C)
#Calculations
tou = m/(n*e**2*P)
#Result
print "The relaxation time of conducton of electrons is",round((tou/1E-14),2),"*10^-14 s"
#Varaible declaration
R = 0.06 #resistance(ohms)
D = 5 #length of wire(m)
I = 15 #current(A)
p = 2.7*10**-8 #resistivity of aluminium(ohm-m)
Ma = 26.98 #atomic weight
Na = 6.025*10**26 #Avogadro's number
rho_s = 2.7*10**3 #sensity(kg/m^3)
#Calculations
#Since each free atom atom contains 3 electrons, therefore,
n = (3*rho_s*Na)/Ma
#For mobility
u = 1/(n*e*p)
#For drift velocity
E = (I*R)/D
vd = u*E
#Results
print "Free electron concentration =",round((n/1E+29),4),"*10^29 electrons/m^2"
print "Mobility of electrons =",round((u/1E-3),3),"*10^-3 m/V-s"
print "Drift velocity of electrons =",round((vd/1E-3),3),"*10^-3 m/s"
#Variable declaration
L = 0.1*10**-9 #length of each side of box(m)
h = 6.62*10**-34 #Planck's constant(J-s)
m = 9.1*10**-31 #mass of electron(kg)
#For lowest energy,
nx = 1
ny = 1
nz = 1
#Calculations
E1 = (((h**2)*(nx**2+ny**2+nz**2))/(8*m*L**2))//(1.6*10**-19)
#Result
print "The lowest energy of electron is",round(E1,2),"eV"
import math
#Variable declaration
'''Fermi equation
F(E) = 1
---------------
1+exp((E-Ef)/kT)
Given, E-Ef = kT
therefore,
F(E) = 1
--------
1+exp(1)
'''
#Calculation
Fe = 1./(1.+math.exp(1.))
#Result
print "F(E) =",round(Fe,3)
import math
#Variable declaration
Fe = 10./100. #probability
Ef = 5.5 #Fermi energy(eV)
k = 1.38*10**-23
#Calculations
'''Fermi equation
F(E) = 1
---------------
1+exp((E-Ef)/kT)
'''
E = Ef+(Ef/100)
E_Ef = (E - Ef)*1.6*10**-19 #(J)
#Let x be E-Ef/k
x = E_Ef/k
T = x/math.log(-(1-(1/Fe)))
#Result
print "Temperature =",round(T,2),"K"
import math
#Variable declaration
Fe = 1./100. #probability
Ef = 0.5 #Fermi energy(eV)
k = 1.38*10**-23
#Calculations
'''Fermi equation
F(E) = 1
---------------
1+exp((E-Ef)/kT)
'''
E = Ef+0.5
E_Ef = (E - Ef)*1.6*10**-19 #(J)
#Let x be E-Ef/k
x = E_Ef/k
T = x/math.log(-(1-(1/Fe)))
#Result
print "Temperature =",round(T),"K"