Wednesday, December 23, 2015

convert units for spectral irradiance


How can I convert


Wm2sr1nmm1


to


Wm2nm1


I have the following matlab code to illustrate the spectral energy distribution of solar radiation:


h = 6.626e-34;      % Planck's Constant = 4.135 x 10^-15 eV s
c = 3e8; % speed of light (MKS)

T= 6000; % kelvin
k = 1.38066e-23; % Boltzmann constant in J/K
lamda = 0:20e-9:3200e-9;
p = 2*3.14*h*c*c./(lamda.^5);
b6000 = p./(exp(h*c./(lamda*k*T)-1));

lamda = lamda.*1000000;
plot(lamda,b6000,'.');
title('Planck Radiation Law');
xlabel('Wavelength [\mu{m}]')

ylabel('Irradiance [W m^{-2} sr^{-1} nmm^{-1}]');
xlim([0 3.2]);

This is my result:


enter image description here


How would I change my yaxis to be the same as the example shown?


but I need the yaxis to be in units of


Wm2nm1


so that the curve looks like


enter image description here



From the plot, it seems that dividing the irradiance by 10.^14 would do the trick, is this correct? Could someone explain the unit conversion, for a non-physicist?


This function is taken from here


http://web.mit.edu/8.13/matlab/Examples/planck.m


Updated version:


From all of the advice given here, this is the updated and hopefully correct methods:


h = 6.626e-34; % Planck's Constant
c = 3e8; % speed of light
T = 6000; % absolute temperature
k = 1.38066e-23; % Boltzmann constant in J/K
lambda = 0:20e-9:3200e-9; % wavelength


% spectral radiance
p = 2*h*c*c./(lambda.^5);
b6000 = p./(exp(h*c./(lambda*k*T))-1);
b6000 = (1e-9).*b6000;

% multiply by the square of the ratio of the solar radius of earth's
% orbital radius
b6000 = b6000.*(2.177e-5);


% apply Lambert's cosine law
b6000 = b6000.*pi;

% convert units for lambda
lambda = lambda.*1e6;

% print result
fh = figure(1);
plot(lambda,b6000)
xlabel('Wavelength [\mu{m}]');

ylabel('Irradiance [W m^{-2} nm^{-1}]');

enter image description here



Answer



The dimensional prefactor that ends up in your code is hc2λ5=6.626×1034 J s×(3×108 m s1)2(˜λ m)5,

where ˜λ is dimensionless and goes from 0 to 3200×10-9. This will come out in terms of a number p, which is what your code calculates, with some units: hc2λ5=pJ s×m2 s2m5=pWm3=pWm21m109m1nm=109pWm2nm1.


Note also that you need to distinguish carefully between radiance (which is the Planck's law quantity you're calculating), which is the power flow per unit of solid angle, and irradiance, which is integrated over solid angle, as detailed in Carl Witthoft's answer.


If you put this together, then, the spectral radiance is Bλ(T)=1092×6.626×1034×(3×108)2˜λ5Wm2sr1nm1exp(6.626×1034×3×108˜λ×6000×1.38066×1023)1.

This peaks at ∼12kWm2sr1nm1, which is consistent with the graph in Wikipedia; it represents the energy flow from the Sun, per unit of solid angle, across a unit area which is right next to the Sun's surface. Note that this is not comparable to the graph you give, which plots the solar spectrum as measured on Earth. To get to the latter, you need to multiply by the square of the ratio of the solar radius to the Earth's orbital radius, (Ra)2=(000696342 km152098232 km)22.177×105.
You then need to account for the fact that the Sun emits in all directions. As garyp points out, this is done by means of Lambert's cosine law, which essentially says that after integrating over solid angle you need to put an extra factor of π. Once you do that, you recover the graph you give:


enter image description here


Finally, note that nmm is not an SI unit. The matlab function you are basing yourself on has a typo at a crucial place which, in my view, renders it essentially useless, or at least useless without a careful examination of what it's actually calculating. Be very careful whenever you see that sort of thing!


No comments:

Post a Comment

classical mechanics - Moment of a force about a given axis (Torque) - Scalar or vectorial?

I am studying Statics and saw that: The moment of a force about a given axis (or Torque) is defined by the equation: $M_X = (\vec r \times \...