 MaplePortal/Units - Maple Help

 Units & Tolerances

 Introduction

You can compute with units and dimensions. Maple will track units throughout a calculation, resolve compound units to a simpler form, and help you ensure your calculations are dimensionally consistent.

Here, note how units of force over area are correctly resolved to the SI unit of stress.

 > $\mathrm{with}\left(\mathrm{Units}\left[\mathrm{Simple}\right]\right):\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}$
 > $\mathrm{stress}≔\frac{5.4⟦N⟧}{4.5⟦{\mathrm{inch}}^{2}⟧}$
 ${\mathrm{stress}}{≔}{1860.003720}⟦{\mathrm{Pa}}⟧$ (1)

The ThermophysicalData and ScientificConstants packages associate units with fluid properties and physical constants.

 >
 ${998.2379971}⟦\frac{{\mathrm{kg}}}{{{m}}^{{3}}}⟧$ (2)
 > $\mathrm{evalf}\left(\mathrm{ScientificConstants}:-\mathrm{Constant}\left('c',\mathrm{units}\right)\right)$
 ${2.99792458}{{10}}^{{8}}⟦\frac{{m}}{{s}}⟧$ (3)

 Defining Units

You can define units using one of several methods.

Ctrl+Shift+U followed by the unit

 > $\mathrm{area1}≔5.5⟦{m}^{2}⟧:$

Unit function

 > $\mathrm{area2}≔4.5\cdot \mathrm{Unit}\left({\mathrm{cm}}^{2}\right):$

Units Palette Here's how you define a variable with a unit using Ctrl+Shift+U.

What you should see

Try it here

Type x:=3.5 > 

Press Ctrl+Shift+U Type m Press the right arrow key Type a colon and then press Enter Changing the Units of a Result

You can also change the units of a result using the options under Convert Output Units in the Context Panel. Simply click on a result with a unit, and navigate to the Context Panel - you can select one of several suggested unit conversions or specify your own. Number formating can also be modified.

 Tolerances

Variables can also have associated tolerances, which are carried through calculations.

For example, consider a water manometer reading a height of 0.08 m with a measurement error of ±0.002 m. The possible range of pressures is thus

 > $\mathrm{restart}:\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\mathrm{with}\left(\mathrm{Tolerances}\right):\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}$
 >
 >
 >
 $\mathrm{ρ__water}{≔}{997.0470390}⟦\frac{{\mathrm{kg}}}{{{m}}^{{3}}}⟧$ (4)
 > $\mathrm{ΔP}≔\mathrm{ρ__water}\cdot g\cdot h$
 ${\mathrm{ΔP}}{≔}{782.}{±}{19.6}⟦{\mathrm{Pa}}⟧$ (5)
 > 

 Applications Heat Flows across a Refrigeration Cycle Ideal Brayton Cycle  