Bug introduced in 9 and partially persists through 10.2 or later
The specific bug described in the original question is fixed (
"Kelvin" is correctly recognized as
"Kelvins" now) but as shown in the answer by Willinski there is more involved problem with misinterpretation of
"KelvinsDifference" in some cases. Please see this discussion for more information on the temperature difference units in Mathematica.
I'm trying to use Mathematica units more often, but I've run into the following problem:
(*Define some unitful constants*) q = UnitConvert[Quantity["elementary charge"]]; k = UnitConvert[Quantity["Boltzmann Constant"]]; T = Quantity[300, "Kelvin"]; V = Quantity[5, "Volt"]; (*Do a simple calculation*) UnitConvert[(q V)/(k T)]
The above code outputs
which really should just be 193.409, since the units cancel, but Mathematica insists on a distinction between absolute temperature and temperature differences. I understand that such a distinction is useful in conversions, but the above is quite a nuisance.
Is there a way to prevent this? I'd rather not have to put in
QuantityMagnitude calls every time I need to cancel some