ODCalc
Units

Units

ODCalc understands a large number of units and is able to convert between quantities in these units directly or in arbitrarily combined. To make these combinations and to track them through the mathematical operations the calculator follows the principles of dimensional analysis. This is essentially that all units are measure certain things (dimensions), and it is only possible to convert between units that measure the same dimensions. For example, it is possible convert between dollars, euros and yen because they are all measures of amount of money, but it is not possible to convert from dollars to metres because they are not measures of the same thing (dimensions of amount of money vs length). This can be further extended when quantities are multiplied or divided, resulting in quantities in different dimensions. For example bananas costing $1 per kg (a quantity with dimensions of amount of money per mass) may be multiplied by 5 kg (dimensions of mass) to give $5 (dimensions of amount of money). By following essentially this principle the calculator is able to keep track of all the units that are used in the calculations.

Dimensions

The table below gives the set of dimensions from which all of the understood units can be derived. The set broadly follows the International System of Units (SI units), the primary unit system used in science and engineering.

DimensionBase Unit
LengthMetre
MassGram
TimeSecond
Electrical currentAmp
TemperatureKelvin
Amount of substanceMole
Luminous intensityCandela
Amount of informationBit
Value (amount of currency)Swiss Franc
Plane angleRadian
Solid angleSteradian

Unit Systems

Unit systems are sets of consistent units which are used in a particular context, for example the metric system or US customary units. ODCalc comes with a number of unit systems built in which are customized to particular applications (initially engineering in the US or elsewhere). Selecting a unit system that matches the work being carried out helps the calculator provide the best results, it does not limit access to the units you may wish to use. For example under the “metric engineering” unit system the following results

1m + 1yd
1.9144 m

where as under the “US customary engineering” system

1m + 1yd
1.00057 mi

i.e. the unit system hints that in the SI case “1m” probably meant 1 metre, where as in the US case it probably meant 1 mile. In both cases the calculator indicated that the expression was ambiguous and allowed choice between the options, it is just that when the correct unit system is chosen it is more likely to give the desired result first time. Hints from the unit system are also taken into account when the calculator attempts to simplify composite units resulting from calculations.

Unit Families

The calculator knows about certain families of units – sets of units which measure the same dimension such as the family of inches, feet, yards and miles – and will automatically pick the unit that fits best

3ft / 12
3 in

Units can also be entered in the sequences customary for imperial units

1yd 2ft 3inch * 2
3.5 yd

Absolute and Relative Units

Temperature and time units come in two forms – absolute and relative. Absolute units measure with reference to some predefined point, for example in the Celsius temperature scale 0°C is the melting point of ice. Other measures of temperature have different zero points giving conversions that are not simple scalings of each other, for example converting to Fahrenheit or Kelvin

0°C in °F
32 °F
0°C in K
273.15 K

Relative units measure differences, for example it may be 15°C hotter inside your house than outside. This type of unit should be converted using a simple scaling factor

15 relative °C in °F
27 °F

In many cases it is not necessary to specify whether the unit is absolute or relative because it is forced to be one or the other by the calculation and only one of the ambiguous options can actually run without error. For example by subtracting the inside temperature from the outside temperature we automatically get a relative °C result which can only be converted to relative Fahrenheit

(20°C - 5°C) in °F
27 °F

A Note on Radians

The calculator includes angle as one of its base dimensions. This is useful because it allows conversion between, for example, degrees and radians using the in operator and functions such as sin() to give the correct output based on the units of the angle provided. However the SI unit system doesn't consider angle as a dimension (the angle must be kept track of externally), which introduces problems using some of the metric formulae. For example the impedance of an inductor is given by the frequency of the current in radians per second multiplied by the inductance, however if this is entered directly in ODCalc the unit will not be as expected

314 rad per sec * 100mH
31.4 Hrad/s

where as if the frequency is entered as 2π times the frequency in Hz

2*pi*50Hz *100mH
31.41593 Ω

the calculator returns a value that can be simplified to ohms. A future version of the calculator will spot and correct these cases, however for now the work around of entering in 2π x Hz should be used in impedance and shaft power calculations.

See Also

Getting Started Entering Data Units Operators Accessing Open Data Vectors Functions