Advice 64. Work with degrees Celsius & Fahrenheit

*   

Fig. 64. Work with degrees Celsius & Fahrenheit

In advice 16 the recommendations for work with units of measure of the physical sizes are given. These units of measures are absent in the list built-in in Mathcad (see the appendix 6). There is nothing difficult: the user units of measure are connected with built-in by the suitable multipliers (MPa := 106 Pa etc.). But this rule cannot be applied for temperature. Point is that that there are two concepts of this physical size – unit of measure of temperature (Kelvin, degree Celsius, Fahrenheit degree etc.) and scale of measurement of temperature (Kelvin scale, scale Celsius, Fahrenheit scale etc.).

Scale Celsius (or Fahrenheit if we speak about the British system of measures) is an off-system scale. Nevertheless, this scale is widely used for display of meaning of temperature. But in scientific and technical accounts, as a rule, we operate with temperature expressed on an absolute Kelvin scale (or Rankine scale if we speak about the British system of measures). The formulas of translation of temperature from one scale in another are rather simple (see « Advice of day » ¹74 in «Tip of the Day…»). But in these formulas technology of input of the user units of measures does not work. This technology was described in advice 16.

In a fig. 64 we show one of the decisions of this problem. We try to do it on a simple example: two temperatures are given, we have to find a difference between them. It is clear, that it is not arithmetic problem, but metrological one. All values have the dimensionality of temperature. The users can input and output the value of temperature in anyone of four units of measures and scales: Kelvin degrees (scale), Rankine, Celsius and Fahrenheit. If we do not have any problems with Kelvin degrees (scales) and Rankine (they are built–in in Mathcad: R  = 1.8 K). But if we speak about degrees (scales) Celsius and Fahrenheit, we have to resort cunnings. These cunnings are the main sense of the advice.

There are eight objects with names  °C and °F:

q              two functions with a name °C (the first one °C(t) := (t + 273.15) K – style Variables, and the second °C(t) := (T/K - 273.15) – style Units 1, and color of a font of a name of the second function is white. It is invisible on the screen of the display)

q              two constants with a name °C (the first one °C := 1 – style Units 2, and the second °C := Kstyle Units 3)

q              two functions with a name °F (the first one °F(t) := (t + 459.67) R – style Variables, and the second °F(T) := (T - 459.67)  style Units 1, and color of a font of a name of the second function is white. It is invisible on the screen of the display)

q              two constants with a name °F (the first one °F := 1 – style Units 2, and the second °F := Rstyle Units 3).

The names of the objects are the same, but that is a different object, as since they have different styles (Variably, User 1, User 2 and User 3).

When we work with temperature there are three situations. Above mentioned function and constants help to react for these situations correctly:

Situation 1. It is necessary to input the value of temperature on a scale Celsius (or Fahrenheit). We use for this the first function °Ñ (or °F) with style Variables. This function is called as a postfix operator: t1 := 0 °C (or t2 := 212 °F). At that the variable t1 (or t2) is appropriated the value of temperature on an absolute scale of measures.

Situation 2. It is necessary to output the value of temperature on a scale Celsius (or Fahrenheit). For this purpose in the operator «=» it is necessary output variable make the operand of a prefix operator, whish name (or symbol) is °Ñ (or °F). The second above-mentioned function is: °F t1 = 32 (or °Ñ t2 = 100). If at that the name of the function we make invisible (see advice 19), and we print in addition the first constant of the user to a numerical constant in the answer °F (or °Ñ). Then the illusion of an output the absolute value of temperature on a relative scale will be complete:  t1 = 50 °F and   t2 = 100 °Ñ .

Situation 3. It is necessary to output the value of a difference of temperatures: t2 – t1, for example, as in a fig. 64. In this case we can apply the usual rule of Mathcad. It is a change of unit of measures K (or R) on °Ñ (or °F) – on the second constant that is on the second constant. We determined this constant.

The three above mentioned methods allow completely to realize work with temperature: input of a value of temperature by any of four scales, output of a value of temperature, input and output of a value of a difference of temperatures.