441 lines
13 KiB
Plaintext
441 lines
13 KiB
Plaintext
# Default Pint units definition file
|
|
# Based on the International System of Units
|
|
# Language: english
|
|
# :copyright: 2013 by Pint Authors, see AUTHORS for more details.
|
|
|
|
@defaults
|
|
group = international
|
|
system = mks
|
|
@end
|
|
|
|
# decimal prefixes
|
|
yocto- = 1e-24 = y-
|
|
zepto- = 1e-21 = z-
|
|
atto- = 1e-18 = a-
|
|
femto- = 1e-15 = f-
|
|
pico- = 1e-12 = p-
|
|
nano- = 1e-9 = n-
|
|
micro- = 1e-6 = u- = µ-
|
|
milli- = 1e-3 = m-
|
|
centi- = 1e-2 = c-
|
|
deci- = 1e-1 = d-
|
|
deca- = 1e+1 = da-
|
|
hecto- = 1e2 = h-
|
|
kilo- = 1e3 = k-
|
|
mega- = 1e6 = M-
|
|
giga- = 1e9 = G-
|
|
tera- = 1e12 = T-
|
|
peta- = 1e15 = P-
|
|
exa- = 1e18 = E-
|
|
zetta- = 1e21 = Z-
|
|
yotta- = 1e24 = Y-
|
|
|
|
# binary_prefixes
|
|
kibi- = 2**10 = Ki-
|
|
mebi- = 2**20 = Mi-
|
|
gibi- = 2**30 = Gi-
|
|
tebi- = 2**40 = Ti-
|
|
pebi- = 2**50 = Pi-
|
|
exbi- = 2**60 = Ei-
|
|
zebi- = 2**70 = Zi-
|
|
yobi- = 2**80 = Yi-
|
|
|
|
# reference
|
|
meter = [length] = m = metre
|
|
second = [time] = s = sec
|
|
ampere = [current] = A = amp
|
|
candela = [luminosity] = cd = candle
|
|
gram = [mass] = g
|
|
mole = [substance] = mol
|
|
kelvin = [temperature]; offset: 0 = K = degK
|
|
radian = [] = rad
|
|
bit = []
|
|
count = []
|
|
|
|
@import constants_en.txt
|
|
|
|
# acceleration
|
|
[acceleration] = [length] / [time] ** 2
|
|
|
|
# Angle
|
|
turn = 2 * pi * radian = revolution = cycle = circle
|
|
degree = pi / 180 * radian = deg = arcdeg = arcdegree = angular_degree
|
|
arcminute = arcdeg / 60 = arcmin = arc_minute = angular_minute
|
|
arcsecond = arcmin / 60 = arcsec = arc_second = angular_second
|
|
steradian = radian ** 2 = sr
|
|
|
|
# Area
|
|
[area] = [length] ** 2
|
|
are = 100 * m**2
|
|
barn = 1e-28 * m ** 2 = b
|
|
cmil = 5.067075e-10 * m ** 2 = circular_mils
|
|
darcy = 9.869233e-13 * m ** 2
|
|
hectare = 100 * are = ha
|
|
|
|
# EM
|
|
esu = 1 * erg**0.5 * centimeter**0.5 = statcoulombs = statC = franklin = Fr
|
|
esu_per_second = 1 * esu / second = statampere
|
|
ampere_turn = 1 * A
|
|
gilbert = 10 / (4 * pi ) * ampere_turn
|
|
coulomb = ampere * second = C
|
|
volt = joule / coulomb = V
|
|
farad = coulomb / volt = F
|
|
ohm = volt / ampere = Ω
|
|
siemens = ampere / volt = S = mho
|
|
weber = volt * second = Wb
|
|
tesla = weber / meter ** 2 = T
|
|
henry = weber / ampere = H
|
|
elementary_charge = 1.602176487e-19 * coulomb = e
|
|
chemical_faraday = 9.64957e4 * coulomb
|
|
physical_faraday = 9.65219e4 * coulomb
|
|
faraday = 96485.3399 * coulomb = C12_faraday
|
|
gamma = 1e-9 * tesla
|
|
gauss = 1e-4 * tesla
|
|
maxwell = 1e-8 * weber = mx
|
|
oersted = 1000 / (4 * pi) * A / m = Oe
|
|
statfarad = 1.112650e-12 * farad = statF = stF
|
|
stathenry = 8.987554e11 * henry = statH = stH
|
|
statmho = 1.112650e-12 * siemens = statS = stS
|
|
statohm = 8.987554e11 * ohm
|
|
statvolt = 2.997925e2 * volt = statV = stV
|
|
unit_pole = 1.256637e-7 * weber
|
|
|
|
# Energy
|
|
[energy] = [force] * [length]
|
|
joule = newton * meter = J
|
|
erg = dyne * centimeter
|
|
btu = 1.05505585262e3 * joule = Btu = BTU = british_thermal_unit
|
|
electron_volt = 1.60217653e-19 * J = eV
|
|
quadrillion_btu = 10**15 * btu = quad
|
|
thm = 100000 * BTU = therm = EC_therm
|
|
cal = 4.184 * joule = calorie = thermochemical_calorie
|
|
international_steam_table_calorie = 4.1868 * joule
|
|
ton_TNT = 4.184e9 * joule = tTNT
|
|
US_therm = 1.054804e8 * joule
|
|
watt_hour = watt * hour = Wh = watthour
|
|
hartree = 4.35974394e-18 * joule = E_h = hartree_energy
|
|
|
|
# Force
|
|
[force] = [mass] * [acceleration]
|
|
newton = kilogram * meter / second ** 2 = N
|
|
dyne = gram * centimeter / second ** 2 = dyn
|
|
force_kilogram = g_0 * kilogram = kgf = kilogram_force = pond
|
|
force_gram = g_0 * gram = gf = gram_force
|
|
force_ounce = g_0 * ounce = ozf = ounce_force
|
|
force_pound = g_0 * lb = lbf = pound_force
|
|
force_ton = 2000 * force_pound = ton_force
|
|
poundal = lb * feet / second ** 2 = pdl
|
|
kip = 1000*lbf
|
|
|
|
# Frequency
|
|
[frequency] = 1 / [time]
|
|
hertz = 1 / second = Hz = rps
|
|
revolutions_per_minute = revolution / minute = rpm
|
|
counts_per_second = count / second = cps
|
|
|
|
# Heat
|
|
#RSI = degK * meter ** 2 / watt
|
|
#clo = 0.155 * RSI = clos
|
|
#R_value = foot ** 2 * degF * hour / btu
|
|
|
|
# Information
|
|
byte = 8 * bit = B = octet
|
|
baud = bit / second = Bd = bps
|
|
|
|
# Irradiance
|
|
peak_sun_hour = 1000 * watt_hour / meter**2 = PSH
|
|
langley = thermochemical_calorie / centimeter**2 = Langley
|
|
|
|
# Length
|
|
angstrom = 1e-10 * meter = Å = ångström = Å
|
|
parsec = 3.08568025e16 * meter = pc
|
|
light_year = speed_of_light * julian_year = ly = lightyear
|
|
astronomical_unit = 149597870691 * meter = au
|
|
|
|
# Mass
|
|
carat = 200 * milligram
|
|
metric_ton = 1000 * kilogram = t = tonne
|
|
atomic_mass_unit = 1.660538782e-27 * kilogram = u = amu = dalton = Da
|
|
scruple = 20 * grain
|
|
bag = 94 * lb
|
|
|
|
# Textile
|
|
denier = gram / (9000 * meter)
|
|
tex = gram / (1000 * meter)
|
|
dtex = decitex
|
|
|
|
# Photometry
|
|
lumen = candela * steradian = lm
|
|
lux = lumen / meter ** 2 = lx
|
|
|
|
# Power
|
|
[power] = [energy] / [time]
|
|
watt = joule / second = W = volt_ampere = VA
|
|
horsepower = 33000 * ft * lbf / min = hp = UK_horsepower = British_horsepower
|
|
boiler_horsepower = 33475 * btu / hour
|
|
metric_horsepower = 75 * force_kilogram * meter / second
|
|
electric_horsepower = 746 * watt
|
|
hydraulic_horsepower = 550 * feet * lbf / second
|
|
refrigeration_ton = 12000 * btu / hour = ton_of_refrigeration
|
|
|
|
# Pressure
|
|
[pressure] = [force] / [area]
|
|
Hg = gravity * 13.59510 * gram / centimeter ** 3 = mercury = conventional_mercury
|
|
mercury_60F = gravity * 13.5568 * gram / centimeter ** 3
|
|
H2O = gravity * 1000 * kilogram / meter ** 3 = h2o = water = conventional_water
|
|
water_4C = gravity * 999.972 * kilogram / meter ** 3 = water_39F
|
|
water_60F = gravity * 999.001 * kilogram / m ** 3
|
|
pascal = newton / meter ** 2 = Pa
|
|
bar = 100000 * pascal
|
|
atmosphere = 101325 * pascal = atm = standard_atmosphere
|
|
technical_atmosphere = kilogram * gravity / centimeter ** 2 = at
|
|
torr = atm / 760
|
|
pound_force_per_square_inch = pound * gravity / inch ** 2 = psi
|
|
kip_per_square_inch = kip / inch ** 2 = ksi
|
|
barye = 0.1 * newton / meter ** 2 = barie = barad = barrie = baryd = Ba
|
|
mm_Hg = millimeter * Hg = mmHg = millimeter_Hg = millimeter_Hg_0C
|
|
cm_Hg = centimeter * Hg = cmHg = centimeter_Hg
|
|
in_Hg = inch * Hg = inHg = inch_Hg = inch_Hg_32F
|
|
inch_Hg_60F = inch * mercury_60F
|
|
inch_H2O_39F = inch * water_39F
|
|
inch_H2O_60F = inch * water_60F
|
|
footH2O = ft * water
|
|
cmH2O = centimeter * water
|
|
foot_H2O = ft * water = ftH2O
|
|
standard_liter_per_minute = 1.68875 * Pa * m ** 3 / s = slpm = slm
|
|
|
|
# Radiation
|
|
Bq = Hz = becquerel
|
|
curie = 3.7e10 * Bq = Ci
|
|
rutherford = 1e6*Bq = rd = Rd
|
|
Gy = joule / kilogram = gray = Sv = sievert
|
|
rem = 1e-2 * sievert
|
|
rads = 1e-2 * gray
|
|
roentgen = 2.58e-4 * coulomb / kilogram
|
|
|
|
# Temperature
|
|
degC = kelvin; offset: 273.15 = celsius
|
|
degR = 5 / 9 * kelvin; offset: 0 = rankine
|
|
degF = 5 / 9 * kelvin; offset: 255.372222 = fahrenheit
|
|
|
|
# Time
|
|
minute = 60 * second = min
|
|
hour = 60 * minute = hr
|
|
day = 24 * hour
|
|
week = 7 * day
|
|
fortnight = 2 * week
|
|
year = 31556925.9747 * second
|
|
month = year / 12
|
|
shake = 1e-8 * second
|
|
sidereal_day = day / 1.00273790935079524
|
|
sidereal_hour = sidereal_day / 24
|
|
sidereal_minute = sidereal_hour / 60
|
|
sidereal_second = sidereal_minute / 60
|
|
sidereal_year = 366.25636042 * sidereal_day
|
|
sidereal_month = 27.321661 * sidereal_day
|
|
tropical_month = 27.321661 * day
|
|
synodic_month = 29.530589 * day = lunar_month
|
|
common_year = 365 * day
|
|
leap_year = 366 * day
|
|
julian_year = 365.25 * day
|
|
gregorian_year = 365.2425 * day
|
|
millenium = 1000 * year = millenia = milenia = milenium
|
|
eon = 1e9 * year
|
|
work_year = 2056 * hour
|
|
work_month = work_year / 12
|
|
|
|
# Velocity
|
|
[speed] = [length] / [time]
|
|
knot = nautical_mile / hour = kt = knot_international = international_knot = nautical_miles_per_hour
|
|
mph = mile / hour = MPH
|
|
kph = kilometer / hour = KPH
|
|
|
|
# Viscosity
|
|
[viscosity] = [pressure] * [time]
|
|
poise = 1e-1 * Pa * second = P
|
|
stokes = 1e-4 * meter ** 2 / second = St
|
|
rhe = 10 / (Pa * s)
|
|
|
|
# Volume
|
|
[volume] = [length] ** 3
|
|
liter = 1e-3 * m ** 3 = l = L = litre
|
|
cc = centimeter ** 3 = cubic_centimeter
|
|
stere = meter ** 3
|
|
|
|
@context(n=1) spectroscopy = sp
|
|
# n index of refraction of the medium.
|
|
[length] <-> [frequency]: speed_of_light / n / value
|
|
[frequency] -> [energy]: planck_constant * value
|
|
[energy] -> [frequency]: value / planck_constant
|
|
@end
|
|
|
|
@context boltzmann
|
|
[temperature] -> [energy]: boltzmann_constant * value
|
|
[energy] -> [temperature]: value / boltzmann_constant
|
|
@end
|
|
|
|
@context(mw=0,volume=0,solvent_mass=0) chemistry = chem
|
|
# mw is the molecular weight of the species
|
|
# volume is the volume of the solution
|
|
# solvent_mass is the mass of solvent in the solution
|
|
|
|
# moles -> mass require the molecular weight
|
|
[substance] -> [mass]: value * mw
|
|
[mass] -> [substance]: value / mw
|
|
|
|
# moles/volume -> mass/volume and moles/mass -> mass / mass
|
|
# require the molecular weight
|
|
[substance] / [volume] -> [mass] / [volume]: value * mw
|
|
[mass] / [volume] -> [substance] / [volume]: value / mw
|
|
[substance] / [mass] -> [mass] / [mass]: value * mw
|
|
[mass] / [mass] -> [substance] / [mass]: value / mw
|
|
|
|
# moles/volume -> moles requires the solution volume
|
|
[substance] / [volume] -> [substance]: value * volume
|
|
[substance] -> [substance] / [volume]: value / volume
|
|
|
|
# moles/mass -> moles requires the solvent (usually water) mass
|
|
[substance] / [mass] -> [substance]: value * solvent_mass
|
|
[substance] -> [substance] / [mass]: value / solvent_mass
|
|
|
|
# moles/mass -> moles/volume require the solvent mass and the volume
|
|
[substance] / [mass] -> [substance]/[volume]: value * solvent_mass / volume
|
|
[substance] / [volume] -> [substance] / [mass]: value / solvent_mass * volume
|
|
|
|
@end
|
|
|
|
@group Commonwealth1959
|
|
# Length
|
|
point = yard / 216 / 12 = pp = printers_point
|
|
thou = yard / 36000 = th = mil
|
|
pica = yard / 216 = P̸ = printers_pica
|
|
inch = yard / 36 = in = international_inch = inches = international_inches
|
|
foot = yard / 3 = ft = international_foot = feet = international_feet
|
|
yard = 0.9144 * metres = international_yard
|
|
chain = 22 * yard = ch
|
|
furlong = 220 * yard = fur
|
|
mile = 1760 * yard = mi = international_mile
|
|
league = 5280 * yard = lea
|
|
|
|
# Length Maritime units
|
|
fathom = 2.0266 * yards = ftm
|
|
cable = 202.66 * yards
|
|
nautical_mile = 2026.6 * yards = nmi = NM
|
|
|
|
# Area
|
|
square_foot = 1 * foot ** 2 = sq_ft = square_feet
|
|
square_yard = 1 * yard ** 2 = sq_yd
|
|
perch = 1 * rod ** 2
|
|
rood = 1210 * yards ** 2
|
|
acre = 4840 * yards ** 2
|
|
|
|
# Volume
|
|
acre_foot = acre * foot = acre_feet
|
|
board_foot = foot ** 2 * inch = FBM
|
|
@end
|
|
|
|
# https://en.wikipedia.org/wiki/Imperial_and_US_customary_measurement_systems
|
|
@group Avoirdupois
|
|
# Mass and weight
|
|
grain = 1 / 7000 pound = gr
|
|
drachm = 1 / 256 pound = dr = avoirdupois_dram
|
|
ounce = 1 /16 pound = oz = avoirdupois_ounce
|
|
# By definition
|
|
pound = 453.59237 * gram = lb = avoirdupois_pound
|
|
stone = 14 * pound = st
|
|
quarter = 28 * pound = qr = qtr
|
|
@end
|
|
|
|
@group AvoirdupoisUS using Avoirdupois
|
|
US_hundredweight = 100 * pound = US_cwt = short_hundredweight
|
|
US_ton = 2000 * pound = short_ton
|
|
@end
|
|
|
|
@group AvoirdupoisUK using Avoirdupois
|
|
cental = 100 * pound
|
|
hundredweight = 112 * pound = cwt = long_hundredweight
|
|
ton = 2240 * pound = long_tone
|
|
@end
|
|
|
|
# https://en.wikipedia.org/wiki/Imperial_and_US_customary_measurement_systems
|
|
@group Troy
|
|
pennyweight = 24 * gram = dwt
|
|
troy_ounce = 480 * grain = toz = apounce = apothecary_ounce
|
|
troy_pound = 12 * toz = tlb = appound = apothecary_pound
|
|
@end
|
|
|
|
# https://en.wikipedia.org/wiki/United_States_customary_units
|
|
@group US using Commonwealth1959
|
|
|
|
# Gunter' survey units
|
|
link = 7.92 * inches
|
|
rod = 25 * link
|
|
|
|
# survey
|
|
square_rod = 2721*.25 foot ** 2
|
|
survey_foot = 1200 / 3937 m = sft
|
|
survey_mile = 8 * furlong
|
|
|
|
# Volume
|
|
fluid_dram = floz / 8 = fldr = fluidram
|
|
teaspoon = tablespoon / 3 = tsp
|
|
tablespoon = floz / 2 = tbsp = Tbsp = Tblsp = tblsp = tbs = Tbl
|
|
fluid_ounce = 1/20 * pint = floz = US_fluid_ounce = US_liquid_ounce
|
|
shot = 3 * tablespoon = jig
|
|
gill = 4 * fluid_ounce = gi = liquid_gill = US_liquid_gill
|
|
cup = 8 * fluid_ounce = cp = liquid_cup = US_liquid_cup
|
|
pint = 473.176473 * milliliter = pt = liquid_pint = US_pint
|
|
quart = 32 * fluid_ounce = qt = liquid_quart = US_liquid_quart
|
|
gallon = 128 * fluid_ounce = gal = liquid_gallon = US_liquid_gallon
|
|
barrel = 31.5 * gallon = bbl
|
|
oil_barrel = 42 * gallon = oil_bbl
|
|
beer_barrel = 31 * gallon = beer_bbl
|
|
hogshead = 63 * gallon
|
|
|
|
# Dry Volume
|
|
dry_pint = 33.60 * inch ** 3 = dpt = US_dry_pit
|
|
dry_quart = 2 * dry_pint = dqt = US_dry_quart
|
|
dry_gallon = 8 * dry_pint = dgal = US_dry_gallon
|
|
peck = 16 * dry_pint = pk
|
|
dry_barrel = 7065 * inch ** 3 = US_dry_barrel
|
|
|
|
# gravitational
|
|
slug = 14.59390 * kilogram
|
|
@end
|
|
|
|
# See https://en.wikipedia.org/wiki/Imperial_units
|
|
@group imperial using Commonwealth1959
|
|
|
|
# Volume
|
|
imperial_fluid_ounce = 1/20 * imperial_pint = imperial_floz = UK_fluid_ounce
|
|
imperial_gill = 1/4 * imperial_pint = imperial_gi = UK_gill
|
|
imperial_cup = imperial_pint / 2 = imperial_cp = UK_cup
|
|
imperial_pint = 568.26125 * milliliter = imperial_pt = UK_pint
|
|
imperial_quart = 2 * imperial_pint = imperial_qt = UK_quart
|
|
imperial_gallon = 8 * imperial_pint = imperial_gal = UK_gallon
|
|
imperial_bushel = 64 * imperial_pint = imperial_bu = UK_bushel
|
|
imperial_barrel = 288 * imperial_pint = imperial_bbl = UK_bbl
|
|
@end
|
|
|
|
@system mks using international
|
|
meter
|
|
kilogram
|
|
second
|
|
@end
|
|
|
|
@system cgs using international
|
|
centimeter
|
|
gram
|
|
second
|
|
@end
|
|
|
|
@system imperial using imperial
|
|
yard
|
|
pound
|
|
@end
|
|
|
|
@system US using US
|
|
yard
|
|
pound
|
|
@end
|