How can I convert
$$ W m^{-2} sr^{-1} nmm^{-1} $$
to
$$ W m^{-2} nm^{-1} $$
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:
How would I change my yaxis to be the same as the example shown?
but I need the yaxis to be in units of
$$ W m^{-2} nm^{-1} $$
so that the curve looks like
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}]');
Answer
The dimensional prefactor that ends up in your code is $$ \frac{hc^2}{\lambda^5}=\frac{6.626\times10^{-34}\text{ J s}\times (3\times10^8\text{ m s}^{-1})^2}{(\tilde\lambda \text{ m})^5}, $$ where $\tilde\lambda$ 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: $$ \frac{hc^2}{\lambda^5} =p\frac{\text{J s}\times \text m^2\text{ s}^{-2}}{\text{m}^5} =p\frac{\text{W}}{\text{m}^3} =p\frac{\text{W}}{\text{m}^2}\frac{1}{\text m}\frac{10^{-9}\,\text m}{1\,\text{nm}} =10^{-9} p\:\text W\,\text m^{-2}\,\text{nm}^{-1}. $$
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_\lambda(T)=10^{-9}\frac{2\times6.626\times10^{-34}\times (3\times10^8)^2}{\tilde\lambda^5} \frac{ \text W\,\text m^{-2}\,\text{sr}^{-1}\,\text{nm}^{-1} }{\exp\left(\frac{6.626\times10^{-34}\times3\times10^8}{\tilde\lambda \times 6000\times 1.38066\times 10^{-23}}\right)-1}. $$ This peaks at ∼$12\:\text{kW}\,\text m^{-2}\,\text{sr}^{-1}\,\text{nm}^{-1}$, 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, $$ \left(\frac{R_☉}{a_⊕}\right)^2 = \left(\frac{\phantom{000\,}696\,342\text{ km}}{152\,098\,232\text{ km}}\right)^2 \approx 2.177\times10^{-5}. $$ 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 $\pi$. Once you do that, you recover the graph you give:
Finally, note that $\text{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