# Default unit library definitions.  Much of this is based on
# http://www.bipm.org/utils/common/pdf/si_brochure_8_en.pdf


# ------------------------------------------------------------------------
[prefixes]
# ------------------------------------------------------------------------
# prefix-string: float-multiplier [, comment]

# SI.
Y: 1.e24
Z: 1.e21
E: 1.e18
P: 1.e15
T: 1.e12
G: 1.e9
M: 1.e6
k: 1.e3
h: 1.e2
da: 1.e1
d: 1.e-1
c: 1.e-2
m: 1.e-3
u: 1.e-6
n: 1.e-9
p: 1.e-12
f: 1.e-15
a: 1.e-18
z: 1.e-21
y: 1.e-24

# IEC
Ei: 1152921504606846976, (1 << 60)
Pi: 1125899906842624,    (1 << 50)
Ti: 1099511627776,       (1 << 40)
Gi: 1073741824,          (1 << 30)
Mi: 1048576,             (1 << 20)
Ki: 1024,                (1 << 10)


# ------------------------------------------------------------------------
[base_units]
# ------------------------------------------------------------------------
# quantity-name: unit-name

# SI.
length: m
mass: kg
time: s
current: A
temperature: K
amount: mol
luminous_intensity: cd

# Derived SI (Table 3).
angle: rad
solid_angle: sr

# Other.
money: USD
passengers: pax
digital_data: byte

# Unitness
Unitless: unitless


# ------------------------------------------------------------------------
[units]
# ------------------------------------------------------------------------
# unit-name: unit-expression, comment
# OR
# unit-name: factor, base-unit, offset, comment
#
# Note that unit names cannot be Python reserved words (such as 'in' for inch).
# Unit names are matched before prefix names are checked.
# A unit-expression cannot use prefixes (except for 'kg'), however 'pi' is
# available as a predefined constant.

g: kg/1000, gram

# Derived SI (Table 3).
Hz: 1/s, hertz
N: m*kg/s**2, newton
Pa: N/m**2, pascal
J: N*m, joule
W: J/s, watt
C: A*s, coulomb
V: W/A, volt
F: C/V, farad
ohm: V/A, ohm
S: A/V, siemens
Wb: V*s, weber
T: Wb/m**2, tesla
H: Wb/A, henry
degC: 1, K, 273.15, degree celsius
lm: cd*sr, lumen
lx: lm/m**2, lux
Bq: 1/s, becquerel
Gy: J/kg, gray
Sv: J/kg, sievert
kat: mol/s, katal

# Non-SI (Table 6).
min: 60*s, minute
h: 3600*s, hour
d: 86400*s, day
deg: (pi/180)*rad, degree
arc_minute: deg/60, arc minute
arc_second: arc_minute/60, arc second
ha: 1e4*m**2, hectare
L: 1e-3*m**3, liter
t: 1e3*kg, tonne (metric ton)

# Non-SI (Table 7).
e: 1.60217653e-19*C, elementary charge
eV: e*V, electron volt
Da: 1.66053886e-27*kg, dalton
u: Da, unified atomic mass unit
ua: 1.49597870700e11*m, astronomical unit
AU: 1.49597870700e11*m, astronomical unit
c0: 299792458.*m/s, speed of light in vacuum
hbar: 1.05457168e-34*J*s, reduced Planck Constant
me: 9.1093826e-31*kg, electron mass
a0: 0.5291772108e-10*m, Bohr radius
Eh: 4.35974417e-18*J, Hartree energy

# Non-SI (Table 8).
bar: 1.e5*Pa, pressure
Ang: 1.e-10*m, angstrom
NM: 1.852e3*m, nautical mile
b: 1.e-28*m**2, barn
kn: NM/h, knot

# Non-SI (Table 9).
erg: 1.e-7*J, erg
dyn: 1.e-5*N, dyne
P: 0.1*Pa*s, poise (dynamic viscosity)
St: 1.e-4*m**2/s, stokes (kinematic viscosity)
sb: 1.e4*cd/m**2, stilb (luminance)
ph: 1.e4*lx, phot (illuminance)
# 'Gal' skipped due to likely confusion with volume unit.
Mx: 1.e-8*Wb, maxwell (magnetic flux)
# 'G' renamed 'gauss' to avoid confusion with acceleration unit.
gauss: 1e-4*T, gauss (magnetic flux density)
Oe: (1.e3/(4*pi))*A/m, oersted (magnetic field)

# Backward compatibility.
degK: K, degree Kelvin
nmi: NM, nautical mile
knot: kn, knot

# Other length.
inch: 2.54e-2*m, inch
ft: 0.3048*m, foot
mi: 1.609344e3*m, mile (U.S. statute)
ly: c0*365.25*d, light year
pc: 648000/pi*AU, parsec
# Other mass.
oz: 28.349523125*g, ounce
lb: 16*oz, pound mass
lbm: lb, pound mass
ton: 2000*lb, ton (short)
slug: 14.5939029*kg, slug

# Other time.
wk: 7*d, week
week: 7*d, week (backward compatibility)
a: 365.242199*d, year
yr: a, year
year: a, year (backward compatibility)
mo: yr/12, month
month: yr/12, month (backward compatibility)

# Other temperature.
degR: K*5./9., degree Rankine
degF: 1, degR, 459.67, degree Fahrenheit

# Other volume.
tsp: 4.92892159375e-3*L, teaspoon
tbsp: 3*tsp, tablespoon
floz: 2*tbsp, fluid ounce
cup: 8*floz, cup
pt: 16*floz, pint
qt: 2*pt, quart
galUS: 3.785411*L, gallon (U.S.)
galUK: 4.54609*L, gallon (U.K.)

# Other miscellaneous.
lbf: 4.44822162*N, pound force

rev: 2*pi*rad, revolution
rpm: 2*pi*rad/min, RPM
rps: 2*pi*rad/s, RPS

cal: 4.184*J, thermochemical calorie
cali: 4.1868*J, international calorie
Btu: 1055.05585262*J, British thermal unit

acre: mi**2/640, acre
hp: 745.7*W, horsepower

atm: 101325.*Pa, standard atmosphere
torr: atm/760, Torr (1 mm of mercury)
psi: 6894.75729317*Pa, pounds per square inch
psf: psi/144, pounds per square foot

mu0: 4.e-7*pi*N/A**2, permeability of vacuum
eps0: 1/mu0/c0**2, permittivity of vacuum
Grav: 6.67259e-11*m**3/kg/s**2, universal gravitational constant
Nav: 6.0221367e23/mol, Avagadros number
R: 8.31424*J/(mol*K), gas constant
V0: 2.24136*m**3/(1000*mol), volume of ideal gas
planck: 2*pi*hbar, Planck constant
mp: 1.672614e-27*kg, proton rest mass
mn: 1.674920e-27*kg, neutron rest mass
sigma: 5.66961e-8*W/(m**2*K**-4), Stefan-Boltzmann constant
Ken: 1.380649e-23*J, kelvin as energy unit
Rinfinity: 1.09737312e7/m, Rydberg constant
re: 2.817939e-15*m, classic electron radius
lambdac: 2.4263096e-12*m, Compton wavelength of electron
lambdap: 1.3214409e-15*m, Compton wavelength of proton
lambdan: 1.3196217e-15*m, Compton wavelength of neutron
mue: 9.284851e-24*J/T, electron magnetic moment
mup: 1.4106203e-26*J/T, proton magnetic moment
mub: 9.274096e-24*J/T, bohr magneton
mun: 5.050951e-27*J/T, nuclear magneton
gammap: 2.6751270e8*rad/(s*T), gyromagnetic ratio of protons in H2O
gammapc: 2.6751965e8*rad/(s*T), gyromagnetic ratio of protons in H2O corrected for diamagnetism of H2O
phi0: 2.0678538e-15*Wb, magnetic flux quantum
hme: 7.273894e-4*J*s/kg, quantum of circulation

percent: unitless/100, percentage
