0% found this document useful (0 votes)
2 views22 pages

Part

Uploaded by

Ankit Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views22 pages

Part

Uploaded by

Ankit Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

//Avinash Mall 4000

1. Consider a system with 2 non-interacting particles distributed in


energy levels, E1=0eV, E2=0.01eV
2. Consider a system with a single particle distributed in 2 energy Levels.
E1=0.01eV and E2=0.05eV
3. Consider a system with 2 non interacting particels distributed
3 energy levels, E1=0eV, E2=0.01eV, E3=0.05eV.
Write the expression for partition function when distribution follows:
a. Maxwell-Boltzmann
b. Fermi-Dirac
c. Bose-Einstein
Plot: Partition Function v/c Temperature (Z v/s T)
i) Internal energy(U) v/c Temperature
ii) Entropy(S) v/s Temperature
iii) Specific heat(Cv) v/s Temperature
iv) Probability of microstate (Pi) v/s Temperature

MAXWELL BOLTZMANN:

1.
clc;clear;
kb=8.6173303*1D-5 //ev/K
E=[ 0.0 0.01]//energy levels eV
T=[0:20:1500] //temperature
function y=f(T)
y=(exp(-0.0./(kb*T))+exp(-0.01./(kb*T)))^2
endfunction
function y1=ln(T)
y1=log(f(T))
endfunction
function y2=h(T)
y2=kb*T*T*numderivative(ln,T)
endfunction

function y3=Cv(T)
y3=numderivative(h,T)
endfunction
function y4=g(T)
y4=-kb*T*ln(T)
endfunction
function y5=k(T)
y5=-numderivative(g,T)
endfunction
function y6=p(e)
y6=exp(-e./(kb*T))./f(T)
endfunction
scf(0)
xgrid(1,1,9)
subplot(2,2,1)
plot(T,f(T))
xtitle("","temperature (k)","partition function")
subplot(2,2,2)
plot(T,h)
xgrid(1,1,9)
xtitle("","temperature (k)","internal energy (eV)")
subplot(2,2,3)
plot(T,Cv)
xgrid(1,1,9)
xtitle("","temperature (k)","specific heat(ev/K)")
subplot(2,2,4)
plot(T,k)
xgrid(1,1,9)
xtitle("","temperature (k)","entropy(ev/K)")
En=[0.0 0.01 0.02 ]
scf(1)
kk=['g*','ro','b--','ko-','*o','*-*']
for i=1:length(En)
plot(T,p(En(i)),kk(i))
end
xtitle("","temperature (k)","probability of microstate")
legend(string(En)+"eV")
xgrid(1,1,9)
2.
clc;clear;
kb=8.6173303*1D-5
E=[ 0.1 0.05]
T=[0:20:1500]
function y=f(T)
y=(exp(-0.01./(kb*T))+exp(-0.05./(kb*T)))
endfunction
function y1=ln(T)
y1=log(f(T))
endfunction
function y2=h(T)
y2=kb*T*T*numderivative(ln,T)
endfunction
function y3=Cv(T)
y3=numderivative(h,T)
endfunction
function y4=g(T)
y4=-kb*T*ln(T)
endfunction
function y5=k(T)
y5=-numderivative(g,T)
endfunction
function y6=p(e)
y6=exp(-e./(kb*T))./f(T)
endfunction

scf(0)
subplot(2,2,1)
plot(T,f(T))
xgrid(1,1,9)
xtitle("","temperature (k)","partition function")
subplot(2,2,2)
plot(T,h)
xgrid(1,1,9)
xtitle("","temperature (k)","internal energy (eV)")
subplot(2,2,3)
plot(T,Cv)
xgrid(1,1,9)
xtitle("","temperature (k)","specific heat(ev/K)")
subplot(2,2,4)
plot(T,k)
xgrid(1,1,9)
xtitle("","temperature (k)","entropy(ev/K)")
En=[ 0.01 0.05 ]

scf(1)
kk=['g*','ro','b--','ko-','*o','*-*']
for i=1:length(En)
plot(T,p(En(i)),kk(i))
end
xtitle("","temperature (k)","probability of microstate")
legend(string(En)+"eV")
xgrid(1,1,9)
3.
clc;clear;
kb=8.6173303*1D-5 //ev/K
E=[ 0.0 0.01 0.05]//energy levels eV
T=[0:20:1500] //temperature
function y=f(T)
y=(exp(-0./(kb*T))+exp(-0.01./(kb*T))+exp(-0.05./(kb*T)))^2
endfunction
function y1=ln(T)
y1=log(f(T))
endfunction
function y2=h(T)
y2=kb*T*T*numderivative(ln,T)
endfunction
function y3=Cv(T)
y3=numderivative(h,T)
endfunction
function y4=g(T)
y4=-kb*T*ln(T)
endfunction
function y5=k(T)
y5=-numderivative(g,T)
endfunction
function y6=p(e)
y6=exp(-e./(kb*T))./f(T)
endfunction
scf(0)
subplot(2,2,1)
plot(T,f(T))
xgrid(1,1,9)
xtitle("","temperature (k)","partition function")
subplot(2,2,2)
plot(T,h)
xgrid(1,1,9)
xtitle("","temperature (k)","internal energy (eV)")
subplot(2,2,3)
plot(T,Cv)
xgrid(1,1,9)
xtitle("","temperature (k)","specific heat(ev/K)")
subplot(2,2,4)
plot(T,k)
xgrid(1,1,9)
xtitle("","temperature (k)","entropy(ev/K)")
En=[0 0.02 0.1 0.01 0.05 0.06 ]
scf(1)
kk=['g*','ro','b--','ko-','*o','*-*']
for i=1:length(En)
plot(T,p(En(i)),kk(i))
end
xtitle("","temperature (k)","probability of microstate")
legend(string(En)+"eV")
xgrid(1,1,9)
BOSE EINSTEIN:

1.
clc;clear;
kb=8.6173303*1D-5 //ev/K
E=[ 0.0 0.01]//energy levels eV
T=[0:20:1500] //temperature
function y=f(T)
y=(exp(-0.0./(kb*T))+exp(-0.01./(kb*T))+exp(-0.02./(kb*T)))
endfunction
function y1=ln(T)
y1=log(f(T))
endfunction
function y2=h(T)
y2=kb*T*T*numderivative(ln,T)
endfunction
function y3=Cv(T)
y3=numderivative(h,T)
endfunction
function y4=g(T)
y4=-kb*T*ln(T)
endfunction
function y5=k(T)
y5=-numderivative(g,T)
endfunction
function y6=p(e)
y6=exp(-e./(kb*T))./f(T)
endfunction
scf(0)
subplot(2,2,1)
plot(T,f(T))
xgrid(1,1,9)
xtitle("","temperature (k)","partition function")
subplot(2,2,2)
plot(T,h)
xgrid(1,1,9)
xtitle("","temperature (k)","internal energy (eV)")
subplot(2,2,3)
plot(T,Cv)
xgrid(1,1,9)
xtitle("","temperature (k)","specific heat(ev/K)")
subplot(2,2,4)
plot(T,k)
xgrid(1,1,9)
xtitle("","temperature (k)","entropy(ev/K)")
En=[0.0 0.01 0.02 ]
scf(1)
kk=['g*','ro','b--','ko-','*o','*-*']
for i=1:length(En)
plot(T,p(En(i)),kk(i))
end
xtitle("","temperature (k)","probability of microstate")
legend(string(En)+"eV")
xgrid(1,1,9)
2.
clc;clear;
kb=8.6173303*1D-5 //ev/K
E=[ 0.1 0.05]//energy levels eV
T=[0:20:1500] //temperature
function y=f(T)
y=(exp(-0.01./(kb*T))+exp(-0.05./(kb*T)))
endfunction
function y1=ln(T)
y1=log(f(T))
endfunction
function y2=h(T)
y2=kb*T*T*numderivative(ln,T)
endfunction
function y3=Cv(T)
y3=numderivative(h,T)
endfunction
function y4=g(T)
y4=-kb*T*ln(T)
endfunction
function y5=k(T)
y5=-numderivative(g,T)
endfunction
function y6=p(e)
y6=exp(-e./(kb*T))./f(T)
endfunction
scf(0)
subplot(2,2,1)
plot(T,f(T))
xgrid(1,1,9)
xtitle("","temperature (k)","partition function")
subplot(2,2,2)
plot(T,h)
xgrid(1,1,9)
xtitle("","temperature (k)","internal energy (eV)")
subplot(2,2,3)
plot(T,Cv)
xgrid(1,1,9)
xtitle("","temperature (k)","specific heat(ev/K)")
subplot(2,2,4)
plot(T,k)
xgrid(1,1,9)
xtitle("","temperature (k)","entropy(ev/K)")
En=[ 0.01 0.05 ]
scf(1)
kk=['g*','ro','b--','ko-','*o','*-*']
for i=1:length(En)
plot(T,p(En(i)),kk(i))
end
xtitle("","temperature (k)","probability of microstate")
legend(string(En)+"eV")
xgrid(1,1,9)
3.

clc;clear;
kb=8.6173303*1D-5
E=[ 0.0 0.1 0.05]
T=[0:20:2000]
function y=f(T)
y=(exp(-0.0./(kb*T))+exp(-0.01./(kb*T))+exp(-0.05./(kb*T))+exp(-
0.06./(kb*T))+exp(-0.02./(kb*T))+exp(-0.1./(kb*T)))
endfunction
function y1=ln(T)
y1=log(f(T))
endfunction
function y2=h(T)
y2=kb*T*T*numderivative(ln,T)
endfunction
function y3=Cv(T)
y3=numderivative(h,T)
endfunction
function y4=g(T)
y4=-kb*T*ln(T)
endfunction
function y5=k(T)
y5=-numderivative(g,T)
endfunction
function y6=p(e)
y6=exp(-e./(kb*T))./f(T)
endfunction
scf(0)
subplot(2,2,1)
plot(T,f(T))
xgrid(1,1,9)
xtitle("","temperature (k)","partition function")
subplot(2,2,2)
plot(T,h)
xgrid(1,1,9)
xtitle("","temperature (k)","internal energy (eV)")
subplot(2,2,3)
plot(T,Cv)
xgrid(1,1,9)
xtitle("","temperature (k)","specific heat(ev/K)")
subplot(2,2,4)
plot(T,k)
xgrid(1,1,9)
xtitle("","temperature (k)","entropy(ev/K)")
En=[ 0 0.01 0.02 0.05 0.06 0.1 ]
scf(1)
kk=['g*','ro','b--','ko-','+','*-*']
for i=1:length(En)
plot(T,p(En(i)),kk(i))
end
xtitle("","temperature (k)","probability of microstate")
legend(string(En)+"eV")
xgrid(1,1,9)
FERMI DIRAC:

clc;clear;
kb=8.6173303*1D-5 //ev/K
E=[ 0.0 0.1 0.05]//energy levels eV
T=[0:20:2000] //temperature
function y=f(T)
y=(exp(-0.01./(kb*T))+exp(-0.05./(kb*T))+exp(-0.06./(kb*T)))
endfunction
function y1=ln(T)
y1=log(f(T))
endfunction
function y2=h(T)
y2=kb*T*T*numderivative(ln,T)
endfunction
function y3=Cv(T)
y3=numderivative(h,T)
endfunction
function y4=g(T)
y4=-kb*T*ln(T)
endfunction
function y5=k(T)
y5=-numderivative(g,T)
endfunction
function y6=p(e)
y6=exp(-e./(kb*T))./f(T)
endfunction
scf(0)
subplot(2,2,1)
plot(T,f(T))
xgrid(1,1,9)
xtitle("","temperature (k)","partition function")
subplot(2,2,2)
plot(T,h)
xgrid(1,1,9)
xtitle("","temperature (k)","internal energy (eV)")
subplot(2,2,3)
plot(T,Cv)
xgrid(1,1,9)
xtitle("","temperature (k)","specific heat(ev/K)")
subplot(2,2,4)
plot(T,k)
xgrid(1,1,9)
xtitle("","temperature (k)","entropy(ev/K)")
En=[ 0.01 0.05 0.06 ]
scf(1)
kk=['g*','ro','b--','ko-','+','*-*']
for i=1:length(En)
plot(T,p(En(i)),kk(i))
end
xtitle("","temperature (k)","probability of microstate")
legend(string(En)+"eV")
xgrid(1,1,9)

You might also like