// // Frink data file for non-changing units. // // This file is used by the Frink calculating tool/programming language: // http://futureboy.homeip.net/frinkdocs/ // // If you got to this page from a web search because you're trying to do a // unit conversion or manipulation, try it at the following URL: // // http://futureboy.homeip.net/frink/ // // Alan Eliasen // eliasen@mindspring.com // // // This file is adapted, modified, and extended from the units database for use // with GNU units, a units conversion program by Adrian Mariano // adrian@cam.cornell.edu, who did a damn fine job collecting much of this. // // // 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 // // Thanks to Jeff Conrad for assistance in ferreting out unit definitions. // ///////////////////////////////////////////////////////////////////////////// // // // 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. // // // ///////////////////////////////////////////////////////////////////////////// // Prefixes // These are defined with the symbol :- to indicate a prefix which cannot // stand by itself (must be attached to a unit) // or with the symbol ::- for a prefix which can be either attached to a unit // or defines a standalone unit. // // A number specifed like "1ee20" with integers for the factor and the // exponent are treated as exact numbers. yotta ::- 1ee24 // 1E24 Greek or Latin octo, "eight" zetta ::- 1ee21 // 1E21 Latin septem, "seven" exa ::- 1ee18 // 1E18 Greek hex, "six" peta ::- 1ee15 // 1E15 Greek pente, "five" tera ::- 1ee12 // 1E12 Greek teras, "monster" giga ::- 1ee9 // 1E9 Greek gigas, "giant" mega ::- 1ee6 // 1E6 Greek megas, "large" myria ::- 1ee4 // 1E4 Not an official SI prefix kilo ::- 1000 // 1E3 Greek chilioi, "thousand" hecto ::- 100 // 1E2 Greek hekaton, "hundred" deca ::- 10 // 1E1 Greek deka, "ten" deka ::- 10 deci ::- 1/10 // 1E-1 Latin decimus, "tenth" centi ::- 1/100 // 1E-2 Latin centum, "hundred" milli ::- 1/1000 // 1E-3 Latin mille, "thousand" micro ::- 1ee-6 // 1E-6 Latin micro/Greek mikros,"small" nano ::- 1ee-9 // 1E-9 Latin nanus or Greek nanos,"dwarf" pico ::- 1ee-12 // 1E-12 Spanish pico, "a bit" femto ::- 1ee-15 // 1E-15 Danish-Norwegian femten,"fifteen" atto ::- 1ee-18 // 1E-18 Danish-Norwegian atten,"eighteen" zepto ::- 1ee-21 // 1E-21 Latin septem, "seven" yocto ::- 1ee-24 // 1E-24 Greek or Latin octo, "eight" 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 // Alan's notes: // I'd like to put a mu in here for micro. // Should we adopt the questionable Electrical Engineer policy of using // "u" to indicate micro? I've added "uF" for microfarad later on to // tackle the most common case. \u00b5 :- micro // Unicode "MICRO SIGN" n :- nano p :- pico f :- femto a :- atto z :- zepto y :- yocto // // SI units // length =!= m // Length of the path traveled by light in a vacuum meter := m // during 1/299792458 seconds (exactly.) // Originally meant to be one ten-millionth // of the length along a meridian from the equator // to a pole, but the measurement was off. // // Alan's notes: // The earth's circumference would then be exactly 40 // million meters (which is a good thing to memorize.) time =!= 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 mass =!= kg // Mass of the international prototype, whatever that is. // // Alan's editorializing: // I dislike having a prefixed unit as the base reference. // What a horrible decision. Why don't you just have it go to // ten and make ten a little louder? kilogram := kg gram := 1/1000 kg current =!= 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 // Alan's editorializing: // I'd actually much rather define this in terms of the charge // of a fundamental particle. electroncharge/sec // is less arbitrary. I'd actually prefer to have the base // unit be charge instead of current. temperature =!= K // "1/273.16 of the thermodynamic temperature of the triple kelvin := K // point of water." Note that there is a minor discrepancy // between this value and the 273.15 K figure used to set // the zero point of the Celsius scale. The *size* of a // Kelvin or a degree Celsius is the same, but you need // to remember that the offset point is slightly different. // Use the Celsius[x] functions defined below to convert // between these unit systems. currency =!= dollar// The US dollar is chosen arbitrarily to be the primitive // unit of money. The dollar must be defined for use // in the CPISource (providing historical purchasing power // of the dollar) and for CurrencySource (providing // exchange rate information // (and things like the price of Gold)) so // you can change the fundamental unit of currency, but you // have to be able to turn it into a dollar if you want // to use these other sources. // If you want to define your own base currency, and you want // currency conversions to still work, you // should (for now) define the base currency as its 3-letter // ISO-4217 currency code (say, "EUR" or "JPY"). This will // allow the // currency converter to unambiguously figure out which // currency you mean. The units "Euro", "euro", the Euro // symbol \u20ac, the Japanese Yen symbol \u00a5, // the U.K. pound symbol \u0163, and "dollar" are // special cases that also work. // // If you change your base currency, you might get a few // errors about units below that are defined in terms of the // dollar. You can probably comment those out and never miss // them. If you have a 3-letter ISO code for your base // currency, it'll figure out what a "dollar" is later, so // you shouldn't need to hard-code in a conversion rate. substance =!= 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. // // Alan's editorializing: // As useful as a mole may be, I really think that a mole is // insufficient by itself. It has to be a mole OF // something. How do you represent that? radian := 1 // The angle subtended at the center of a circle by an arc // equal in length to the radius of the circle. // A circle thus subtends an angle of 2 pi radians. // // Alan's editorializing: // Despite what other units programs might have you believe, // radians ARE dimensionless units and making them their own // unit leads to all sorts of arbitrary convolutions in // calculations (at the possible expense of some inclarity if // you don't know what you're doing.) // If you really want radians to be a fundamental unit, // replace the above with "angle =!= radian" // (This will give you a bit of artificiality in calculations.) sr := 1 // Solid angle which cuts off an area of the surface of steradian := sr// the sphere equal to that of a square with sides of // length equal to the radius of the sphere. // A sphere thus subtends 4 pi steradians. // Also a dimensionless unit (length^2/length^2) // If you really want steradians to be a fundamental unit, // replace the above with "solid_angle =!= sr" // (This will give you a bit of artificiality in calculations.) information =!= 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. // // Alan's editorializing: That irrelevant non-sequitur // about entropy isn't my doing. What does that have to // do with the bit itself? I'm also considering changing // bits to be dimensionless units--it makes problems in // information theory come out more reasonably. luminous_intensity =!= cd candela := cd // Official definition: // "The candela is the luminous intensity, in a given // direction, of a source that emits monochromatic radiation // of frequency 540 x 10^12 hertz and that has a radiant // intensity in that direction of 1/683 watt per 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.) // // Alan's editorializing: // I think the candela is a scam, and I am completely // opposed to it. Some good-for-nothing lighting "engineers" // or psychologists probably got this perceptually-rigged // abomination into the whole otherwise scientific endeavor. // // What an unbelievably useless and stupid unit. Is light // at 540.00000001 x 10^12 Hz (or any other frequency) zero // candela? Is this expected to be an impulse function at // this frequency? Oh, wait, the Heisenberg Uncertainty // Principle makes this impossible. No mention for // correction (ideally along the blackbody curve) for other // wavelengths? Damn you, 16th CGPM! Damn you all to hell! // Define the default symbol for the imaginary unit, that is, the square // root of negative one. i := <> // Define unit combinations 1 ||| dimensionless m^2 ||| area m^3 ||| volume s^-1 ||| frequency m s^-1 ||| velocity m s^-2 ||| acceleration m kg s^-1 ||| momentum m kg s^-2 ||| force m^2 kg s^-3 ||| power m^-1 kg s^-2 ||| pressure m^2 kg s^-2 ||| energy m^2 kg s^-1 ||| angular_momentum m^2 kg ||| moment_of_inertia m^3 s^-1 ||| flow m^-3 kg ||| mass_density m^3 kg ||| specific_volume A m^-2 ||| electric_current_density dollar kg^-1 ||| price_per_mass // // Names of some numbers // semi :- 1/2 demi :- 1/2 hemi :- 1/2 half ::- 1/2 third ::- 1/3 quarter ::- 1/4 eighth ::- 1/8 uni :- 1 bi :- 2 tri :- 3 one := 1 two := 2 double := 2 three := 3 triple := 3 treble := 3 four := 4 quadruple := 4 five := 5 quintuple := 5 six := 6 sextuple := 6 seven := 7 septuple := 7 eight := 8 nine := 9 ten := 10 twenty := 20 thirty := 30 forty := 40 fifty := 50 sixty := 60 seventy := 70 eighty := 80 ninety := 90 hundred := 100 thousand := 1000 million := 1ee6 billion := 1ee9 trillion := 1ee12 quadrillion := 1ee15 quintillion := 1ee18 sextillion := 1ee21 septillion := 1ee24 octillion := 1ee27 nonillion := 1ee30 noventillion := nonillion decillion := 1ee33 undecillion := 1ee36 duodecillion := 1ee39 tredecillion := 1ee42 quattuordecillion := 1ee45 quindecillion := 1ee48 sexdecillion := 1ee51 septendecillion := 1ee54 octodecillion := 1ee57 novemdecillion := 1ee60 vigintillion := 1ee63 centillion := 1ee303 googol := 1ee100 // 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. brbillion := million^2 brtrillion := million^3 brquadrillion := million^4 brquintillion := million^5 brsextillion := million^6 brseptillion := million^7 broctillion := million^8 brnonillion := million^9 brnoventillion := brnonillion brdecillion := million^10 brundecillion := million^11 brduodecillion := million^12 brtredecillion := million^13 brquattuordecillion := million^14 brquindecillion := million^15 brsexdecillion := million^16 brseptdecillion := million^17 broctodecillion := million^18 brnovemdecillion := million^19 brvigintillion := million^20 // These numbers fill the gaps left by the European 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 brmilliard := milliard brbilliard := billiard brtrilliard := trilliard brquadrilliard := quadrilliard brquintilliard := quintilliard brsextilliard := sextilliard brseptilliard := septilliard broctilliard := octilliard brnonilliard := nonilliard brnoventilliard := noventilliard brdecilliard := decilliard // The British Centillion would be 1ee600. The googolplex is another // familiar large number equal to 10^googol. These numbers give overflows. ////////////////////////////////////////////////////////////////////////////// // // // 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 J m^-2 ||| surface_tension coulomb := A s // charge coulomb ||| charge coulomb m^-2 ||| surface_charge_density coulomb m^-3 ||| electric_charge_density C := coulomb volt := W/A // potential difference V := volt volt ||| electric_potential V / m ||| electric_field_strength A / m ||| magnetic_field_strength ohm := V/A // electrical resistance \u2126 := ohm // Official Unicode codepoint OHM SIGN \u03a9 := ohm // "Preferred" Unicode codepoint for ohm // GREEK CAPITAL LETTER OMEGA ohm ||| electric_resistance siemens := A/V // electrical conductance S := siemens siemens ||| electric_conductance farad := C/V // capacitance farad ||| capacitance F := farad uF := microfarad // Concession to electrical engineers // without adding the questionable "u" // as a general prefix. weber := V s // magnetic flux weber ||| magnetic_flux Wb := weber henry := Wb/A // inductance henry ||| inductance henries := henry // Irregular plural H := henry tesla := Wb/m^2 // magnetic flux density tesla ||| magnetic_flux_density T := tesla hertz := s^-1 // frequency Hz := hertz J/K ||| heat_capacity J kg^-1 K^-1 ||| specific_heat_capacity // // 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 := 1ee-5 day // Actual human blink takes 1/3 second ce := 1ee-2 day // // units derived easily from SI units // 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 := 1ee5 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 // 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. L := liter // This unit and its symbol l were adopted by // the CIPM in 1879. The alternative symbol for // the liter, L, was adopted by the CGPM in 1979 // in order to avoid the risk of confusion // between the letter l and the number 1. Thus, // although both l and L are internationally // accepted symbols for the liter, to avoid this // risk the preferred symbol for use in the // United States is L. mho := siemens // Inverse of ohm, hence ohm spelled backward galvat := ampere // Named after Luigi Galvani angstrom := 1ee-10 m // Convenient for describing molecular sizes \u212b := angstrom // Official Unicode codepoint for // Angstrom symbol: ANGSTROM SIGN \u00c5 := angstrom // "Preferred" Unicode codepoint for // Angstrom symbol: // LATIN CAPITAL LETTER A WITH RING ABOVE 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 := 1ee-15 m // Convenient for describing nuclear sizes // Nuclear radius is from 1 to 10 fermis barn := 1ee-28 m^2 // Used to measure cross section for // particle physics collision, said to // have originated in the phrase "big as // a barn". shed := 1ee-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^-1 // measures reciprocal of lens focal length fresnel := 1ee12 Hz // occasionally used in spectroscopy shake := 1ee-8 sec svedberg := 1ee-13 s // Used for measuring the sedimentation // coefficient for centrifuging. gamma := microgram lambda := microliter spat := 1ee12 m // Rarely used for astronomical measurements preece := 1ee13 ohm m// resistivity planck := J s // action of one joule over one second sturgeon := henry^-1 // magnetic reluctance sturgeon ||| 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 capacity mired := microK^-1 // reciprocal color temperature. The name // abbreviates micro reciprocal degree. crocodile := megavolt // used informally in UK physics labs metricounce := 25 g mounce := metricounce finsenunit := 1ee5 W/m^2 // Measures intensity of ultraviolet light // with wavelength 296.7 nm. fluxunit := 1ee-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. // Basic constants pi := 3.141592653589793238 \u03c0 := pi // Unicode character for pi // as a mathematical constant // GREEK SMALL LETTER PI e := 2.71828182845904523536 // Base of natural logarithm // 'e' was previously used to be // the charge of the electron, but // changed to this. Mathematicians and // particle physicists may battle this // out. EulerMascheroniConstant := 0.577215664901532860606512 // See http://en.wikipedia.org/wiki/Euler-Mascheroni_constant c := 299792458 m/s // speed of light in vacuum (exact) light := c lightspeed := c // sure, why not. mu0 := 4 pi 1e-7 N/A^2 // permeability of vacuum (exact) magneticconstant := mu0 permeabilityofvacuum := mu0 mu0 ||| permeability epsilon0 := 1/(mu0 c^2) // permittivity of vacuum (exact) // This is equivalent to about // 8.85e-12 farads/meter permittivityofvacuum := epsilon0 electricconstant := epsilon0 epsilon0 ||| permittivity energy := c^2 // convert mass to energy electroncharge := 1.60217653e-19 C // electron charge, also called e // but that's reserved for the // base of the natural logarithm // This is the 2002 CODATA recommended // value. Standard uncertainty is // +/- 14 in the last 2 digits. // http://physics.nist.gov/cgi-bin/cuu/Value?e h := 6.6260693e-34 J s // Planck's constant, given by 2002 // CODATA figures. There is a standard // uncertainty in the last 2 digits of +/- 11 // http://physics.nist.gov/cgi-bin/cuu/Value?h classicalElectronRadius := 2.817940325e-15 m // 2002 CODATA value // http://physics.nist.gov/cgi-bin/cuu/Value?re // uncertainty is +/- 28 in the last 2 digits r_e := classicalElectronRadius ThomsonCrossSection := 0.665245873e-28 m^2 // 2002 CODATA value // http://physics.nist.gov/cgi-bin/cuu/Value?sigmae // The "classical" cross-section of an electron when // illuminated by radiation. // Uncertainty is +/- 13 in the last 2 digits. sigma_e := ThomsonCrossSection sigma_t := ThomsonCrossSection plancksconstant := h \u210e := h // Official Unicode char for Planck's const. hbar := h / (2 pi) \u210f := hbar // Official Unicode char for Planck/2 pi G := 6.6742e-11 N m^2 / kg^2 // Newtonian gravity constant // From 2002 CODATA figures. There is a standard uncertainty in the // last two figures of +/- 10 // Given by http://physics.nist.gov/cgi-bin/cuu/Value?bg coulombconst := 1/(4 pi epsilon0) // listed as "k" sometimes au := 149597870691. m // astronomical unit, the average // radius of earth's orbit around the // sun, as defined by the IAU (1976). // Estimated error +/- 30 m // Actually, the official definition from the IAU is: // "the distance from the Sun at which a particle of // negligible mass, in an unperturbed circular orbit, // would have an orbital period of 365.2568983 days // (a Gaussian year)." Gee, thanks for that helpful // definition, guys. ua := au // The SI defines this abbreviation as its preferred // version astronomicalunit := au // // angular measure // circle := 2 pi radian degree := 1/360 circle arcdegree := degree deg := degree arcdeg := arcdegree arcminute := 1/60 degree arcmin := arcminute arcsecond := 1/60 arcmin arcsec := arcsecond mas := milliarcsecond 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 1ee-3 radian. pointangle := 1/32 circle centrad := 1/100 radian // Used for angular deviation of light // through a prism. brad := 1/256 circle // Binary radian--used to fit angular measurements into // a byte. Questionable but what the hell. // // 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 := 1/2 pi sr octant := 1/2 pi sr // // Concentration measures // percent := 1/100 proof := 1/200 // Alcohol content measured by volume at // 60 degrees Fahrenheit. This is a USA // measure. In Europe proof=percent. ppm := 1ee-6 partspermillion := ppm ppb := 1ee-9 partsperbillion := ppb // USA billion ppt := 1ee-12 partspertrillion := ppt // USA trillion karat := 1/24 // measure of gold purity fine := 1/1000 // Measure of gold purity caratgold := karat gammil := mg/l basispoint := 1/100 percent// Used in finance // // Temperature difference // The units below are NOT an absolute temperature measurement in Fahrenheit, // but represents the size of a degree in the specified systems. degcelsius := K degreeCelsius := K // Per http://physics.nist.gov/Pubs/SP811/sec04.html#4.2.1.1 degC := K // The *size* of a degree in the Celsius scale. // This is identical to the size of a Kelvin. // WARNING: This should only be used when // you're indicating the *difference* between // two temperatures, (say, how much energy to // raise the temperature of a gram of water by 5 // degrees Celsius, *not* for absolute // temperatures. (I wonder if they should go // entirely to eliminate this confusion...) // For calculating absolute temperatures, use // the Celsius[] or C[] functions below. // // In 1741 Anders Celsius introduced a // Temperature scale with water boiling at 0 // degrees and 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. zerocelsius := 273.15 K // Defined by the 10th CGPM, 1954, Resolution 3; // CR, 79. The triple point of water was defined // at the same time to be 273.16 Kelvin, and // the reference temperature 273.15 K (the ice // point) to be the scale difference between // Kelvin and Celsius. So, the size of a Kelvin // and a degree Celsius are the same, but // the zero point of the Celsius scale is actually // set to .01 Kelvin below the triple point. degfahrenheit := 5/9 degC // The *size* of a degree in the Fahrenheit scale. degreeFahrenheit := degfahrenheit // The *size* of a degree in the Fahrenheit scale. degF := degfahrenheit // WARNING: These should only be used when // you're indicating the *difference* between // two temperatures, (say, how much energy to // raise the temperature of a gram of water by 5 // degrees Fahrenheit, *not* for absolute // temperatures. (I wonder if they should go // entirely to eliminate this confusion...) // For calculating absolute temperatures, use // the Fahrenheit[] or F[] functions below. // // Fahrenheit defined his temperature scale // by setting 0 to the coldest temperature // he could produce and by setting 96 degrees // to body heat (for reasons unknown). \u2109 := degfahrenheit // Single Unicode codepoint for // DEGREE FAHRENHEIT degreesRankine := 5/9 K degreesrankine := degreesRankine // The Rankine scale has the degrankine := degreesRankine // Fahrenheit degree, but its zero degreerankine := degrankine // is at absolute zero. degR := degrankine Rankine := degreesrankine 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. // Function for converting Fahrenheit to/from standard units // This is a less legible version of the revised function below //Fahrenheit[x] := (x conforms K) ? ((x - zerocelsius) / K) * 9/5 + 32 : ((x conforms 1) ? ((x-32) * 5/9) K + zerocelsius : "Error") Fahrenheit[x] := { if (x conforms K) // If x is already a temperature, convert to F return ((x - zerocelsius) / K) * 9/5 + 32 else if (x conforms 1) // If x is a pure number, treat as Fahrenheit degrees return ((x-32) * 5/9) K + zerocelsius else return "Error" } // TODO: Change the implementation of the following idiom so that it aliases // the function instead of chaining function calls. F[x] := Fahrenheit[x] // Function for converting Celsius to/from standard units Celsius[x] := (x conforms K) ? (x-zerocelsius) / K : ((x conforms 1) ? (x K + zerocelsius) : "Error") C[x] := Celsius[x] Reaumur[x] := (x conforms K) ? (8/10 (x-zerocelsius)) / K : ((x conforms 1) ? (10/8 * x * K + zerocelsius) : "Error") // Physical constants // gravity := 980665/100000 m/s^2 // std acceleration of gravity // (exact) g_n := gravity gee := gravity gravities := gravity // Irregular plural force := gravity // use to turn masses into forces // Various conventional values atm := 101325 Pa // Standard atmospheric pressure (exact) atmosphere := atm Hg := 13.5951 gram / cm^3 // Density of mercury (defined) mercurydensity := Hg water := gram / cm^3 // Standard density of water (defined) 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 // Physico-chemical constants // Atomic mass unit is given by the 2002 CODATA value // http://physics.nist.gov/cgi-bin/cuu/Value?u atomicmassunit := 1.66053886e-27 kg // atomic mass unit // error is +/- 28 in last 2 digits // (defined to be 1/12 of the mass of // carbon 12) m_u := atomicmassunit 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, 2006 CODATA // value. Standard uncertainty is // +/- 15 in last 2 digits // http://physics.nist.gov/cgi-bin/cuu/Value?r R := gasconstant boltzmann := R / N_A // Boltzmann's constant boltzmannsconstant := boltzmann // Boltzmann's constant k := boltzmann molarvolume := mol R stdtemp / atm // Volume occupied by one mole of an // ideal gas at STP. molar := mol / l // Unit of concentration (moles/liter) Molar := molar // Sometimes capitalized molar ||| concentration_by_volume molal := mol / kg // Unit of concentration (moles/kg) molal ||| concentration_by_mass m^3/mol ||| molar_volume loschmidt := avogadro mol / molarvolume// Molecules per cubic meter of an // ideal gas at STP. Loschmidt did // work similar to Avogadro. stefanboltzmann := 2 pi^5 k^4 / (15 h^3 c^2) // The radiant emittance by a // blackbody sigma := stefanboltzmann // 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. This is the 2002 // CODATA value. Standard // uncertainty is +/- 51 in last 2 // digits. K_J := 2 electroncharge/h // Josephson Constant // 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 1998 recommended value // of the constant is 483597.898 GHz/V. R_K := h/electroncharge^2 // 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. This is approximately equal to 25812.807 ohms // Density of mercury and water at different temperatures using the standard // force of gravity. // Hg10C := 13.5708 gram / cm^3 // These units, when used to form // Hg20C := 13.5462 gram / cm^3 // pressure measures, are not accurate // Hg23C := 13.5386 gram / cm^3 // because of considerations of the // Hg30C := 13.5217 gram / cm^3 // revised practical temperature scale. // Hg40C := 13.4973 gram / cm^3 // Hg60F := 13.5574 gram / cm^3 // H2O0C := 0.99987 gram / cm^3 // H2O5C := 0.99999 gram / cm^3 // H2O10C := 0.99973 gram / cm^3 // H2O15C := 0.99913 gram / cm^3 // H2O18C := 0.99862 gram / cm^3 // H2O20C := 0.99823 gram / cm^3 // H2O25C := 0.99707 gram / cm^3 // H2O50C := 0.98807 gram / cm^3 // H2O100C := 0.95838 gram / cm^3 // Masses of elementary particles, as given by 2002 CODATA-recommended values. // http://physics.nist.gov/cuu/Constants/index.html electronmass := 9.1093826e-31 kg // +/- 16 in last 2 digits m_e := electronmass protonmass := 1.67262171e-27 kg // +/- 27 in last 2 digits m_p := protonmass neutronmass := 1.67492728e-27 kg // +/- 29 in last 2 digits m_n := neutronmass muonmass := 1.88353140e-28 kg // +/- 33 in last 2 digits m_mu := muonmass m_muon := muonmass deuteronmass := 3.34358335e-27 kg // +/- 57 in last 2 digits m_d := deuteronmass alphaparticlemass := 6.6446565e-27 kg // +/- 11 in last 2 digits m_alpha := alphaparticlemass taumass := 3.16777e-27 kg // +/- 52 in last 2 digits m_tau := taumass // Atomic constants alpha := 7.297352568e-3 // 2002 CODATA value // http://physics.nist.gov/cgi-bin/cuu/Value?alph // Standard uncertainty is +/- 24 in the last 2 // decimal places. // This can also be given by: // mu0 c electroncharge^2 / (2 h) // The fine structure constant was // introduced to explain fine // structure visible in spectral // lines. finestructureconstant := alpha // Rydberg constant Rydberg_constant := 10973731.568525 m^-1 // 2002 CODATA value // http://physics.nist.gov/cgi-bin/cuu/Value?ryd // The standard uncertainty is +/- 73 in the last 2 decimal places. Rinfinity := Rydberg_constant //m_e c alpha^2 / (2 h) // 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. bohrradius := alpha / (4 pi Rinfinity) // Planck constants planckmass := (hbar c / G)^(1/2) m_P := planckmass plancktime := hbar / (planckmass c^2) t_P := plancktime plancklength := plancktime c l_P := plancklength // 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 Comptonwavelength := electronwavelength protonwavelength := h / (m_p c) lambda_C_p := protonwavelength neutronwavelength := h / (m_n c) lambda_C_n := neutronwavelength // Magnetic moments bohrmagneton := electroncharge hbar / (2 electronmass) mu_B := bohrmagneton nuclearmagneton := electroncharge hbar / (2 protonmass) mu_N := nuclearmagneton // Values below are from 2002 CODATA values muonmagneticmoment := -4.49044799e-26 J/T // +/- 40 in last 2 digits mu_mu := muonmagneticmoment protonmagneticmoment := 1.41060671e-26 J/T // +/- 12 in last 2 digits mu_p := protonmagneticmoment electronmagneticmoment:= -928.476412e-26 J/T // +/- 80 in last 2 digits mu_e := electronmagneticmoment neutronmagneticmoment := -0.96623645e-26 J/T // +/- 24 in last 2 digits mu_n := neutronmagneticmoment deuteronmagneticmoment := 0.433073482e-26 J/T // +/- 38 in last 2 digits mu_d := deuteronmagneticmoment // // United States units // // linear measure // The US Metric Law of 1866 gave the exact relation 1 meter = 39.37 inches. // From 1893 until 1959, the foot was exactly 1200/3937 meters. In 1959 // the definition was changed to bring the US into agreement with other // countries. Since then, the foot has been exactly 0.3048 meters. At the // same time it was decided that any data expressed in feet derived from // geodetic surveys within the US would continue to use the old definition. inch := 254/100 cm foot := 12 inch feet := foot ft := foot survey ::- 1200/3937 m/ft // Ratio to give survey length geodetic ::- survey statute ::- survey int :- 3937/1200 ft/m // Convert US Survey measures to // international measures inches := inch // Wacky plural in := inch yard := 3 ft yd := yard mile := 5280 ft line := 1/12 inch // Also defined as '.1 in' or as '1e-8 Wb' rod := 11/2 surveyyard rd := rod perch := rod furlong := 40 rod // From "furrow long" statutemile := statute mile league := 3 statute mile // Calories: energy to raise a gram of water one degree celsius cal_IT := 41868/10000 J // International Table calorie cal_th := 4184/1000 J // Thermochemical calorie cal_fifteen := 4.18580 J // Energy to go from 14.5 to 15.5 degC cal_twenty := 4.18190 J // Energy to go from 19.5 to 20.5 degC cal_mean := 4.19002 J // 1/100 energy to go from 0 to 100 degC calorie := cal_IT cal := calorie calorie_IT := cal_IT thermcalorie := cal_th calorie_th := thermcalorie Calorie := kilocalorie // the food Calorie thermie := 1ee6 cal_fifteen// Heat required to raise the // temperature of a tonne of // water from 14.5 to 15.5 degC. // // Units derived from physical constants // inHg := inch gravity Hg // Inches of mercury inH2O := inch gravity water inchmercury := inHg inchesmercury := inHg // Irregular plural mmH2O := mm gravity water mmHg := mm gravity Hg kgf := kg gravity technicalatmosphere := kgf / cm^2 at := technicalatmosphere hyl := kgf s^2 / m // Also gram-force s^2/m according to [15] torr := 101325/760 Pa // Exactly defined. Differs from mmHg by // about 1 part in 7 million. Torr := torr // Accepted symbol is Torr // 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. eV := electroncharge V // Energy acquired by a particle with charge e electronvolt := eV // when it is accelerated through 1 V lightyear := c 365.25 day // The 365.25 day year is specified in // NIST publication 811 ly := lightyear lightsecond := c s lightminute := c min parsec := au radian / 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) The formula should use // tangent, but the error is about // 1e-12. 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 invcm := cminv // spectroscopy. wavenumber := cminv kcal_mol := kcal / (mol N_A) // kcal/mol is used as a unit of // energy by physical chemists. // // CGS system based on centimeter, gram and second // dyne := cm gram / s^2 // force dyn := dyne erg := cm dyne // energy poise := gram / (cm s) // viscosity, honors Jean Poiseuille P := poise poise ||| viscosity rhe := poise^-1 // reciprocal viscosity rhe ||| reciprocal_viscosity stokes := cm^2 / s // kinematic viscosity St := stokes stokes ||| kinematic_viscosity stoke := stokes lentor := stokes // old name Gal := cm / s^2 // acceleration, used in geophysics galileo := Gal // for earth's gravitational field // (note that "gal" is for gallon // but "Gal" is the standard symbol // for the gal which is evidently a // shortened form of "galileo".) barye := dyne/cm^2 // pressure barad := barye // old name kayser := 1/cm // Proposed as a unit for wavenumber balmer := kayser // Even less common name than "kayser" kine := cm/s // velocity bole := g cm / s // momentum pond := gram force glug := gram force s^2 / cm// Mass which is accelerated at // 1 cm/s^2 by 1 gram force darcy := centipoise cm^2 /(s atm)// Measures permeability to fluid flow. // One darcy is the permeability of a // medium that allows a flow of cc/s of // a liquid of centipoise viscosity // under a pressure gradient of atm/cm. mohm := cm / (dyn s) // mobile ohm, measure of mechanical mobileohm := mohm // mobility mechanicalohm := dyn s / cm // mechanical resistance acousticalohm := dyn s / cm^5 // ratio of the sound pressure of // 1 dyn/cm^2 to a source of strength // 1 cm^3/s ray := acousticalohm rayl := dyn s / cm^3 // Specific acoustical resistance eotvos := 1ee-9 Gal/cm // Change in gravitational acceleration // over horizontal distance // Electromagnetic units derived from the abampere abampere := 10 A // Current which produces a force of abamp := abampere // 2 dyne/cm between two infinitely aA := abampere // long wires that are 1 cm apart biot := aA // alternative name for abamp Bi := biot abcoulomb := abamp sec abcoul := abcoulomb abvolt := dyne cm / (abamp sec) abfarad := abampere sec / abvolt abhenry := abvolt sec / abamp abohm := abvolt / abamp abmho := abohm^-1 gauss := abvolt sec / cm^2 Gs := gauss maxwell := abvolt sec // Also called the "line" Mx := maxwell oersted := gauss / mu0 Oe := oersted gilbert := gauss cm / mu0 Gb := gilbert Gi := gilbert unitpole := 4 pi maxwell // Gaussian system: electromagnetic units derived from statampere. // // Note that the Gaussian units are often used in such a way that Coulomb's law // has the form F= q1 * q2 / r^2. The constant 1/(4*pi*epsilon0) // is incorporated // into the units. From this, we can get the relation force=charge^2/dist^2. // This means that the simplification esu^2 = dyne cm^2 can be used to simplify // units in the Gaussian system, with the curious result that capacitance can // be measured in cm, resistance in sec/cm, and inductance in sec^2/cm. These // units are given the names statfarad, statohm and stathenry below. statampere := 10 A cm / (s c) statamp := statampere statvolt := dyne cm / (statamp sec) statcoulomb := statamp s esu := statcoulomb statcoul := statcoulomb statfarad := statamp sec / statvolt cmcapacitance := statfarad stathenry := statvolt sec / statamp statohm := statvolt / statamp statmho := statohm^-1 statmaxwell := statvolt sec franklin := statcoulomb debye := 1ee-18 statcoul cm// unit of electrical dipole moment debye ||| electrical_dipole_moment helmholtz := debye/angstrom^2 // Dipole moment per area jar := 1000 statfarad // approx capacitance of Leyden jar // // Some historical eletromagnetic units // intampere := 0.999835 A // Defined as the current which in one intamp := intampere // second deposits .001118 gram of // silver from an aqueous solution of // silver nitrate. intfarad := 0.999505 F intvolt := 1.00033 V intohm := 1.000495 ohm // Defined as the resistance of a // uniform column of mercury containing // 14.4521 gram in a column 1.063 m // long and maintained at 0 degC. daniell := 1.042 V // Meant to be electromotive force of a // Daniell cell, but in error by .04 V faraday := N_A electroncharge mol // Charge that must flow to deposit or faraday_phys := 96521.9 C // liberate one gram equivalent of any faraday_chem := 96495.7 C // element. (The chemical and physical // values are off slightly from what is // obtained by multiplying by amu_chem // or amu_phys. These values are from // a 1991 NIST publication.) Note that // there is a Faraday constant which is // equal to N_A e and hence has units of // C/mol. kappline := 6000 maxwell // Named by and for Gisbert Kapp siemensunit := 0.9534 ohm // Resistance of a meter long column of // mercury with a 1 mm cross section. // // Photometric units // candle := 1.02 candela // Standard unit for luminous intensity hefnerunit := 0.9 candle // in use before candela hefnercandle := hefnerunit // violle := 20.17 cd // luminous intensity of 1 cm^2 of // platinum at its temperature of // solidification (2045 K) lumen := cd sr // Luminous flux lm := lumen // talbot := lumen s // Luminous energy lumberg := talbot talbot ||| luminous_energy m^-2 cd sr ||| illuminance lux := lm/m^2 // Illuminance or exitance (luminous lx := lux // flux incident on or coming from phot := lumen / cm^2 // a surface) ph := phot // footcandle := lumen/ft^2 // Illuminance from a 1 candela source // at a distance of one foot metercandle := lumen/m^2 // Illuminance from a 1 candela source // at a distance of one meter mcs := metercandle s// luminous energy per area, used to // measure photographic exposure // Luminance measures nit := cd/m^2 // Luminance: the intensity per projected stilb := cd / cm^2 // area of an extended luminous source. sb := stilb // (nit is from latin nitere = to shine.) apostilb := cd/(pi m^2) asb := apostilb blondel := apostilb // Named after a French scientist. nox := 1ee-3 lux // These two units were proposed for skot := 1ee-3 apostilb// measurements relating to dark adapted // eyes. // Equivalent luminance measures. These units are units which measure // the luminance of a surface with a specified exitance which obeys // Lambert's law. (Lambert's law specifies that luminous intensity of // a perfectly diffuse luminous surface is proportional to the cosine // of the angle at which you view the luminous surface.) equivalentlux := cd / (pi m^2) // luminance of a 1 lux surface equivalentphot := cd / (pi cm^2) // luminance of a 1 phot surface lambert := cd / (pi cm^2) footlambert := cd / (pi ft^2) // Some luminance data from the IES Lighting Handbook, 8th ed, 1993 sunlum := 1.6e9 cd/m^2 // at zenith sunillum := 100e3 lux // clear sky sunillum_o := 10e3 lux // overcast sky sunlum_h := 6e6 cd/m^2 // value at horizon skylum := 8000 cd/m^2 // average, clear sky skylum_o := 2000 cd/m^2 // average, overcast sky moonlum := 2500 cd/m^2 // // Astronomical time measurements // anomalisticyear := 365.2596 days // The time between successive // perihelion passages of the // earth. siderealyear := 365.256360417 day // The time for the earth to make // one revolution around the sun // relative to the stars. tropicalyear := 365.242198781 day // The mean interval between vernal // equinoxes. Differs from the // sidereal year by 1 part in // 26000 due to precession of the // earth about its rotational axis // combined with precession of the // perihelion of the earth's // orbit. gaussianyear := 365.2690 days // The orbital period of a body in // circular orbit at a distance of // 1 au from the sun. Calculated // from Kepler's third law. siderealday := 23.934469444 hour // The sidereal day is the interval siderealhour := 1/24 siderealday // between two successive transits siderealminute := 1/60 siderealhour // of a star over the meridian, siderealsecond := 1/60 siderealminute// or the time required for the // earth to make one rotation // relative to the stars. The // more usual solar day is the // time required to make a // rotation relative to the sun. // Because the earth moves in its // orbit, it has to turn a bit // extra to face the sun again, // hence the solar day is slightly // longer. anomalisticmonth := 27.55454977 day // Time from perigee to perigee nodicalmonth := 27.2122199 day // The nodes are the points where draconicmonth := nodicalmonth // an orbit crosses the ecliptic. draconiticmonth := nodicalmonth // This is the time required to // travel from the ascending node // to the next ascending node. siderealmonth := 27.321661 day // Time required for the moon to // orbit the earth lunarmonth := 29.5305555 day // Time between full moons. Full synodicmonth := lunarmonth // moon occur when the sun and lunation := synodicmonth // moon are on opposite sides of lune := 1/30 lunation // the earth. Since the earth lunour := 1/24 lune // moves around the sun, the moon // has to revolve a bit farther to // get into the full moon // configuration. year := tropicalyear yr := year month := 1/12 year // This is obviously an average for the // limiting case... so is accurate in the // long term but useless for adding an // offset to a specific date. mo := month decade := 10 years century := 100 years centuries := century // Irregular plural millennium := 1000 years millennia := millennium solaryear := year lunaryear := 12 lunarmonth calendaryear := 365 day commonyear := 365 day leapyear := 366 day julianyear := 365.25 day juliancentury := 36525 day juliancenturies := 36525 day gregorianyear := 365.2425 day islamicyear := 354 day // A year of 12 lunar months. They islamicleapyear := 355 day // began counting on July 16, AD 622 // when Muhammad emigrated to Medina // (the year of the Hegira). They need // 11 leap days in 30 years to stay in // sync with the lunar year which is a // bit longer than the 29.5 days of the // average month. islamicmonth := 1/12 islamicyear// They have 29 day and 30 day months. cron := 1ee6 years lustrum := 5 years // The Lustrum was a Roman // purification ceremony that took // place every five years. // Classically educated Englishmen // used this term. // The following are sidereal days unless otherwise noted mercuryday := 58.6462 day venusday := 243.01 day // retrograde earthday := siderealday marssiderealday := 24 hours + 37 min + 22.663 sec marsday := marssiderealday marssolarday := 24 hours + 39 min + 35.24409 sec jupiterday := 0.41354 day saturnday := 0.4375 day uranusday := 0.65 day // retrograde neptuneday := 0.768 day plutoday := 6.3867 day // Solar days // Planetary sidereal years mercuryyear := 86.96 day venusyear := 224.68 day earthyear := siderealyear marsyear := 686.95 day jupiteryear := 11.862 tropicalyear saturnyear := 29.458 tropicalyear uranusyear := 84.012 tropicalyear neptuneyear := 164.798 tropicalyear plutoyear := 248.5 tropicalyear // // Some other astronomical values // sunmass := 1.9891e30 kg sunradius := 6.96e8 m sunpower := 3.86e26 watts landarea := 148.847e6 km^2 oceanarea := 361.254e6 km^2 moonmass := 7.3483e22 kg moonradius := 1738 km // mean value // Distances sundist := 1.0000010178 au// mean earth-sun distance sundist_near := 1.471e11 m // earth-sun distance at perihelion sundist_far := 1.521e11 m // earth-sun distance at aphelion // Average distances between planets and the sun. mercurydist := 57910. Mm venusdist := 108200. Mm earthdist := sundist marsdist := 227940. Mm jupiterdist := 778330. Mm saturndist := 1429400. Mm uranusdist := 2870990. Mm neptunedist := 4497070. Mm plutodist := 5913520. Mm moondist := 384400. km // mean earth-moon distance mercurymass := 0.33022e24 kg venusmass := 4.8690e24 kg marsmass := 0.64191e24 kg earthmass := 5.9742e24 kg jupitermass := 1898.8e24 kg saturnmass := 568.5e24 kg uranusmass := 86.625e24 kg neptunemass := 102.78e24 kg plutomass := 0.0127e24 kg mercuryradius := 2439. km venusradius := 6052. km marsradius := 3397. km earthradius := 6371.01 km // mean +/- 0.02 km jupiterradius := 71492. km saturnradius := 60268. km uranusradius := 25559. km neptuneradius := 24764. km plutoradius := 1137. km // These use the WGS84 datum, which is currently most commonly used // in mapping. earthradius_equatorial := 6378137. m earthradius_polar := 6356752.3142 m earth_flattening := (earthradius_equatorial-earthradius_polar)/earthradius_equatorial // http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.HTM // http://ssd.jpl.nasa.gov/phys_props_earth.html // Larger moons... their distances are the average distances from their planet. // Mars phobosdist = 9378.5 km phobosmass = 1.08e16 kg deimosdist = 23458. km deimosmass = 1.8e15 kg // Jupiter iodist := 422000. km ioradius := 1815. km iomass := 8.93e22 kg europadist := 670900. km europaradius := 1569. km europamass := 4.80e22 kg ganymededist := 1070000. km ganymederadius := 2631. km ganymedemass := 1.48e23 kg callistodist := 1883000. km callistoradius := 2400. km callistomass := 1.08e23 kg // Saturn titandist := 1221850. km titanradius := 2575. km titanmass := 1.35e23 kg // Pluto charondist := 19640. km charonradius := 586. km charonmass := 1.90e21 kg moongravity := 1.62 m/s^2 // General cosmological observations hubbleconstant := 71 km/s/megaparsec // WMAP data, +0.04/-0.03 (factor) H_0 := hubbleconstant atomicmass := electronmass atomiccharge := electroncharge atomicaction := hbar // Inverse time units annually := 1/year annual := annually yearly := annual daily := 1/day weekly := 1/week monthly := 1/month hourly := 1/hour // Perfect intervals octave := 2 majorthird := 5/4 minorthird := 6/5 musicalfourth := 4/3 musicalfifth := 3/2 majorsecond := musicalfifth^2 / octave majorsixth := musicalfourth majorthird minorsixth := musicalfourth minorthird majorseventh := musicalfifth majorthird minorseventh := musicalfifth minorthird pythagoreanthird := majorsecond musicalfifth^2 / octave syntoniccomma := pythagoreanthird / majorthird pythagoreancomma := musicalfifth^12 / octave^7 // Equal tempered definitions semitone := octave^(1/12) // // The Hartree system of atomic units, derived from fundamental units // of mass (of electron), action (planck's constant), charge, and // the coulomb constant. // Fundamental units // derived units (Warning: accuracy is lost from deriving them this way) atomiclength := bohrradius atomictime := hbar^3/(coulombconst^2 atomicmass electroncharge^4) // Period of first Bohr orbit atomicvelocity := atomiclength / atomictime atomicenergy := hbar / atomictime hartree := atomicenergy Hartree := hartree // // These thermal units treat entropy as charge, from [5] // thermalcoulomb := J/K // entropy thermalampere := W/K // entropy flow thermalfarad := J/K^2 thermalohm := K^2/W // thermal resistance fourier := thermalohm thermalhenry := J K^2/W^2 // thermal inductance thermalvolt := K // thermal potential difference // surveyor's measure surveyorschain := 66 surveyft surveyorspole := 1/4 surveyorschain surveyorslink := 1/100 surveyorschain chain := surveyorschain surveychain := chain ch := chain link := surveyorslink acre := 43560 surveyfoot^2 // NIST Handbook 44 has a // typographical error (forgetting // to underline feet in one place // on middle of page C-16 in 2003 // edition) with // respect to this, but it's // clear from corroborating // different figures in that // document and NIST Special // Publication 811, Sec. B.6, // that the survey foot is // the proper definition. Have // filed errata with NIST and // requested confirmation. // 2003-08-27 intacre := 43560 ft^2 // Acre based on international ft acrefoot := acre surveyfoot acrefeet := acrefoot // Irregular plural section := surveymile^2 township := 36 section homestead := 160 acre // Area of land granted by the 1862 Homestead // Act of the United States Congress gunterschain := surveyorschain engineerschain := 100 ft engineerslink := 1/100 engineerschain ramsdenschain := engineerschain ramsdenslink := engineerslink // nautical measure fathom := 6 surveyft // Originally defined as the distance from // fingertip to fingertip with arms fully // extended. nauticalmile := 1852 m // Supposed to be one minute of latitude at // the equator. That value is about 1855 m. // Early estimates of the earth's circumference // were a bit off. The value of 1852 m was // made the international standard in 1929. // The US did not accept this value until // July 1, 1954. The UK switched in 1970. // The value of this unit was adopted by the // First International Extraordinary // Hydrographic Conference, Monaco, 1929, // under the name "International nautical mile." oldUSnauticalmile := 6080.20 feet // Used in U.S. before July 1, 1954 oldUSknot := oldUSnauticalmile / hour cable := 720 surveyfoot // NIST Handbook 44, 2003 Appendix C cablelength := cable cableslength := cable metriccable := 200 m // Used by France and Spain navycablelength := 720 surveyft marineleague := 3 nauticalmile knot := nauticalmile / hr shackle := 15 fathoms // Adopted 1949 by British navy oldUKRNshackle := 12.5 fathoms // Used by Royal Navy until 1949 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. datamile := 6000 feet // Defined by U.S. Department of Defense // as a unit used in radar measurements. // Avoirdupois weight // These are actually defined as mass units to follow the recommendations // of the SI. pound := 45359237/100000000 kg // Defined exactly lb := pound // From the latin libra grain := 1/7000 pound // The grain is the same in all three // weight systems. It was originally // defined as the weight of a barley // corn taken from the middle of the // ear. gr := grain ounce := 1/16 pound oz := ounce dram := 1/16 ounce dr := dram hundredweight := 100 pounds // This is the USA hundredweight cwt := hundredweight shorthundredweight := hundredweight ton := 2000 lb shortton := ton shortquarter := 1/4 shortton // Troy Weight. In 1828 the troy pound was made the first United States // standard weight. It was to be used to regulate coinage. troypound := 5760 grain troyounce := 1/12 troypound ozt := troyounce pennyweight := 1/20 troyounce // Abbreviated "d" in reference to a dwt := pennyweight // Frankish coin called the "denier" // minted in the late 700's. There // were 240 deniers to the pound. assayton := mg ton / troyounce // mg / assayton = troyounce / ton // Some other jewelers units metriccarat := 2/10 gram metricgrain := 50 mg carat := metriccarat ct := carat jewelerspoint := 1/100 carat silversmithpoint := 1/4000 inch // Apothecaries' weight appound := troypound apounce := troyounce apdram := 1/8 apounce scruple := 1/3 apdram // Liquid measure gallon := 231 in^3 gal := gallon quart := 1/4 gallon qt := quart pint := 1/2 qt pt := pint gill := 1/4 pint fluidounce := 1/16 pint floz := fluidounce fluiddram := 1/8 floz fldr := fluiddram minim := 1/60 fldr liquidbarrel := 31.5 gallon petroleumbarrel := 42 gallon // Originated in Pennsylvania oil // fields, from the winetierce barrel := petroleumbarrel oilbarrel := petroleumbarrel bbl := barrel hogshead := 63 gallon firkin := 9 gallon // Dry measures: The Winchester Bushel was defined by William III in 1702 and // legally adopted in the US in 1836. drybarrel := 7056 in^3 bushel := 2150.42 in^3 // Volume of 8 inch cylinder with 18.5 bu := bushel // inch diameter (rounded) peck := 1/4 bushel pk := peck drygallon := 1/2 peck dryquart := 1/4 drygallon drypint := 1/2 dryquart // Grain measures. The bushel as it is used by farmers in the USA is actually // a measure of mass which varies for different commodities. Canada uses the // same bushel masses for most commodities, but not for oats. wheatbushel := 60 lb soybeanbushel := 60 lb cornbushel := 56 lb ryebushel := 56 lb barleybushel := 48 lb oatbushel := 32 lb ricebushel := 45 lb canada_oatbushel := 34 lb // Wine and Spirits measure pony := 1 floz jigger := 1.5 floz // Can vary between 1 and 2 floz shot := jigger // Sometimes 1 floz eushot := 20 ml // EU standard spirits measure // See http://bundesrecht.juris.de/eo_1988/anhang_c_119.html fifth := 1/5 gallon winebottle := 750 ml // US industry standard, 1979 winesplit := 1/4 winebottle wineglass := 4 floz magnum := 1.5 liter // Standardized in 1979, but given // as 2 qt in some references metrictenth := 375 ml metricfifth := 750 ml metricquart := 1 liter // French champagne bottle sizes split := 200 ml jeroboam := 2 magnum rehoboam := 3 magnum methuselah := 4 magnum salmanazar := 6 magnum balthazar := 8 magnum nebuchadnezzar := 10 magnum // Shoe measures shoeiron := 1/48 inch // Used to measure leather in soles shoeounce := 1/64 inch // Used to measure non-sole shoe leather // // USA slang units // buck := dollar fin := 5 dollar sawbuck := 10 dollar key := kg // usually of marijuana, 60's lid := 1 oz // Another 60's weed unit footballfield := 100 yards marathon := 26 miles + 385 yards // // British // british :- 1200000/3937014 m/ft // The UK lengths were defined by // a bronze bar manufactured in // 1844. Measurement of that bar // revealed the dimensions given // here. // Old nautical definitions // See: http://www.hemyockcastle.co.uk/nautical.htm oldbrnauticalmile := 6080 ft // Used until 1970 when the UK oldbrknot := oldbrnauticalmile / hr // switched to the international oldbrcable := 1/10 oldbrnauticalmile // nautical mile. geographicalmile := oldbrnauticalmile admiraltymile := oldbrnauticalmile admiraltyknot := oldbrknot admiraltycable := oldbrcable seamile := 6000 ft cablet := 120 fathoms hawserlaidcable := 130 fathoms oldrussiancable := 100 fathoms oldhollandcable := 123 fathoms oldportugalcable:= 141 fathoms // British Imperial weight is mostly the same as US weight. A few extra // units are added here. clove := 7 lb stone := 14 lb brhundredweight := 8 stone brquartermass := 1/4 brhundredweight longhundredweight := brhundredweight longton := 20 brhundredweight brton := longton brassayton := mg brton / troyounce // British Imperial volume measures brgallon := 454609/100000 l // The British Imperial gallon was canadiangallon := brgallon // defined in 1824 to be the volume of cangallon := brgallon // water which weighed 10 pounds at 62 // deg F with a pressure of 30 inHg. // In 1963 it was defined to be the space // occupied by 10 pounds of distilled // water of density 0.998859 g/ml weighed // in air of density 0.001217 g/ml // against weights of density 8.136 g/ml. // The value given here is given by [1] // as an exact value. imperialgallon := brgallon brquart := 1/4 brgallon imperialquart := brquart brpint := 1/2 brquart imperialpint := brpint brfloz := 1/20 brpint // Note difference in definition imperialfloz := brfloz brdram := 1/8 brfloz imperialdram := brdram brminim := 1/60 brdram imperialminim := brminim brscruple := 1/3 brdram imperialscruple := brscruple fluidscruple := brscruple brfluidounce := brfloz imperialfluidounce := brfloz brgill := 1/4 brpint imperialgill := brgill brpeck := 2 brgallon imperialpeck := brpeck brbarrel := 36 brgallon // Used for beer imperialbarrel := brbarrel brbushel := 4 brpeck imperialbushel := brbushel brheapedbushel := 1.278 brbushel brquarter := 8 brbushel brchaldron := 36 brbushel // Obscure British volume measures. These units are generally traditional // measures whose definitions have fluctuated over the years. Often they // depended on the quantity being measured. They are given here in terms of // British Imperial measures. For example, the puncheon may have historically // been defined relative to the wine gallon or beer gallon or ale gallon // rather than the British Imperial gallon. bag := 4 brbushel bucket := 4 brgallon last := 40 brbushel noggin := brgill pottle := 1/2 brgallon pin := 4.5 brgallon puncheon := 72 brgallon seam := 8 brbushel coomb := 4 brbushel boll := 6 brbushel firlot := 1/4 boll brfirkin := 9 brgallon // Used for ale and beer cran := 37.5 brgallon // measures herring, about 750 fish barrelbulk := 5 feet^3 brhogshead := 63 brgallon registerton := 100 ft^3 // Used for internal capacity of ships shippington := 40 ft^3 // Used for ship's cargo freight or timber brshippington := 42 ft^3 // freightton := shippington// Both register ton and shipping ton derive // from the "tun cask" of wine. displacementton := 35 ft^3 // Approximate volume of a longton weight of // sea water used to measure ship displacement waterton := 224 brgallon strike := 70.5 l // 16th century unit, sometimes // defined as .5, 2, or 4 bushels // depending on the location. It // probably doesn't make a lot of // sense to define in terms of imperial // bushels. Zupko gives a value of // 2 Winchester grain bushels or about // 70.5 liters. // obscure British lengths barleycorn := 1/3 britishinch // Given in Realm of Measure as the // difference between successive shoe sizes nail := 1/16 britishyard // Originally the width of the thumbnail, // or 1/16 ft. This took on the general // meaning of 1/16 and settled on the // nail of a yard or 1/16 yards as its // final value. [12] pole := 16.5 britishft rope := 20 britishft englishell := 45 britishinch flemishell := 27 britishinch ell := englishell // supposed to be measure from elbow to // fingertips span := 9 britishinch // supposed to be distance from thumb // to pinky with full hand extension goad := 4.5 britishft // used for cloth // misc obscure British units rood := 1/4 acre englishcarat := 3.163 grain // Originally intended to be 4 grain // but this value ended up being // used in the London diamond market mancus := 2 oz mast := 2.5 lb basebox := 31360 in^2 // Used in metal plating // alternate spellings metre := meter gramme := gram litre := liter dioptre := diopter // // Units derived the human body (may not be very accurate) // geometricpace := 5 ft // distance between points where the same // foot hits the ground pace := 2.5 ft// distance between points where alternate // feet touch the ground USmilitarypace := 30 in // United States official military pace USdoubletimepace := 36 in // United States official doubletime pace fingerbreadth := 7/8 in// The finger is defined as either the width fingerlength := 4.5 in// or length of the finger finger := fingerbreadth hand := 4 inch// width of hand palmwidth := hand // The palm is a unit defined as either the width palmlength := 8 in // or the length of the hand // // Cooking measures // // US measures cup := 8 floz tablespoon := 1/16 cup tbl := tablespoon tbsp := tablespoon Tbsp := tablespoon Tsp := tablespoon teaspoon := 1/3 tablespoon tsp := teaspoon metriccup := 250 ml // US can sizes. number1can := 10 floz number2can := 19 floz number2_5can := 3.5 cups number3can := 4 cups number5can := 7 cups number10can := 105 floz // British measures brcup := 1/2 brpint brteacup := 1/3 brpint brtablespoon := 15 ml // Also 5/8 brfloz, approx 17.7 ml brteaspoon := 1/3 brtablespoon // Also 1/4 brtablespoon dessertspoon := 2 brteaspoon brtsp := brteaspoon brtbl := brtablespoon dsp := dessertspoon // Australian australiatablespoon := 20 ml austbl := australiatablespoon // Chinese // Thai measurements are very similar so the name must be qualified chinesecatty := 1/2 kg oldchinesecatty := 4/3 lbs // Before metric conversion. chinesetael := 1/16 oldchinesecatty chinesemace := 1/10 chinesetael oldchinesepicul := 100 oldchinesecatty chinesepicul := 100 chinesecatty // Chinese usage // Thai weights thaitical := 15 grams thaibaht := thaitical // New name for thaitical, not to be confused with // the Thai currency called "Thailand_baht". thaisalung := 1/4 thaitical thaifung := 1/2 thaisalung thaisatang := 1/100 thaitical thaisadtahng := thaisatang // Alternate transliteration thaitamlung := 4 thaitical thaicatty := 10 thaitamlung thaichang := 2 thaicatty thaihap := 50 thaichang thaipicul := thaihap thaikoyan := 20 thaipicul // Japanese japancup := 200 ml jo := 71 inches * 35.5 inches // The area of a standard tatami mat. tatamimat := jo tsubo := 2 jo // Used in agriculture // densities of cooking ingredients from The Cake Bible by Rose Levy Beranbaum // so you can convert '2 cups sugar' to grams, for example, or in the other // direction grams could be converted to 'cup flour_scooped'. butter := 8. oz/cup butter_clarified := 6.8 oz/cup cocoa_butter := 9. oz/cup shortening := 6.75 oz/cup // vegetable shortening stickbutter := 1/4 lb vegetable_oil := 7.5 oz/cup cakeflour_sifted := 3.5 oz/cup // The density of flour depends on the cakeflour_spooned := 4. oz/cup // measuring method. "Scooped", or cakeflour_scooped := 4.5 oz/cup // "dip and sweep" refers to dipping a flour_sifted := 4. oz/cup // measure into a bin, and then sweeping flour_spooned := 4.25 oz/cup // the excess off the top. "Spooned" flour_scooped := 5. oz/cup // means to lightly spoon into a measure breadflour_sifted := 4.25 oz/cup // and then sweep the top. Sifted means breadflour_spooned := 4.5 oz/cup // sifting the flour directly into a breadflour_scooped := 5.5 oz/cup // measure and then sweeping the top. cornstarch := 120. grams/cup dutchcocoa_sifted := 75. g/cup // These are for Dutch processed cocoa dutchcocoa_spooned := 92. g/cup dutchcocoa_scooped := 95. g/cup cocoa_sifted := 75. g/cup // These are for nonalkalized cocoa cocoa_spooned := 82. g/cup cocoa_scooped := 95. g/cup heavycream := 232. g/cup milk := 242. g/cup sourcream := 242. g/cup molasses := 11.25 oz/cup cornsyrup := 11.5 oz/cup honey := 11.75 oz/cup sugar := 200. g/cup powdered_sugar := 4. oz/cup brownsugar_light := 217. g/cup // packed brownsugar_dark := 239. g/cup baking_powder := 4.6 grams / tsp salt := 6 g / tsp koshersalt := 2.8 g / tsp // Diamond Crystal salt, from package // Note that Morton kosher salt is // much denser. ethanol := .7893 g/cm^3 // Density of ethanol alcohol := ethanol // For now, density of ethanol methanol := .79130 g/cm^3 // Density of methanol // Egg weights and volumes for a USA large egg egg := 50. grams eggwhite := 30. grams eggyolk := 18.6 grams eggvolume := 3. tablespoons + 1/2 tsp eggwhitevolume := 2. tablespoons eggyolkvolume := 3.5 tsp // // Units derived from imperial system // ouncedal := oz ft / s^2 // force which accelerates an ounce // at 1 ft/s^2 poundal := lb ft / s^2 // same thing for a pound tondal := ton ft / s^2 // and for a ton pdl := poundal psi := pound force / inch^2 psia := psi // absolute pressure tsi := ton force / inch^2 reyn := psi sec lbf := lb force slug := lbf s^2 / ft slugf := slug force slinch := lbf s^2 / inch // Mass unit derived from inch second slinchf := slinch force // pound-force system. Used in space // applications where in/sec^2 was a // natural acceleration measure. geepound := slug tonf := ton force lbm := lb kip := 1000 lbf // from kilopound mil := 1/1000 inch thou := 1/1000inch circularinch := 1/4 pi in^2 // area of a one-inch diameter circle circularmil := 1/4 pi mil^2// area of one-mil diameter circle cmil := circularmil cental := 100 pound centner := cental caliber := 1/100 inch // for measuring bullets duty := ft lbf celo := ft / s^2 jerk := ft / s^3 australiapoint := 1/100 inch // The "point" is used to measure rainfall // in Australia sabin := ft^2 // Measure of sound absorption equal to the // absorbing power of one square foot of // a perfectly absorbing material. The // sound absorptivity of an object is the // area times a dimensionless // absorptivity coefficient. standardgauge := 4 ft + 8.5 in // Standard width between railroad track flag := 5 ft^2 // Construction term referring to sidewalk. rollwallpaper := 30 ft^2 // Area of roll of wall paper fillpower := in^3 / ounce // Density of down at standard pressure. // The best down has 750-800 fillpower. pinlength := 1/16 inch // A//17 pin is 17/16 in long in the USA. buttonline := 1/40 inch // The line was used in 19th century USA // to measure width of buttons. scoopnumber := quart^-1 // Ice cream scoops are labeled with a // number specifying how many scoops // fill a quart. // // Other units of work, energy, power, etc // // Btu definitions: energy to raise a pound of water 1 degF // "Btu" is the correct capitalization. Btu := cal lb degrankine / (gram K)// international table BTU btu := Btu BTU := btu britishthermalunit := Btu Btu_IT := Btu btu_IT := Btu_IT Btu_th := cal_th lb degrankine / (gram K) btu_th := Btu_th Btu_mean := cal_mean lb degrankine / (gram K) btu_mean := Btu_mean quad := quadrillion Btu ECtherm := 105506000 J // Exact definition, close to 1e5 Btu UStherm := 105480400 J // Exact definition therm := UStherm // The horsepower is supposedly the power of one horse pulling. Obviously // different people had different horses. horsepower := 550 foot pound force / sec // Invented by James Watt hp := horsepower metrichorsepower := 75 kilogram force meter / sec electrichorsepower := 746 W boilerhorsepower := 9809.50 W waterhorsepower := 746.043 W brhorsepower := 745.70 W donkeypower := 250 W Wh := watt hour // Thermal insulance and conductivity. Rvalue := degrankine ft^2 hr / Btu // r-value, U.S. insulation figure Cvalue := 1/Rvalue // C-value U.S. insulation conductance rating kvalue := Btu in / (ft^2 hr degF) // k-value, insulation conductance/in thick Uvalue := 1/Rvalue europeanUvalue := watt / (m^2 K) RSI := K m^2 / W // SI insulation figure // The following definitions are per NIST Special Publication 811: // http://physics.nist.gov/Pubs/SP811/appenB9.html W / (m K) ||| thermal_conductivity m^2 K / W ||| thermal_insulance K / W ||| thermal_resistance m K / W ||| thermal_resistivity // Term not defined by SI, somewhat questionable. Used in building trade. W / (m^2 K) ||| thermal_conductance // Defined by the BIPM, // http://www.bipm.org/pdf/si-brochure.pdf J/kg ||| specific_energy W/m^2 ||| heat_flux_density J/mol ||| molar_energy J/(mol K) ||| molar_heat_capacity // kvalue is defined as the amount of // heat that will be transmitted through a one inch thick piece of // homogenous material, one square foot in size, in one hour, when // there is a one degree Fahrenheit temperature difference. // // Cvalue is the kvalue multiplied by the thickness in inches and thus // gives the thermal conductance of a real piece of material with a given // thickness. // Rvalue is the reciprocal of this, and refers to the thermal insulance of a // real piece of material of a given, concrete thickness. clo := 0.155 K m^2 / W// Supposed to be the insulance // required to keep a resting person // comfortable indoors. The value // given is from NIST and the CRC, // but [5] gives a slightly different // value of 0.875 ft^2 degF hr / Btu. // Misc other measures clausius := 1ee3 cal/K // A unit of physical entropy langley := thermcalorie/cm^2 poncelet := 100 kg force m / s tonrefrigeration := ton 144 Btu / (lb day)// One ton refrigeration is // the rate of heat extraction required // turn one ton of water to ice in // a day. Ice is defined to have a // latent heat of 144 Btu/lb. tonsrefrigeration := tonrefrigeration // Irregular plural tonref := tonrefrigeration refrigeration := tonref / ton frigorie := 1000 cal_fifteen// Used in refrigeration engineering. // Energy in combustible fuels TNT := 4_184_000_000 J/ton // So you can write tons TNT, this // is a defined, not measured, value PETN := 6.01e6 J/kg // An explosive compound, // Pentaerythrite tetranitrate // used in plastic explosive like Semtex gasoline := 1.4e8 J/gallon // So you can convert energy // to gallons gasoline natural_gas := 1.09e6 J/foot^3 // Energy in natural gas naturalgas := natural_gas propane := 9.63e7 J/gallon // Energy in liquid propane kerosene := 1.42e8 J/gallon // Energy in liquid kerosene oil := 41.868 GJ/metricton coal := 18.20 GJ/metricton // // Permeability: The permeability or permeance, n, of a substance determines // how fast vapor flows through the substance. The formula W = n A dP // holds where W is the rate of flow (in mass/time), n is the permeability, // A is the area of the flow path, and dP is the vapor pressure difference. // // Alan's Veto: These are damned, damned sketchy, and are going to go. // perm_0C := grain / (hr ft^2 inHg) // perm_zero := perm_0C // perm_0 := perm_0C // perm := perm_0C //perm_23C := grain / (hr ft^2 in-Hg23C) //perm_twentythree := perm_23C // // Counting measures // unity := 1 pair := 2 couple := 2 brace := 2 nest := 3 dickers := 10 dozen := 12 bakersdozen := 13 score := 20 flock := 40 timer := 40 shock := 60 gross := 144 greatgross := 12 gross // Paper counting measure shortquire := 24 quire := 25 shortream := 480 ream := 500 perfectream := 516 bundle := 2 reams bale := 5 bundles // // Paper measures // // USA paper sizes lettersize := 8.5 inch 11 inch legalsize := 8.5 inch 14 inch ledgersize := 11 inch 17 inch executivesize := 7.25 inch 10.5 inch Apaper := 8.5 inch 11 inch Bpaper := 11 inch 17 inch Cpaper := 17 inch 22 inch Dpaper := 22 inch 34 inch Epaper := 34 inch 44 inch // The metric paper sizes are defined so that if a sheet is cut in half // along the short direction, the result is two sheets which are // similar to the original sheet. This means that for any metric size, // the long side is close to sqrt(2) times the length of the short // side. Each series of sizes is generated by repeated cuts in half, // with the values rounded down to the nearest millimeter. A0paper := 841 mm 1189 mm // The basic size in the A series A1paper := 594 mm 841 mm // is defined to have an area of A2paper := 420 mm 594 mm // one square meter. A3paper := 297 mm 420 mm A4paper := 210 mm 297 mm A5paper := 148 mm 210 mm A6paper := 105 mm 148 mm A7paper := 74 mm 105 mm A8paper := 52 mm 74 mm A9paper := 37 mm 52 mm A10paper := 26 mm 37 mm B0paper := 1000 mm 1414 mm // The basic B size has an area B1paper := 707 mm 1000 mm // of sqrt(2) square meters. B2paper := 500 mm 707 mm B3paper := 353 mm 500 mm B4paper := 250 mm 353 mm B5paper := 176 mm 250 mm B6paper := 125 mm 176 mm B7paper := 88 mm 125 mm B8paper := 62 mm 88 mm B9paper := 44 mm 62 mm B10paper := 31 mm 44 mm C0paper := 917 mm 1297 mm // The basic C size has an area C1paper := 648 mm 917 mm // of sqrt(sqrt(2)) square meters. C2paper := 458 mm 648 mm C3paper := 324 mm 458 mm // Intended for envelope sizes C4paper := 229 mm 324 mm C5paper := 162 mm 229 mm C6paper := 114 mm 162 mm C7paper := 81 mm 114 mm C8paper := 57 mm 81 mm C9paper := 40 mm 57 mm C10paper := 28 mm 40 mm // gsm (Grams per Square Meter), a sane, metric paper weight measure gsm := grams / meter^2 // In the USA, a collection of crazy historical paper measures are used. Paper // is measured as a weight of a ream of that particular type of paper. This is // sometimes called the "substance" or "basis" (as in "substance 20" paper). // The standard sheet size or "basis size" varies depending on the type of // paper. As a result, 20 pound bond paper and 50 pound text paper are actually // about the same weight. The different sheet sizes were historically the most // convenient for printing or folding in the different applications. These // different basis weights are standards maintained by American Society for // Testing Materials (ASTM) and the American Forest and Paper Association // (AF&PA). poundbookpaper := lb / 25 inch 38 inch ream lbbook := poundbookpaper poundtextpaper := poundbookpaper lbtext := poundtextpaper poundoffsetpaper := poundbookpaper // For offset printing lboffset := poundoffsetpaper poundbiblepaper := poundbookpaper // Designed to be lightweight, thin, lbbible := poundbiblepaper // strong and opaque. poundtagpaper := lb / 24 inch 36 inch ream lbtag := poundtagpaper poundbagpaper := poundtagpaper lbbag := poundbagpaper poundnewsprintpaper := poundtagpaper lbnewsprint := poundnewsprintpaper poundposterpaper := poundtagpaper lbposter := poundposterpaper poundtissuepaper := poundtagpaper lbtissue := poundtissuepaper poundwrappingpaper := poundtagpaper lbwrapping := poundwrappingpaper poundwaxingpaper := poundtagpaper lbwaxing := poundwaxingpaper poundglassinepaper := poundtagpaper lbglassine := poundglassinepaper poundcoverpaper := lb / 20 inch 26 inch ream lbcover := poundcoverpaper poundindexpaper := lb / 25.5 inch 30.5 inch ream lbindex := poundindexpaper poundindexbristolpaper := poundindexpaper lbindexbristol := poundindexpaper poundbondpaper := lb / 17 inch 22 inch ream // Bond paper is stiff and lbbond := poundbondpaper // durable for repeated poundwritingpaper := poundbondpaper // filing, and it resists lbwriting := poundwritingpaper // ink penetration. poundledgerpaper := poundbondpaper lbledger := poundledgerpaper poundcopypaper := poundbondpaper lbcopy := poundcopypaper poundblottingpaper := lb / 19 inch 24 inch ream lbblotting := poundblottingpaper poundblankspaper := lb / 22 inch 28 inch ream lbblanks := poundblankspaper poundpostcardpaper := lb / 22.5 inch 28.5 inch ream lbpostcard := poundpostcardpaper poundweddingbristol := poundpostcardpaper lbweddingbristol := poundweddingbristol poundbristolpaper := poundweddingbristol lbbristol := poundbristolpaper poundboxboard := lb / (1000 ft^2) lbboxboard := poundboxboard poundpaperboard := poundboxboard lbpaperboard := poundpaperboard // When paper is marked in units of M, it means the weight of 1000 sheets of the // given size of paper. To convert this to paper weight, divide by the size of // the paper in question. paperM := lb / 1000 // // Old French distance measures, from French Weights and Measures // Before the Revolution by Zupko // frenchfoot := 4500/13853 m // pied de roi, the standard of Paris. pied := frenchfoot // Half of the hashimicubit, frenchfeet := frenchfoot // instituted by Charlemagne. frenchinch := 1/12 frenchfoot // This exact definition comes from frenchthumb := frenchinch // a law passed on 10 Dec 1799 which pouce := frenchthumb // fixed the meter at // 3 frenchfeet + 11.296 lignes. frenchline := 1/12 frenchinch // This is supposed to be the size ligne := frenchline // of the average barleycorn frenchpoint := 1/12 frenchline toise := 6 frenchfeet arpent := 180^2 pied^2 // The arpent is 100 square perches, // but the perche seems to vary a lot // and can be 18 feet, 20 feet, or 22 // feet. This measure was described // as being in common use in Canada in // 1934 (Websters 2nd). The value // given here is the Paris standard // arpent. // // Printing // fournierpoint := 0.1648 inch / 12 // First definition of the printers // point made by Pierre Fournier who // defined it in 1737 as 1/12 of a // cicero which was 0.1648 inches. olddidotpoint := 1/72 frenchinch // François Ambroise Didot, one of // a family of printers, changed // Fournier's definition around 1770 // to fit to the French units then in // use. bertholdpoint := 1/2660 m // H. Berthold tried to create a // metric version of the didot point // in 1878. INpoint := 0.4 mm // This point was created by a // group directed by Fermin Didot in // 1881 and is associated with the // imprimerie nationale. It doesn't // seem to have been used much. germandidotpoint := 0.376065 mm // Exact definition appears in DIN // 16507, a German standards document // of 1954. Adopted more broadly in // 1966 by ??? metricpoint := 3/8 mm // Proposed in 1977 by Eurograf point := 13837/1000000 inch // exact, NIST Handbook 44, Appendix 3 printerspoint := point texscaledpoint := 1/65536 point // The TeX typesetting system uses texsp := texscaledpoint // this for all computations. computerpoint := 1/72 inch // The American point was rounded computerpica := 12 computerpoint // to an even 1/72 inch by computer postscriptpoint := computerpoint // people at some point. pspoint := postscriptpoint Q := 1/4 mm // Used in Japanese phototypesetting // Q is for quarter frenchprinterspoint := olddidotpoint didotpoint := germandidotpoint // This seems to be the dominant value europeanpoint := didotpoint // for the point used in Europe cicero := 12 didotpoint stick := 2 inches // Type sizes excelsior := 3 point brilliant := 3.5 point diamond := 4 point pearl := 5 point agate := 5.5 point ruby := agate // British nonpareil := 6 point mignonette := 6.5 point emerald := mignonette// British minion := 7 point brevier := 8 point bourgeois := 9 point longprimer := 10 point smallpica := 11 point pica := 12 point english := 14 point columbian := 16 point greatprimer := 18 point paragon := 20 point meridian := 44 point canon := 48 point // German type sizes nonplusultra := 2 didotpoint brillant := 3 didotpoint diamant := 4 didotpoint perl := 5 didotpoint nonpareille := 6 didotpoint kolonel := 7 didotpoint petit := 8 didotpoint borgis := 9 didotpoint korpus := 10 didotpoint corpus := korpus garamond := korpus mittel := 14 didotpoint tertia := 16 didotpoint text := 18 didotpoint kleine_kanon := 32 didotpoint kanon := 36 didotpoint grosse_kanon := 42 didotpoint missal := 48 didotpoint kleine_sabon := 72 didotpoint grosse_sabon := 84 didotpoint // // Information theory units // nat := 0.69314718056 bits // Entropy measured base e hartley := 3.32192809488 bits // log2(10) bits, or the entropy // of a uniformly distributed // random variable over 10 // symbols. // // Computer // bps := bit/sec // Sometimes the term "baud" is // incorrectly used to refer to // bits per second. Baud refers // to symbols per second. Modern // modems transmit several bits // per symbol. byte := 8 bit // Not all machines had 8 bit // bytes, but these days most of // them do. But beware: for // transmission over modems, a // few extra bits are used so // there are actually 10 bits per // byte. nybble := 4 bits // Half of a byte. Sometimes // equal to different lengths // such as 3 bits. nibble := nybble // In computers, "kilo" tends to mean a multiple of 1024 or 2^10. // This obviously interferes with the standard meanings. // // In December 1998 the International Electrotechnical Commission (IEC), the // leading international organization for worldwide standardization in // electrotechnology, approved as an IEC International Standard names and // symbols for prefixes for binary multiples for use in the fields of data // processing and data transmission. One would say "kibibit" to mean 1024 bits // // http://physics.nist.gov/cuu/Units/binary.html // Prefixes kibi ::- 2^10 // kilobinary mebi ::- 2^20 // megabinary gibi ::- 2^30 // gigabinary tebi ::- 2^40 // terabinary pebi ::- 2^50 // petabinary exbi ::- 2^60 // exabinary // Official symbols Ki :- kibi Mi :- mebi Gi :- gibi Ti :- tebi Pi :- pebi Ei :- exbi jiffy := 1/100 sec // This is defined in the Jargon File jiffies := jiffy // (http://www.jargon.org) as being the // duration of a clock tick for measuring // wall-clock time. Supposedly the value // used to be 1/60 sec or 1/50 sec // depending on the frequency of AC power, // but then 1/100 sec became more common. // On linux systems, this term is used and // for the Intel based chips, it does have // the value of .01 sec. The Jargon File // also lists two other definitions: // millisecond, and the time taken for // light to travel one foot. // // yarn and cloth measures // // yarn linear density m kg^-1 ||| reciprocal_linear_mass_density woolyarnrun := 1600 yard/pound// 1600 yds of "number 1 yarn" weighs // a pound. yarncut := 300 yard/pound // Less common system used in // Pennsylvania for wool yarn cottonyarncount := 840 yard/pound linenyarncount := 300 yard/pound // Also used for hemp and ramie worstedyarncount := 1680 ft/pound metricyarncount := meter/gram kg/m ||| linear_mass_density tex := gram / km // rational metric yarn measure, meant denier := 1/9 tex // used for silk and rayon manchesteryarnnumber := drams/(1000 yards)// old system used for silk pli := lb/in typp := 1000 yd/lb asbestoscut := 100 yd/lb // used for glass and asbestos yarn drex := 0.1 tex // to be used for any kind of yarn // yarn and cloth length skeincotton := 80*54 inch // 80 turns of thread on a reel with a // 54 in circumference (varies for other // kinds of thread) cottonbolt := 120 ft // cloth measurement woolbolt := 210 ft bolt := cottonbolt heer := 600 yards cut := 300 yards // used for wet-spun linen yarn lea := 300 yards // // drug dosage // mcg := microgram // Frequently used for vitamins iudiptheria := 62.8 microgram // IU is for international unit iupenicillin := 0.6 microgram iuinsulin := 41.67 microgram drop := 1/20 ml // The drop was an old "unit" that was // replaced by the minim. But I was // told by a pharmacist that in his // profession, the conversion of 20 // drops per ml is actually used. bloodunit := 450 ml // For whole blood. For blood // components, a blood unit is the // quanity of the component found in a // blood unit of whole blood. The // human body contains about 12 blood // units of whole blood. // // fixup units for times when prefix handling doesn't do the job // hectare := hectoare ha := hectare megohm := megaohm kilohm := kiloohm microhm := microohm cent := 1/100 dollar // British currency // // These have been supplanted by the PoundSource definitions which include // historical exchange rates for years back to 1600. // //shilling := 1/20 britainpound // Before decimalisation, there //oldpence := 1/12 shilling // were 20 shillings to a pound, // each of twelve old pence //quid := britainpound // Slang names //fiver := 5 quid //tenner := 10 quid // // Units used for measuring volume of wood // cord := 4 ft * 4 ft * 8 ft// 4 ft by 4 ft by 8 ft bundle of wood facecord := 1/2 cord cordfoot := 1/8 cord // One foot long section of a cord cordfeet := cordfoot rick := 4 ft 8 ft 16 inches // Stack of firewood housecord := 1/3 cord // Used to sell firewood for residences, // often confusingly called a "cord" boardfoot := ft^2 inch // Usually 1 inch thick wood boardfeet := boardfoot fbm := boardfoot // feet board measure stere := m^3 st := stere timberfoot := ft^3 // Used for measuring solid blocks of wood standard := 120 12 ft 11 in 1.5 in // This is the St Petersburg or // Pittsburg standard. Apparently the // term is short for "standard hundred" // which was meant to refer to 100 pieces // of wood (deals). However, this // particular standard is equal to 120 // deals which are 12 ft by 11 in by 1.5 // inches (not the standard deal). // In Britain, the deal is apparently any piece of wood over 6 feet long, over // 7 wide and 2.5 inches thick. The OED doesn't give a standard size. A piece // of wood less than 7 inches wide is called a "batten". This unit is now used // exclusively for fir and pine. deal := 12 ft 11 in 2.5 in // The standard North American deal [OED] wholedeal := 1/2 deal // If it's half as thick as the standard // deal it's called a "whole deal"! splitdeal := 1/2 wholedeal // And half again as thick is a split deal. // // Gas and Liquid flow units // // Some horribly-named flow units that I've never seen used other than once // (unexplained) in the Guinness Book of World Records which has degraded into // tabloid trash. cumec := m^3/s cusec := ft^3/s // Conventional abbreviations for fluid flow units gph := gal/hr gpm := gal/min mgd := megagal/day cf := ft^3 ccf := 100 cf // sorta dubious, but used. cfs := cf/s cfh := cf/hour cfm := cf/min lpm := liter/min // Miner's inch: This is an old historic unit used in the Western United // States. It is generally defined as the rate of flow through a one square // inch hole at a specified depth such as 4 inches. In the late 19th century, // volume of water was sometimes measured in the "24 hour inch". Values for the // miner's inch were fixed by state statues. (This information is from a web // site operated by the Nevada Division of Water Planning: The Water Words // Dictionary at http://www.state.nv.us/cnr/ndwp/dict-1/waterwds.htm.) minersinchAZ := 1.5 ft^3/min minersinchCA := 1.5 ft^3/min minersinchMT := 1.5 ft^3/min minersinchNV := 1.5 ft^3/min minersinchOR := 1.5 ft^3/min minersinchID := 1.2 ft^3/min minersinchKS := 1.2 ft^3/min minersinchNE := 1.2 ft^3/min minersinchNM := 1.2 ft^3/min minersinchND := 1.2 ft^3/min minersinchSD := 1.2 ft^3/min minersinchUT := 1.2 ft^3/min minersinchCO := 1.56 ft^3/min minersinchBC := 1.68 ft^3/min // British Columbia // In vacuum science and some other applications, gas flow is measured // as the product of volumetric flow and pressure. This is useful // because it makes it easy to compare with the flow at standard // pressure (one atmosphere). It also directly relates to the number // of gas molecules per unit time, and hence to the mass flow if the // molecular mass is known. sccm := atm cc/min // 's' is for "standard" to indicate sccs := atm cc/sec // flow at standard pressure scfh := atm ft^3/hour // scfm := atm ft^3/min slpm := atm liter/min slph := atm liter/hour lusec := liter micron Hg force / s // Used in vacuum science // Wire gauge: this area is a nightmare with huge charts of wire gauge // diameters that usually have no clear origin. There are at least 5 competing // wire gauge systems to add to the confusion. // The use of wire gauge is related to the manufacturing method: a metal rod is // heated and drawn through a hole. The size change can't be too big. To get // smaller wires, the process is repeated with a series of smaller holes. // American Wire Gauge (AWG) or Brown & Sharpe Gauge appears to be the most // important gauge. ASTM B-258 specifies that this gauge is based on geometric // interpolation between gauge 0000, which is 0.46 inches exactly, and gauge 36 // which is 0.005 inches exactly. Therefore, the diameter in inches of a wire // is given by the formula 1/200 92^((36-g)/39). Note that 92^(1/39) is close // to 2^(1/6), so diameter is approximately halved for every 6 gauges. For the // repeated zero values, use negative numbers in the formula. The same document // also specifies rounding rules which seem to be ignored by makers of tables. // Gauges up to 44 are to be specified with up to 4 significant figures, but no // closer than 0.0001 inch. Gauges from 44 to 56 are to be rounded to the // nearest 0.00001 inch. The table below gives 4 significant figures for all // gauges. // // In addition to being used to measure wire thickness, this gauge is used to // measure the thickness of sheets of aluminum, copper, and most metals other // than steel, iron and zinc. // The numbers below are DIAMETERS. wire0000gauge := 0.4600 in wire000gauge := 0.4096 in wire00gauge := 0.3648 in wire0gauge := 0.3249 in wire1gauge := 0.2893 in wire2gauge := 0.2576 in wire3gauge := 0.2294 in wire4gauge := 0.2043 in wire5gauge := 0.1819 in wire6gau