Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

%Plancks function for black body radiation clc clear all %(i) %inputing values h

ID: 3281376 • Letter: #

Question

%Plancks function for black body radiation
clc
clear all

%(i)
%inputing values

h = 6.63*10^-34 %value is in Js
k = input("Enter the value for k; "); %value in m^2kgs^-2K^-1
c = 3.0*10^8 %value in ms^-1
lambda1 = input("Enter the value for wavelength; "); %value in meters
T1 =input("Enter the value for temperature; "); %value in Kelvins


f1 = (((2*h*(c)^2)/(lambda1)^5)*(1/(e^((h*c)/(lambda1*k*T1))-1)));

disp(f1);

%(ii)

%calculating and plotting

lambda2 = 10e-9:10*10^-9:2000*10^-9; %value in nanometers
maximumfunc2 = 0;
x = 1;
for T2 = 2000:1000:6000;
f2 = (((2*h*(c).^2)./((lambda2).^5)) .* (1./(exp((h*c)./(lambda2.*k.*T2))-1)));
hold on
plot(lambda2, f2)
maximumfunc2(x) = max(f2);
x += 1;
end
maximumfunc2'

Homework 2 Planck's function for blackbody radiation takes the following form: 2hc2 1 i Evaluate Planck's function for a sample wavelength of 1um and a temperature of 5000K with ii. Calculate and plot Planck's function over a range of wavelengths from 0 to 2000nm and for a iii. Develop your program to estimate at which wavelength the blackbody peaks peak and verify h = 6.63 × 10-34j s, k-1.38 × 10-23 m2 kgs-2 K-1 and c-3.0 x 10"ms-1 range of temperatures from 2000 to 6000K Wein's displacement law: peakT constant

Explanation / Answer

%your iii part answer c=3.0*10.^8;% speed of light in vaccum h=6.63*10.^-34;% Planck constant k=1.38*10.^-23;% Boltzmann constant step= 2.8429e-008; lambda=[0:step:2*10.^-6]; T=1;% Temperature initiatlisation for i=2000:500:6000 Ii=(2*pi.*h.*(c.^2))./((lambda.^5).*(exp((h.*c)./(k.*T.*lambda.*i))-1)); plot(lambda,Ii) hold on grid end xlabel('lambda') ylabel('I(lambda)') title('Wein displacement law') legend('T=2000','T=2500','T=3000','T=3500','T=4000','T=4500','T=5000','T=5500','T=6000') hold off