**from=***unit_from*.- Unit to convert from. No default.
**to=***unit_to*- Unit to convert to. No default.
**unit=***unit_file*- Units database file. Multiple files can be given, separated
by commas. A search path "
**.:$NEMODAT**" is employed, so a local file is always tried before a file in**$NEMODAT**. Default:**units.lib**. **show=mul|div**- Option to
select the multiplicative or it’s inverse factor you need to convert from
Iunit_from to
*unit_to*, i.e.

Valid options are**mul**and**div**. You can also select to show both, although the**mul**is always shown first, irrespective of the order given. [Default:**mul**]. **quiet=t|f**- Be quiet in interactive mode? [Default:
**t**]*NOTE: interactive mode not implemented*

% units kpc/Myr km/s 977.81311or a bit more mondaine:

% units meters feet 3.2808399

You can also use constants in the units expressions. For example, if you
need to know the length of something in multiples of *5 cm*, but know it’s
*3 feet*, try

% units "3*feet" "5*cm" 18.288Note the usage of the (single or double) quotes to prevent the shell from interpreting the * meta character.

Powers of units can be specified using
the ’^’ character as shown in the example, or by simple concatenation: ’cm3’
is equivalent to ’cm^3’. Multiplication of units can be specified by using
spaces, a dash or an asterisk. Division of units is indicated by the slash
(’/’). Note that multiplication has a higher precedence than division, so
If the user enters incompatible unit types, the units program will print
a message indicating that the units are not conformable and it will display
the reduced form for each unit:

% units ergs/hour "fathoms kg^2 / day" conformability error 2.7777778e-11 kg m^2 / sec^3 2.1166667e-05 kg^2 m / secAlso note the use of double quotes in order for NEMO to read the

The conversion information is read from
a units data file. The default file includes definitions for most familiar
units, abbreviations and metric prefixes. Some constants of nature included
are:

pi’Pound’ is a unit of mass. Compound names are run together so ’poundforce’ is a unit of force. British units that differ from their US counterparts are prefixed with ’br’, and currency is prefixed with its country name: ’belgiumfranc’, ’britainpound’. When searching for a unit, if the specified string does not appear exactly as a unit name, then the units program will try to remove a trailing ’s’ or a trailing ’es’ and check again for a match.ratio of circumference to diameter cspeed of light echarge on an electron gacceleration of gravity forcesame as g moleAvogadro’s number waterpressure per unit height of water mercurypressure per unit height of mercury auastronomical unit

All of these definitions can be read in the standard units file, or you can supply your own file. A unit is specified on a single line by giving its name and an equivalence. One should be careful to define new units in terms of old ones so that a reduction leads to the primitive units which are marked with ’!’ characters. The units program will not detect infinite loops that could be caused by careless unit definitions.

Prefixes are defined in the same was as standard units, but with a trailing dash at the end of the prefix name.

prefixabbrev.factor yotta-Y-1e24 zetta-Z-1e21 exa-E-1e18 peta-P-1e15 tera-T-1e12 giga-G-1e9 mega-M-1e6 myria-1e4 kilo-k-1e3 hecto-h-1e2 deka-da-1e1 deci-d-1e-1 centi-c-1e-2 milli-m-1e-3 micro-1e-6 nano-1e-9 pico-p-1e-12 femto-f-1e-15 atto-a-1e-18 zopto-z-1e-21 yocto-y-1e-24

mass length velocity G 1/G time g cm cm/s 6.6732e-8 1.49853e+07 s (cgs) kg m m/s 6.6732e-11 1.49853e+10 s (SI) M AU km/s 886.8 1.128e-3 4.74yr (planets) M AU 29.8 km/s 1 1 0.159yr (planets) M pc km/s 2.32385e2 1e6.yr (starcluster) M kpc km/s 2.32385e5 1e9.yr 1e10.M 10.kpc 100.km/s 2.32385 1e8.yr (galaxy) ~2e4.M kpc ~990.km/s 1 1 1e6.yr (galaxy) 1e11.M 10.kpc ~97.8.km/s 4.497 0.22237 1e8.yr (galaxy) 1e10.M 1.kpc 1.km/s 43007.1 (GADGET)

1 pc3.086e18 cm 1 AU1.496e13 cm 1 radian206265 arcsec 1 yr3.156e7 sec 1 solarmass1.988e33 g 1 km/s1.023 pc per million year 1 arcsec/yr4.74 km/s at 1 pc 1 arcsec 4.848 pc/Mpc_distance

The effect of including a ’/’ in a prefix is surprising.

Exponents entered by the user can be only one digit.

The user must use | to indicate division of numbers and / to indicate division of symbols. This distinction should not be necessary.

The program contains various arbitrary limits on the length of the units converted and on the length of the data file.

NIST: http://physics.nist.gov/cuu/Constants/index.html

NIST: http://physics.nist.gov/PhysRefData/contents.html

FRINK: http://futureboy.homeip.net/frinkdocs/

units calculator: http://www.astro.wisc.edu/~dolan/constants/calc.html

Granot,
*Scaling relations between numerical simulations and physical systems they
representP, http://arxiv.org/pdf/1111.6865v1
*

$NEMODAT/units.lib - the standard units library /usr/lib/units - original units library from units(1)

14-jul-93V1.0 Original versionAM 21-jul-93V2.0 Conversion to nemoPJT 8-aug-93V2.1 cleanup, reset defaults, switch key orderPJT