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

Velocity Distribution and Temperature Effects

For general knowledge
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)
172 views22 pages

Velocity Distribution and Temperature Effects

For general knowledge
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

Name of Student: Sayan Dhani Class: Physics(H)-SEM VI

Univ. Roll No.: 190310400102 Paper: - CC - XIV


Univ. Reg. No.: 201901001262 of 2019-20

Computation of the velocity distribution of particles for the system


and comparison with the Maxwell velocity distribution

Scilab code:

//Plot of Maxwell-Boltzmann Velocity Distribution


clc,clf
Gas=input("Name of gas : ","string")
M=input("Molecular weight of the gas "+string(Gas)+" in (gm) : ")
N=(6.022*10^23) // Avogadro number
K=(1.38*10^(-23)) // Boltzmann Conts.
m=(M/(N*1000)) // mass of each molecule in kg
a=m/(2*%pi*K)
b=m/(2*K)
t=input("The lowest temp. "+string(Gas)+" in (K) : ")
T=[t;(2*t);(3*t)]
v=linspace(1,3000,1000) // velocity range in m/s^2

for i=1:1000
w(1,i)=(4*%pi*((a/T(1,:))^1.5)*(exp(-(b*(v(i)^2)/T(1,:)))*(v(i)^2)));
w(2,i)=(4*%pi*((a/T(2,:))^1.5)*(exp(-(b*(v(i)^2)/T(2,:)))*(v(i)^2)));
w(3,i)=(4*%pi*((a/T(3,:))^1.5)*(exp(-(b*(v(i)^2)/T(3,:)))*(v(i)^2)));
end

[p1,q1]= max(real(w(1,:)))
vmp1=v(q1) ;
vav1=sqrt(4/%pi)*vmp1;
vrms1=sqrt(3/2)*vmp1;

[p2,q2]= max(real(w(2,:)))
vmp2=v(q2) ;
vav2=sqrt(4/%pi)*vmp2;
vrms2=sqrt(3/2)*vmp2;

[p3,q3]= max(real(w(3,:)))
vmp3=v(q3) ;
vav3=sqrt(4/%pi)*vmp3;
vrms3=sqrt(3/2)*vmp3;

C=[t vmp1 vav1 vrms1 ; (2*t) vmp2 vav2 vrms2 ; (3*t) vmp3 vav3 vrms3]
disp("temp(K) Vmp Vav Vrms")
disp(C)

plot(v',w')
legend("T = "+string(T)+" K")
xtitle("Maxwell-Boltzmann Velocity distribution")
xlabel("velocity in (m/s)")
ylabel("the distribution function ; f(v)")
xgrid(1)

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

Output :

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

Plot Raleigh-Jeans Law at high temperature and low temperature.

Scilab code:

//Plot of Rayleigh-Jeans's law


clc,clf,clear;
h=6.626e-34; //Plank's const.
c=3e8; //velocity of light
k=1.38e-23; //Boltzmann Const.
t=200 // temperature in K
T=[t;(5*t);(15*t)]
n=linspace(1,5e12,100) //frequency range

for i=1:100
rj1(i)=(8*%pi*k*T(1,:)*(n(i))^2)/c^3 // Rayleigh-Jeans's law for t k
rj2(i)=(8*%pi*k*T(2,:)*(n(i))^2)/c^3 // Rayleigh-Jeans's law for 5t k
rj3(i)=(8*%pi*k*T(3,:)*(n(i))^2)/c^3 // Rayleigh-Jeans's law for 15t k
end

plot2d(n',[rj1 rj2 rj3 ],[1 2 3])


xtitle("Plot of Rayleigh-Jeanss law")
xlabel("frequency in Hz")
ylabel("Energy density u(n) ")
legend("Rayleigh-Jeans law for T = "+string(T)+" K",2)

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

Output :

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

Plot Planck’s law for Black Body radiation at high temperature and low
temperature.

Scilab code:

//Plot of Plank Radiation law


clc,clf,clear;
h=6.626e-34; //Plank's const.
c=3e8; //velocity of light
k=1.38e-23; //Boltzmann Const.
t=200 // temperature in K
T=[t;(5*t);(15*t)]
n=linspace(1,5e10,100) //frequency range

for i=1:100

p1(i)=(8*%pi*h*(n(i))^3)/((c^3)*(exp(h*n(i)/(k*T(1,:))) - 1)) //Plank Radiation


law for t k
p2(i)=(8*%pi*h*(n(i))^3)/((c^3)*(exp(h*n(i)/(k*T(2,:))) - 1)) //Plank
Radiation law for 2t k
p3(i)=(8*%pi*h*(n(i))^3)/((c^3)*(exp(h*n(i)/(k*T(3,:))) - 1)) //Plank
Radiation law for 3t k
end

plot2d(n',[p1 p2 p3 ],[3 1 5])


xtitle("Plot of Plank Radiation law")
xlabel("frequency in Hz")
ylabel("Energy density u(n) ")
legend("Plank Radiation law for T = "+string(T)+" K",2)

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

Output :

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

Plot Planck’s law for Black Body radiation and compare it with
Raleigh-Jeans Law at high temperature and low temperature.

Scilab code:

//Plot of Rayleigh-Jeans's law and Plank Radiation law


clc,clf,clear;
h=6.626e-34; //Plank's const.
c=3e8; //velocity of light
k=1.38e-23; //Boltzmann Const.
t=200 // In K
T=[t;(5*t);(10*t)] //different temp matrix
n=linspace(1,5e12,100) //frequency range

for i=1:100

rj1(i)=(8*%pi*k*T(1,:)*(n(i))^2)/c^3 // Rayleigh-Jeans's law for t k


rj2(i)=(8*%pi*k*T(2,:)*(n(i))^2)/c^3 // Rayleigh-Jeans's law for 10t k
rj3(i)=(8*%pi*k*T(3,:)*(n(i))^2)/c^3 // Rayleigh-Jeans's law for 20t k

p1(i)=(8*%pi*h*(n(i))^3)/((c^3)*(exp(h*n(i)/(k*T(1,:))) - 1)) //Plank Radiation


law for t k
p2(i)=(8*%pi*h*(n(i))^3)/((c^3)*(exp(h*n(i)/(k*T(2,:))) - 1)) //Plank
Radiation law for 2t k
p3(i)=(8*%pi*h*(n(i))^3)/((c^3)*(exp(h*n(i)/(k*T(3,:))) - 1)) //Plank
Radiation law for 3t k

end

plot2d(n',[rj1 rj2 rj3 p1 p2 p3],[1 2 3 4 5 6],leg="Rayleigh-Jeans law at 200 k @ -


Jeans law at 1000 k@Rayleigh-Jeans law at 2000 k@ Plank Radiation law at 200
k@Plank Radiation law at 1000 k@Plank Radiation law at 2000 k")
xtitle("Plot of Rayleigh-Jeans law and Plank Radiation law")
xlabel("frequency in Hz")
ylabel("Energy density u(n) ")

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

Plot of Maxwell-Boltzmann Distribution Function :

Scilab code/ Input :

//Plot of M.B Distribution function


clc,clf
k=(1.38e-23)/(1.6e-19) //Boltzmann Constant in eV
T=[0,50,100,150,300] // temp given in Kelvin
E=linspace(0,0.2,5000) // energy of different molecules in eV
for i=1:5000
for j=1:5
mb(j,i)=1/(exp( E(i)/(k*T(j))))
end
end
plot(E',mb(1,:)','r')
plot(E',mb(2,:)','b')
plot(E',mb(3,:)','g')
plot(E',mb(4,:)','c--')
plot(E',mb(5,:)','g-')
title("M.B Statistics","fontsize",3)
xlabel("Energy--->","fontsize",3)
ylabel("Occupation number --->","fontsize",3)
legend("T="+string(T)+" K")
ax=gca//handle the current axes
ax.data_bounds=[0,-0.2;0.2,1]

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

Output:

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

Plot of Bose-Einstein Distribution Function :

Scilab code/ Input :

//Plot of B E Distribution function


clc,clf
k=(1.38e-23) //Boltzmann Constant
e=1.6e-19
T=[0,50,100,150,300] // temp given in Kelvin
E=linspace(0,0.1,5000) // energy of different molecules in J
for i=1:5000
for j=1:5
be(j,i)=1/(exp( (E(i)*e)/(k*T(j))) - 1)
end
end
plot(E',be(1,:)','r','linewidth',2)
plot(E',be(2,:)','b','linewidth',2)
plot(E',be(3,:)','g','linewidth',2)
plot(E',be(4,:)','c--','linewidth',2)
plot(E',be(5,:)','g-','linewidth',2)
title("B.E Statistics","fontsize",3)
xlabel("Energy--->","fontsize",3)
ylabel("Occupation number --->","fontsize",3)
legend("T="+string(T)+" K")
ax=gca//handle the current axes
ax.data_bounds=[0,-0.5;0.1,10.5]

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

Output:

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

Plot of Cv v/s T according --1) Dulong-Petit law , 2) Einstein Law , 3)


Debye law for a given metal :

SCILAB CODE / INPUT :

//Plot of Cv v/s T according --1) Dulong-Petit law , 2) Einstein Law , 3) Debye law
clc,clf
k=1.38e-23 // Boltzmann Const.
N=6.022e23 // Avogadro number
m=input("Enter the name of metal : ","string") // metal name
Te=input("Enter the Einstein temp."+string(m)+" in K :")
Td=input("Enter the Debye temp."+string(m)+" in K :")
T=linspace(1,4000,200)// Temp range
for i=1:200
CvDP(i)=(3*N*k) //Dulong-Petit law

if abs(Td) < 400 then


CvD(i)=(9*N*k*((T(i)/Td)^3)*integrate('(((exp(x))*(x^4))/((exp(x) - 1)^2))','x',0,(Te/T(i)))) //
Debye law
else
CvD(i)=(9*N*k*(((T(i)+3)/Td)^3)*integrate('(((exp(x))*(x^4))/((exp(x) - 1)^2))','x',0,(Te/(T(i)+3))))
// Debye law
end

if abs(Te) < 400 then


CvE(i)=(3*N*k*((Te/(T(i)))^2)*((exp(Te/T(i)))/((exp(Te/T(i)) - 1)^2))) //Einstein Law
else
CvE(i)=(3*N*k*((Te/(T(i)+3))^2)*(exp((Te/(T(i)+3)))/((exp(Te/(T(i)+3)) - 1)^2))) //Einstein
Law
end

end
plot2d(T',[CvDP CvE CvD],[3 2 5] , leg="Dulong-Petit Law@Einstine Law@Debye Law")
xtitle("Plot of Cv v/s T according --1) Dulong-Petit law , 2) Einstein Law , 3) Debye law ")
xlabel("Temp.--->")
ylabel("Cv --->")
xgrid(1)

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

OUTPUT :

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

Plot of Properties of 2-Level System

Scilab Code :

//Plot of Properties of 2-Level system


clf,clc
N=200 // total number of particles in the system
k=1.38e-23 // Boltzmann Const. in unit of J/K
e=1.6e-19 // Electronic charge
T=linspace(1,50000,1000) // Temperature range
E1=0 // Energy of gnd state in V
E2=0.5 // Energy of 1st excited state in V
for i=1:1000
z(i)=((exp(-e*E1/(k*T(i))) + exp(-e*E2/(k*T(i))))^N) // Partition function
Eavg(i)=((((e*E1*exp(-e*E1/(k*T(i)))) + (e*E2*exp(-e*E2/(k*T(i)))))*N)/(exp(-
e*E1/(k*T(i))) + exp(-e*E2/(k*T(i))))) // <E>
E2avg(i)=((((e*E1*E1*exp(-e*E1/(k*T(i)))) + (e*E2*E2*exp(-
e*E2/(k*T(i)))))*N)/(exp(-e*E1/(k*T(i))) + exp(-e*E2/(k*T(i))))) // <E^2>
Cv(i)=(((E2avg(i)) - ((Eavg(i))^2))/(k*T(i)*T(i))) // Specific heat
end
subplot(131)
plot2d(T',z,1,leg='Partition function')
xtitle('Plot of Partition function v/s temp.','T(in K unit)-->','Z(T) -->')
xgrid()
subplot(132)
plot2d(T',[Eavg , E2avg],[2,3],leg='Avg. Energy@Avg. (Energy^2)')
xtitle('Plot of Average Energy & Average (Energy^2) v/s temp.','T(in K unit)--
>','<E(T)> , <(E(T)^2)> -->')
xgrid()
ax=gca//handle the current axes
ax.data_bounds=[0,0;50000,8*10^(-18)]
subplot(133)
plot2d(T',Cv,5,leg='Sp. heat')
xtitle('Plot of Specific heat v/s temp.','T(in K unit)-->','<Cv(T)> -->')
xgrid()

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

Output :

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

Plot of Properties of 2-Level System for a Paramagnetic Substance :

Scilab Code :

//Plot of Properties of 2-Level system for a Paramagnetic Substances


clf,clc
k=8.617e-5 // Boltzmann Const. in unit of eV/K
u=5.78e-5 // Bohr's Magneton
B=1 // In Tesla unit
T=linspace(1,10,1000) // Temperature range
E1= -u*B // Energy of gnd state in eV
E2=u*B // Energy of 1st excited state in eV
for i=1:1000
z(i)= (2*cosh(u*B/(k*T(i)))) // Partition function
n1(i)=(exp(-E1/(k*T(i))))/z(i) // Occupation number of spin up particles
n2(i)=(exp(-E2/(k*T(i))))/z(i) // Occupation number of spin down particles
M(i)=(u*tanh(u*B/(k*T(i)))) // Magnetization per particle
s(i)=(log(2*cosh(u*B/(k*T(i))))) - ((u*B/(k*T(i)))*tanh(u*B/(k*T(i)))) // Entropy
per NK
end
subplot(221)
plot2d(T',z,9,leg='Partition function')
xtitle('Plot of Partition function v/s temp.','T(in K unit)-->','Z(T) -->')
xgrid()
subplot(222)
plot2d(T',[n1 , n2],[2,3],leg='Occupation number of spin up particles@Occupation
number of spin down particles')
xtitle('Plot of Occupation Number v/s temp.','T(in K unit)-->','n1(T) , n2(T) -->')
xgrid()
subplot(223)
plot2d(T',M,5,leg='Magnetization per particle')
xtitle('Plot of Magnetization per particle v/s temp.','T(in K unit)-->','M(T) -->')
xgrid()
subplot(224)
plot2d(T',s,6,leg='Entropy per NK')
xtitle('Plot of Entropy per NK v/s temp.','T(in K unit)-->','S(T) -->')
xgrid()

……………………………………………………………
Date: / / Signature of Teacher
Name of Student: Sayan Dhani Class: Physics(H)-SEM VI
Univ. Roll No.: 190310400102 Paper: - CC - XIV
Univ. Reg. No.: 201901001262 of 2019-20

Output :

……………………………………………………………
Date: / / Signature of Teacher

You might also like