Message Boards Message Boards

0
|
6138 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Why does PlanckRadiationLaw return UnitConvert?

Posted 8 years ago

When I type the first basic example in the PlanckRadiationLaw documentation (http://reference.wolfram.com/language/ref/PlanckRadiationLaw.html):

Cell[CellGroupData[{Cell[BoxData[
 RowBox[{"PlanckRadiationLaw", "[", 
  RowBox[{
   RowBox[{"Quantity", "[", 
    RowBox[{"10000", ",", " ", "\"\<Kelvins\>\""}], "]"}], ",", 
   RowBox[{"Quantity", "[", 
    RowBox[{"500", ",", " ", "\"\<Nanometers\>\""}], "]"}]}], 
  "]"}]], "Input"],

I get

Cell[BoxData[
 FormBox[
  RowBox[{"UnitConvert", "[", 
   RowBox[{
    FractionBox[
     TemplateBox[{FractionBox["1", "15625000000000"],RowBox[{
         StyleBox["\"h\"", Italic, StripOnInput -> False], 
         "\[ThinSpace]", 
         SuperscriptBox[
          StyleBox["\"c\"", Italic, StripOnInput -> False], "2"], 
         "\[NegativeMediumSpace]", "\"/(\"", "\[InvisibleSpace]", 
         SuperscriptBox["\"nm\"", "5"], "\[InvisibleSpace]", "\"sr\"",
          "\[InvisibleSpace]", "\")\""}],
       "Planck constant speed of light in vacuum squared per \
nanometer to the fifth steradian",FractionBox[
        RowBox[{"\"PlanckConstant\"", " ", 
          SuperscriptBox["\"SpeedOfLight\"", "2"]}], 
        RowBox[{
          SuperscriptBox["\"Nanometers\"", "5"], " ", 
          "\"Steradians\""}]]},
      "QuantityTF"], 
     RowBox[{
      RowBox[{"exp", "(", 
       TemplateBox[{FractionBox["1", "5000000"],RowBox[{
           StyleBox["\"h\"", Italic, StripOnInput -> False], 
           "\[ThinSpace]", 
           StyleBox["\"c\"", Italic, StripOnInput -> False], 
           "\[InvisibleSpace]", "\"/(\"", "\[InvisibleSpace]", 
           "\"nm\"", "\[ThinSpace]", "\"K\"", "\[ThinSpace]", 
           StyleBox["\"k\"", Italic, StripOnInput -> False], 
           "\[InvisibleSpace]", "\")\""}],
         "Planck constant speed of light in vacuum per nanometer \
kelvin Boltzmann constant",FractionBox[
          RowBox[{"\"PlanckConstant\"", " ", "\"SpeedOfLight\""}], 

          RowBox[{
           "\"BoltzmannConstant\"", " ", "\"Kelvins\"", " ", 
            "\"Nanometers\""}]]},
        "QuantityTF"], ")"}], "-", "1"}]], ",", 
    FractionBox["\<\"Watts\"\>", 
     RowBox[{
      SuperscriptBox["\<\"Meters\"\>", "3"], 
      " ", "\<\"Steradians\"\>"}]]}], "]"}], 
  TraditionalForm]], "Output",
 CellChangeTimes->{3.6683142396636505`*^9}]
}, Open  ]]

Could you please help me to get the output in the form shown in the example webpage? Thank you.

POSTED BY: Mohamed Sami

You are right, the examples in PlankRadiationLaw do not work as advertised.

POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract