Why No Purple?

<ding/ding/ding> <yawn> “Who’s texting me at this time of night?”

This better be good.

At this hour? Of course you did, Teena. What’s going on?

Well, I’m awake. What’s the question?

Whoa! That’s not really an either‑or proposition. Energy is continuous, but the energy differences that atoms/molecules respond to are stepwise. You get continuous white light from hot objects like stars and welding torches.
If white light passes a hydrogen atom, the atom will only absorb certain specific frequencies (frequency is a measure of energy).

Yes, except they don’t bounce off, they pass by.

Mostly, though the usual sequence read ‘upward’ in energy is radio, microwave, infrared, red, orange, yellow, green, blue, violet, ultraviolet, X-rays, gamma rays.
White is an even mixture of all frequencies.

Mmm?

Ah, what you’re really looking at is variation in fuel/air mixture (and possibly which fuel — I’ll get to that).
A rich methane mixture (not much oxygen, like a shuttered Bunsen burner) doesn’t get very hot, has lots of unburnt carbon particles and looks orange. Add more oxygen and the flame gets hotter, no more soot particles, just isolated CO, CO2, and water molecules, each of which gets excited to flame temp and then radiates light but only at its own characteristic frequencies. Switch to acetylene fuel and the flame gets hotter still because C2H2+O2 reactions give off more energy per molecule than CH4+O2. Now you’re in plasma temperature range, where free electrons can emit whatever frequency they feel like.

Sunsets are a whole other thing — the sun’s white light is transformed in various ways as it filters through dust and such in the atmosphere. Anyway, no flame or atom/molecule excitation in a sunset

Yes, but in each of these cases the *source* is different — soot particles, excited molecules, plasma.

The campfire has several different processes going on. Close in, the heated wood emits various gases. The gases reacting with O2 *are* the flame, generally orange to yellow from excited molecules but you can get blue where the local ventilation forms a jet and brings in extra oxygen for an efficient flame. Further out it’s back to red-hot soot.

To your original question — this is a hypothesis, but I suspect the particular atoms and molecules emitted from untreated burning wood simply don’t have any strong emissions lines in the green region. I know there aren’t for any hydrogen atoms — look up “Balmer series” in wikipedia.

*spectra
Right.
As you said, you could throw in copper or sodium salts to get those blue and golden colors.

G’night, Teena.
Now get to bed.

~ Rich Olcott

  • Thanks to Alex, who wrote much of this.

Hiding Under Many Guises

Vinnie lifts his pizza slice and pauses. “I dunno, Sy, this Pressure‑Volume part of enthalpy, how is it energy so you can just add or subtract it from the thermal and chemical kinds?”

“Fair question, Vinnie. It stumped scientists through the end of Napoleon’s day until Sadi Carnot bridged the gap by inventing thermodynamics.”

“Sounds like a big deal from the way you said that.”

“Oh, it was. But first let’s clear the ‘is it energy?’ question. How would Newton have calculated the work you did lifting that slice?”

“How much force I used times the distance it moved.”

“Putting units to that, it’d be force in newtons times distance in meters. A newton is one kilogram accelerated by one meter per second each second so your force‑distance work there is measured in kilograms times meters‑squared divided by seconds‑squared. With me?”

“Hold on — ‘per second each second’ turned into ‘per second‑squared.” <pause> “Okay, go on.”

“What’s Einstein’s famous equation?”

“Easy, E=mc².”

“Mm-hm. Putting units to that, c is in meters per second, so energy is kilograms times meters‑squared divided by seconds‑squared. Sound familiar?”

“Any time I’ve got that combination I’ve got energy?”

“Mostly. Here’s another example — a piston under pressure. Pressure is force per unit area. The piston’s area is in square meters so the force it feels is newtons per meter‑squared, times square meters, or just newtons. The piston travels some distance so you’ve got newtons times meters.”

“That’s force‑distance work units so it’s energy, too.”

“Right. Now break it down another way. When the piston travels that distance, the piston’s area sweeps through a volume measured in meters‑cubed, right?”

“You’re gonna say pressure times volume gives me the same units as energy?”

“Work it out. Here’s a paper napkin.”

“Dang, I hate equations … Hey, sure enough, it boils down to kilograms times meters‑squared divided by seconds‑squared again!”

“There you go. One more. The Ideal Gas Law is real simple equation —”

“Gaah, equations!”

“Bear with me, it’s just PV=nRT.”

“Is that the same PV so it’s energy again?”

“Sure is. The n measures the amount of some gas, could be in grams or whatever. The R, called the Gas Constant, is there to make the units come out right. T‘s the absolute temperature. Point is, this equation gives us the basis for enthalpy’s chemical+PV+thermal arithmetic.”

“And that’s where this Carnot guy comes in.”

“Carnot and a host of other physicists. Boyle, Gay‑Lussac, Avagadro and others contributed to Clapeyron’s gas law. Carnot’s 1824 book tied the gas narrative to the energetics narrative that Descartes, Leibniz, Newton and such had been working on. Carnot did it with an Einstein‑style thought experiment — an imaginary perfect engine.”

“Anything perfect is imaginary, I know that much. How’s it supposed to work?”

<sketching on another paper napkin> “Here’s the general idea. There’s a sealed cylinder in the middle containing a piston that can move vertically. Above the piston there’s what Carnot called ‘a working body,’ which could be anything that expands and contracts with temperature.”

“Steam, huh?”

“Could be, or alcohol vapor or a big lump of iron, whatever. Carnot’s argument was so general that the composition doesn’t matter. Below the piston there’s a mechanism to transfer power from or to the piston. Then we’ve got a heat source and a heat sink, each of which can be connected to the cylinder or not.”

“Looks straight‑forward.”

“These days, sure. Not in 1824. Carnot’s gadget operates in four phases. In generator mode the working body starts in a contracted state connected to the hot Th source. The body expands, yielding PV energy. In phase 2, the body continues to expand while it while it stays at Th. Phase 3, switch to the cold Tc heat sink. That cools the body so it contracts and absorbs PV energy. Phase 4 compresses the body to heat it back to Th, completing the cycle.”

“How did he keep the phases separate?”

“Only conceptually. In real life Phases 1 and 2 would occur simultaneously. Carnot’s crucial contribution was to treat them separately and yet demonstrate how they’re related. Unfortunately, he died of scarlet fever before Clapeyron and Clausius publicized and completed his work.”

~ Rich Olcott

Energy Is A Shape-shifter

Another dinner, another pizza at Eddie’s place. Vinnie wanders over to my table. “Hi, Sy, got a minute?”

“Not doing anything other than eating, Vinnie. What’s on your mind other than the sound of my chewing?”

“At least you keep your mouth closed. No, it’s about this energy thing you’ve gotten back into. I read that enthalpy piece and it’s bothering me.”

“In what way?”

“Well, you said that something’s enthalpy is the energy total of ‘thermal plus Pressure‑Volume plus chemical energy,’ right? I’m trying to fit that together with the potential energy and kinetic energy we talked about a while ago. It’s not working.”

“Deep question for dinner time but worth the effort. Would it help if I told you that the ‘actual versus potential’ notion goes back to Aristotle, the ‘kinetic’ idea came from Newton’s enemy Leibniz, but ‘enthalpy’ wasn’t a word until the 20th century?”

“Not a bit.”

“Didn’t think it would. Here’s another way to look at it. The thinkers prior to the mid‑1700s all looked at lumpy matter — pendulums, rolling balls on a ramp, planets, missiles — either alone or floating in space or colliding with each other. You could in principle calculate kinetic and potential energy for each lump, but that wasn’t enough when the Industrial Revolution came along.”

“What more did they want?”

“Fuel was suddenly for more than cooking and heating the house. Before then, all you needed to know was whether the log pile was stocked better than it was last year. If not, you might have a few chilly early Spring days but you could get past that. Then the Revolution came along. Miners loved Watt’s coal‑fired water‑pump except if you bought one and ran out of coal then the mine flooded. The miners learned that some kinds of coal burned hotter than others. You didn’t need as much of the good kind for a day’s pumping. The demand for a coal‑rating system got the scientists interested, but those lumps of coal weren’t falling or colliding, they just sat there with their heat locked inside. The classical energy quantities didn’t seem to apply so it was time to invent a new kind of energy.”

“That’s how Conservation of Energy works? You just spread the definition out a little?”

“That’s the current status of dark energy, for instance. We know the galaxies are moving apart against gravity so dark energy’s in there to balance the books. We have no good idea why it exists or where it comes from, but we can calculate it. ‘Internal energy’ put the Victorian‑era physicists in the same pickle — ‘atom’ and ‘molecule’ were notions from Greek and Roman times but none of the Victorians seriously believed in them. The notion of chemical bond energy didn’t crop up until the twentieth century. Lacking a good theory, all the Victorians could do was measure and tabulate heat output from different chemical reactions, the data that went into handbooks like the CRC. Naturally they had to invent thermodynamics for doing the energy accountancy.”

“But if it’s just book-balancing, how do you know the energy is real?”

“Because all the different forms of energy convert to each other. Think of a rocket going up to meet the ISS. Some of the rocket fuel’s chemical energy goes into giving the craft gravitational potential energy just getting it up there. At the same time, most of the chemical energy becomes kinetic energy as the craft reaches the 27600 km/h speed it needs to orbit at that altitude.”

<grin> “All?”

“Okay, we haven’t figured out how to harness dark energy. Yet.”

“HAW! Wait, how does enthalpy’s ‘chemical+PV+thermal’ work when the pressure’s zero, like out in space?”

“Then no work was done against an atmosphere up there to make way for the volume. Suppose you suddenly transported a jug of fuel from Earth up to just outside of the ISS. Same amount of fuel, so same amount of chemical energy, right? Same temperature so same thermal component?”

“I suppose.”

“The volume that the jug had occupied on Earth, what happened to it?”

“Suddenly closed in, probably with a little thud.”

“The thud sound’s where the Earth‑side PV energy went. It all balances out.”

~ Rich Olcott

Stripes And Solids

“Any other broad-brush Jupiter averages, Cathleen?”

“How about chemistry, Vinnie? Big picture, 84% of Jupiter’s atoms are hydrogen, 16% are helium.”

“Doesn’t leave much room for asteroids and such that fall in.”

“Less than a percent for all other elements. Helium doesn’t do chemistry, so from a distant chemist’s perspective Jupiter and Saturn both look like a dilute hydrogen‑helium solution of every other element. But the solvent’s not a typical laboratory liquid.”

“Hard to think of a gas as a solvent.”

“True, Sy, but chemistry gets strange under high temperatures and pressures.”

“Hey, I always figured Jupiter to be cold ’cause it’s farther from the Sun than us.”

“Good logic, Vinnie, but Jupiter generates its own heat. That’s one reason its weather is different from ours. Earth gets more than 99% of its energy budget from sunlight, especially in the infrared. There’s year‑long solar heating at low latitudes but only half‑years of that near the Poles. The imbalance is behind the temperature disparities that drive our prevailing weather patterns.”

“Jupiter’s not like that?”

“Nope. It gets 30 times less energy from the Sun than Earth does and actually gives off more heat than it receives. Its poles and equator are at virtually the same chilly temperature. There’s a small amount of heat flow from equator to poles, but most of Jupiter’s heat migrates spherically from a 24,000 K fever near its core to its outer layers.”

“What could generate all that heat?”

“Probably several contributors. The dominant one is gravitational potential energy from everything falling inward and banging into everything else. Random rock or atom collisions generate heat. Entropy rules.”

“Sounds reasonable. What’s another?”

“Radioactives. Half of Earth’s internal heating comes from gravity, same mechanism as Jupiter though on a smaller scale. The rest comes from unstable isotopes like uranium, thorium and potassium‑40. Also aluminum‑26, back in the early years, but that’s all gone now. Jupiter undoubtedly ate from the same dinner table. Those fissionable atoms split and release heat whenever they feel like it whether or not they’re collected in one place like in a reactor or bomb. Whatever the origin, Jupiter ferries that heat to the surface and dumps it as infrared radiation.”

“Yeah or else it’d explode or something.”

“Mm-hm. The question is, what are the heat‑carrying channels? They must thread their way through the planet’s structure.”

“It’s just a big ball of gas, how can it have structure?”

“I can help with that, Vinnie. Remember a few years back I wrote about high‑pressure chemistry? Hydrogen gets weird at a million bars‑‑‑”

“Anyone’d get weird after that many bars, Sy.” <heh, heh>

“Ha ha, Vinnie. A bar is pressure equal to one Earth atmosphere. Pressures deep inside Jupiter get into hundreds of megabars. Hydrogen molecules down there are crammed so close together that their electron clouds merge and you have a collection of protons floating in a sea of electron charge. They call it metallic hydrogen, but it’s fluid like mercury, not crystalline. Cathleen, when you refer to Jupiter’s structure you’re thinking layers?”

“That’s right, Sy, but the layers may or may not be arranged like Earth’s crust, mantle, core scheme. A lot of the Juno data is consistent with that — a shell of the atmosphere we see, surrounding a thick layer of increasingly compressed hydrogen‑helium over a core of heavy stuff suspended in metallic hydrogen. About 20% down we think the helium is squeezed out and falls like rain, only to evaporate again at a lower level. The core’s metallic hydrogen may even be solid despite thousand‑degree temperatures — we just don’t know how hydrogen behaves in that regime.”

“What other kind of layering can there be?”

“Experiments have demonstrated that under the right conditions a rapidly spinning fluid can self-organize into a series of concentric rotating cylinders. Maybe Jupiter and the other gas planets follow that model and the stripes show where the cylinders intersect with gravity’s spherical imperative. Coaxial cylinders would account for the equator and poles rotating at different rates. Juno data indicates that Jupiter’s equatorial zone has more ammonia than the rest of its atmosphere. Maybe between‑cylinder winds trap the ammonia and prevent it from mixing with the next deeper cylinder.”

~ Rich Olcott

Ya got potential, kid, but how much?

Dusk at the end of January, not my favorite time of day or year.  I was just closing up the office when I heard a familiar footstep behind me.  “Hi, Vinnie.  What’s up?”

“Energy, Sy.”

“Energy?”

“Energy and LIGO.  Back in flight school we learned all about trading off kinetic energy and potential energy.  When I climb I use up the fuel’s chemical energy to gain gravitational potential energy.  When I dive I convert gravitational potential energy into  kinetic energy ’cause I speed up.  Simple.”

“So how do you think that ties in with LIGO?”

“OK, back when we pretended we was in those two space shuttles (which you sneaky-like used to represent photons in a LIGO) and I got caught in that high-gravity area where space is compressed, we said that in my inertial frame I’m still flying at the same speed but in your inertial frame I’ve slowed down.”

“Yeah, that’s what we worked out.”

“Well, if I’m flying into higher gravity, that’s like diving, right, ’cause I’m going where gravity is stronger like closer to the Earth, so I’m losing gravitational potential energy.  But if I’m slowing down I’ve gotta be losing kinetic energy, too, right?  So how can they both happen?  And how’s it work with photons?”

“Interesting questions, Vinnie, but I’m hungry.  How about some dinner?”shuttle-escape-1

We took the elevator down to Eddie’s pizza joint on the second floor.  I felt heavier already.  We ordered, ate and got down to business.

“OK, Vinnie.  Energy with photons is different than with objects that have mass, so let’s start with the flying-objects case.  How do you calculate gravitational potential energy?”

“Like they taught us in high school, Sy, ‘little g’ times mass times the height, and ‘little g’ is some number I forget.”

“Not a problem, we’ll just suppose that ‘little g’ times your plane’s mass is some convenient number, like 1,000.  So your gravitational potential energy is 1000×height, where the height’s in feet and the unit of energy is … call it a fidget.  OK?”

“Saves having to look up that number.”

sfo-to-den
Vinnie’s route, courtesy of Google Earth

“Fine.  Let’s suppose you’re flying over San Francisco Bay and your radar altimeter reads 20,000 feet.  What’s your gravitational potential energy?”

“Uhh… twenty million fidgets.”

“Great.  You maintain level flight to Denver.  As you pass over the Rockies you notice your altimeter now reads 6,000 feet because of that 14,000-foot mountain you’re flying over.  What’s your gravitational potential energy?”

“Six million fidgets.  Or is it still twenty?”

“Well, if God forbid you were to drop out of the sky, would you hit the ground harder in California or Colorado?”

“California, of course.  I’d fall more than three times as far.”

“So what you really care about isn’t some absolute amount of potential energy, it’s the relative amount of smash you experience if you fall down this far or that far.  ‘Height’ in the formula isn’t some absolute height, it’s height above wherever your floor is.  Make sense?”

“Mm-hm.”

“That’s an essential characteristic of potential energy — electric, gravitational, chemical, you name it.   It’s only potential.  You can’t assign a value without stating the specific transition you’re interested in.  You don’t know voltages in a circuit until you put a resistance between two specific points and meter the current through it.  You don’t know gravitational potential energy until you decide what location you want to compare it with.”

“And I suppose a uranium atom’s nuclear energy is only potential until a nuke or something sets it off.”

“You got the idea.  So, when you flew into that high-gravity compressed-space sector, what happened to your gravitational potential energy?”

“Like I said, it’s like I’m in a dive so I got less, right?”

“Depends on what you’re going to fall onto, doesn’t it?”

“No, wait, it’s definitely less ’cause I gotta use energy to fly back out to flat space.”

“OK, you’re comparing here to far away.  That’s legit.  But where’s that energy go?”

“Ahh, you’re finally getting to the kinetic energy side of my question –”

“Whoa, look at the time!  Got a plane to catch.  We’ll pick this up next week.  Bye.”

“Hey, Sy, your tab! …  Phooey, stuck for it again.”

~~ Rich Olcott

Life and energy on Titan, maybe

Say you’re an astrobiologist tasked with designing a world that would be able to support life we’d be able to recognize as such.  What absolute essentials would you need to include?

Abundant liquid water?  Biologists have found algae thriving inside desert rocks, moistened only by dew seeping in through microscopic pores.  A comfortable temperature?  We’ve found bacteria living in environments as cold as 5ºF and as warm as 250ºF.  A solid surface to grow on?  Arthur C Clarke (A Meeting with Medusa) wrote about complex life-forms floating in the 3,000-mile-deep atmosphere of Jupiter.  OK, that’s science fiction, but Clarke’s the guy who invented geostationary satellites for telecommunications and GPS.gibbs-energies

Many scientists would say that the obvious essential is a source of chemical energy.  I’d add, “and an efficient mechanism to convert the source energy to a form that can be transported within an organism.”  To my knowledge, all life-forms now on Earth have met the second prerequisite by using the ATP molecule for intra-cellular energy transport.  But life has been amazingly creative in finding ways to build those ATPs.  The tall diagram lists some biologic energy sources in decreasing order of how much energy is released.

All the Biology textbooks tell us that Earth’s energy cycle starts with the Sun.  Solar photons energize plant photosynthesis which creates loads of ATP molecules.  Some of them power a multistep process which combines CO2 and H2O to release O2 and create carbohydrates (CH2O)x.  (Glucose, for instance, is (CH2O)6.  Guess where the term “carbohydrate” came from.)  Earth’s biologic carbon cycle completes when other life “burns” carbohydrates to exploit the energy stored therein.  On this chart, “burn” means “combine with O2” and usually doesn’t involve fire.

Notice that “Make (CH2O)x” is at the bottom of the chart — that process absorbs a lot of energy per carbon atom.  Conversely, “Burn (CH2O)x” releases energy which is why we like sugar too much.

In the past couple of decades we’ve learned that’s not the only way, or maybe even the dominant way, that Earth-life makes its ATPs.  Microbes have evolved a surprising number of “front ends” to the energy machinery.  Here in Colorado we’ve got problems in old mines where microbes build ATPs by oxidizing iron pyrite (FeS) to sludgy rust (Fe2O3) and sulfuric acid (H2SO4).  Works great for them, not so good for downstream organisms.

Iron compounds are such a good energy source that many scientists believe (it’s still controversial) that Earth’s hematite and magnetite deposits were laid down half-a-billion years ago by archaea, microorganisms that preceded bacteria.

Way down on the energy-source scale are the methanogens, archaea that use molecular hydrogen to convert CO2 to methane (CH4).  They only live in zero-oxygen environments — peat bogs, ocean-bottom hydrothermal vents and subsurface veins that are perilous to mine.

Earthly biology participates in many cyclic processes.  The bi-level diagram below highlights two — oxygen cycling between O2 and oxygen compounds, and carbon cycling between CO2 and living tissues (which contain carbohydrates).

If it weren’t for light-driven photosynthesis ( ~~ is a photon), pretty soon all our O2 would be locked up in the ground where it came from.  In a sense, Earth uses life and carbon to get oxygen back up into the atmosphere.  Astronomers look for O2 in a planetary atmosphere as a sign of life.titan-cycles-2

Maybe Titan does something similar.  Titan’s atmosphere contains methane (CH4) and H2 but the quantities aren’t right.  The purple “Lyman α” and blue “Balmer α” lines on the energy chart denote particularly strong solar photons that can break up C-H bonds and generate H2 in Titan’s upper atmosphere.  We understand the relevant processes pretty well and can calculate how much methane, acetylene (C2H2) and H2 should be up there.

The calculated quantities pretty much match what astronomers found in Titan’s upper atmosphere.  But they’re not what Cassini-Huygens found on the ground.  Acetylene just isn’t there, and a (somewhat precarious) computer simulation indicates that there’s much less ground-side H2 than you’d expect from simple diffusion.  Dr Chris McKay has put those clues and the energy stack together to suggest that something on Titan inhales acetylene and hydrogen and exhales methane.

Something alive, maybe?

~~ Rich Olcott

And now for some completely different dimensions

Terry Pratchett wrote that Knowledge = Power = Energy = Matter = Mass.  Physicists don’t agree because the units don’t match up.

Physicists check equations with a powerful technique called “Dimensional Analysis,” but it’s only theoretically related to the “travel in space and time” kinds of dimension we discussed earlier.

Place setting LMTIt all started with Newton’s mechanics, his study of how objects affect the motion of other objects.  His vocabulary list included words like force, momentum, velocity, acceleration, mass, …, all concepts that seem familiar to us but which Newton either originated or fundamentally re-defined. As time went on, other thinkers added more terms like power, energy and action.

They’re all linked mathematically by various equations, but also by three fundamental dimensions: length (L), time (T) and mass (M). (There are a few others, like electric charge and temperature, that apply to problems outside of mechanics proper.)

Velocity, for example.  (Strictly speaking, velocity is speed in a particular direction but here we’re just concerned with its magnitude.)   You can measure it in miles per hour or millimeters per second or parsecs per millennium — in each case it’s length per time.  Velocity’s dimension expression is L/T no matter what units you use.

Momentum is the product of mass and velocity.  A 6,000-lb Escalade SUV doing 60 miles an hour has twice the momentum of a 3,000-lb compact car traveling at the same speed.  (Insurance companies are well aware of that fact and charge accordingly.)  In terms of dimensions, momentum is M*(L/T) = ML/T.

Acceleration is how rapidly velocity changes — a car clocked at “zero to 60 in 6 seconds” accelerated an average of 10 miles per hour per second.  Time’s in the denominator twice (who cares what the units are?), so the dimensional expression for acceleration is L/T2.

Physicists and chemists and engineers pay attention to these dimensional expressions because they have to match up across an equal sign.  Everyone knows Einstein’s equation, E = mc2. The c is the velocity of light.  As a velocity its dimension expression is L/T.  Therefore, the expression for energy must be M*(L/T)2 = ML2/T2.  See how easy?

Now things get more interesting.  Newton’s original Second Law calculated force on an object by how rapidly its momentum changed: (ML/T)/T.  Later on (possibly influenced by his feud with Leibniz about who invented calculus), he changed that to mass times acceleration M*(L/T2).  Conceptually they’re different but dimensionally they’re identical — both expressions for force work out to ML/T2.

Something seductively similar seems to apply to Heisenberg’s Area.  As we’ve seen, it’s the product of uncertainties in position (L) and momentum (ML/T) so the Area’s dimension expression works out to L*(ML/T) = ML2/T.

SeductiveThere is another way to get the same dimension expression but things aren’t not as nice there as they look at first glance.  Action is given by the amount of energy expended in a given time interval, times the length of that interval.  If you take the product of energy and time the dimensions work out as (ML2/T2)*T = ML2/T, just like Heisenberg’s Area.

It’s so tempting to think that energy and time negotiate precision like position and momentum do.  But they don’t.  In quantum mechanics, time is a driver, not a result.  If you tell me when an event happens (the t-coordinate), I can maybe calculate its energy and such.  But if you tell me the energy, I can’t give you a time when it’ll happen.  The situation reminds me of geologists trying to predict an earthquake.  They’ve got lots of statistics on tremor size distribution and can even give you average time between tremors of a certain size, but when will the next one hit?  Lord only knows.

File the detailed reasoning under “Arcane” — in technicalese, there are operators for position, momentum and energy but there’s no operator for time.  If you’re curious, John Baez’s paper has all the details.  Be warned, it contains equations!

Trust me — if you’ve spent a couple of days going through a long derivation, totting up the dimensions on either side of equations along the way is a great technique for reassuring yourself that you probably didn’t do something stupid back at hour 14.  Or maybe to detect that you did.

~~ Rich Olcott