2
$\begingroup$

This is the version of Planck's Equation I am unable to Plot:

L[λ_]:=((8.0*π*2.9979x10^8*2.9979*10^8*6.626*10^-34)/\
λ^5)*(1.0/((E^((2.9979*10^8*6.626*10^-34)/(1.3806*10^-34*\
λ*5000.0)) )-1.0))
$\endgroup$
6
  • $\begingroup$ What have you tried so far? $\endgroup$
    – MarcoB
    Commented Jul 4, 2020 at 18:47
  • $\begingroup$ I have used every version of Planck's constant, Boltzmann's constant and the speed of light I can find on the internet. Nothing works. My formula is identical to that used by Zach Heuman in his manipulate demonstration. $\endgroup$
    – OKCarl
    Commented Jul 4, 2020 at 19:31
  • 2
    $\begingroup$ Replace x with * and you're all set. $\endgroup$
    – Roman
    Commented Jul 4, 2020 at 19:31
  • $\begingroup$ Replacing x with * yields: 1.49667*10^-15/((-1. + E^(287760./[Lambda])) [Lambda]^5) Unfortunately, still no Plot. What should I use for values on the X and Y axis? $\endgroup$
    – OKCarl
    Commented Jul 4, 2020 at 19:42
  • 4
    $\begingroup$ You may have the wrong exponent on your value for $k_B$. Evaluate UnitConvert@Quantity["BoltzmannConstant"] // N to see the value in SI units. Your values of $c$ and $h$ are already in SI units, so use meters for $\lambda$. The final units will be in watts per cubic meter, or watts per square meter of surface area per meter of wavelength, which may be confirmed by evaluating Quantity["PlanckConstant"] Quantity["SpeedOfLight"]^2/ Quantity["Meters"]^5/Quantity["Watts"] // UnitConvert // QuantityUnit $\endgroup$
    – LouisB
    Commented Jul 4, 2020 at 22:05

2 Answers 2

7
$\begingroup$

Color curves by the peak wavelength:

PlanckPlot[wen_] := 
 PlanckRadiationLaw[Quantity[wen, "Kelvins"], 
   "SpectralPlot"] /. {ColorData[97, 1] -> 
    PlanckRadiationLaw[Quantity[wen, "Kelvins"], "Color"]}
Show[PlanckPlot /@ {6000, 5778, 5500, 5000, 4500, 4000, 3500}, 
 PlotRange -> {{0, 3*10^(-6)}, All}, ImageSize -> 350, 
 Frame -> {{True, False}, {True, False}}, 
 FrameLabel -> {"Wavelenght(m)", 
   "Spectral energy density(kJ/\!\(\*SuperscriptBox[\(m\), \
\(3\)]\))"}]

enter image description here

Color along the curves according to the wavelength:

PlanckPlot[wen_] := 
 PlanckRadiationLaw[Quantity[wen, "Kelvins"], 
   "SpectralPlot"] /. {ColorData[97, 1] -> 
    PlanckRadiationLaw[Quantity[wen, "Kelvins"], "Color"]}
ColorPlanckPlot[wen_] := 
 ListLinePlot[
  First[Cases[PlanckPlot[wen], 
    Line[a_] :> Map[Apply[{#*10^9, #2} &], a], Infinity]], 
  ColorFunction -> (PlanckRadiationLaw[
      Quantity[1, "WienWavelengthDisplacementLawConstant"]/
       Quantity[#/10^9, "Meters"], "Color"] &), 
  ColorFunctionScaling -> False]
Show[ColorPlanckPlot /@ {6000, 5778, 5500, 5000, 4500, 4000, 3500}, 
 PlotRange -> {{0, 2000}, All}, 
 Frame -> {{True, False}, {True, False}}, 
 FrameLabel -> {"Wavelenght(nm)", 
   "Spectral energy density(kJ/\!\(\*SuperscriptBox[\(m\), \
\(3\)]\))"}, ImageSize -> 350]

enter image description here

$\endgroup$
0
5
$\begingroup$

Using builtin functionalities and SI units:

h = Quantity["PlanckConstant"] // UnitConvert // QuantityMagnitude
(*    132521403/200000000000000000000000000000000000000000    *)

c = Quantity["SpeedOfLight"] // UnitConvert // QuantityMagnitude
(*    299792458    *)

kB = Quantity["BoltzmannConstant"] // UnitConvert // QuantityMagnitude
(*    1380649/100000000000000000000000000000    *)

With[{T = 5000},
  Plot[(2 h c^2)/λ^5 1/(E^((h c)/(λ kB T)) - 1), {λ, 0, 5000*10^-9}, 
    AxesLabel -> {"λ [m]", "flux [W/m^3]"}]]

enter image description here

You can see that this matches the built-in plot you get with

PlanckRadiationLaw[Quantity[5000, "Kelvins"], "SpectralPlot"]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.