Austin VornhagenEssays
A sealed laboratory apparatus in near darkness: two glass bulbs joined by a narrow aperture, the left glowing cold blue and the right glowing ember orange, with luminous motes drifting between them.

Thermodynamics, carefully

Gravity Is Free.
Sorting Is Not.

A walk from the four laws of thermodynamics to Maxwell's demon, and the accounting that closes the loophole.

Loading film

I started with a plain question: what are the laws of thermodynamics? I ended up trying to build a machine that breaks one of them. The trip between those two points turned out to be the most useful thing I have read in months, and not because the machine worked.

It did not work. What made the argument worth writing down is why it did not, because the answer is never "the second law forbids it." The answer is an accounting problem, and you can follow every line of it.

Four laws, numbered from zero

The laws of thermodynamics describe how energy moves and changes, and what limits those changes. There are four, numbered zero through three.

Law 0

Temperature tells us when things are in thermal balance

If two objects are each the same temperature as a third object, they are the same temperature as each other. This is what makes thermometers useful.

Law 1

Energy is conserved

Energy cannot be created or destroyed. It can transfer between things or change form. When a stove heats water, energy moves into the water. It does not appear from nowhere.

Law 2

The total entropy of an isolated system cannot decrease

Entropy roughly measures how dispersed energy is among the possible microscopic arrangements of a system. Your coffee cools as its heat spreads into the room. It will not spontaneously collect heat from the room and reheat itself.

Law 3

A perfect crystal approaching absolute zero approaches zero entropy

Absolute zero is 0 kelvin, or −273.15 °C. It is the lower limit of temperature, and it cannot be reached through a finite sequence of cooling operations.

The second law is the one with the escape hatch people reach for, so it is worth being precise about what it allows. Local entropy can decrease. A refrigerator cools its interior every day. Doing that increases entropy elsewhere by at least as much.

Why the first law is true

The confusing part is not the statement. It is the confidence. How do we know energy cannot be created or destroyed? Why should that be a rule?

The honest answer is that the first law is a fundamental principle supported by experiment. Every time energy has appeared to vanish, we have eventually found where it went.

Rub your hands together and then stop. Your hands were moving, and now they are not. Where did that energy go? Much of it became heat. The organized movement of your hands transferred into microscopic motion and interactions among the particles in your hands. Nothing was destroyed. It was redistributed into a form that is much harder to collect.

A car burning gasoline looks like it uses energy up. It uses a fuel supply up. The chemical energy becomes movement, heat, and sound. All of it still exists. Most of it is now spread through the surroundings and effectively unusable.

The first law says the accounting always balances:

Fig. 01The ledger never fails to balance

Scroll to run the cycle

Heat a sealed cylinder of gas and let it push a piston. Energy arrives as heat, some raises the gas's internal energy, and some leaves again as work done on the piston. The three bars move independently, but the sum of what came in minus what went out always equals the change in the middle. That identity is the first law, and it is the only bookkeeping rule the rest of this essay uses.

ΔU  =  Q  −  WΔU, change in the system's internal energy  ·  Q, energy transferred in as heat  ·  W, energy transferred out as work

Heat a sealed container of gas and the incoming energy can raise the gas's internal energy. If the gas pushes a piston outward, it transfers some energy back out by doing work. You have to count both. Count both, and the books close every time.

As for why nature follows that rule at all, physics offers a deeper connection. Under standard assumptions, conservation of energy follows when the laws governing a system do not change with time. The rules work the same tomorrow as they do today, even though the things obeying them change constantly.

That still leaves "why does nature have those rules?" At some point physics reaches principles we establish by observing how the world behaves rather than deriving them from something more basic. This is one of them.

If energy only ever changes form, can it come back around?

Here is the first place I got ahead of myself. If energy can only be transferred between states, then it could be transferred an unlimited number of times. So would anything stop the universe from revisiting a state it has already been in?

Taking the first law by itself, no. Endlessly transforming energy and returning to a previous configuration does not violate conservation, as long as the total stays the same. But there is a jump hiding between two claims:

  • Energy can keep changing forms indefinitely.
  • Therefore every previous state of the universe can be revisited.

The second does not follow from the first. Conserving a total tells you nothing about which arrangements of that total are reachable.

Picture an ideal pendulum with no friction. Its energy moves back and forth between height and motion forever, revisiting its previous states, entirely within the first law. It still cannot swing higher than its energy allows. Repeating something infinitely many times does not make every outcome available.

Even returning is not guaranteed by conservation. An ideal free particle moving through unlimited empty space at constant speed keeps its energy forever and never comes back to where it started.

The idea does connect to a real result. Under particular mathematical conditions, including a finite volume of accessible states and dynamics that preserve that volume, almost every starting state eventually returns arbitrarily close to itself, and does so repeatedly. That is Poincaré recurrence. Exact repetition is not generally guaranteed, and applying the result to the entire universe means establishing those conditions for the universe, which the first law does not do.

What survivesThe narrow claim holds. The first law does not forbid recurrence and sets no limit on how many times energy can change form. Whether a particular state returns is a question about the dynamics, and it needs its own evidence.

Could a smarter machine create order faster than entropy destroys it?

This is the question I actually wanted to ask. The second law says total entropy in an isolated system cannot decrease. Does that accounting include intelligence acting on the world? If we built an artificial superintelligence that could generate order faster than entropy generates disorder, would total entropy go down?

Physics already includes intelligence. Under established physics, even a superintelligence reduces entropy in one place only by increasing it elsewhere by at least as much. The intelligence, its machinery, its energy supply, and its surroundings all belong in the accounting.

One correction matters before going further, because it is the thing that makes the question feel more promising than it is. Entropy is not how messy something looks. A beautifully organized city can coexist with steeply increasing total entropy. The buildings and gardens are visible. The energy dispersed into the surroundings while constructing and maintaining them is not.

"Creating order faster than entropy creates disorder" is already true locally, and mundanely so. A refrigerator removes heat from its interior faster than heat leaks in. That is exactly what it is for. It also releases heat into the room and consumes an energy supply. Include the whole process and total entropy rises.

A superintelligence might design a far more efficient refrigerator. The second law sets a ceiling on that: an ideal, thermodynamically reversible process leaves total entropy unchanged. Better engineering approaches that ceiling. It does not pass it.

Physicists have chased something very close to this proposal for over a century, under the name Maxwell's demon. Imagine an intelligent being that watches individual gas molecules and sorts the fast ones to one side and the slow ones to the other. It appears to manufacture a hot side and a cold side without paying the usual price.

The catch is that its information processing is physical and has to be accounted for. It can use an initially prepared memory as a resource. Restoring that memory so the operation can repeat carries an entropy cost. Reversible computation avoids some costs; it does not hand the complete system a repeatable way to decrease total entropy. Bennett's notes on Landauer's principle work through exactly this.

There is also a qualification to "cannot decrease." The second law is statistical. Small systems show temporary entropy decreases through fluctuations all the time. What they do not provide is a reliable, repeatable method for reducing the total entropy of an isolated system.

Could a superintelligence discover new physics? We cannot rule that out. But intelligence alone supplies no demonstrated exception. To establish one it would have to show a total entropy decrease after accounting for its own operation and everything it consumed.

The forces that charge nothing

So I went looking for a way to do the sorting without an energy supply, which led to a question that sounds naive and is not: how much energy does gravity consume?

None. Gravity is not an engine burning fuel to keep attracting things. A book sitting on a table feels gravity continuously, and gravity transfers no energy to it, because the book is not moving. A force can persist without using power.

When the book falls, gravitational potential energy decreases while kinetic energy increases. When it lands, that becomes sound, heat, and deformation. Lifting it back up puts the energy back in. It is also why an ideal orbit continues without fuel: gravity changes the direction of motion continuously without changing speed in a circular orbit.

Gravity is not alone in this. Several familiar things exert a pull or a push indefinitely with no ongoing input.

ExampleWhat happens without ongoing fuel
A permanent magnetHolds itself against your refrigerator without consuming electricity or gradually using up its magnetism by holding on.
Static electric attractionA charged balloon attracts a wall. The effect fades as charge leaks away, not because exerting the force consumes fuel.
A stretched springKeeps pulling while held stretched. Stretching it stored energy; maintaining the pull takes no more, in an ideal spring.
A book resting on a tableThe table pushes upward continuously without a power supply.

The distinction doing all the work here is exerting a force versus transferring energy through movement. A stretched spring held still transfers nothing. Let it contract and it releases what was stored.

Your own body makes this feel wrong. Holding a heavy object still is exhausting, so it seems obvious that maintaining a force costs something. It does, for you: muscles consume chemical energy to hold tension. A shelf holds the same object with no such bill. That is a fact about muscles, not about forces.

Which sets up the real question. Gravity can pull forever. Extracting energy through gravity, though, changes the system. A falling weight can power a generator, and when it reaches the bottom that source is spent. Raising it again costs at least what you could ideally have gotten from the fall.

Building the demon out of free parts

So here is the proposal. Use gravity, magnetism, and static electricity as the sorting mechanism. None of them needs a fuel supply. If those three can do the demon's job, the demon does its job for free.

Assume for a moment that it works, and specify the device precisely. Two insulated chambers, equal amounts of the same gas, both at 300 kelvin, connected through a particle sorter obeying one rule:

Particle approaching the sorterAction
From chamber A, kinetic energy above a chosen thresholdPass into B
From chamber B, kinetic energy below that thresholdPass into A
Either of the other two casesReflect back into its original chamber

Exchange particles in matched pairs so each chamber keeps the same count. Every exchange sends a higher-energy particle into B and a lower-energy particle into A. A cools, B warms, total energy is unchanged. The three free forces each supply a piece of the mechanism:

  • Static electricity can establish an energy barrier that only sufficiently energetic charged particles cross.
  • Magnetism can bend charged-particle trajectories by different amounts depending on their momentum, separating paths.
  • Gravity can provide a second energy threshold: particles need enough upward kinetic energy to reach a higher opening.

Those are all real physical capabilities, not hand-waving. And if the sorter works, the payoff is not subtle. Suppose it produces 290 K and 310 K. For equal quantities of ideal gas at fixed volume with constant heat capacity C, the total gas entropy change is:

ΔS = C ln(290/300) + C ln(310/300) = C ln(899/900) < 0A genuine decrease. Under the assumption that the sorter itself ends unchanged, an isolated system's total entropy has gone down.

Run a heat engine between the chambers, lift a weight with the output, repeat. The stored energy comes from the gas's thermal energy, so the gas cools as you go. Energy conservation holds throughout. Nothing in the first law objects.

Now test the parts. Start with the gravitational threshold, because it is the easiest one to check and the result is genuinely surprising.

Fig. 02Raising the barrier filters the count, not the temperature

Scroll to raise the barrier

Molecules leave a gas at temperature T and climb a vertical passage. Only those with enough upward kinetic energy reach the top. Scroll to raise the required climb energy U and watch the two readouts diverge: arrivals per second collapses, while the mean upward kinetic energy on arrival stays pinned. Selecting energetic departures does not produce hotter arrivals.

That plate is the whole problem in miniature. A barrier really does select energetic particles. It also charges them for the selection.

Work it out for a thermal gas at temperature T crossing a passage that requires climb energy U. The particles that make it have an average initial upward kinetic energy of U + kBT. Climbing removes U. Their average upward kinetic energy on arrival is therefore kBT, which is exactly the average for particles crossing an ordinary horizontal opening in the same gas.

⟨Kup⟩ before climb = U + kBT   →   after climb = kBTRaising U reduces how many particles arrive. It does not raise how energetic the arrivals are.

Gas in gravitational equilibrium is thinner higher up and the same temperature. A static electric barrier behaves the same way for charged particles: they lose kinetic energy climbing the potential and regain it descending. If the two chambers sit at the same potential, the barrier costs the same to cross in either direction.

The accounting that closes it

Three questions decide whether the device works. The barrier result above answers the third. Here are all of them, in the order that matters.

1. Why would fast particles cross from A into B but not carry energy back?

A barrier alone cannot establish that. With both endpoints at the same potential energy, crossing requires the same minimum energy in either direction. Making one slope steeper changes the acceleration along the way, not the energy needed to get over.

Magnetism is more interesting, because it changes which paths connect the chambers, and it can block a particular return trajectory. But blocking one return path does not eliminate all return paths. For a static, lossless device connecting exactly two chambers, the total capacity to transmit particles at a given energy is the same in both directions, even when the individual routes look nothing alike.

2. Does the sorting survive when particles arrive from every direction?

This is the one that finishes the argument, and it is worth seeing rather than reading.

Fig. 03Every outgoing path needs a predecessor

Scroll to follow the traffic

At one fixed energy, divide the entry paths from A into 100 equally weighted bundles. Say the device reflects 70 and transmits 30. Those 70 fill 70 of the outgoing paths back toward A. The remaining 30 outgoing paths have to be supplied from B, because the motion is invertible and cannot merge bundles or leave one without a predecessor. So 30 cross each way. At equilibrium, equally weighted bundles at the same energy carry equal traffic, and the two flows cancel exactly.

The number 100 is illustrative; the structure is not. Two properties of ordinary static electric, magnetic, and gravitational forces do the work. They preserve each particle's total energy, and they preserve the volume of possible position-and-momentum states, which is Liouville's theorem. In thermal equilibrium, states with the same total energy carry equal statistical weight. Those forces shuffle particles among those states while leaving the equilibrium distribution exactly where it was.

For classical charged particles in static fields there is a concrete statement of this. The distribution

f  ∝  exp[ −( ½mv² + qφ + mgz ) / kBT ]½mv², kinetic energy  ·  qφ, electric potential energy  ·  mgz, gravitational potential energy

remains an equilibrium distribution under the combined electric, magnetic, and gravitational forces. In physical terms: electricity and gravity change where particles concentrate, magnetic fields bend how they move, and none of it drives an initially equilibrated gas into two different temperatures.

Notice where that conclusion came from. It came from the particle dynamics, not from declaring that the second law forbids the outcome.

3. Can particles arrive hotter after spending energy climbing?

Individual particles can still arrive very energetic. The question is whether the arriving population is hotter, and Fig. 02 answers it: no. Raising the barrier thins the traffic and leaves the mean arrival energy alone.

If the particles descend again before entering B, they get the energy back, and you really can deliver selected high-energy particles into B. The equal-energy return traffic from question two is still there, and it still cancels.

Where an exception would hideAn absorbing wall, an extra outlet, or a particle trap changes this accounting, because each one introduces another destination or a resource that changes during operation. That is the honest answer to "what would have to be different." It is also why those components are never free.

What would actually count as breaking it

The forces genuinely do filter and steer. They can separate a specially prepared beam. They can sort by a physical property: gravity separates materials by settling, magnets pull magnetic material out of a mixture, charged plates drive positive and negative particles to opposite sides. All of that is real, and none of it needs a power supply during the process.

Maxwell's demon asks for something strictly harder. Start with gas at a uniform temperature, and continually separate fast from slow to create a temperature difference you can extract work from. So here is the test any proposed device has to pass:

After one sorting cycle, can you restore the particles, fields, gates, and every other piece of equipment to their starting conditions, while keeping the energy you extracted and leaving no other change?

Getting one round of sorting without ongoing fuel does not pass. Repeatability is the whole claim, and the reset is where the bill arrives. A mechanical one-way gate looks like the obvious fix until you notice that the gate has a temperature too, and its own thermal motion lets reverse events through. Feynman works this through in the ratchet and pawl, and the ratchet fails for exactly this reason.

I want to be careful about what this does and does not establish. It does not prove that no arrangement of anything could ever do it. It shows that this particular family of arrangements, static fields in a closed two-chamber device, cannot, and it shows why using the dynamics rather than an appeal to authority.

A force that needs no ongoing power does not make every process driven by that force thermodynamically free.

That sentence is the whole essay. Gravity, magnetism, and static electricity cost nothing to maintain. The sorting you want to do with them is a different transaction, and it has its own line in the ledger.

What I find genuinely satisfying about this is the shape of the reasoning. At no point did the argument need to invoke the second law as a rule. It counted trajectories, counted energies, and found that the flows canceled. The second law showed up at the end as a summary of what the counting had already established, which is the right order for a law to arrive in.

Most arguments fail at the accounting, not the idea.

I write about systems here and build websites for service businesses at Content Pilots. If you want to argue with this essay, or you want a site whose numbers actually add up, my inbox is open.