PROGRAM :
In terms of Wavelength
clf ;clc
h = 6.626e-34 // Planck's Constant in SI unit
k = 1.38e-23 // Boltzmann Constant in SI unit
c = 3e8 // Speed of light
lambda = linspace(1e-7,1.5e-5,40)' // in (m) unit
lambda_rj = linspace(6e-6,1.5e-5,40)'
nu = linspace(3e6,3e14,40)' // in (Hz) unit
nu_rj = linspace(1e3,3e13,40)' // in (Hz) unit
T = 600:200:1000 // in (K) unit
T0 = 1100
// Planck's law in terms of Wavelength
function y=Planck(lambda, T)
y = (8*%pi*h*c)/((lambda^5)*(exp((h*c)/(lambda*k*T))-1))
endfunction
y = feval(lambda,T,Planck)
plot2d(lambda,y,[-1,-6, -3])
legend([string(T)],opt="ur" )
xlabel("Wavelength (m)","font_size",4)
ylabel("Energy Density","font_size",4)
title("Planck''s law for Black-Body radiation","font_size",4)
xgrid
scf()
//Reyleigh-Jeans law in terms of Wavelength
function y=rj(lambda, T)
y = (8*%pi*k*T)/(lambda^4)
endfunction
y1 = feval(lambda_rj,T,rj)
plot2d(lambda_rj,y1,[-14,-11, -3])
legend([string(T)],opt="ur")
xlabel("Wavelength (m)","font_size",4)
ylabel("Energy Density","font_size",4)
title("Reyleigh-Jeans law for Black-Body radiation","font_size",4)
xgrid
scf()
// comparison between above two laws
Y = feval(lambda,T0,Planck)
Y1 = feval(lambda_rj,T0,rj)
plot2d(lambda,Y,-14);plot2d(lambda_rj,Y1,-8)
legend("planck''S Law","reyleigh-jeans law)",1)
xlabel("wavelength (M)","Font_Size",4)
ylabel("energy density","Font_Size",4)
title("Comparison between Planck''s law and Reyleigh-Jeans law for Black Body radiation at "+string(T0),"font_size",2)
xgrid ;
output:
0 মন্তব্যসমূহ