Today at the Topos Institute, Sophie Libkind, Owen Lynch and I spent some time talking about thermodynamics, Carnot engines and the like. As a result, I want to work out for myself some basic facts about the ideal gas. This stuff is all well-known, but I’m having trouble finding exactly what I want—and no more, thank you—collected in one place.
Just for background, the Carnot cycle looks roughly like this:
This is actually a very inaccurate picture, but it gets the point across. We have a container of gas, and we make it execute a cyclic motion, so its pressure and volume trace out a loop in the plane. As you can see, this loop consists of four curves:
• In the first, from a to b, we put a container of gas in contact with a hot medium. Then we make it undergo isothermal expansion: that is, expansion at a constant temperature.
• In the second, from b to c, we insulate the container and let the gas undergo adiabatic reversible expansion: that is, expansion while no heat enters or leaves. The temperature drops, but merely because the container expands, not because heat leaves. It reaches a lower temperature. Then we remove the insulation.
• In the third, from c to d, we put the container in contact with a cold medium that matches its temperature. Then we make it undergo isothermal contraction: that is, contraction at a constant temperature.
• In the fourth, from d to a, we insulate the container and let the gas undergo adiabatic reversible contraction: that is, contraction while no heat enters or leaves. The temperature increases until it matches that of the hot medium. Then we remove the insulation.
The Carnot cycle is historically important because it’s an example of a heat engine that’s as efficient as possible: it give you the most work possible for the given amount of heat transferred from the hot medium to the cold medium. But I don’t want to get into that. I just want to figure out formulas for everything that’s going on here—including formulas for the four curves in this picture!
To get specific formulas, I’ll consider an ideal monatomic gas, meaning a gas made of individual atoms, like helium. Some features of an ideal gas, like the formula for energy as a function of temperature, depend on whether it’s monatomic.
As a quirky added bonus, I’d like to highlight how certain properties of the ideal monatomic gas depend on the dimension of space. There’s a certain chunk of the theory that doesn’t depend on the dimension of space, as long as you interpret ‘volume’ to mean the n-dimensional analogue of volume. But the number 3 shows up in the formula for the energy of the ideal monatomic gas. And this is because space is 3-dimensional! So just for fun, I’ll do the whole analysis in n dimensions.
There are four basic formulas we need to know.
First, we have the ideal gas law:
• is the pressure.
• is the n-dimensional volume.
• is the number of molecules in a container of gas.
• is a constant called Boltzmann’s constant.
• is the temperature.
Second, we have a formula for the energy, or more precisely the internal energy, of a monatomic ideal gas:
• is the internal energy.
• is the dimension of space.
The factor of n/2 shows up thanks to the equipartition theorem: classically, a harmonic oscillator at temperature has expected energy equal to times its number of degrees of freedom. Very roughly, the point is that in n dimensions there are n different directions in which an atom can move around.
Third, we have a relation between internal energy, work and heat:
The intuition is simple: to increase the energy of some gas you can do work to it or transfer heat to it. But the math may seem a bit murky, so let me explain.
I emphasize ‘to’ because it affects the sign: for example, the work done by the gas is minus the work done to the gas. Work done to the gas increases its internal energy, while work done by it reduces its internal energy. Similarly for heat.
But what is this ‘infinitesimal’ stuff, and these weird symbols?
In a minute I’m going to express everything in terms of and So, and will be functions on the plane with coordinates and will be a 1-form on this plane: it’s the differential of the function
But and are not differentials of functions and There are no functions on the plane called and You can not take a box of gas and measure its work, or heat! There are just 1-forms called and describing the change in work or heat. These are not exact 1-forms: that is, they’re not differentials of functions.
Fourth and finally:
This should be intuitive. The work done by the gas on the outside world by changing its volume a little equals the pressure times the change in volume. So, the work done to the gas is minus the pressure times the change in volume.
One nice feature of the 1-form is this: as we integrate it around a simple closed curve going counterclockwise, we get the area enclosed by that curve. So, the area of this region:
is the work done by our container of gas during the Carnot cycle. (There are a lot of minus signs to worry about here, but don’t worry, I’ve got them under control. Our curve is going clockwise, so the work done to our container of gas is negative, and it’s minus the area in the region.)
Okay, now that we have our four basic equations, we can play with them and derive consequences. Let’s suppose the number of atoms in our container of gas is fixed—a constant. Then we think of everything as a function of two variables: and
First, since we have
So temperature is proportional to pressure times volume.
Second, since and we have
So, like the temperature, the internal energy of the gas is proportional to pressure times volume—but it depends on the dimension of space!
From this we get
From this and our formulas we get
That’s basically it!
But now we know how to figure out everything about the Carnot cycle. I won’t do it all here, but I’ll work out formulas for the curves in this cycle:
The isothermal curves are easy, since we’ve seen temperature is proportional to pressure times volume:
So, an isothermal curve is any curve with
The adiabatic reversible curves, or ‘adiabats’ for short, are a lot more interesting. A curve in the plane is an adiabat if when the container of gas changes pressure and volume while moving along this curve, no heat gets transferred to or from the gas. That is:
where the funny symbol means I’m restricting a 1-form to the curve and getting a 1-form on that curve (which happens to be zero).
Let’s figure out what an adiabat looks like! By our formula for we have
Now, we can integrate both sides along a portion of the curve and get
So in 3-dimensional space, as you let a gas expand adiabatically—say by putting it in an insulated cylinder so heat can’t get in or out—its pressure drops as its volume increases. But for a monatomic gas it drops in this peculiar specific way: the pressure goes like the volume to the -5/3 power.
In any dimension, the pressure of the monatomic gas drops more steeply when the container expands adiabatically than when it expands at constant temperature. Why? Because drops more rapidly than since
But as ,
so the adiabats become closer and and closer to the isothermal curves in high dimensions. This is not important for understanding the conceptually significant features of the Carnot cycle! But it’s curious, and I’d like to improve my understanding by thinking about it until it seems obvious. It doesn’t yet.