-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathunits.dat
5180 lines (4617 loc) · 217 KB
/
units.dat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#
# This file is the units database for use with GNU units, a units conversion
# program by Adrian Mariano adrian@cam.cornell.edu
#
# 14 February 2010 Version 1.50
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006
# 2007, 2008, 2009, 2010
# Free Software Foundation, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301 USA
#
############################################################################
#
# Improvements and corrections are welcome.
#
# Most units data was drawn from
# 1. NIST Special Publication 811, 1995 Edition
# 2. CRC Handbook of Chemistry and Physics 70th edition
# 3. Oxford English Dictionary
# 4. Websters New Universal Unabridged Dictionary
# 5. Units of Measure by Stephen Dresner
# 6. A Dictionary of English Weights and Measures by Ronald Zupko
# 7. British Weights and Measures by Ronald Zupko
# 8. Realm of Measure by Isaac Asimov
# 9. United States standards of weights and measures, their
# creation and creators by Arthur H. Frazier.
# 10. French weights and measures before the Revolution: a
# dictionary of provincial and local units by Ronald Zupko
# 11. Weights and Measures: their ancient origins and their
# development in Great Britain up to AD 1855 by FG Skinner
# 12. The World of Measurements by H. Arthur Klein
# 13. For Good Measure by William Johnstone
# 14. NTC's Encyclopedia of International Weights and Measures
# by William Johnstone
# 15. Sizes by John Lord
# 16. Sizesaurus by Stephen Strauss
# 17. CODATA Recommended Values of Physical Constants available at
# http://physics.nist.gov/cuu/Constants/index.html
# 18. How Many? A Dictionary of Units of Measurement. Available at
# http://www.unc.edu/~rowlett/units/index.html
# 19. Numericana. http://www.numericana.com
# 20. UK history of measurement
# http://www.ukmetrication.com/history.htm
#
# Thanks to Jeff Conrad for assistance in ferreting out unit definitions.
#
###########################################################################
#
# If units you use are missing or defined incorrectly, please contact me.
#
# I added shoe size information but I'm not convinced that it's correct.
# If you know anything about shoe sizes please contact me.
#
###########################################################################
###########################################################################
# #
# Primitive units. Any unit defined to contain a '!' character is a #
# primitive unit which will not be reduced any further. All units should #
# reduce to primitive units. #
# #
###########################################################################
#
# SI units
#
kg ! # Mass of the international prototype
kilogram kg
s ! # Duration of 9192631770 periods of the radiation
second s # corresponding to the transition between the two hyperfine
# levels of the ground state of the cesium-133 atom
m ! # Length of the path traveled by light in a vacuum
meter m # during 1|299792458 seconds. Originally meant to be
# 1e-7 of the length along a meridian from the equator
# to a pole.
A ! # The current which produces a force of 2e-7 N/m between two
ampere A # infinitely long wires that are 1 meter apart
amp ampere
cd ! # Luminous intensity in a given direction of a source which
candela cd # emits monochromatic radiation at 540e12 Hz with radiant
# intensity 1|683 W/steradian. (This differs from radiant
# intensity (W/sr) in that it is adjusted for human
# perceptual dependence on wavelength. The frequency of
# 540e12 Hz (yellow) is where human perception is most
# efficient.)
mol ! # The amount of substance of a system which contains as many
mole mol # elementary entities as there are atoms in 0.012 kg of
# carbon 12. The elementary entities must be specified and
# may be atoms, molecules, ions, electrons, or other
# particles or groups of particles. It is understood that
# unbound atoms of carbon 12, at rest and in the ground
# state, are referred to.
K ! # 1|273.16 of the thermodynamic temperature of the triple
kelvin K # point of water
#
# The radian and steradian are defined as dimensionless primitive units.
# The radian is equal to m/m and the steradian to m^2/m^2 so these units are
# dimensionless. Retaining them as named units is useful because it allows
# clarity in expressions and makes the meaning of unit definitions more clear.
# These units will reduce to 1 in conversions but not for sums of units or for
# arguments to functions.
#
radian !dimensionless # The angle subtended at the center of a circle by
# an arc equal in length to the radius of the
# circle
sr !dimensionless # Solid angle which cuts off an area of the surface
steradian sr # of the sphere equal to that of a square with
# sides of length equal to the radius of the
# sphere
#
# Some primitive non-SI units
#
US$ ! # The US dollar is chosen arbitrarily to be the primitive
# unit of money.
bit ! # Basic unit of information (entropy). The entropy in bits
# of a random variable over a finite alphabet is defined
# to be the sum of -p(i)*log2(p(i)) over the alphabet where
# p(i) is the probability that the random variable takes
# on the value i.
###########################################################################
# #
# Prefixes (longer names must come first) #
# #
###########################################################################
yotta- 1e24 # Greek or Latin octo, "eight"
zetta- 1e21 # Latin septem, "seven"
exa- 1e18 # Greek hex, "six"
peta- 1e15 # Greek pente, "five"
tera- 1e12 # Greek teras, "monster"
giga- 1e9 # Greek gigas, "giant"
mega- 1e6 # Greek megas, "large"
myria- 1e4 # Not an official SI prefix
kilo- 1e3 # Greek chilioi, "thousand"
hecto- 1e2 # Greek hekaton, "hundred"
deca- 1e1 # Greek deka, "ten"
deka- deca
deci- 1e-1 # Latin decimus, "tenth"
centi- 1e-2 # Latin centum, "hundred"
milli- 1e-3 # Latin mille, "thousand"
micro- 1e-6 # Latin micro or Greek mikros, "small"
nano- 1e-9 # Latin nanus or Greek nanos, "dwarf"
pico- 1e-12 # Spanish pico, "a bit"
femto- 1e-15 # Danish-Norwegian femten, "fifteen"
atto- 1e-18 # Danish-Norwegian atten, "eighteen"
zepto- 1e-21 # Latin septem, "seven"
yocto- 1e-24 # Greek or Latin octo, "eight"
quarter- 1|4
semi- 0.5
demi- 0.5
hemi- 0.5
half- 0.5
double- 2
triple- 3
treble- 3
kibi- 2^10 # In response to the convention of illegally
mebi- 2^20 # and confusingly using metric prefixes for
gibi- 2^30 # powers of two, the International
tebi- 2^40 # Electrotechnical Commission aproved these
pebi- 2^50 # binary prefixes for use in 1998. If you
exbi- 2^60 # want to refer to "megabytes" using the
Ki- kibi # binary definition, use these prefixes.
Mi- mebi
Gi- gibi
Ti- tebi
Pi- pebi
Ei- exbi
Y- yotta
Z- zetta
E- exa
P- peta
T- tera
G- giga
M- mega
k- kilo
h- hecto
da- deka
d- deci
c- centi
m- milli
u- micro # it should be a mu but u is easy to type
n- nano
p- pico
f- femto
a- atto
z- zepto
y- yocto
#
# Names of some numbers
#
one 1
two 2
double 2
couple 2
three 3
triple 3
four 4
quadruple 4
five 5
quintuple 5
six 6
seven 7
eight 8
nine 9
ten 10
eleven 11
twelve 12
thirteen 13
fourteen 14
fifteen 15
sixteen 16
seventeen 17
eighteen 18
nineteen 19
twenty 20
thirty 30
forty 40
fifty 50
sixty 60
seventy 70
eighty 80
ninety 90
hundred 100
thousand 1000
million 1e6
# These number terms were described by N. Chuquet and De la Roche in the 16th
# century as being successive powers of a million. These definitions are still
# used in most European countries. The current US definitions for these
# numbers arose in the 17th century and don't make nearly as much sense. These
# numbers are listed in the CRC Concise Encyclopedia of Mathematics by Eric
# W. Weisstein.
shortbillion 1e9
shorttrillion 1e12
shortquadrillion 1e15
shortquintillion 1e18
shortsextillion 1e21
shortseptillion 1e24
shortoctillion 1e27
shortnonillion 1e30
shortnoventillion shortnonillion
shortdecillion 1e33
shortundecillion 1e36
shortduodecillion 1e39
shorttredecillion 1e42
shortquattuordecillion 1e45
shortquindecillion 1e48
shortsexdecillion 1e51
shortseptendecillion 1e54
shortoctodecillion 1e57
shortnovemdecillion 1e60
shortvigintillion 1e63
centillion 1e303
googol 1e100
longbillion million^2
longtrillion million^3
longquadrillion million^4
longquintillion million^5
longsextillion million^6
longseptillion million^7
longoctillion million^8
longnonillion million^9
longnoventillion longnonillion
longdecillion million^10
longundecillion million^11
longduodecillion million^12
longtredecillion million^13
longquattuordecillion million^14
longquindecillion million^15
longsexdecillion million^16
longseptdecillion million^17
longoctodecillion million^18
longnovemdecillion million^19
longvigintillion million^20
# These numbers fill the gaps left by the long system above.
milliard 1000 million
billiard 1000 million^2
trilliard 1000 million^3
quadrilliard 1000 million^4
quintilliard 1000 million^5
sextilliard 1000 million^6
septilliard 1000 million^7
octilliard 1000 million^8
nonilliard 1000 million^9
noventilliard nonilliard
decilliard 1000 million^10
# For consistency
longmilliard milliard
longbilliard billiard
longtrilliard trilliard
longquadrilliard quadrilliard
longquintilliard quintilliard
longsextilliard sextilliard
longseptilliard septilliard
longoctilliard octilliard
longnonilliard nonilliard
longnoventilliard noventilliard
longdecilliard decilliard
# The long centillion would be 1e600. The googolplex is another
# familiar large number equal to 10^googol. These numbers give overflows.
#
# The short system prevails in English speaking countries
#
billion shortbillion
trillion shorttrillion
quadrillion shortquadrillion
quintillion shortquintillion
sextillion shortsextillion
septillion shortseptillion
octillion shortoctillion
nonillion shortnonillion
noventillion shortnoventillion
decillion shortdecillion
undecillion shortundecillion
duodecillion shortduodecillion
tredecillion shorttredecillion
quattuordecillion shortquattuordecillion
quindecillion shortquindecillion
sexdecillion shortsexdecillion
septendecillion shortseptendecillion
octodecillion shortoctodecillion
novemdecillion shortnovemdecillion
vigintillion shortvigintillion
#############################################################################
# #
# Derived units which can be reduced to the primitive units #
# #
#############################################################################
#
# Named SI derived units (officially accepted)
#
newton kg m / s^2 # force
N newton
pascal N/m^2 # pressure or stress
Pa pascal
joule N m # energy
J joule
watt J/s # power
W watt
coulomb A s # charge
C coulomb
volt W/A # potential difference
V volt
ohm V/A # electrical resistance
siemens A/V # electrical conductance
S siemens
farad C/V # capacitance
F farad
weber V s # magnetic flux
Wb weber
henry Wb/A # inductance
H henry
tesla Wb/m^2 # magnetic flux density
T tesla
hertz /s # frequency
Hz hertz
#
# Dimensions. These are here to help with dimensional analysis and
# because they will appear in the list produced by hitting '?' at the
# "You want:" prompt to tell the user the dimension of the unit.
#
LENGTH meter
AREA LENGTH^2
VOLUME LENGTH^3
MASS kilogram
CURRENT ampere
AMOUNT mole
ANGLE radian
SOLID_ANGLE steradian
MONEY US$
FORCE newton
PRESSURE FORCE / AREA
STRESS FORCE / AREA
CHARGE coulomb
CAPACITANCE farad
RESISTANCE ohm
CONDUCTANCE siemens
INDUCTANCE henry
FREQUENCY hertz
VELOCITY LENGTH / TIME
ACCELERATION VELOCITY / TIME
DENSITY MASS / VOLUME
LINEAR_DENSITY MASS / LENGTH
VISCOSITY FORCE TIME / AREA
KINEMATIC_VISCOSITY VISCOSITY / DENSITY
#
# units derived easily from SI units
#
gram millikg
gm gram
g gram
tonne 1000 kg
t tonne
metricton tonne
sthene tonne m / s^2
funal sthene
pieze sthene / m^2
quintal 100 kg
bar 1e5 Pa # About 1 atm
vac millibar
micron micrometer # One millionth of a meter
bicron picometer # One brbillionth of a meter
cc cm^3
are 100 m^2
liter 1000 cc # The liter was defined in 1901 as the
oldliter 1.000028 dm^3 # space occupied by 1 kg of pure water at
l liter # the temperature of its maximum density
L liter # under a pressure of 1 atm. This was
# supposed to be 1000 cubic cm, but it
# was discovered that the original
# measurement was off. In 1964, the
# liter was redefined to be exactly 1000
# cubic centimeters.
mho siemens # Inverse of ohm, hence ohm spelled backward
galvat ampere # Named after Luigi Galvani
angstrom 1e-10 m # Convenient for describing molecular sizes
xunit 1.00202e-13 meter # Used for measuring wavelengths
siegbahn xunit # of X-rays. It is defined to be
# 1|3029.45 of the spacing of calcite
# planes at 18 degC. It was intended
# to be exactly 1e-13 m, but was
# later found to be off slightly.
fermi 1e-15 m # Convenient for describing nuclear sizes
# Nuclear radius is from 1 to 10 fermis
barn 1e-28 m^2 # Used to measure cross section for
# particle physics collision, said to
# have originated in the phrase "big as
# a barn".
shed 1e-24 barn # Defined to be a smaller companion to the
# barn, but it's too small to be of
# much use.
brewster micron^2/N # measures stress-optical coef
diopter /m # measures reciprocal of lens focal length
fresnel 1e12 Hz # occasionally used in spectroscopy
shake 1e-8 sec
svedberg 1e-13 s # Used for measuring the sedimentation
# coefficient for centrifuging.
gamma microgram # Also used for 1e-9 tesla
lambda microliter
spat 1e12 m # Rarely used for astronomical measurements
preece 1e13 ohm m # resistivity
planck J s # action of one joule over one second
sturgeon /henry # magnetic reluctance
daraf 1/farad # elastance (farad spelled backwards)
leo 10 m/s^2
poiseuille N s / m^2 # viscosity
mayer J/g K # specific heat
mired / microK # reciprocal color temperature. The name
# abbreviates micro reciprocal degree.
crocodile megavolt # used informally in UK physics labs
metricounce 25 g
mounce metricounce
finsenunit 1e5 W/m^2 # Measures intensity of ultraviolet light
# with wavelength 296.7 nm.
fluxunit 1e-26 W/m^2 Hz # Used in radio astronomy to measure
# the energy incident on the receiving
# body across a specified frequency
# bandwidth. [12]
jansky fluxunit # K. G. Jansky identified radio waves coming
Jy jansky # from outer space in 1931.
pfu / cm^2 sr s # particle flux unit -- Used to measure
# rate at which particles are received by
# a spacecraft as particles per solid
# angle per detector area per second. [18]
pyron cal_IT / cm^2 min # Measures heat flow from solar radiation,
# from Greek work "pyr" for fire.
katal mol/sec # Measure of the amount of a catalyst. One
kat katal # katal of catalyst enables the reaction
# to consume or produce on mol/sec.
#
# time
#
sec s
minute 60 s
min minute
hour 60 min
hr hour
day 24 hr
d day
da day
week 7 day
wk week
sennight 7 day
fortnight 14 day
blink 1e-5 day # Actual human blink takes 1|3 second
ce 1e-2 day
cron 1e6 years
watch 4 hours # time a sentry stands watch or a ship's
# crew is on duty.
bell 1|8 watch # Bell would be sounded every 30 minutes.
#
# angular measure
#
circle 2 pi radian
degree 1|360 circle
deg degree
arcdeg degree
arcmin 1|60 degree
arcminute arcmin
' arcmin
arcsec 1|60 arcmin
arcsecond arcsec
" arcsec
'' "
rightangle 90 degrees
quadrant 1|4 circle
quintant 1|5 circle
sextant 1|6 circle
sign 1|12 circle # Angular extent of one sign of the zodiac
turn circle
revolution turn
rev turn
pulsatance radian / sec
gon 1|100 rightangle # measure of grade
grade gon
centesimalminute 1|100 grade
centesimalsecond 1|100 centesimalminute
milangle 1|6400 circle # Official NIST definition.
# Another choice is 1e-3 radian.
pointangle 1|32 circle # Used for reporting compass readings
centrad 0.01 radian # Used for angular deviation of light
# through a prism.
mas milli arcsec # Used by astronomers
seclongitude circle (seconds/day) # Astronomers measure longitude
# (which they call right ascension) in
# time units by dividing the equator into
# 24 hours instead of 360 degrees.
#
# Some geometric formulas
#
circlearea(r) [m;m^2] pi r^2 ; sqrt(circlearea/pi)
spherevolume(r) [m;m^3] 4|3 pi r^3 ; cuberoot(spherevolume/4|3 pi)
spherevol(r) [m;m^3] spherevolume(r) ; ~spherevolume(spherevol)
square(x) x^2 ; sqrt(square)
#
# Solid angle measure
#
sphere 4 pi sr
squaredegree 1|180^2 pi^2 sr
squareminute 1|60^2 squaredegree
squaresecond 1|60^2 squareminute
squarearcmin squareminute
squarearcsec squaresecond
sphericalrightangle 0.5 pi sr
octant 0.5 pi sr
#
# Concentration measures
#
percent 0.01
% percent
mill 0.001 # Originally established by Congress in 1791
# as a unit of money equal to 0.001 dollars,
# it has come to refer to 0.001 in general.
# Used by some towns to set their property
# tax rate, and written with a symbol similar
# to the % symbol but with two 0's in the
# denominator. [18]
proof 1|200 # Alcohol content measured by volume at
# 60 degrees Fahrenheit. This is a USA
# measure. In Europe proof=percent.
ppm 1e-6
partspermillion ppm
ppb 1e-9
partsperbillion ppb # USA billion
ppt 1e-12
partspertrillion ppt # USA trillion
karat 1|24 # measure of gold purity
caratgold karat
gammil mg/l
basispoint 0.01 % # Used in finance
fine 1|1000 # Measure of gold purity
# The pH scale is used to measure the concentration of hydronium (H3O+) ions in
# a solution. A neutral solution has a pH of 7 as a result of dissociated
# water molecules.
pH(x) [;mol/liter] 10^(-x) mol/liter ; (-log(pH liters/mol))
#
# Temperature
#
# Two types of units are defined: units for converting temperature differences
# and functions for converting absolute temperatures. Conversions for
# differences start with "deg" and conversions for absolute temperature start
# with "temp".
#
TEMPERATURE kelvin
TEMPERATURE_DIFFERENCE kelvin
tempC(x) [;K] x K + stdtemp ; (tempC +(-stdtemp))/K # In 1741 Anders Celsius
tempcelsius(x) [;K] tempC(x); ~tempC(tempcelsius) # introduced a temperature
degcelsius K # scale with water boiling at 0 degrees and
degC K # freezing at 100 degrees at standard
# pressure. After his death the fixed points
# were reversed and the scale was called the
# centigrade scale. Due to the difficulty of
# accurately measuring the temperature of
# melting ice at standard pressure, the
# centigrade scale was replaced in 1954 by
# the Celsius scale which is defined by
# subtracting 273.15 from the temperature in
# Kelvins. This definition differed slightly
# from the old centigrade definition, but the
# Kelvin scale depends on the triple point of
# water rather than a melting point, so it
# can be measured accurately.
tempF(x) [;K] (x+(-32)) degF + stdtemp ; (tempF+(-stdtemp))/degF + 32
tempfahrenheit(x) [;K] tempF(x) ; ~tempF(tempfahrenheit)
degfahrenheit 5|9 degC # Fahrenheit defined his temperature scale
degF 5|9 degC # by setting 0 to the coldest temperature
# he could produce in his lab with a salt
# water solution and by setting 96 degrees to
# body heat. In Fahrenheit's words:
#
# Placing the thermometer in a mixture of
# sal ammoniac or sea salt, ice, and water
# a point on the scale will be found which
# is denoted as zero. A second point is
# obtained if the same mixture is used
# without salt. Denote this position as
# 30. A third point, designated as 96, is
# obtained if the thermometer is placed in
# the mouth so as to acquire the heat of a
# healthy man." (D. G. Fahrenheit,
# Phil. Trans. (London) 33, 78, 1724)
degreesrankine degF # The Rankine scale has the
degrankine degreesrankine # Fahrenheit degree, but its zero
degreerankine degF # is at absolute zero.
degR degrankine
tempR degrankine
temprankine degrankine
tempreaumur(x) [;K] x degreaumur+stdtemp ; (tempreaumur+(-stdtemp))/degreaumur
degreaumur 10|8 degC # The Reaumur scale was used in Europe and
# particularly in France. It is defined
# to be 0 at the freezing point of water
# and 80 at the boiling point. Reaumur
# apparently selected 80 because it is
# divisible by many numbers.
degK K # "Degrees Kelvin" is forbidden usage.
tempK K # For consistency.
# Gas mark is implemented below but in a terribly ugly way. There is
# a simple formula, but it requires a conditional which is not
# presently supported.
#
# The formula to convert to degrees Fahrenheit is:
#
# 25 log2(gasmark) + k_f gasmark<=1
# 25 (gasmark-1) + k_f gasmark>=1
#
# k_f = 275
#
gasmark[degR] \
.0625 634.67 \
.125 659.67 \
.25 684.67 \
.5 709.67 \
1 734.67 \
2 759.67 \
3 784.67 \
4 809.67 \
5 834.67 \
6 859.67 \
7 884.67 \
8 909.67 \
9 934.67 \
10 959.67
# Units cannot handle wind chill or heat index because they are two variable
# functions, but they are included here for your edification. Clearly these
# equations are the result of a model fitting operation.
#
# wind chill index (WCI) a measurement of the combined cooling effect of low
# air temperature and wind on the human body. The index was first defined
# by the American Antarctic explorer Paul Siple in 1939. As currently used
# by U.S. meteorologists, the wind chill index is computed from the
# temperature T (in °F) and wind speed V (in mi/hr) using the formula:
# WCI = 0.0817(3.71 sqrt(V) + 5.81 - 0.25V)(T - 91.4) + 91.4.
# For very low wind speeds, below 4 mi/hr, the WCI is actually higher than
# the air temperature, but for higher wind speeds it is lower than the air
# temperature.
#
# heat index (HI or HX) a measure of the combined effect of heat and
# humidity on the human body. U.S. meteorologists compute the index
# from the temperature T (in °F) and the relative humidity H (as a
# value from 0 to 1).
# HI = -42.379 + 2.04901523 T + 1014.333127 H - 22.475541 TH
# - .00683783 T^2 - 548.1717 H^2 + 0.122874 T^2 H + 8.5282 T H^2
# - 0.0199 T^2 H^2.
#
# Physical constants
#
# Basic constants
pi 3.14159265358979323846
c 2.99792458e8 m/s # speed of light in vacuum (exact)
light c
mu0 4 pi 1e-7 H/m # permeability of vacuum (exact)
epsilon0 1/mu0 c^2 # permittivity of vacuum (exact)
energy c^2 # convert mass to energy
e 1.602176487e-19 C # electron charge
h 6.62606896e-34 J s # Planck constant
hbar h / 2 pi
spin hbar
G 6.67428e-11 N m^2 / kg^2 # Newtonian gravitational constant
# This is the NIST 2002 value.
# Note that NIST increased the
# uncertainty of G to 1500 ppm
# as a result of disagreements
# between experiments performed in
# the late 1990s. Some other
# sources give conflicting values
# with a much lower uncertainty.
coulombconst 1/4 pi epsilon0 # listed as "k" sometimes
# Physico-chemical constants
atomicmassunit 1.660538782e-27 kg# atomic mass unit (defined to be
u atomicmassunit # 1|12 of the mass of carbon 12)
amu atomicmassunit
amu_chem 1.66026e-27 kg # 1|16 of the weighted average mass of
# the 3 naturally occuring neutral
# isotopes of oxygen
amu_phys 1.65981e-27 kg # 1|16 of the mass of a neutral
# oxygen 16 atom
dalton u # Maybe this should be amu_chem?
avogadro grams/amu mol # size of a mole
N_A avogadro
gasconstant 8.314472 J / mol K # molar gas constant
R gasconstant
boltzmann R / N_A # Boltzmann constant
k boltzmann
kboltzmann boltzmann
molarvolume mol R stdtemp / atm # Volume occupied by one mole of an
# ideal gas at STP.
loschmidt avogadro mol / molarvolume # Molecules per cubic meter of an
# ideal gas at STP. Loschmidt did
# work similar to Avogadro.
stefanboltzmann pi^2 k^4 / 60 hbar^3 c^2 # The power per area radiated by a
sigma stefanboltzmann # blackbody at temperature T is
# given by sigma T^4.
wiendisplacement 2.8977685e-3 m K # Wien's Displacement Law gives the
# frequency at which the the Planck
# spectrum has maximum intensity.
# The relation is lambda T = b where
# lambda is wavelength, T is
# temperature and b is the Wien
# displacement. This relation is
# used to determine the temperature
# of stars.
K_J 483597.9 GHz/V # Direct measurement of the volt is difficult. Until
# recently, laboratories kept Weston cadmium cells as
# a reference, but they could drift. In 1987 the
# CGPM officially recommended the use of the
# Josephson effect as a laboratory representation of
# the volt. The Josephson effect occurs when two
# superconductors are separated by a thin insulating
# layer. A "supercurrent" flows across the insulator
# with a frequency that depends on the potential
# applied across the superconductors. This frequency
# can be very accurately measured. The Josephson
# constant K_J, which is equal to 2e/h, relates the
# measured frequency to the potential. The value
# given here is the officially specified value for
# use beginning in 1990. The 2006 recommended value
# of the constant is 483597.891 GHz/V.
R_K 25812.807 ohm # Measurement of the ohm also presents difficulties.
# The old approach involved maintaining resistances
# that were subject to drift. The new standard is
# based on the Hall effect. When a current carrying
# ribbon is placed in a magnetic field, a potential
# difference develops across the ribbon. The ratio
# of the potential difference to the current is
# called the Hall resistance. Klaus von Klitzing
# discovered in 1980 that the Hall resistance varies
# in discrete jumps when the magnetic field is very
# large and the temperature very low. This enables
# accurate realization of the resistance h/e^2 in the
# lab. The value given here is the officially
# specified value for use beginning in 1990.
# Various conventional values
gravity 9.80665 m/s^2 # std acceleration of gravity (exact)
force gravity # use to turn masses into forces
atm 101325 Pa # Standard atmospheric pressure
atmosphere atm
Hg 13.5951 gram force / cm^3 # Standard weight of mercury (exact)
water gram force/cm^3 # Standard weight of water (exact)
waterdensity gram / cm^3 # Density of water
H2O water
wc water # water column
mach 331.46 m/s # speed of sound in dry air at STP
standardtemp 273.15 K # standard temperature
stdtemp standardtemp
# Weight of mercury and water at different temperatures using the standard
# force of gravity.
Hg10C 13.5708 force gram / cm^3 # These units, when used to form
Hg20C 13.5462 force gram / cm^3 # pressure measures, are not accurate
Hg23C 13.5386 force gram / cm^3 # because of considerations of the
Hg30C 13.5217 force gram / cm^3 # revised practical temperature scale.
Hg40C 13.4973 force gram / cm^3
Hg60F 13.5574 force gram / cm^3
H2O0C 0.99987 force gram / cm^3
H2O5C 0.99999 force gram / cm^3
H2O10C 0.99973 force gram / cm^3
H2O15C 0.99913 force gram / cm^3
H2O18C 0.99862 force gram / cm^3
H2O20C 0.99823 force gram / cm^3
H2O25C 0.99707 force gram / cm^3
H2O50C 0.98807 force gram / cm^3
H2O100C 0.95838 force gram / cm^3
# Atomic constants
Rinfinity 10973731.568527 /m # The wavelengths of a spectral series
R_H 10967760 /m # can be expressed as
# 1/lambda = R (1/m^2 - 1/n^2).
# where R is a number that various
# slightly from element to element.
# For hydrogen, R_H is the value,
# and for heavy elements, the value
# approaches Rinfinity, which can be
# computed from
# m_e c alpha^2 / 2 h
# with a loss of 5 digits
# of precision.
alpha 7.2973525376e-3 # The fine structure constant was
# introduced to explain fine
# structure visible in spectral
# lines. It can be computed from
# mu0 c e^2 / 2 h
# with a loss of 3 digits precision
# and loss of precision in derived
# values which use alpha.
bohrradius alpha / 4 pi Rinfinity
prout 185.5 keV # nuclear binding energy equal to 1|12
# binding energy of the deuteron
# Planck constants
planckmass 2.17644e-8 kg # sqrt(hbar c / G)
m_P planckmass
plancktime hbar / planckmass c^2
t_P plancktime
plancklength plancktime c
l_P plancklength
# Masses of elementary particles
electronmass 5.4857990943e-4 u
m_e electronmass
protonmass 1.00727646677 u
m_p protonmass
neutronmass 1.00866491597 u
m_n neutronmass
muonmass 0.1134289256 u
m_mu muonmass
deuteronmass 2.013553212724 u
m_d deuteronmass
alphaparticlemass 4.001506179127 u
m_alpha alphaparticlemass
# particle wavelengths: the compton wavelength of a particle is
# defined as h / m c where m is the mass of the particle.
electronwavelength h / m_e c
lambda_C electronwavelength
protonwavelength h / m_p c
lambda_C,p protonwavelength
neutronwavelength h / m_n c
lambda_C,n neutronwavelength
# Magnetic moments
bohrmagneton e hbar / 2 electronmass
mu_B bohrmagneton
nuclearmagneton e hbar / 2 protonmass
mu_N nuclearmagneton
mu_mu 4.49044786e-26 J/T # Muon magnetic moment
mu_p 1.410606662e-26 J/T # Proton magnetic moment
mu_e 928.476377e-26 J/T # Electron magnetic moment
mu_n 0.96623641e-26 J/T # Neutron magnetic moment
mu_d 0.433073465e-26 J/T # Deuteron magnetic moment
#
# Units derived from physical constants
#
kgf kg force
technicalatmosphere kgf / cm^2
at technicalatmosphere
hyl kgf s^2 / m # Also gram-force s^2/m according to [15]
mmHg mm Hg
torr mmHg # These units, both named after Evangelista
tor Pa # Torricelli, should not be confused.
# Acording to [15] the torr is actually
# atm/760 which is slightly different.
inHg inch Hg
inH2O inch water
mmH2O mm water
eV e V # Energy acquired by a particle with charge e
electronvolt eV # when it is accelerated through 1 V
lightyear c julianyear # The 365.25 day year is specified in
ly lightyear # NIST publication 811
lightsecond c s
lightminute c min
parsec au / tan(arcsec) # Unit of length equal to distance
pc parsec # from the sun to a point having
# heliocentric parallax of 1
# arcsec (derived from parallax
# second). A distant object with
# paralax theta will be about
# (arcsec/theta) parsecs from the
# sun (using the approximation
# that tan(theta) = theta).
rydberg h c Rinfinity # Rydberg energy
crith 0.089885 gram # The crith is the mass of one
# liter of hydrogen at standard
# temperature and pressure.
amagatvolume molarvolume
amagat mol/amagatvolume # Used to measure gas densities
lorentz bohrmagneton / h c # Used to measure the extent
# that the frequency of light
# is shifted by a magnetic field.
cminv h c / cm # Unit of energy used in infrared