WOLFRAM LANGUAGE TUTORIAL

Temperature Units

There are two closely related UnitDimensions related to temperature in the Wolfram System: absolute temperature units and temperature difference units.

Absolute Temperature versus Temperature Difference

Quantity expressions that have UnitDimensions with represent an absolute temperature, while those with dimensions of represent the difference between absolute temperatures. It is important to know that the two are related, but not directly interchangeable.

Unit conversion and multiplication are non-commutative operations for absolute temperatures, which means conversion and then multiplication will not necessarily result in the same result as multiplication and then conversion. Here is an example.

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Temperature difference units, however, can be freely multiplied and converted.
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=

Adding Temperatures

Plus will operate on the sum of temperature units and temperature difference units, and on the sum of temperature difference units, but not always on the sum of just temperature units.

Calculate the sum of an absolute temperature and a temperature difference.
In[5]:=
Click for copyable input
Out[5]=
Calculate the sum of two temperature differences.
In[6]:=
Click for copyable input
Out[6]=
A sum cannot generally be calculated for two different absolute temperatures.
In[7]:=
Click for copyable input
Out[7]=
However, the sum of two measures of absolute temperature, with the same unit, can be calculated.
In[8]:=
Click for copyable input
Out[8]=
A sum can also be calculated for two different absolute temperatures, if both are SI measures (i.e. have a base of kelvins).
In[9]:=
Click for copyable input
Out[9]=

Multiplying Temperatures

Multiplication and unit conversions are non-commutative for absolute temperatures.

In[10]:=
Click for copyable input
Out[10]=
In[11]:=
Click for copyable input
Out[11]=

Because of this non-commutative trait, multiplication of different absolute temperatures may not evaluate.

In[12]:=
Click for copyable input
Out[12]=

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

In[13]:=
Click for copyable input
Out[13]=
The single-argument form of UnitConvert will convert any temperature to kelvins.
In[14]:=
Click for copyable input
In[15]:=
Click for copyable input
Out[15]=
In[16]:=
Click for copyable input
Out[16]=