# Problem in units convertion when multipliying Boltzmann constant and a temperature

When define the temperature of a variable in Celsius, Mathematica 9.0 does not calculate the right answer when multiplying by boltzmann constant.

Example:

Temperature1 = Quantity[100, "Celsius"];

Temperature2 = Quantity[373.15, "Kelvins"];

Temperature1 * Quantity["BoltzmannConstant"]

Temperature2 * Quantity["BoltzmannConstant"]

Quantity[1.38065*10^-21, "Joules"] <-- WRONG Answer



Mathematica should be able to manage this units conversion, or there is something I'm doing wrong?

-
You can send a bug report to support@wolfram.com ¯\(°_o)/¯ – ssch Sep 19 '13 at 19:33
What version are you using, I have got different output on V9.010 – Kuba Sep 19 '13 at 19:34
I have the same version V9.010 – Pedro Sep 19 '13 at 20:07
For me it doesn't compute, I get Quantity[373.15,Times["BoltzmannConstant","Kelvins"]]. Am I supposed to do something more with this to get it in Joules? – Pickett Sep 19 '13 at 20:13

Ignoring the fact that I don't get the same results using Mathematica 9.0.1.0...

From the tutorial on temperature units:

When working with absolute temperatures, it is imperative to first standardize the units, to allow for proper unit conversions.

In this case it appears that you have to standardise both your temperatures and $k_b$ to obtain the result that you expect, i.e.

UnitConvert[Temperature1, "Kelvins"] UnitConvert[Quantity["BoltzmannConstant"],"Joules"/"Kelvins"]

(* 5.15189*10^-21 J *)

-
Thank you. My bad, I thought that mathematica would handle everything on its own. This is very tricky when having multiple variables and functions with different units. – Pedro Sep 20 '13 at 16:05
@Pedro - I sympathise, although it is a useful feature in practice it is difficult to use correctly -- especially when absolute temperatures are present. PS An up-vote is usually considered thanks enough! – MikeLimaOscar Sep 20 '13 at 16:11
Ok. I received an answer from Wolfram Technical Support. They are stating that this is a bug and that they are sending and incident report to the developers. – Pedro Sep 20 '13 at 21:48
This is a better way to see the error: t1 = Quantity[100, "Celsius"]; t2 = Quantity[327.15, "Kelvins"]; kk = Quantity[1, "BoltzmannConstant"]; UnitSimplify[(t1*kk)] UnitSimplify[(t2*kk)] – Pedro Sep 24 '13 at 18:30