
Dimensions, Units, and Systems of Units



There exist measurable quantities, called base dimensions, that are considered to be fundamental and independent. In Maple, the list of base dimensions includes length, mass, time, electric current, thermodynamic temperature, amount of substance, luminous intensity, information, and currency.


A base unit corresponding to a base dimension quantifies measurements. For example, a meter is a base unit corresponding to the base dimension length. Composite, or complex, units are products of powers of base units. Named complex units are called derived units. To simplify references, some products of powers of base dimensions, complex dimensions, have been named. These named complex dimensions include force, representing length mass per time squared, and energy, representing mass length squared per time squared. A derived unit of force is the newton, which is defined as a kilogram meter per second squared. A derived unit of energy is the joule, which is defined as a kilogram meter squared per second squared. For a list of dimensional quantities, see Index.


For most dimensions, there is a large number of corresponding units. For example length can be measured in meters, feet, angstroms, or many other units. Units can be organized into systems of units. For more information, see Systems. Some units exist in more than one unit system, or to measure different dimensions. For example, there is a unit of mass named the ounce in the avoirdupois and troy systems, and a unit of volume named the ounce in the US and UK systems. To distinguish among these units in Maple, each unit has a context. For example, the ounce[avoirdupois] and ounce[troy] are units of mass.



Comprehensiveness



The Units package accepts approximately 300 distinct unit names (for example, meters and grams), and over 550 units with various contexts (for example, standard miles and US survey miles.)


Over 500 units are defined using exact conversions. For example, 1 International Table Btu is defined as 52752792631/50000000 joules.


For units specified as accepting either SI or IEC prefixes, both the unit names and the unit symbols are accepted with their prefixes. For example, pm/ms is interpreted as 1e9 meter per second.


The user can extend the set of: base dimensions and units, complex dimensions, complex units, and systems of units. For more information, see AddBaseUnit, AddDimension, AddUnit, and AddSystem, respectively.



Regional Unit Names



The SI unit of length is called the meter in the United States, the metre in Canada and Western Europe, and other variations in other regions. As well, the plural forms, for example, meters and metres, are used.


The Units package accepts many common spelling variations (including pluralization) of units, and includes tools that allow the user to expand this set.

>

convert(['m'^3, 'L', 'gal'], 'conversion_table', 'output'='grid',
'filter'='evalf[4]');

$\left[\begin{array}{cccccc}{}& {}& {\mathrm{To:}}& {{m}}^{{3}}& {L}& {\mathrm{gal}}\\ {\mathrm{Unit\; Name}}& {\mathrm{Symbol}}& {}& {}& {}& {}\\ {\mathrm{cubic\; meters}}& {{m}}^{{3}}& {}& {1.}& {1000.}& {264.2}\\ {\mathrm{liters}}& {L}& {}& {0.001}& {1.}& {0.2642}\\ {\mathrm{gallons}}& {\mathrm{gal}}& {}& {0.003785}& {3.785}& {1.}\end{array}\right]$
 (1) 
>

Units:AddUnit('meter', 'spelling'='metre', 'plural'='metres'):

>

Units:AddUnit('liter', 'spelling'='litre', 'plural'='litres'):

>

convert(['m'^3, 'L', 'gal'], 'conversion_table', 'output'='columns',
'filter'='evalf[4]');

$\left[\begin{array}{ccc}{\mathrm{Units\; From:}}& {\mathrm{Units\; To:}}& {\mathrm{Conversion\; Factor:}}\\ {}& {}& {}\\ {\mathrm{cubic\; metres}}& {L}& {1000.}\\ {}& {\mathrm{gal}}& {264.2}\\ {\mathrm{litres}}& {\mathrm{m^3}}& {0.001}\\ {}& {\mathrm{gal}}& {0.2642}\\ {\mathrm{gallons}}& {\mathrm{m^3}}& {0.003785}\\ {}& {L}& {3.785}\end{array}\right]$
 (2) 

In the case that units are specific to a country, the context is prefixed by the appropriate ISO 1866 country code (for example, US, CA, UK, and DE, for the United States, Canada, the United Kingdom, and Germany, respectively).



Unit Representation



A unit is identified by a unit name and a context. The unit name may have various spellings, but the context is fixed. A context is used to distinguish two units with the same name but different values. For example, the units ${\mathrm{pound}}_{\mathrm{avoirdupois}}$ and ${\mathrm{pound}}_{\mathrm{troy}}$ refer to the unit pound with contexts avoirdupois and troy, respectively.


Each unit has a default context that can be changed. A unit name without a context refers to the default context. The unit meter refers to the SI meter and the pound refers to the avoirdupois pound. To determine the default context for a unit, use the GetUnit(unit) calling sequence.


One or more unit symbols can be associated with a unit name. For example, m and lb are symbols for the meter and pound, respectively. The symbol is valid for any context of the unit. In contrast, an abbreviation is a short form for a specific unitcontext pair. For example, at refers to only the technical context of the atmosphere unit.


Some units take either SI or IEC prefixes to identify power of 10 or power of 2 multiples, respectively, of the unit. In both cases, unit names take prefixes different from those of unit symbols (for example, centimeter and cm have different prefixes). Unit names with symbol prefixes, for example, cmetre, and unit symbols with name prefixes, for example, centim, are not accepted.


A unit can be raised to a rational power, or multiplied by a constant (see type/constant) or by other units. For example, ${\frac{{\mathrm{cm}}^{\raisebox{1ex}{$3$}\!\left/ \!\raisebox{1ex}{$2$}\right.}{g}^{\raisebox{1ex}{$3$}\!\left/ \!\raisebox{1ex}{$2$}\right.}}{s}}}$ is a valid CGS system unit (see CGS). However, ft + yd, which is equal to four feet, is not a valid unit of length.


An expression with a unit such as $5\u27e6m\u27e7$ or $\left(x+y\right)\u27e6V\u27e7$ is represented in Maple as a product of the expression with a function call, which can be obtained by calling the procedure $\mathrm{Unit}$.


As a consequence, the expression $0$ (zero) with a unit cannot be represented in Maple: it would be represented as, for example, $0\xb7\mathrm{\ⅆ\ⅇgC}$, or internally, $0\xb7\mathrm{Unit}\left(\mathrm{degC}\right)$, but $0$ multiplied by any function call immediately simplifies to $0$. This particularly comes up with temperatures sometimes, when dealing with empirical temperatures rather than with temperature differences. This can be a reason to use Temperature objects instead of regular unit expressions.



Unit Environments



In the default environment, units are ignored unless you explicitly instruct Maple to take them into account. For example, conversions between units can be performed by using the convert routines, which are available in all environments. For more information, see Units/default.


In the Simple Units environment, some Maple functions are modified to accept input with units. Using the Unit routine, units can be included in expressions. Unassigned variables are not assumed to represent unitfree quantities. For more information, see Units[Simple].


In the Standard Units environment, some Maple functions are modified to accept input with units. Using the Unit routine, units can be included in expressions. Unassigned variables are assumed to represent unitfree quantities. For more information, see Units[Standard].


In the Natural Units environment, some Maple functions are modified to accept input with units. Using the Unit routine or the natural notation (*unit_name), units can be included in expressions. Unassigned variables are assumed to represent unitfree quantities. For more information, see Units[Natural].


Although the lists of functions available for unit calculations in the Natural, Simple, and Standard environments are the same, the functions are not identical. The Standard and Simple environment functions do not accept the natural notation for units. The Standard and Natural environment functions assume that unassigned variables are unitfree.



Formatting Output



In all Units environments, the units of an expression are generally displayed next to the expression.


Note: Prior to Maple 2015, units were displayed surrounded by double brackets.

>

253.0 * x^2 * Unit('m'/'s');

${253.0}{}{{x}}^{{2}}{}\u27e6\frac{{m}}{{s}}\u27e7$
 (3) 

If all unit names in a result have associated symbols or abbreviations, the result is displayed using unit symbols and abbreviations. Otherwise, it is displayed using only unit names.

>

253.0 * x^2 * Unit('m'/'s');

${253.0}{}{{x}}^{{2}}{}\u27e6\frac{{m}}{{s}}\u27e7$
 (4) 
>

convert((4), 'units', 'km'/'fortnight');

${306028.8000}{}{{x}}^{{2}}{}\u27e6\frac{{\mathrm{kilometre}}}{{\mathrm{fortnight}}}\u27e7$
 (5) 

The context of a unit is displayed in output only if it is not the default context. For example, mile refers to the (${\mathrm{mile}}_{\mathrm{standard}}$), the default context for the mile.

>

spd := 253.0 * x^2 * Unit('m'/'s');

${\mathrm{spd}}{\u2254}{253.0}{}{{x}}^{{2}}{}\u27e6\frac{{m}}{{s}}\u27e7$
 (6) 
>

convert(spd, 'units', 'mi'/'h');

${565.9448819}{}{{x}}^{{2}}{}\u27e6\frac{{\mathrm{mi}}}{{h}}\u27e7$
 (7) 
>

convert(spd, 'units', 'mi[standard]'/'h');

${565.9448819}{}{{x}}^{{2}}{}\u27e6\frac{{\mathrm{mi}}}{{h}}\u27e7$
 (8) 
>

convert(spd, 'units', 'mi[US_survey]'/'h');

${565.9437500}{}{{x}}^{{2}}{}\u27e6\frac{{{\mathrm{mi}}}_{{\mathrm{US\_survey}}}}{{h}}\u27e7$
 (9) 
>

convert(spd, 'units', 'mi'/'fortnight');

${190157.4803}{}{{x}}^{{2}}{}\u27e6\frac{{\mathrm{mile}}}{{\mathrm{fortnight}}}\u27e7$
 (10) 
>

convert(spd, 'units', 'mi[standard]'/'fortnight');

${190157.4803}{}{{x}}^{{2}}{}\u27e6\frac{{\mathrm{mile}}}{{\mathrm{fortnight}}}\u27e7$
 (11) 
>

convert(spd, 'units', 'mi[US_survey]'/'fortnight');

${190157.1000}{}{{x}}^{{2}}{}\u27e6\frac{{{\mathrm{mile}}}_{{\mathrm{US\_survey}}}}{{\mathrm{fortnight}}}\u27e7$
 (12) 

Some complex units, for example, radians, are defined in terms of units with attachments. In this case, upon combining units, the units with attachments are replaced by complex units in output. However, unit attachments or modifiers are, in general, displayed.

>

43.0 * Unit('feet(radius)'/'yard');

${43.0}{}\u27e6\frac{{\mathrm{ft}}{}\left({\mathrm{radius}}\right)}{{\mathrm{yd}}}\u27e7$
 (13) 
>

combine(43.0 * Unit('feet(radius)'/'yard'), 'units');

${14.33333333}{}\u27e6\frac{{1}}{{\mathrm{rad}}}\u27e7$
 (14) 
>

combine(43.0 * Unit('feet'/'feet(radius)'), 'units');

${43.0}{}\u27e6{\mathrm{rad}}\u27e7$
 (15) 
>

combine(43.0 * Unit('J'/'m'/'W(mech)'/'h(mech)'*'cm(mech)'), 'units');

${0.0001194444444}{}\u27e6\frac{{N}}{{N}{}\left({\mathrm{mech}}\right)}\u27e7$
 (16) 
>

43.0 * Unit('J(mech)'/'m(mech)'/'W(mech)'/'h(mech)'*'cm(mech)');

${43.0}{}\u27e6\frac{{J}{}\left({\mathrm{mech}}\right){}{\mathrm{cm}}{}\left({\mathrm{mech}}\right)}{{m}{}\left({\mathrm{mech}}\right){}{W}{}\left({\mathrm{mech}}\right){}{h}{}\left({\mathrm{mech}}\right)}\u27e7$
 (17) 
>

combine((17), 'units');

>

combine(43.0 * Unit('J(chemical)'/'m(chemical)'/'W(mech)'/'h(mech)'*'cm(mech)'), 'units');

${0.0001194444444}{}\u27e6\frac{{N}{}\left({\mathrm{chemical}}\right)}{{N}{}\left({\mathrm{mech}}\right)}\u27e7$
 (19) 


Unit, Dimension, and System Conversions



The unit conversion operation is key to the Units package. The convert function converts between units or temperature scales, a unit and its dimension, or a unit and the corresponding unit in a specified system of units. The Unit Converter, which can be launched from the Tools menu, facilitates easy unit conversion. For more information, see Unit Converter.


To convert a measurement between units with the same dimension, except absolute temperatures, use the convert/units function. The energy option allows energy conversions, which convert between energy units with different dimensions. Since convert/units converts only temperature intervals, use the convert/temperature function to convert absolute temperatures between temperature scales.


To determine the dimension, base or complex, associated with a unit, use the convert/dimensions function.


The convert/system function converts a measurement in one unit to the default unit of the same dimension in a specified system of units.



