#import module
import math
#Calculation
# given that E-Ef = kT
# fermi function FE = 1/(1+exp((E-Ef)/kT)
# therefore FE = 1/(1+exp(kT/kT));
# FE = 1/(1+exp(1))
FE=1/(1+math.exp(1));
FE=math.ceil(FE*10**2)/10**2; #rounding off to 2 decimals
#Result
print("fermi function is",FE);
#import module
import math
#Calculation
# given that E-Ef = kT
# fermi function FE = 1/(1+exp((E-Ef)/kT)
# therefore FE = 1/(1+exp(kT/kT));
# FE = 1/(1+exp(1))
FE=1/(1+math.exp(1));
FE=math.ceil(FE*10**3)/10**3; #rounding off to 3 decimals
#Result
print("fermi function is",FE);
#import module
import math
from __future__ import division
#Variable decleration
FE=10/100; #fermi function is 10%
Ef=5.5; #fermi energy of silver in eV
k=1.38*10**-23;
#Calculation
E=Ef+(Ef/100);
#FE=1/(1+math.exp((E-Ef)/(k*T)))
#therefore 1/FE = 1+math.exp((E-Ef)/(k*T))
#therefore (1/FE)-1 = math.exp((E-Ef)/(k*T))
#therefore log((1/FE)-1) = (E-Ef)/(k*T)
#therefore T = (E-Ef)/(k*math.log((1/FE)-1))
#let X=E-Ef;
X=E-Ef; #energy in eV
X=X*1.6*10**-19; #energy in J
T = (X/(k*math.log((1/FE)-1)));
T=math.ceil(T*10**2)/10**2; #rounding off to 2 decimals
#Result
print("temperature in K is",T);
#import module
import math
from __future__ import division
#Variable decleration
#let X=E-Ef
X=0.5; #E-Ef=0.5 in eV
#Calculation
X=X*1.6*10**-19; #X in J
FE=1/100; #fermi function is 1%
k=1.38*10**-23;
#FE=1/(1+exp(X/(k*T)))
#therefore 1/FE = 1+math.exp(X/(k*T))
#therefore (1/FE)-1 = math.exp(X/(k*T))
#therefore log((1/FE)-1) = X/(k*T)
#but log(x) = 2.303*math.log10(x)
#therefore T = X/(k*math.log((1/FE)-1))
#but log(x)=2.303*math.log10(x)
#therefore T = X/(k*2.303*math.log10((1/FE)-1))
T = X/(k*2.303*math.log10((1/FE)-1));
#Result
print("temperature in K is",T);
#import module
import math
from __future__ import division
#Variable decleration
rho_s=10.5*10**3; #density in kg/m^3
NA=6.02*10**26; #avagadro number per kmol
MA=107.9;
#Calculation
n=(rho_s*NA)/MA;
sigma=6.8*10**7;
e=1.6*10**-19; #charge in coulomb
mew=sigma/(n*e);
mew=math.ceil(mew*10**6)/10**6; #rounding off to 6 decimals
#Result
print("density of electrons is",n);
print("mobility of electrons in silver in m^2/Vs is",mew);
#import module
import math
from __future__ import division
#Variable decleration
d=8.92*10**3; #density in kg/m^3
rho=1.73*10**-8; #resistivity in ohm-m
m=9.1*10**-31; #mass in kg
w=63.5; #atomic weight
e=1.6*10**-19; #charge in coulomb
A=6.02*10**26; #avagadro number
#Calculation
n=(d*A)/w;
mew=1/(rho*n*e);
tow=m/(n*(e**2)*rho);
mew=math.ceil(mew*10**6)/10**6; #rounding off to 6 decimals
#Result
print("mobility of electrons in Copper in m/Vs is",mew);
print("average time of collision of electrons in copper in sec is",tow);
#import module
import math
from __future__ import division
#Variable decleration
rho=1.54*10**-8; #resistivity in ohm-m
n=5.8*10**28; #electron/m^3
m=9.108*10**-31; #mass in kg
e=1.602*10**-19; #charge in coulomb
#Calculation
tow=m/(n*(e**2)*rho);
#Result
print("relaxation time of conduction electrons in sec is",tow);
#import module
import math
from __future__ import division
#Variable decleration
FE=10/100; #fermi function is 10%
Ef=5.5; #fermi energy of silver in eV
k=1.38*10**-23;
#Calculation
E=Ef+(Ef/100);
#FE=1/(1+math.exp((E-Ef)/(k*T)))
#therefore 1/FE = 1+math.exp((E-Ef)/(k*T))
#therefore (1/FE)-1 = math.exp((E-Ef)/(k*T))
#therefore log((1/FE)-1) = (E-Ef)/(k*T)
#therefore T = (E-Ef)/(k*math.log((1/FE)-1))
#let X=E-Ef;
X=E-Ef; #energy in eV
X=X*1.6*10**-19; #energy in J
T = (X/(k*math.log((1/FE)-1)));
T=math.ceil(T*10**2)/10**2; #rounding off to 2 decimals
#Result
print("temperature in K is",T);
#import module
import math
#Calculation
# given that E-Ef = kT
# fermi function FpE = 1/(1+exp((E-Ef)/kT)
# therefore FpE = 1/(1+exp(kT/kT));
# FpE = 1/(1+exp(1))
FpE=1/(1+math.exp(1));
FpE=math.ceil(FpE*10**2)/10**2; #rounding off to 2 decimals
#Result
print("fermi function is",FpE);
#the presence of electron at that energy level is not certain
#import module
import math
from __future__ import division
#Variable decleration
m=9.1*10**-31; #mass in kg
h=6.626*10**-34;
A=(8*m)**(3/2);
#Calculation
B=math.pi/(2*h**3);
EfeV=3.10; #fermi energy in eV
Ef=EfeV*1.6*10**-19; #fermi energy in J
EFeV=EfeV+0.02; #energy after interval in eV
EF=EFeV*1.6*10**-19; #energy after interval in J
def f(E):
Q=A*B*math.sqrt(E)
I=(Ef,EF,f)
#Result
print("number of energy states per unit volume is",I);
#import module
import math
from __future__ import division
#Variable decleration
T=300; #temperature in K
n=8.5*10**28; #density per m^3
rho=1.69*10**-8; #resistivity in ohm/m^3
me=9.11*10**-31; #mass of electron in kg
e=1.6*10**-19; #charge in coulomb
KB=1.38*10**-23; #boltzmann constant in J/k
#Calculation
lamda=math.sqrt(3*KB*me*T)/(n*(e**2)*rho);
#Result
print("mean free path of electron in m is",lamda);
#answer given in the book is wrong
import math
from __future__ import division
#Variable decleration
rho=1.43*10**-8; #resistivity in ohm-m
n=6.5*10**28; #electron/m^3
m=9.11*10**-34; #mass in kg
e=1.6*10**-19; #charge in coulomb
#Calculation
tow=m/(n*(e**2)*rho);
#Result
print("relaxation time of conduction electrons in sec is",tow);
import math
from __future__ import division
#Variable decleration
d=8.92*10**3; #density in kg/m^3
rho=1.73*10**-8; #resistivity in ohm-m
m=9.1*10**-31; #mass in kg
M=63.5; #atomic weight
e=1.6*10**-19; #charge in coulomb
A=6.02*10**26; #avagadro number
#Calculation
n=(d*A)/M;
mew=1/(rho*n*e);
tow=m/(n*(e**2)*rho);
mew=math.ceil(mew*10**6)/10**6; #rounding off to 6 decimals
#Result
print("mobility of electrons in Copper in m/Vs is",mew);
print("average time of collision of electrons in copper in sec is",tow);
import math
from __future__ import division
#Variable decleration
MH=1.008*2*1.67*10**-27; #mass in kg
T=30; #temperature in C
#Calculation
T=T+273; #temperature in K
KB=1.38*10**-23; #boltzmann constant in J/k
KE=(3/2)*KB*T; #kinetic energy in J
KEeV=KE*6.24*10**18; #kinetic energy in eV
cbar=math.sqrt((3*KB*T)/MH);
#Result
print("average kinetic energy in J is",KE);
print("average kinetic energy in eV is",KEeV);
print("velocity of molecules in m/s is",cbar);
#answers for average kinetic energy in eV and velocity of electrons given in the book are wrong
import math
from __future__ import division
#Variable decleration
Ee=10; #electron kinetic energy in eV
Ep=10; #proton kinetic energy in eV
me=9.1*10**-31; #mass of electron in kg
mp=1.67*10**-27; #mass of proton in kg
#Calculation
EeeV=Ee*1.6*10**-19; #electron kinetic energy in J
EpeV=Ep*1.6*10**-19; #proton kinetic energy in J
cebar=math.sqrt((2*EeeV)/me);
cpbar=math.sqrt((2*EpeV)/mp);
#Result
print("velocity of electron in m/s is",cebar);
print("velocity of proton in m/s is",cpbar);
#answers given in the book are wrong
#import module
import math
from __future__ import division
#Variable decleration
A=10; #area of cross section in mm^2
A=A*10**-6; #area of cross section in m^2
i=100; #current in amp
n=8.5*10**28; #number of electrons per mm^3
e=1.6*10**-19; #electron charge in coulumb
#Calculation
vd=1/(n*A*e);
#Result
print("drift velocity in m/s is",vd);
#answer given in the book is wrong
#import module
import math
from __future__ import division
#Variable decleration
tow=3*10**-14; #relaxation time in sec
n=8*10**28; #density of electrons per m^3
KB=1.38*10**-23; #boltzmann constant in J/k
T=0; #temperature in C
#Calculation
T=T+273; #temperature in K
m=9.1*10**-31; #mass of electron in kg
sigma_T=((3*n*tow*(KB**2)*T)/(2*m));
sigma_T=math.ceil(sigma_T*10**2)/10**2; #rounding off to 2 decimals
#Result
print("thermal conductivity of copper in ohm-1 is",sigma_T);