# a basic question about entropy and free energy

by jeebs
Tags: basic, energy, entropy, free
 P: 326 I'm wondering about entropy, free energy and disorder. I see entropy defined along the lines of "the amount of energy within a system that is unavailable to be used for useful work". So, the energy that is available to do work, ie. the Free energy, is given by the internal energy minus the entropy contribution (using the Hemholtz free energy rather than Gibbs just for simplicity). Also, I am aware that the entropy is associated with the level of disorder of a system. So, say we had a mixture of two gases confined in a box. Now say that gas A was all initially up in one corner, and gas B filled the rest of the box - but to make things equal these gases are similar in that particles of A don't repel each other any greater than they repel gas B, or any greater than B repels B. Also, we could say that every particle is initially positioned on some imaginary cubic lattice, so that it might look something like $$\left(\begin{array}{cccc}A&A&B&B\\A&A&B&B\\B&B&B&B\\B&B&B&B\end{array}\ right)$$ and then some time passes until they have randomly ended up all positioned at one of these imaginary points again, and it has evolved to something like $$\left(\begin{array}{cccc}A&B&B&B\\B&B&B&A\\B&B&A&B\\A&B&B&B\end{array}\ right)$$ Clearly the disorder has increased, in other words the entropy has increased. However, if all the particles repel each other equally and are at the same density throughout the system, just like how it started, then there would be no difference in pressure on any of the walls at either instant, right? Well, where has the energy available to do work gone due to the disorder? I'm imagining "useful work" as the ability to move a wall as if it was a piston, thus increasing the volume and lowering the pressure. Surely the gas particles could push the wall no differently when they are all mixed up compared to when they were separate, assuming there has been no temperature change just because the particles have rearranged themselves? What am I missing here? Also, going back to the Helmholtz free energy, it's written as F = U - TS, where U is the internal energy (ie. the potential energy due to the Coulomb interactions of the particles, right) and TS is the entropic term. I always wondered about the TS term, why does it have that form? I mean, S is measured in Joules per Kelvin, so multiplying it by the temperature makes the dimensions correct to be used in that equation, but why was it decided that TS is the amount of entropic energy present in the system? I'm aware that increases in entropy go hand in hand with increases of temperature, but... still I'm not sure... looking at the units you could call the change in entropy "the change in energy per unit temperature", so multiplying it by the temperature gives you a change in energy, but what energy is this?
PF Patron
HW Helper
P: 2,532
 Quote by jeebs Well, where has the energy available to do work gone due to the disorder?
It has disappeared. There's no Law of Conservation of "Energy Available to Do Work"; there's only the Law of Conservation of Energy, and the energy in your system is unchanged. The entropy has increased, though.

 Quote by jeebs Also, going back to the Helmholtz free energy, it's written as F = U - TS, where U is the internal energy (ie. the potential energy due to the Coulomb interactions of the particles, right) and TS is the entropic term. I always wondered about the TS term, why does it have that form?
We know that closed adiabatic systems at constant volume tend to evolve toward their lowest energy state (i.e., $dU=0$ at equilibrium, where $dU=T\,dS-P\,dV$). But we often deal with systems at constant temperature rather than adiabatic systems. Therefore, we perform a so-called Legendre transform by writing $F=U-TS$; this produces $dF=-S\,dT-P\,dV$, which tells us that constant-temperature systems at constant volume tend to minimize $F$ and satisfy $dF=0$ at equilibrium. So that's the quick story of where the $TS$ comes from. Does this make sense?
P: 326
 Quote by Mapes It has disappeared. There's no Law of Conservation of "Energy Available to Do Work"; there's only the Law of Conservation of Energy, and the energy in your system is unchanged. The entropy has increased, though.
I am still failing to make the connection between increasing disorder and decreasing capacity to do work. how has it disappeared exactly? something must have happened to it based on the spatial configuration of the two gases.

 Quote by Mapes We know that closed adiabatic systems at constant volume tend to evolve toward their lowest energy state (i.e., $dU=0$ at equilibrium, where $dU=T\,dS-P\,dV$). But we often deal with systems at constant temperature rather than adiabatic systems. Therefore, we perform a so-called Legendre transform by writing $F=U-TS$; this produces $dF=-S\,dT-P\,dV$, which tells us that constant-temperature systems at constant volume tend to minimize $F$ and satisfy $dF=0$ at equilibrium. So that's the quick story of where the $TS$ comes from. Does this make sense?
Okay this I think I understand, but when you mentioned that $dU=T\,dS-P\,dV$, if I'm not mistaken this relates to what my gas example was talking about. If we assume the gas is in a rigid container, fixed volume, and perfectly insulating walls so that it's adiabatic, then dV = 0, and the temperature could be kept constant, so we would have dU = TdS. If we were then talking about the free energy change in a given time dG = dU + pdV - TdS, we would have dG = dU - dU = 0. If the gas particles don't distinguish A from B (in a Coulomb interaction sense) then their internal energy should never change either - but apparently dU = TdS, so if there is an entropy change (the particle rearrangement) dS there must be an internal energy change - I don't get how this would arise in my example.

If we were to allow them to get all mixed up from an intially ordered configuration, how has the free energy been able to lower itself there - eg. if we suddenly made one of the rigid walls act like a movable piston, how can the mixture of gas have any less capacity to force the piston out just because its particles are more mixed up, compared to if we had made one wall a piston at the start before the mixing?
or have I just described an impossible/illogical/unphysical/nonsensical situation here?

PF Patron
HW Helper
P: 2,532

## a basic question about entropy and free energy

 Quote by jeebs I am still failing to make the connection between increasing disorder and decreasing capacity to do work. how has it disappeared exactly? something must have happened to it based on the spatial configuration of the two gases.
An analogous situation is equal amounts of a substance at temperatures $T_1$ and $T_2$ that, once brought together, equilibrate to temperature $(T_1+T_2)/2$. What happened to the energy available to do work? It spontaneously and irrecoverably disappeared. There's no physical law against that; in fact, the Second Law tells us that it must be so.

For your second question, note that your $dG$ equation is not quite right; because $G=U-TS+PV$,

$$dG=dU-T\,dS-S\,dT+P\,dV+V\,dP=-S\,dT+V\,dP.$$

I'm not sure if this resolves your question, so I'll stop there.
P: 326
 Quote by Mapes An analogous situation is equal amounts of a substance at temperatures $T_1$ and $T_2$ that, once brought together, equilibrate to temperature $(T_1+T_2)/2$. What happened to the energy available to do work? It spontaneously and irrecoverably disappeared. There's no physical law against that; in fact, the Second Law tells us that it must be so.
In my example I meant for the temperature to be constant. I was trying to stress the example was supposed to be concerned with just isolating the effect of the amount of configurational disorder - no temperature change, no enegy gain or loss from the environment. I still don't see why mixing the gases up would make a difference to the energy available to do work if gas A and B did not interact with each other any more strongly or weakly than they interact with themselves.
PF Patron
HW Helper
P: 2,532
 Quote by jeebs In my example I meant for the temperature to be constant. I was trying to stress the example was supposed to be concerned with just isolating the effect of the amount of configurational disorder - no temperature change, no enegy gain or loss from the environment. I still don't see why mixing the gases up would make a difference to the energy available to do work if gas A and B did not interact with each other any more strongly or weakly than they interact with themselves.
Yes, I know your example features a material gradient and constant temperature. My analogous scenario features a temperature gradient and a single material, as I thought that might give some additional insight.

Yet another way to look at it is to imagine extracting the actual work from your first scenario. Assume that you reversibly let gas A expand into the whole box, extracting work from the expansion. The gas will cool down because you're removing energy. Now throw that energy back in, doing work on the system to increase its thermal energy. If you go through the same process with gas B, you'll reach your original end state. That's what I mean when I say that the available work has disappeared.

In other words, when something irreversible happens and the universe's entropy increases, it means you had the opportunity to extract work, and you didn't take it. That's equivalent to actually extracting the work and then putting it right back into the system as heat.

Does this make sense?
P: 326
 Quote by Mapes Yet another way to look at it is to imagine extracting the actual work from your first scenario. Assume that you reversibly let gas A expand into the whole box, extracting work from the expansion. The gas will cool down because you're removing energy. Now throw that energy back in, doing work on the system to increase its thermal energy. If you go through the same process with gas B, you'll reach your original end state. That's what I mean when I say that the available work has disappeared. In other words, when something irreversible happens and the universe's entropy increases, it means you had the opportunity to extract work, and you didn't take it. That's equivalent to actually extracting the work and then putting it right back into the system as heat. Does this make sense?
Are you saying that at first, there is only gas A present, and it is reversible because it can start by occupying some initial small region of the box, expand out to fill the whole container - then have the walls pushed in so that it once again is confined to the small region it started in, and be at its initial temperature and pressure?

Then what happens with gas B? Are you starting with the same set up of unmixed gases in the box, like in my example? so that you let gas A and B expand to fill the box, get all mixed up, but then when you compress it all back down to the initial volume you can never get (or at least it would be highly unlikely to get) them back into the same unmixed configuration? So that would be irreversible?

If that is the case, then I can see that the entropy has increasedduring this process, but what is there to suggest that the gas mixture couldn't once again just expand again in the same manner as it did the first time, if it was returned to the same pressure, temperature and volume...? Why is there not as much energy available to do this work a second time?
 P: 1 The problem is so called Gibbs Paradox which is actually treated in statistical mechanics not thermodynamics. And it's no wonder because microscopical definition of entropy does not belong to thermodynamics. Thermodynamics is strictly macroscopical theory. The essence of Gibbs paradox is that of course there is no increase in entropy upon mixing of two (or more) identical gases. But when using microscopical definition of entropy difference in entropy between two states (unmixed and mixed) does appear. The inconsistency is overcome by stating that particles are indistinguishable. More on Gibbs paradox here: http://en.wikipedia.org/wiki/Gibbs_paradox.
 P: 36 Maybe a numerical example will clarify: Start with 4 moles of gas A occupying 4 liters in one corner, and 12 moles of gas gas B occupying the remaining 12 liters of the containter. The temperature is held at constant T=195K, that makes the pressure of each portion about 16 atmosphere. Let A and B mix; the final result is gas A at partial pressure 4 atm and gas B at partial pressure 12 atm. Total Final pressure unchanged at 16atm, temperature unchanged and absolutely no work was extracted. Now, instead if gas A were allowed to expand by the same ratio against a piston,about 9000 Joules of work (4moles*R*T*ln(16/4))could have been extracted, but it has gone to waste,so to speak, as an increase of entropy. Similarly, gas B "lost" about 5600 J of energy. And what we mean by "lost" is that it is no longer available, it's now more "randomized" than before; useful mechanical work is directed. Of course one could take the 16 liters of gas mixture at 16 atm, expand it against a piston and go on to extract useful energy. But the 14600J lost thru mixing is lost forever.
PF Patron
HW Helper