When adding the bugs header to the question "Kelvin per Kelvin Difference" I was confused by the fact that I cannot determine for sure whether the described bug is fixed in version 10.2 or not: from the one hand the code in the question now produces what was expected by the OP, but from the other hand the underlying problem described in the answer by Xerxes (which has 16 upvotes and no contradictory comments or answers) is still here.
I always felt suspicious the fact that we have two different unit systems for temperature in Mathematica: temperature and temperature difference. The corresponding Documentation page where the motivation for introducing them seems to be explained does not convince me and I feel that the developers just "thrown the baby out with the bathwater" and introduction of these two unit systems creates more difficulties than adds benefits.
Could one provide an explanation why actually introducing of temperature difference units is necessary? What are benefits and drawbacks in practice?
And in the context of the referenced question: does Boltzmann Constant should be defined via "Kelvins" or "KelvinsDifference" in Mathematica?
I expect well-reasoned answers, not just opinions.
My conclusions from the discussion in the comments
The temperature difference units should NEVER arise automatically in Mathematica when performing physically reasonable arithmetic operations with physical units. If you get such units in the output you are doing something wrong or encounter a bug.
The temperature difference units actually are not intended for what we know in physics as calculations with quantities, their purpose is very simple and utilitarian: just to allow the conversions between Celsius, Fahrenheit and Kelvins in the way shown on the linked Documentation page. So Boltzmann Constant must be defined via "Kelvins" (as it takes place to be) and Xerxes' complain about bug is incorrect: no physical constant should be defined via "KelvinsDifference" because this unit is a special-purpose unit with very narrow field of applications and is not intended to be used as a base unit.
The temperature difference units were introduced for resolving ambiguous cases of conversion between Celsius, Fahrenheit and Kelvins which are described on the linked Documentation page. One can notice that the "KelvinsDifference" unit is not strictly necessary for this purpose (the same can be achieved with only "Kelvins"). The reason for introduction of "KelvinsDifference" seems to be an attempt to unify the language. The fact that we have this unit proves that all the temperature difference units are artificial and were introduced with single-purpose goal to allow transparent conversion between temperature units. They do not play well with other parts of the Wolfram's "system-wide units" system and cause confusion when one tries to use the units system for performing the convenient in physics calculations with quantities (what is a different matter than just the conversion between temperature units!). The immediately obvious inconsistently can be illustrated using the classical example of calculation of efficiency of the Carnot cycle:
Suppose that we wish to calculate the efficiency of the Carnot cycle starting from the known temperature difference $ΔT$ between the hot reservoir and and the cold reservoir expressed via
°Funits and known temperature of the hot reservoir $T_H$ expressed via°Funits using the proper formula: $η=ΔT/T_H$. The straightforward and conceptually correct implementation of this formula for the case of°Funits in Mathematica is as follows:η[TH_, ΔT_] := UnitConvert[Quantity[ΔT, "DegreesFahrenheitDifference"]]/ UnitConvert[Quantity[TH, "DegreesFahrenheit"]]what returns the "kelvins difference per kelvin" units which do not make sense.
"KelvinsDifference"is necessary? Is it reasonable to introduce this "differential" unit system for temperature? Especially considering the fact that we can easily add "absolute" temperature units in Mathematica and obtain absolute temperature units in the output: please tryQuantity[1,"Kelvins"]+Quantity[1,"Kelvins"]//InputFormwhat givesQuantity[2, "Kelvins"]. And the difference is also the "absolute temperature": tryQuantity[2, "Kelvins"] - Quantity[1, "Kelvins"] // InputForm. – Alexey Popkov Sep 14 '15 at 16:30KelvinsDifferenceat all, I'm not sure I have a well-formed opinion (which is why this is a comment and not an answer). I do know that conceptually, it is important to distinguish differences in quantities from the quantities themselves, especially in thermodynamics. In addition, I like the point made in the documentation that it doesn't make sense to add temperatures, but $\Delta T + T$ and $\Delta T_1 + \Delta T_2$ make sense. – march Sep 14 '15 at 16:35UnitConvert[Quantity[1, "DegreesFahrenheit"]]gives "256K", while1/UnitConvert[Quantity[1, "1/DegreesFahrenheit"]]treats the quantity is a difference and gives5/9K. (ButKelvinnotKelvinDifferencewhich is really what it is) Without resorting to some knowledge of physics there is no evident reason why a different formula should apply in the two cases. – george2079 Sep 15 '15 at 15:53Differenceunit, because just writing180 °Fwould be equivalent to writing82.2… °C, which is clearly wrong.A difference of
180 diff$°Fis equivalent to100 diff$°Cand also100 diff$K, if you'll permit me the notational liberty.The error is not in MMA but in the sloppyness of the olden days' natural philosophers!
– Felix Kasza Sep 16 '15 at 10:08180 diff$°Fwill be converted into100 diff$K, not100 K, and later will not be canceled with"Kelvins". Imagine that we wish to calculate the efficiency of the Carnot cycle starting from thediff$°Funits for $\Delta T$ and the°Funits for $T_1$ using the formula: $\eta = \frac{\Delta T}{T_1}$ - Mathematica will fail! – Alexey Popkov Sep 16 '15 at 11:47η = UnitConvert[Quantity[180,"DegreesFahrenheitDifference"]]/UnitConvert[Quantity[1180,"DegreesFahrenheit"]]. It returns the "kelvins difference per kelvin" units what does not make sense. We would not have this problem if we have"Kelvins"to which"DegreesFahrenheitDifference"would be converted automatically (what would be physically reasonable implementation). – Alexey Popkov Sep 16 '15 at 12:01deltaT / Tmakes sense. I just regard it as a small wart that prevents many, many incorrect uses of temperature units.For example, if we only had absolute °C (I hatehatehate the comment editor, it is a punishment for my sins), then: heating a 0 °C ice cube by 0 °C should give an unchanged temperature. But
– Felix Kasza Sep 17 '15 at 12:19UnitConvert[Quantity[0,"Celsius"],"Kelvins"] + UnitConvert[Quantity[0,"Celsius"],"Kelvins"]would produceQuantity[546.32,"Kelvins"]if it were allowed."Kelvins"from the other units. The temperature difference units do not play well with other parts of the Wolfram's "system-wide units" system and cause confusion. So the proper approach is to avoid them when performing calculations with units (not the conversion between temperature units). – Alexey Popkov Sep 17 '15 at 12:37This may perhaps be compared to high-school-level vector arithmetics: Point plus Vector is fine and gives a Point, V+V => V, P+P => forbidden. Same thing, really.
– Felix Kasza Sep 17 '15 at 12:45