# UnitMath FAQ ( Units )

### What are Units? TOP

A unit is a quantity in terms of which the magnitudes of other quantities of the same type can be stated.

Can you be more specific?

acre, byte, coulomb, cup, degree, dyne, joule, K, rpm, mach, meter, ounce, \$, second, torr, watt ... { hundreds more }

UnitMath supports 20 different categories of Units from "angle" to "volume". Each of these categories has specific units that you can use in your equations. For example there are dozens of units under the category "length" from "angstroms" to "parsecs". Any of these lengths can be readily used in an equation that calls for length.

In addition to the categories of units you may use combinations of units with * and /. For example you can make up the combined unit "\$/pound" or "bushel/hour".

### How can I find the defined units? TOP

From the UnitMath window pull down the tools menu and select "Functions/Prefixes/Units". This will open the "Units..." window where you may browse all the units supported by UnitMath with the definition each units. The pop-up menu on the top of the screen enables you to select the category of units displayed, and the check box on the bottom of the screen allows you to control the order in which the units are displayed.

Double clicking on any unit will paste that unit into the current selection in the UnitMath window. Multiple Units may be pasted by pulling down the menu "options" and selecting "Paste selection".

### What does a unit without a number mean? TOP

In UnitMath a unit alone has the same meaning as 1 unit. That is "meter" is the same as "1 meter".

### How do I convert between units? TOP

The operator "as" is used to convert between units of the same type. The simplest case is when both terms are from the same category.
ton as pound = 2,000 pound
mile as yard = 1,760 yard
hour as seconds = 3,600 seconds
50 as pi ~ 15.915 pi

The as term may be calculated.
acre as ( 25 foot * 8 foot ) = 217.8 ( 25 foot * 8 foot )
60 mph as feet/second = 88 feet/second
250 feet/(5 miles) as minutes/year ~ 4,980.575 minutes/year

The operator & is used to concatenate units.
league_nautical_Brit as miles & feet = 3 miles + 2,400 feet
ton_metric as pounds & ounces ~ ( 2,204 pounds + 9.962 ounces )
year as weeks & days & hours & minutes & seconds ~ ( 52 weeks + days + 5 hours + 48 minutes + ( 45.190 pm 0.043 ) seconds )

### What else can I do with units? TOP

In calculations units are used just like numbers, so you can do any of the following and much more.

2 foot + inch as inch = 25 inch
40 feet * 1,089 yd as acres = 3 acres
60 mph * ( 3 hours + 20 min ) as miles = 200 miles
1200 miles / (8 hours) as mph = 150 mph
1000 lb / ( 55 gallons ) as gram/cc ~ 2.179 gram/cc
55 gallons / ( sq inch ) as ft & inch = 1,058 ft + 9 inch
( 300 ft ) ^ 2 as acres ~ 2.066 acres
( 55 gallons ) ^ (1/3) as feet & inches & (1/8 inch) ~ ( feet + 11 inches + 2.673 (1/8 inch) )

### Can I use prefixes with units? TOP

Yes, UnitMath accepts all the standard prefixes with any unit defined in UnitMath. To see a list of all the prefixes supported by UnitMath open the "Units..." window and select "Prefixes" from the pull down menu.

kiloMeter as meter = 1,000 meter
megaAmp as amps = 1,000,000 amps

Note: prefixes are case sensitive so m (1/1000) and M (1,000,000) are not the same.

mm as m = 1e-3 m
Mm as m = 1,000,000 m

### What about "Normalized" equations ? TOP

Normalized equations are equations where if you replace equation's variables with #'s ( of specified units ) the results will be a # ( in some specified units ). UnitMath makes equations like these more meaningful, easier to use, and much less likely to give errors.

An example will help.

The maximum practical speed of a displacement boat is give by the formula "1.2 * sqrt( length )". Where the length is in feet and the answer is in knots. Using UnitMath the same equation can be written to accept any unit of length and return any unit of speed.

max_prac_speed: 1.2 sqrt( length / ft ) knot;

" Examples "
length: 10 m;
max_prac_speed as mph ~ 8. mph
max_prac_speed as km/hr ~ ( 12.7 ± 0.5 ) km/hr

length: 512 ft;
max_prac_speed as knots ~ ( 26.0 to 27.2 to 28.3 ) knots
1000 miles / max_prac_speed as hours ~ ( 30.7 to 32.0 to 33.4 ) hours

The actual conversion from a "Normalized" equation to a general equation was done by dividing the length by feet to get a number representing the number of feet, and multiplying the result by knots to get the result in the knots.

A second example can't hurt.

Following is another normalized equation this time for "Brake Horsepower". Brake horsepower is used to measure the output power of an engine and is defined as follows:

Bhp = 2 pi r w n / 33,000 in hp
where
r = radius of the brake arm, in feet.
w = force acting at end of brake arm, in pounds.
n = number of revolutions per minute.

To generalize this equation in UnitMath enter :

Bhp: 2 pi ( r / feet ) ( w / lbf ) ( n / rpm ) / 33,000 * hp;

" Example 1 "
r: 14.0 inches; w: 150.0 newtons; n: 100.0 rps;
Bhp ~ 45. hp
Bhp as kiloWatts ~ ( 33.4 to 33.7 ) kiloWatts

" Example 2 "
r: 9.0 meter; w: 15.0 dyne; n: 100.0 kiloHz;
Bhp ~ 0.18 hp
Bhp as Watts ~ ( 133.7 to 136.3 ) Watts

Personally, I'd rename the variables to make there meaning more obvious.

Bhp: 2 pi ( radius / feet ) ( ForceAtRadius / lbf ) ( AngularVelocity / rpm ) / 33,000 * hp;