Plot Planck‟s law for Black Body radiation and compare it with Raleigh-Jeans Law at high temperature and low temperature.
PROGRAM :
clf ;clc
K = 8.617e-5 // Boltzmann constant in (eV/K) unit
T = [100:200:500]' // in K unit
E = linspace(0,0.5,150)' // in eV unit
function y=f(E, T, a)
y = 1/(exp((E-μ)./(K*T))+a)
endfunction
Name = ["Bose-Einstein Distribution","Maxwell-Boltzmann Distribution","Fermi-Dirac Distribution"]
a0 = [-1,0,1]
for a = a0
if a == 1 then,
μ = 0.25 // only for Fermi energy in eV unit
else
μ = 0
end
Z = feval(E,T,f)
plot2d(E,Z,[color("black"),-6, -3])
xlabel("Energy (eV) ","font_size",3 )
ylabel("Probability value","font_size",3 )
title(string(Name(a+2)),"font_size",3 )
legend(string(T),opt='ur')
xgrid
scf()
end
T0 = 250 // in K unit
S = [ ]
for a = a0
if a == 1 then,
μ = 0.25 // Fermi energy in eV unit
else
μ = 0
end
S = [S,feval(E,T0,f)]
end
plot2d(E,S,[-14,-6, -3])
xlabel("Energy (eV)","font_size",3 )
ylabel("Probability value","font_size",3 )
title("Comparison of all distribution function at a single temperature value (T = 250 K) .")
legend(string(Name),opt='ur')
xgrid
output:
0 মন্তব্যসমূহ