## Tuesday, June 22, 2010

### Where did the entropy go?

I ended my last post rather abruptly when I got confused about the equilibrium equation for the reaction we were discussing. We had:

CH4 + CO2 ===> 2CO + 2 H2

The Gibbs Free Energy for this reaction is positive, so conventionally it "shouldn't go". I had considered what would actually happen in the case of a reaction whose Free Energy was exactly zero, and I said it should be in equilibrium just as it was written. That's where things got messed up.

For a Free Energy of zero, you get k=1 for the equilibrium constant. I plugged in the concentrations as written above into the equilibrium formula

k = [CO]^2 * [H2]^2 / [CH4] * [CO2]

and it comes to k = 16, so something is wrong.

Here's what I've figured out so far. Free energy is calculated for gasses at STP conditions: Standard Temperature and Pressure, or 1 atmosphere at 25 degrees Celsius. If you think about it, you'll see that it is physically impossible to combine these four gasses, in their stoichiometric ratios, in a single container at STP conditions. Just think about it. There is twice as much H2 as there is CH4, so the partial pressure of hydrogen must be twice the partial pressure of methane. They can't both be at STP.

By confining the gasses in a cylinder with a piston, we can vary the total pressure and it is not surprising that the equilibrium concentrations will change. This is just an application of Le Chatelier's principle. The value of k remains constant but the equilibrium point moves to the left or right: as the piston is compressed, the heavier molecules are favored because they take up less space, and vice versa. At some arbitray position, the gasses will inevitably be present in their stoichiometric proportions: but it is physically impossible for them to be present in the precise conditions specified in the balanced chemical equation: namely, all of them simultaneoulsy at STP.

By fiddling with the numbers, you can in fact verify that the equilibrium equation is satisfied for the following concentrations:

1/4 CH4 + 1/4 CO2 ===> 1/2 CO + 1/2 H2

It's just the balanced equation divided through by 4. So whatever enthalpies and entropies we had for the balanced equation, they are all altered in proportion for this modified equation. The free energy change is clearly zero.

What is still bothering the hell out of me is the fact that you still cannot put these four components into a single container at the exact conditions represented in the equation. The equation is written for STP conditions, and when you combine these gasses the partial pressures of the product side are still goind to be double the pressures of the reactant side. So it still needs to be explained: why does the equilibrium hold?

Let's look closely at what it means to combine these gasses.You have in the reaction as written 1/4 litre of methane, 1/4 litre of CO2, 1/2 litre of CO, etc; all of them at one atmosphere. You put them into a 1 litre container, and they fill the container: now, the partial pressures are respectively 1/4 atmosphere, 1/4 atmosphere, 1/2 atmosphere, etc. (You may notice that the total pressure inside the container is now 1.5 atmospheres but that is neither here nor there.) The point is that none of the gasses are at STP any more, so their enthalpies and entropies are all different. Why then does the equilibrium hold?

The problem is not so much with the enthalpies as with the entropies. In fact, the enthalpy of an ideal gas at a given temperature does not depend on the pressure or size of the containment vessel. (This fact in itself ought to be surprising but that is a story I'm not going to open up at this point.) But the entropies certainly change with expansion. And the gasses on the left hand of the equation expand by a factor of four, while those on the right hand side (the products) expand only by a factor of two. So the entropy changes ought to be different.

Most troubling of all is the fact that the entropy change tends to be logarithmic with the change in volume. So if we are looking to balance out the competing energy changes, it seems odd to me that the physical solution should come out in terms of nice fractional ratios of the original chemical equation. Clearly I haven't fully understood the situation yet. Maybe someone else will have a better explanation. But for now I'm going to put this little side issue to rest and continue with my story about Atomic Energy of Canada and the hydrocarbon detection system.

## Monday, June 14, 2010

### Point of Equilibrium

It is a well-known fact that a chemical reaction will not procede if the Gibbs Free Energy is positive. But as with so many well-known facts, there's more to the story than that.

Last week I wrote out the chemical reaction

CH4 + CO2 ===> 2CO + 2 H2

and noted that even at 300 degrees C, the Free Energy was positive. The obvious conclusion is that the hydrocarbons leaking into our leak detection system should not decompose, and if they exist they should be measurable at the hydrocarbon detector.

Anyone who has taken first year chemistry will be able to follow this straightforward logic. But it is an oversimplification of the truth. Now I'm going to explain why.

The much-repeated claim that the Gibbs Free Energy describes the spontaneity of a reaction is strictly true only when the components of the reaction are present in their stoichiometric proportions: which is to say, the proportions as given when the chemical reation is written out in its balanced form, as it is here. So if you mix one mole of methate, one mole of carbon dioxide, two moles of carbon monoxide and two moles of hydrogen, it is true that there will be no further production of the lighter species; in fact, given the right stimulus (e.g. a spark) the tendency would be for the reaction to go the other way, namely recombination into methane and CO2.

But in our leak detection system, the situation is very different. We are far from having the gasses present in their stoichiometric proportions. In fact we begin with pure CO2, and then introduce a tiny amount of methane, measured in the parts per million. What happens then?

It's a question of equilibrium. There comes a point where the rate of decomposition on the part of the heavier species equals the rate of recombination of the lighter species. The proportions of the mixture then stabilize. And not everyone remembers this, but in fact it is also part of the first-year chemistry curriculum (because otherwise I would have had no way of knowing it myself, not having any other education in the subject): you can use the Gibbs Free Energy to determine where exactly that point of equilibrium lies!

At this point I'm not going to explain why it works but I'm just going to write out the formula for equilibrium: it should look something like this:

k = [CO]^2 * [H2]^2 / [CH4] * [CO2]

The quantities in brackets are just the quantities of chemicals expressed in mole fractions. Reactants on the bottom, products on top. Because there are two moles of carbon monoxide in the balanced formula, you have to take the square of the concentration. Etcetera. Remember, I'm not explaining why this works, I'm just saying it's how the formula goes.

There's one more formula we need to make this work. The quantity k in the expression above is called the "equilibrium constant". To get the equilibrium constant you use the Gibbs Free Energy. It's an exponential formula: you take the ratio of the Gibbs Free Energy to the Ideal Gas Law constant for the temperature in question, and that ratio becomes the argument of the exponential function. If the ratio is positive, then the constant is greater than one; if negative, it is less than one.

If the Gibbs free energy is zero, then the equilibrium constant is equal to one. What does this mean? Just plug in the numbers. It means the numerator and the denominator of the fraction have to be equal. There are many ways you can do this. You can have one mole of each component. Or you can have, for example, two moles of methane, two moles of CO2, two moles of CO and one mole of H2...then your fraction comes to four on top and four on the bottom. Or whatever.

Even as a write these words, I can see that something is wrong. When the Gibbs Free Energy is zero, with k=1, the reaction ought to be balanced exactly as it is written. But if I try to plug those numbers into the equilibrium formula, I get 2^2 * 2^2 on top (because there are two moles each of hydrogen and carbon monoxide) and 1*1 on the bottom, so my equilibrium constant is way off. I'm going to take a pause here while I figure out what's wrong.

## Tuesday, June 8, 2010

### Where did the methane go?

Getting back to the question of the oil-cooled nuclear reactor in Pinawa, Manitoba: my assignment was to get a new monitoring system installed on the leak detection system. The fifty-seven pressure tubes of the reactor were each surrounded by a larger tube, and these outer tubes were continuously purged with CO2 gas. The leak detection system was based on monitoring the purge gas for trace hydrocarbons, which would indicate that a pressure tube was leaking. To pinpoint the location of any possible leaks, the 57 tubes were separately routed through a system of solenoid valves to a monitoring station.

To the great chagrin of the reactor operators, the detection system indicated all kinds of leaks! At least a quarter of the channels showed hydrocarbon readings well into the tens of parts per million. This was a very serious matter.

Until someone got the bright idea of just letting the multiplexer valve sit on a single channel for a while. It turned out that after ten minutes the reading would go back down to zero. You could clearly see it on the strip chart recorder which left a telltale line of ink, one after another, for each channel in sequence. The high readings were obviously some kind of instrumentation glitch, a "surge" they called it. The true reading was the number showing after ten minutes purging a single channel. Problem solved.

And this was where things sat when I was given the assignment. I was most definitely not expected to get into the question of explaining the "surges": the system was working just fine. All we needed was some more modern equipment. Strip chart recorders were after all very very 1960's: this was the 80's and we were converting to computers for all our data monitoring. And one of the major benefits of computer data logging would be to get rid of those annoying surge readings. You would just program the computer to switch channels, wait ten minutes, and then log the reading only when it had had a chance to "settle down".

I still don't know what made me think of it, but it occurred to me that I might be able to explain the surges. What if there was some chemical reaction taking place in the sampling lines whereby hydrocarbons were being broken down to some other lighter species which were then going through the detector without showing their presence? Then, when the valve switched to the next sampling line, some unsampled gas would still be left sitting in the last tube. With 57 channels at 10 minutes each, it would be almost six hours before that tube would be sampled again. Maybe that was enough time for the reaction to reverse and the products be converted back into methane. That would explain the surge, and it would explain why the surge disappeared after ten minutes: once the fresh gas reached the detector, the remaining hydrocarbons would have been washed out of the system.

But what kind of reaction could be responsible for this wierd behavior. Taking methane as an example of a typical hydrocarbon, I wrote out:

CH4 + CO2 => ???

I did some trial and error and came up a couple of possible reactions. The one that seemed most interesting was:

CH4 + CO2 => 2CO + 2H2

If you haven't done chemistry for a while, you might want to note that the left and right hand sides of this equation each have two carbons, two oxygens, and four hydrogens. So it is indeed a balanced chemical equation. The question is: does this reaction actually take place?

There's a way to tell if a reaction is expected to take place or not, and it's something you learn in first year chemistry. It's called the Gibbs Free Energy and its a formula that combines the enthalpy and entropy of a reaction into a combined measure of spontaneity. In short, all things being equal, if the Gibbs Free Energy is negative, the reaction should go. If it's positive, then it won't.

Let's ignore for a moment just what is the physical meaning of enthalpy and entropy: the fact is you can look them up in the chemical handbooks and add them up. It's not that hard and what you find is that the Gibbs Free Energy for the reaction in question is decidedly positive. So my theory was wrong: thermodynamically speaking, the reaction shouldn't occur.

Was that correct? Maybe I'd made a mistake in the calculation. I went over it again and got the same result. Then, I noticed something: in the formula for Gibbs Free Energy, the entropy term is multiplied by the temperature. Out of habit I had used STP (Standard Temperature and Pressure) conditions, but of course the reactor ran at a coolant temperature of 300 degrees Celsius. Maybe this would make a difference?

Sure enough, it did. For this reaction, the internal energy of the molecules (the enthalpy) was definitely higher on the right hand side, which inhibited the reaction: but the entropy contribution was in the other direction; since it was multiplied by temperature, the reaction became more favorable the hotter it ran. This makes sense because entropy is a measure of disorder, and the products consist of four molecules while the reactants are only two. So at sufficiently high temperatures the entropy should dominate and the reaction procede.

I quickly redid the figures, and once again I was disappointed. Even with the corrected temperature, the additional contribution of the entropy term was still not sufficient to tilt the balance from positive to negative. The reaction was still a "no go."

And yet: the reaction does take place, and I was able to prove it by directly measuring carbon monoxide in a freely running sample line! The explanation of this mystery will follow in my next blog post.