Debian Codegraph @

examples/pint/files/default_en.txt

raw
1 # Default Pint units definition file
2 # Based on the International System of Units
3 # Language: english
4 # :copyright: 2013,2019 by Pint Authors, see AUTHORS for more details.
5
6 # Syntax
7 # ======
8 # Units
9 # -----
10 # <canonical name> = <relation to another unit or dimension> [= <symbol>] [= <alias>] [ = <alias> ] [...]
11 #
12 # The canonical name and aliases should be expressed in singular form.
13 # Pint automatically deals with plurals built by adding 's' to the singular form; plural
14 # forms that don't follow this rule should be instead explicitly listed as aliases.
15 #
16 # If a unit has no symbol and one wants to define aliases, then the symbol should be
17 # conventionally set to _.
18 #
19 # Example:
20 # millennium = 1e3 * year = _ = millennia
21 #
22 #
23 # Prefixes
24 # --------
25 # <prefix>- = <amount> [= <symbol>] [= <alias>] [ = <alias> ] [...]
26 #
27 # Example:
28 # deca- = 1e+1 = da- = deka-
29 #
30 #
31 # Derived dimensions
32 # ------------------
33 # [dimension name] = <relation to other dimensions>
34 #
35 # Example:
36 # [density] = [mass] / [volume]
37 #
38 # Note that primary dimensions don't need to be declared; they can be
39 # defined for the first time in a unit definition.
40 # E.g. see below `meter = [length]`
41 #
42 #
43 # Additional aliases
44 # ------------------
45 # @alias <canonical name or previous alias> = <alias> [ = <alias> ] [...]
46 #
47 # Used to add aliases to already existing unit definitions.
48 # Particularly useful when one wants to enrich definitions
49 # from defaults_en.txt with custom aliases.
50 #
51 # Example:
52 # @alias meter = my_meter
53
54 # See also: https://pint.readthedocs.io/en/latest/defining.html
55
56 @defaults
57 group = international
58 system = mks
59 @end
60
61
62 #### PREFIXES ####
63
64 # decimal prefixes
65 yocto- = 1e-24 = y-
66 zepto- = 1e-21 = z-
67 atto- = 1e-18 = a-
68 femto- = 1e-15 = f-
69 pico- = 1e-12 = p-
70 nano- = 1e-9 = n-
71 micro- = 1e-6 = µ- = u-
72 milli- = 1e-3 = m-
73 centi- = 1e-2 = c-
74 deci- = 1e-1 = d-
75 deca- = 1e+1 = da- = deka-
76 hecto- = 1e2 = h-
77 kilo- = 1e3 = k-
78 mega- = 1e6 = M-
79 giga- = 1e9 = G-
80 tera- = 1e12 = T-
81 peta- = 1e15 = P-
82 exa- = 1e18 = E-
83 zetta- = 1e21 = Z-
84 yotta- = 1e24 = Y-
85
86 # binary_prefixes
87 kibi- = 2**10 = Ki-
88 mebi- = 2**20 = Mi-
89 gibi- = 2**30 = Gi-
90 tebi- = 2**40 = Ti-
91 pebi- = 2**50 = Pi-
92 exbi- = 2**60 = Ei-
93 zebi- = 2**70 = Zi-
94 yobi- = 2**80 = Yi-
95
96 # extra_prefixes
97 semi- = 0.5 = _ = demi-
98 sesqui- = 1.5
99
100
101 #### BASE UNITS ####
102
103 meter = [length] = m = metre
104 second = [time] = s = sec
105 ampere = [current] = A = amp
106 candela = [luminosity] = cd = candle
107 gram = [mass] = g
108 mole = [substance] = mol
109 kelvin = [temperature]; offset: 0 = K = degK = °K = degree_Kelvin = degreeK # older names supported for compatibility
110 radian = [] = rad
111 bit = []
112 count = []
113
114
115 #### CONSTANTS ####
116
117 @import constants_en.txt
118
119
120 #### UNITS ####
121 # Common and less common, grouped by quantity.
122 # Conversion factors are exact (except when noted),
123 # although floating-point conversion may introduce inaccuracies
124
125 # Angle
126 turn = 2 * π * radian = _ = revolution = cycle = circle
127 degree = π / 180 * radian = deg = arcdeg = arcdegree = angular_degree
128 arcminute = degree / 60 = arcmin = arc_minute = angular_minute
129 arcsecond = arcminute / 60 = arcsec = arc_second = angular_second
130 milliarcsecond = 1e-3 * arcsecond = mas
131 grade = π / 200 * radian = grad = gon
132 mil = π / 32000 * radian
133
134 # Solid angle
135 steradian = radian ** 2 = sr
136 square_degree = (π / 180) ** 2 * sr = sq_deg = sqdeg
137
138 # Information
139 baud = bit / second = Bd = bps
140
141 byte = 8 * bit = B = octet
142 # byte = 8 * bit = _ = octet
143 ## NOTE: B (byte) symbol can conflict with Bell
144
145 # Length
146 angstrom = 1e-10 * meter = Å = ångström = Å
147 micron = micrometer = µ
148 fermi = femtometer = fm
149 light_year = speed_of_light * julian_year = ly = lightyear
150 astronomical_unit = 149597870700 * meter = au # since Aug 2012
151 parsec = 1 / tansec * astronomical_unit = pc
152 nautical_mile = 1852 * meter = nmi
153 bohr = hbar / (alpha * m_e * c) = a_0 = a0 = bohr_radius = atomic_unit_of_length = a_u_length
154 x_unit_Cu = K_alpha_Cu_d_220 * d_220 / 1537.4 = Xu_Cu
155 x_unit_Mo = K_alpha_Mo_d_220 * d_220 / 707.831 = Xu_Mo
156 angstrom_star = K_alpha_W_d_220 * d_220 / 0.2090100 = Å_star
157 planck_length = (hbar * gravitational_constant / c ** 3) ** 0.5
158
159 # Mass
160 metric_ton = 1e3 * kilogram = t = tonne
161 unified_atomic_mass_unit = atomic_mass_constant = u = amu
162 dalton = atomic_mass_constant = Da
163 grain = 64.79891 * milligram = gr
164 gamma_mass = microgram
165 carat = 200 * milligram = ct = karat
166 planck_mass = (hbar * c / gravitational_constant) ** 0.5
167
168 # Time
169 minute = 60 * second = min
170 hour = 60 * minute = h = hr
171 day = 24 * hour = d
172 week = 7 * day
173 fortnight = 2 * week
174 year = 365.25 * day = a = yr = julian_year
175 month = year / 12
176
177 # decade = 10 * year
178 ## NOTE: decade [time] can conflict with decade [dimensionless]
179
180 century = 100 * year = _ = centuries
181 millennium = 1e3 * year = _ = millennia
182 eon = 1e9 * year
183 shake = 1e-8 * second
184 svedberg = 1e-13 * second
185 atomic_unit_of_time = hbar / E_h = a_u_time
186 gregorian_year = 365.2425 * day
187 sidereal_year = 365.256363004 * day # approximate, as of J2000 epoch
188 tropical_year = 365.242190402 * day # approximate, as of J2000 epoch
189 common_year = 365 * day
190 leap_year = 366 * day
191 sidereal_day = day / 1.00273790935079524 # approximate
192 sidereal_month = 27.32166155 * day # approximate
193 tropical_month = 27.321582 * day # approximate
194 synodic_month = 29.530589 * day = _ = lunar_month # approximate
195 planck_time = (hbar * gravitational_constant / c ** 5) ** 0.5
196
197 # Temperature
198 degree_Celsius = kelvin; offset: 273.15 = °C = celsius = degC = degreeC
199 degree_Rankine = 5 / 9 * kelvin; offset: 0 = °R = rankine = degR = degreeR
200 degree_Fahrenheit = 5 / 9 * kelvin; offset: 233.15 + 200 / 9 = °F = fahrenheit = degF = degreeF
201 degree_Reaumur = 4 / 5 * kelvin; offset: 273.15 = °Re = reaumur = degRe = degreeRe = degree_Réaumur = réaumur
202 atomic_unit_of_temperature = E_h / k = a_u_temp
203 planck_temperature = (hbar * c ** 5 / gravitational_constant / k ** 2) ** 0.5
204
205 # Area
206 [area] = [length] ** 2
207 are = 100 * meter ** 2
208 barn = 1e-28 * meter ** 2 = b
209 darcy = centipoise * centimeter ** 2 / (second * atmosphere)
210 hectare = 100 * are = ha
211
212 # Volume
213 [volume] = [length] ** 3
214 liter = decimeter ** 3 = l = L = litre
215 cubic_centimeter = centimeter ** 3 = cc
216 lambda = microliter = λ
217 stere = meter ** 3
218
219 # Frequency
220 [frequency] = 1 / [time]
221 hertz = 1 / second = Hz
222 revolutions_per_minute = revolution / minute = rpm
223 revolutions_per_second = revolution / second = rps
224 counts_per_second = count / second = cps
225
226 # Wavenumber
227 [wavenumber] = 1 / [length]
228 reciprocal_centimeter = 1 / cm = cm_1 = kayser
229
230 # Velocity
231 [velocity] = [length] / [time] = [speed]
232 knot = nautical_mile / hour = kt = knot_international = international_knot
233 mile_per_hour = mile / hour = mph = MPH
234 kilometer_per_hour = kilometer / hour = kph = KPH
235 kilometer_per_second = kilometer / second = kps
236 meter_per_second = meter / second = mps
237 foot_per_second = foot / second = fps
238
239 # Volumetric Flow Rate
240 [volumetric_flow_rate] = [volume] / [time]
241 sverdrup = 1e6 * meter ** 3 / second = sv
242
243 # Acceleration
244 [acceleration] = [velocity] / [time]
245 galileo = centimeter / second ** 2 = Gal
246
247 # Force
248 [force] = [mass] * [acceleration]
249 newton = kilogram * meter / second ** 2 = N
250 dyne = gram * centimeter / second ** 2 = dyn
251 force_kilogram = g_0 * kilogram = kgf = kilogram_force = pond
252 force_gram = g_0 * gram = gf = gram_force
253 force_metric_ton = g_0 * metric_ton = tf = metric_ton_force = force_t = t_force
254 atomic_unit_of_force = E_h / a_0 = a_u_force
255
256 # Energy
257 [energy] = [force] * [length]
258 joule = newton * meter = J
259 erg = dyne * centimeter
260 watt_hour = watt * hour = Wh = watthour
261 electron_volt = e * volt = eV
262 rydberg = ℎ * c * R_inf = Ry
263 hartree = 2 * rydberg = E_h = Eh = hartree_energy = atomic_unit_of_energy = a_u_energy
264 calorie = 4.184 * joule = cal = thermochemical_calorie = cal_th
265 international_calorie = 4.1868 * joule = cal_it = international_steam_table_calorie
266 fifteen_degree_calorie = 4.1855 * joule = cal_15
267 british_thermal_unit = 1055.056 * joule = Btu = BTU = Btu_iso
268 international_british_thermal_unit = 1e3 * pound / kilogram * degR / kelvin * international_calorie = Btu_it
269 thermochemical_british_thermal_unit = 1e3 * pound / kilogram * degR / kelvin * calorie = Btu_th
270 quadrillion_Btu = 1e15 * Btu = quad
271 therm = 1e5 * Btu = thm = EC_therm
272 US_therm = 1.054804e8 * joule # approximate, no exact definition
273 ton_TNT = 1e9 * calorie = tTNT
274 tonne_of_oil_equivalent = 1e10 * international_calorie = toe
275 atmosphere_liter = atmosphere * liter = atm_l
276
277 # Power
278 [power] = [energy] / [time]
279 watt = joule / second = W
280 volt_ampere = volt * ampere = VA
281 horsepower = 550 * foot * force_pound / second = hp = UK_horsepower = hydraulic_horsepower
282 boiler_horsepower = 33475 * Btu / hour # unclear which Btu
283 metric_horsepower = 75 * force_kilogram * meter / second
284 electrical_horsepower = 746 * watt
285 refrigeration_ton = 12e3 * Btu / hour = _ = ton_of_refrigeration # approximate, no exact definition
286 cooling_tower_ton = 1.25 * refrigeration_ton # approximate, no exact definition
287 standard_liter_per_minute = atmosphere * liter / minute = slpm = slm
288 conventional_watt_90 = K_J90 ** 2 * R_K90 / (K_J ** 2 * R_K) * watt = W_90
289
290 # Momentum
291 [momentum] = [length] * [mass] / [time]
292
293 # Density (as auxiliary for pressure)
294 [density] = [mass] / [volume]
295 mercury = 13.5951 * kilogram / liter = Hg = Hg_0C = Hg_32F = conventional_mercury
296 water = 1.0 * kilogram / liter = H2O = conventional_water
297 mercury_60F = 13.5568 * kilogram / liter = Hg_60F # approximate
298 water_39F = 0.999972 * kilogram / liter = water_4C # approximate
299 water_60F = 0.999001 * kilogram / liter # approximate
300
301 # Pressure
302 [pressure] = [force] / [area]
303 pascal = newton / meter ** 2 = Pa
304 barye = dyne / centimeter ** 2 = Ba = barie = barad = barrie = baryd
305 bar = 1e5 * pascal
306 technical_atmosphere = kilogram * g_0 / centimeter ** 2 = at
307 torr = atm / 760
308 pound_force_per_square_inch = force_pound / inch ** 2 = psi
309 kip_per_square_inch = kip / inch ** 2 = ksi
310 millimeter_Hg = millimeter * Hg * g_0 = mmHg = mm_Hg = millimeter_Hg_0C
311 centimeter_Hg = centimeter * Hg * g_0 = cmHg = cm_Hg = centimeter_Hg_0C
312 inch_Hg = inch * Hg * g_0 = inHg = in_Hg = inch_Hg_32F
313 inch_Hg_60F = inch * Hg_60F * g_0
314 inch_H2O_39F = inch * water_39F * g_0
315 inch_H2O_60F = inch * water_60F * g_0
316 foot_H2O = foot * water * g_0 = ftH2O = feet_H2O
317 centimeter_H2O = centimeter * water * g_0 = cmH2O = cm_H2O
318 sound_pressure_level = 20e-6 * pascal = SPL
319
320 # Torque
321 [torque] = [force] * [length]
322 foot_pound = foot * force_pound = ft_lb = footpound
323
324 # Viscosity
325 [viscosity] = [pressure] * [time]
326 poise = 0.1 * Pa * second = P
327 reyn = psi * second
328
329 # Kinematic viscosity
330 [kinematic_viscosity] = [area] / [time]
331 stokes = centimeter ** 2 / second = St
332
333 # Fluidity
334 [fluidity] = 1 / [viscosity]
335 rhe = 1 / poise
336
337 # Amount of substance
338 particle = 1 / N_A = _ = molec = molecule
339
340 # Concentration
341 [concentration] = [substance] / [volume]
342 molar = mole / liter = M
343
344 # Catalytic activity
345 [activity] = [substance] / [time]
346 katal = mole / second = kat
347 enzyme_unit = micromole / minute = U = enzymeunit
348
349 # Entropy
350 [entropy] = [energy] / [temperature]
351 clausius = calorie / kelvin = Cl
352
353 # Molar entropy
354 [molar_entropy] = [entropy] / [substance]
355 entropy_unit = calorie / kelvin / mole = eu
356
357 # Radiation
358 becquerel = counts_per_second = Bq
359 curie = 3.7e10 * becquerel = Ci
360 rutherford = 1e6 * becquerel = Rd
361 gray = joule / kilogram = Gy
362 sievert = joule / kilogram = Sv
363 rads = 0.01 * gray
364 rem = 0.01 * sievert
365 roentgen = 2.58e-4 * coulomb / kilogram = _ = röntgen # approximate, depends on medium
366
367 # Heat transimission
368 [heat_transmission] = [energy] / [area]
369 peak_sun_hour = 1e3 * watt_hour / meter ** 2 = PSH
370 langley = thermochemical_calorie / centimeter ** 2 = Ly
371
372 # Luminance
373 [luminance] = [luminosity] / [area]
374 nit = candela / meter ** 2
375 stilb = candela / centimeter ** 2
376 lambert = 1 / π * candela / centimeter ** 2
377
378 # Luminous flux
379 [luminous_flux] = [luminosity]
380 lumen = candela * steradian = lm
381
382 # Illuminance
383 [illuminance] = [luminous_flux] / [area]
384 lux = lumen / meter ** 2 = lx
385
386 # Intensity
387 [intensity] = [power] / [area]
388 atomic_unit_of_intensity = 0.5 * ε_0 * c * atomic_unit_of_electric_field ** 2 = a_u_intensity
389
390 # Current
391 biot = 10 * ampere = Bi
392 abampere = biot = abA
393 atomic_unit_of_current = e / atomic_unit_of_time = a_u_current
394 mean_international_ampere = mean_international_volt / mean_international_ohm = A_it
395 US_international_ampere = US_international_volt / US_international_ohm = A_US
396 conventional_ampere_90 = K_J90 * R_K90 / (K_J * R_K) * ampere = A_90
397 planck_current = (c ** 6 / gravitational_constant / k_C) ** 0.5
398
399 # Charge
400 [charge] = [current] * [time]
401 coulomb = ampere * second = C
402 abcoulomb = 10 * C = abC
403 faraday = e * N_A * mole
404 conventional_coulomb_90 = K_J90 * R_K90 / (K_J * R_K) * coulomb = C_90
405 ampere_hour = ampere * hour = Ah
406
407 # Electric potential
408 [electric_potential] = [energy] / [charge]
409 volt = joule / coulomb = V
410 abvolt = 1e-8 * volt = abV
411 mean_international_volt = 1.00034 * volt = V_it # approximate
412 US_international_volt = 1.00033 * volt = V_US # approximate
413 conventional_volt_90 = K_J90 / K_J * volt = V_90
414
415 # Electric field
416 [electric_field] = [electric_potential] / [length]
417 atomic_unit_of_electric_field = e * k_C / a_0 ** 2 = a_u_electric_field
418
419 # Electric displacement field
420 [electric_displacement_field] = [charge] / [area]
421
422 # Resistance
423 [resistance] = [electric_potential] / [current]
424 ohm = volt / ampere = Ω
425 abohm = 1e-9 * ohm = abΩ
426 mean_international_ohm = 1.00049 * ohm = Ω_it = ohm_it # approximate
427 US_international_ohm = 1.000495 * ohm = Ω_US = ohm_US # approximate
428 conventional_ohm_90 = R_K / R_K90 * ohm = Ω_90 = ohm_90
429
430 # Resistivity
431 [resistivity] = [resistance] * [length]
432
433 # Conductance
434 [conductance] = [current] / [electric_potential]
435 siemens = ampere / volt = S = mho
436 absiemens = 1e9 * siemens = abS = abmho
437
438 # Capacitance
439 [capacitance] = [charge] / [electric_potential]
440 farad = coulomb / volt = F
441 abfarad = 1e9 * farad = abF
442 conventional_farad_90 = R_K90 / R_K * farad = F_90
443
444 # Inductance
445 [inductance] = [magnetic_flux] / [current]
446 henry = weber / ampere = H
447 abhenry = 1e-9 * henry = abH
448 conventional_henry_90 = R_K / R_K90 * henry = H_90
449
450 # Magnetic flux
451 [magnetic_flux] = [electric_potential] * [time]
452 weber = volt * second = Wb
453 unit_pole = µ_0 * biot * centimeter
454
455 # Magnetic field
456 [magnetic_field] = [magnetic_flux] / [area]
457 tesla = weber / meter ** 2 = T
458 gamma = 1e-9 * tesla = γ
459
460 # Magnetomotive force
461 [magnetomotive_force] = [current]
462 ampere_turn = ampere = At
463 biot_turn = biot
464 gilbert = 1 / (4 * π) * biot_turn = Gb
465
466 # Magnetic field strength
467 [magnetic_field_strength] = [current] / [length]
468
469 # Electric dipole moment
470 [electric_dipole] = [charge] * [length]
471 debye = 1e-9 / ζ * coulomb * angstrom = D # formally 1 D = 1e-10 Fr*Å, but we generally want to use it outside the Gaussian context
472
473 # Electric quadrupole moment
474 [electric_quadrupole] = [charge] * [area]
475 buckingham = debye * angstrom
476
477 # Magnetic dipole moment
478 [magnetic_dipole] = [current] * [area]
479 bohr_magneton = e * hbar / (2 * m_e) = µ_B = mu_B
480 nuclear_magneton = e * hbar / (2 * m_p) = µ_N = mu_N
481
482 # Logaritmic Unit Definition
483 # Unit = scale; logbase; logfactor
484 # x_dB = [logfactor] * log( x_lin / [scale] ) / log( [logbase] )
485
486 # Logaritmic Units of dimensionless quantity: [ https://en.wikipedia.org/wiki/Level_(logarithmic_quantity) ]
487
488 decibelmilliwatt = 1e-3 watt; logbase: 10; logfactor: 10 = dBm
489 decibelmicrowatt = 1e-6 watt; logbase: 10; logfactor: 10 = dBu
490
491 decibel = 1 ; logbase: 10; logfactor: 10 = dB
492 # bell = 1 ; logbase: 10; logfactor: = B
493 ## NOTE: B (Bell) symbol conflicts with byte
494
495 decade = 1 ; logbase: 10; logfactor: 1
496 ## NOTE: decade [time] can conflict with decade [dimensionless]
497
498 octave = 1 ; logbase: 2; logfactor: 1 = oct
499
500 neper = 1 ; logbase: 2.71828182845904523536028747135266249775724709369995; logfactor: 0.5 = Np
501 # neper = 1 ; logbase: eulers_number; logfactor: 0.5 = Np
502
503 #### UNIT GROUPS ####
504 # Mostly for length, area, volume, mass, force
505 # (customary or specialized units)
506
507 @group USCSLengthInternational
508 thou = 1e-3 * inch = th = mil_length
509 inch = yard / 36 = in = international_inch = inches = international_inches
510 hand = 4 * inch
511 foot = yard / 3 = ft = international_foot = feet = international_feet
512 yard = 0.9144 * meter = yd = international_yard # since Jul 1959
513 mile = 1760 * yard = mi = international_mile
514
515 circular_mil = π / 4 * mil_length ** 2 = cmil
516 square_inch = inch ** 2 = sq_in = square_inches
517 square_foot = foot ** 2 = sq_ft = square_feet
518 square_yard = yard ** 2 = sq_yd
519 square_mile = mile ** 2 = sq_mi
520
521 cubic_inch = in ** 3 = cu_in
522 cubic_foot = ft ** 3 = cu_ft = cubic_feet
523 cubic_yard = yd ** 3 = cu_yd
524 @end
525
526 @group USCSLengthSurvey
527 link = 1e-2 * chain = li = survey_link
528 survey_foot = 1200 / 3937 * meter = sft
529 fathom = 6 * survey_foot
530 rod = 16.5 * survey_foot = rd = pole = perch
531 chain = 4 * rod
532 furlong = 40 * rod = fur
533 cables_length = 120 * fathom
534 survey_mile = 5280 * survey_foot = smi = us_statute_mile
535 league = 3 * survey_mile
536
537 square_rod = rod ** 2 = sq_rod = sq_pole = sq_perch
538 acre = 10 * chain ** 2
539 square_survey_mile = survey_mile ** 2 = _ = section
540 square_league = league ** 2
541
542 acre_foot = acre * survey_foot = _ = acre_feet
543 @end
544
545 @group USCSDryVolume
546 dry_pint = bushel / 64 = dpi = US_dry_pint
547 dry_quart = bushel / 32 = dqt = US_dry_quart
548 dry_gallon = bushel / 8 = dgal = US_dry_gallon
549 peck = bushel / 4 = pk
550 bushel = 2150.42 cubic_inch = bu
551 dry_barrel = 7056 cubic_inch = _ = US_dry_barrel
552 board_foot = ft * ft * in = FBM = board_feet = BF = BDFT = super_foot = superficial_foot = super_feet = superficial_feet
553 @end
554
555 @group USCSLiquidVolume
556 minim = pint / 7680
557 fluid_dram = pint / 128 = fldr = fluidram = US_fluid_dram = US_liquid_dram
558 fluid_ounce = pint / 16 = floz = US_fluid_ounce = US_liquid_ounce
559 gill = pint / 4 = gi = liquid_gill = US_liquid_gill
560 pint = quart / 2 = pt = liquid_pint = US_pint
561 fifth = gallon / 5 = _ = US_liquid_fifth
562 quart = gallon / 4 = qt = liquid_quart = US_liquid_quart
563 gallon = 231 * cubic_inch = gal = liquid_gallon = US_liquid_gallon
564 @end
565
566 @group USCSVolumeOther
567 teaspoon = fluid_ounce / 6 = tsp
568 tablespoon = fluid_ounce / 2 = tbsp
569 shot = 3 * tablespoon = jig = US_shot
570 cup = pint / 2 = cp = liquid_cup = US_liquid_cup
571 barrel = 31.5 * gallon = bbl
572 oil_barrel = 42 * gallon = oil_bbl
573 beer_barrel = 31 * gallon = beer_bbl
574 hogshead = 63 * gallon
575 @end
576
577 @group Avoirdupois
578 dram = pound / 256 = dr = avoirdupois_dram = avdp_dram = drachm
579 ounce = pound / 16 = oz = avoirdupois_ounce = avdp_ounce
580 pound = 7e3 * grain = lb = avoirdupois_pound = avdp_pound
581 stone = 14 * pound
582 quarter = 28 * stone
583 bag = 94 * pound
584 hundredweight = 100 * pound = cwt = short_hundredweight
585 long_hundredweight = 112 * pound
586 ton = 2e3 * pound = _ = short_ton
587 long_ton = 2240 * pound
588 slug = g_0 * pound * second ** 2 / foot
589 slinch = g_0 * pound * second ** 2 / inch = blob = slugette
590
591 force_ounce = g_0 * ounce = ozf = ounce_force
592 force_pound = g_0 * pound = lbf = pound_force
593 force_ton = g_0 * ton = _ = ton_force = force_short_ton = short_ton_force
594 force_long_ton = g_0 * long_ton = _ = long_ton_force
595 kip = 1e3 * force_pound
596 poundal = pound * foot / second ** 2 = pdl
597 @end
598
599 @group AvoirdupoisUK using Avoirdupois
600 UK_hundredweight = long_hundredweight = UK_cwt
601 UK_ton = long_ton
602 UK_force_ton = force_long_ton = _ = UK_ton_force
603 @end
604
605 @group AvoirdupoisUS using Avoirdupois
606 US_hundredweight = hundredweight = US_cwt
607 US_ton = ton
608 US_force_ton = force_ton = _ = US_ton_force
609 @end
610
611 @group Troy
612 pennyweight = 24 * grain = dwt
613 troy_ounce = 480 * grain = toz = ozt
614 troy_pound = 12 * troy_ounce = tlb = lbt
615 @end
616
617 @group Apothecary
618 scruple = 20 * grain
619 apothecary_dram = 3 * scruple = ap_dr
620 apothecary_ounce = 8 * apothecary_dram = ap_oz
621 apothecary_pound = 12 * apothecary_ounce = ap_lb
622 @end
623
624 @group ImperialVolume
625 imperial_minim = imperial_fluid_ounce / 480
626 imperial_fluid_scruple = imperial_fluid_ounce / 24
627 imperial_fluid_drachm = imperial_fluid_ounce / 8 = imperial_fldr = imperial_fluid_dram
628 imperial_fluid_ounce = imperial_pint / 20 = imperial_floz = UK_fluid_ounce
629 imperial_gill = imperial_pint / 4 = imperial_gi = UK_gill
630 imperial_cup = imperial_pint / 2 = imperial_cp = UK_cup
631 imperial_pint = imperial_gallon / 8 = imperial_pt = UK_pint
632 imperial_quart = imperial_gallon / 4 = imperial_qt = UK_quart
633 imperial_gallon = 4.54609 * liter = imperial_gal = UK_gallon
634 imperial_peck = 2 * imperial_gallon = imperial_pk = UK_pk
635 imperial_bushel = 8 * imperial_gallon = imperial_bu = UK_bushel
636 imperial_barrel = 36 * imperial_gallon = imperial_bbl = UK_bbl
637 @end
638
639 @group Printer
640 pica = inch / 6 = _ = printers_pica
641 point = pica / 12 = pp = printers_point = big_point = bp
642 didot = 1 / 2660 * m
643 cicero = 12 * didot
644 tex_point = inch / 72.27
645 tex_pica = 12 * tex_point
646 tex_didot = 1238 / 1157 * tex_point
647 tex_cicero = 12 * tex_didot
648 scaled_point = tex_point / 65536
649 css_pixel = inch / 96 = px
650
651 pixel = [printing_unit] = _ = dot = pel = picture_element
652 pixels_per_centimeter = pixel / cm = PPCM
653 pixels_per_inch = pixel / inch = dots_per_inch = PPI = ppi = DPI = printers_dpi
654 bits_per_pixel = bit / pixel = bpp
655 @end
656
657 @group Textile
658 tex = gram / kilometer = Tt
659 dtex = decitex
660 denier = gram / (9 * kilometer) = den = Td
661 jute = pound / (14400 * yard) = Tj
662 aberdeen = jute = Ta
663 RKM = gf / tex
664
665 number_english = 840 * yard / pound = Ne = NeC = ECC
666 number_meter = kilometer / kilogram = Nm
667 @end
668
669
670 #### CGS ELECTROMAGNETIC UNITS ####
671
672 # === Gaussian system of units ===
673 @group Gaussian
674 franklin = erg ** 0.5 * centimeter ** 0.5 = Fr = statcoulomb = statC = esu
675 statvolt = erg / franklin = statV
676 statampere = franklin / second = statA
677 gauss = dyne / franklin = G
678 maxwell = gauss * centimeter ** 2 = Mx
679 oersted = dyne / maxwell = Oe = ørsted
680 statohm = statvolt / statampere = statΩ
681 statfarad = franklin / statvolt = statF
682 statmho = statampere / statvolt
683 @end
684 # Note this system is not commensurate with SI, as ε_0 and µ_0 disappear;
685 # some quantities with different dimensions in SI have the same
686 # dimensions in the Gaussian system (e.g. [Mx] = [Fr], but [Wb] != [C]),
687 # and therefore the conversion factors depend on the context (not in pint sense)
688 [gaussian_charge] = [length] ** 1.5 * [mass] ** 0.5 / [time]
689 [gaussian_current] = [gaussian_charge] / [time]
690 [gaussian_electric_potential] = [gaussian_charge] / [length]
691 [gaussian_electric_field] = [gaussian_electric_potential] / [length]
692 [gaussian_electric_displacement_field] = [gaussian_charge] / [area]
693 [gaussian_electric_flux] = [gaussian_charge]
694 [gaussian_electric_dipole] = [gaussian_charge] * [length]
695 [gaussian_electric_quadrupole] = [gaussian_charge] * [area]
696 [gaussian_magnetic_field] = [force] / [gaussian_charge]
697 [gaussian_magnetic_field_strength] = [gaussian_magnetic_field]
698 [gaussian_magnetic_flux] = [gaussian_magnetic_field] * [area]
699 [gaussian_magnetic_dipole] = [energy] / [gaussian_magnetic_field]
700 [gaussian_resistance] = [gaussian_electric_potential] / [gaussian_current]
701 [gaussian_resistivity] = [gaussian_resistance] * [length]
702 [gaussian_capacitance] = [gaussian_charge] / [gaussian_electric_potential]
703 [gaussian_inductance] = [gaussian_electric_potential] * [time] / [gaussian_current]
704 [gaussian_conductance] = [gaussian_current] / [gaussian_electric_potential]
705 @context Gaussian = Gau
706 [gaussian_charge] -> [charge]: value / k_C ** 0.5
707 [charge] -> [gaussian_charge]: value * k_C ** 0.5
708 [gaussian_current] -> [current]: value / k_C ** 0.5
709 [current] -> [gaussian_current]: value * k_C ** 0.5
710 [gaussian_electric_potential] -> [electric_potential]: value * k_C ** 0.5
711 [electric_potential] -> [gaussian_electric_potential]: value / k_C ** 0.5
712 [gaussian_electric_field] -> [electric_field]: value * k_C ** 0.5
713 [electric_field] -> [gaussian_electric_field]: value / k_C ** 0.5
714 [gaussian_electric_displacement_field] -> [electric_displacement_field]: value / (4 * π / ε_0) ** 0.5
715 [electric_displacement_field] -> [gaussian_electric_displacement_field]: value * (4 * π / ε_0) ** 0.5
716 [gaussian_electric_dipole] -> [electric_dipole]: value / k_C ** 0.5
717 [electric_dipole] -> [gaussian_electric_dipole]: value * k_C ** 0.5
718 [gaussian_electric_quadrupole] -> [electric_quadrupole]: value / k_C ** 0.5
719 [electric_quadrupole] -> [gaussian_electric_quadrupole]: value * k_C ** 0.5
720 [gaussian_magnetic_field] -> [magnetic_field]: value / (4 * π / µ_0) ** 0.5
721 [magnetic_field] -> [gaussian_magnetic_field]: value * (4 * π / µ_0) ** 0.5
722 [gaussian_magnetic_flux] -> [magnetic_flux]: value / (4 * π / µ_0) ** 0.5
723 [magnetic_flux] -> [gaussian_magnetic_flux]: value * (4 * π / µ_0) ** 0.5
724 [gaussian_magnetic_field_strength] -> [magnetic_field_strength]: value / (4 * π * µ_0) ** 0.5
725 [magnetic_field_strength] -> [gaussian_magnetic_field_strength]: value * (4 * π * µ_0) ** 0.5
726 [gaussian_magnetic_dipole] -> [magnetic_dipole]: value * (4 * π / µ_0) ** 0.5
727 [magnetic_dipole] -> [gaussian_magnetic_dipole]: value / (4 * π / µ_0) ** 0.5
728 [gaussian_resistance] -> [resistance]: value * k_C
729 [resistance] -> [gaussian_resistance]: value / k_C
730 [gaussian_resistivity] -> [resistivity]: value * k_C
731 [resistivity] -> [gaussian_resistivity]: value / k_C
732 [gaussian_capacitance] -> [capacitance]: value / k_C
733 [capacitance] -> [gaussian_capacitance]: value * k_C
734 [gaussian_inductance] -> [inductance]: value * k_C
735 [inductance] -> [gaussian_inductance]: value / k_C
736 [gaussian_conductance] -> [conductance]: value / k_C
737 [conductance] -> [gaussian_conductance]: value * k_C
738 @end
739
740 # === ESU system of units ===
741 # (where different from Gaussian)
742 # See note for Gaussian system too
743 @group ESU using Gaussian
744 statweber = statvolt * second = statWb
745 stattesla = statweber / centimeter ** 2 = statT
746 stathenry = statweber / statampere = statH
747 @end
748 [esu_charge] = [length] ** 1.5 * [mass] ** 0.5 / [time]
749 [esu_current] = [esu_charge] / [time]
750 [esu_electric_potential] = [esu_charge] / [length]
751 [esu_magnetic_flux] = [esu_electric_potential] * [time]
752 [esu_magnetic_field] = [esu_magnetic_flux] / [area]
753 [esu_magnetic_field_strength] = [esu_current] / [length]
754 [esu_magnetic_dipole] = [esu_current] * [area]
755 @context ESU = esu
756 [esu_magnetic_field] -> [magnetic_field]: value * k_C ** 0.5
757 [magnetic_field] -> [esu_magnetic_field]: value / k_C ** 0.5
758 [esu_magnetic_flux] -> [magnetic_flux]: value * k_C ** 0.5
759 [magnetic_flux] -> [esu_magnetic_flux]: value / k_C ** 0.5
760 [esu_magnetic_field_strength] -> [magnetic_field_strength]: value / (4 * π / ε_0) ** 0.5
761 [magnetic_field_strength] -> [esu_magnetic_field_strength]: value * (4 * π / ε_0) ** 0.5
762 [esu_magnetic_dipole] -> [magnetic_dipole]: value / k_C ** 0.5
763 [magnetic_dipole] -> [esu_magnetic_dipole]: value * k_C ** 0.5
764 @end
765
766
767 #### CONVERSION CONTEXTS ####
768
769 @context(n=1) spectroscopy = sp
770 # n index of refraction of the medium.
771 [length] <-> [frequency]: speed_of_light / n / value
772 [frequency] -> [energy]: planck_constant * value
773 [energy] -> [frequency]: value / planck_constant
774 # allow wavenumber / kayser
775 [wavenumber] <-> [length]: 1 / value
776 @end
777
778 @context boltzmann
779 [temperature] -> [energy]: boltzmann_constant * value
780 [energy] -> [temperature]: value / boltzmann_constant
781 @end
782
783 @context energy
784 [energy] -> [energy] / [substance]: value * N_A
785 [energy] / [substance] -> [energy]: value / N_A
786 [energy] -> [mass]: value / c ** 2
787 [mass] -> [energy]: value * c ** 2
788 @end
789
790 @context(mw=0,volume=0,solvent_mass=0) chemistry = chem
791 # mw is the molecular weight of the species
792 # volume is the volume of the solution
793 # solvent_mass is the mass of solvent in the solution
794
795 # moles -> mass require the molecular weight
796 [substance] -> [mass]: value * mw
797 [mass] -> [substance]: value / mw
798
799 # moles/volume -> mass/volume and moles/mass -> mass/mass
800 # require the molecular weight
801 [substance] / [volume] -> [mass] / [volume]: value * mw
802 [mass] / [volume] -> [substance] / [volume]: value / mw
803 [substance] / [mass] -> [mass] / [mass]: value * mw
804 [mass] / [mass] -> [substance] / [mass]: value / mw
805
806 # moles/volume -> moles requires the solution volume
807 [substance] / [volume] -> [substance]: value * volume
808 [substance] -> [substance] / [volume]: value / volume
809
810 # moles/mass -> moles requires the solvent (usually water) mass
811 [substance] / [mass] -> [substance]: value * solvent_mass
812 [substance] -> [substance] / [mass]: value / solvent_mass
813
814 # moles/mass -> moles/volume require the solvent mass and the volume
815 [substance] / [mass] -> [substance]/[volume]: value * solvent_mass / volume
816 [substance] / [volume] -> [substance] / [mass]: value / solvent_mass * volume
817
818 @end
819
820 @context textile
821 # Allow switching between Direct count system (i.e. tex) and
822 # Indirect count system (i.e. Ne, Nm)
823 [mass] / [length] <-> [length] / [mass]: 1 / value
824 @end
825
826
827 #### SYSTEMS OF UNITS ####
828
829 @system SI
830 second
831 meter
832 kilogram
833 ampere
834 kelvin
835 mole
836 candela
837 @end
838
839 @system mks using international
840 meter
841 kilogram
842 second
843 @end
844
845 @system cgs using international, Gaussian, ESU
846 centimeter
847 gram
848 second
849 @end
850
851 @system atomic using international
852 # based on unit m_e, e, hbar, k_C, k
853 bohr: meter
854 electron_mass: gram
855 atomic_unit_of_time: second
856 atomic_unit_of_current: ampere
857 atomic_unit_of_temperature: kelvin
858 @end
859
860 @system Planck using international
861 # based on unit c, gravitational_constant, hbar, k_C, k
862 planck_length: meter
863 planck_mass: gram
864 planck_time: second
865 planck_current: ampere
866 planck_temperature: kelvin
867 @end
868
869 @system imperial using ImperialVolume, USCSLengthInternational, AvoirdupoisUK
870 yard
871 pound
872 @end
873
874 @system US using USCSLiquidVolume, USCSDryVolume, USCSVolumeOther, USCSLengthInternational, USCSLengthSurvey, AvoirdupoisUS
875 yard
876 pound
877 @end