# Physical significance of free energy in canonical ensemble?

From macroscopic thermodynamics I understand that the free energy equals the total energy of the system minus the energy it would have cost a thermal reservoir to create it. So any energy in "excess" of the thermal energy given to it by a reservoir is "free" to do work, and in a physical system that free energy can be obtained by external forces on the system (i.e pressurizing, adding momentum, etc).

In statistical mechanics when we model a system, we model it in its equilibrium state. When we determine those equilibrium states as a function of T, we're only looking at the energy needed to activate the internal degrees of freedom to states that correspond to a given T, and no more.

Given that statistical mechanics theory doesn't account for any external forces on the system, how can the system have "free" energy? We're always calculating a state that maximizes entropy, so it seems to me that we're calculating stable equilibrium states, which means no excess energy. I know I'm wrong (I can calculate the free energy of a simple harmonic oscillator using a canonical ensemble and see that pretty easily), but I just don't understand the physical reasons.

• We're always calculating a state that maximizes entropy I don't think this is true. Certainly the system+reservoir has maximum entropy, but the system itself doesn't need to have maximum entropy. It will just have minimum free energy. Am I understanding everything correctly? Mar 22, 2019 at 4:20
• Good first thought. The canonical ensemble doesn't include reservoir though -- it's just in contact with one. I'll look into this deeper, but at first glance it's not obvious to me how you can maximize entropy of system + reservoir given that the canonical ensemble only looks at the phase space of the system. Mar 22, 2019 at 4:28
• Well it doesn't matter what you "look at". The system+reservoir is an isolated system itself, so entropy must be maximized. With this assumption you can then show that free energy of just the system will be minimized. Mar 22, 2019 at 4:30
• If you were correct (just needs minimum free energy), what would the physical intuition behind that free energy be? Mar 22, 2019 at 4:30
• @Aaron_Stevens What is the entropy of a reservoir whose temperature is independent of the other system attached to it? An ideal reservoir can only be realized approximately but then one would need a separate limit argument as to the variation being negligible relative to any other possible changes. An analogy is an ideal voltage source (constant voltage, zero internal impedance, arbitrary current) . For most application one can just add a finite amount of internal resistance to make the model more realistic, for a reservoir one needs finite heat capacity, but how large is large enough? Mar 22, 2019 at 15:42

"The Free energy equals the total energy of the system minus the energy it would have cost a thermal reservoir to create it." Your understanding of the cost is questionable. The cost, when we talk in thermodynamics, is due to entropy increase and is $$\delta Q = T dS$$. This amount of energy cannot be recovered and is thus not free for use.

• In words, how would you describe the cost, TdS? Mar 22, 2019 at 18:43
• Entropy changes with a cost of heat. This heat cannot be recovered. For example, you can 100% convert work to heat by friction. But you cannot 100% convert heat to work because that is not free for use. Part of the heat will be used somewhere but not work accompanying the entropy increase. That is the 2nd law. Mar 22, 2019 at 21:30
• I don't see how what you quote from the question goes against the rest of your answer. Mar 23, 2019 at 3:13
• I think the OP didn't consider this point when he said "So any energy in "excess" of the thermal energy given to it by a reservoir is "free" to do work". Mar 23, 2019 at 14:17

You're getting hung up on words, and misunderstanding what "free energy" actually is. Free energy, enthalpy, and Gibbs free energy can all be described as follows: the relevant part of the total energy, in linear approximation. That's it. Let's derive the Helmholtz free energy from this description.

First, consider two systems, label them 'in' and 'out.' If we assume that the interaction energy (the change to the total energy that comes about merely from the systems being in contact) is negligible, then we can write $$E_{\mathrm{tot}} = E_{\text{in}} + E_{\text{out}}.$$ Second, we assume that the systems are in thermal contact: they can exchange heat, but not volume or chemical species. We also assume that they are otherwise thermally isolated and in equilibrium. This means that $$đQ_{\mathrm{in}} = -đQ_{\mathrm{out}}$$ and $$T_{\mathrm{in}}=T_{\mathrm{out}}$$. Finally, we assume that the outside system is a heat bath: effectively, it has unlimited heat capacity to absorb or give as much heat as the inside system can handle without changing temperature.

Energy is a natural function of entropy (and volume, etc), from the first law of thermodynamics $$\mathrm{d}E = T\mathrm{d}S - P\mathrm{d}V+\ldots$$. So we can Taylor expand $$E_{\mathrm{out}}$$ at its present entropy as: $$E_{\mathrm{out}} = E_0 + \left.\frac{\partial E_{\mathrm{out}}}{\partial S}\right|_{S=S_0} (S - S_0) + \frac{1}{2} \left.\frac{\partial^2 E_{\mathrm{out}}}{\partial S^2}\right|_{S=S_0} (S - S_0)^2 + \ldots$$ Next, the second order (and higher) terms are what we assume are negligible when we say the outside system is a heat bath. The linear term is just $$T\Delta S_{\mathrm{out}}$$, by definition. Note, though that that is just $$-T\Delta S_{\mathrm{in}}$$. This means that we can write the total energy as: $$E_{\mathrm{tot}} \approx E_{\mathrm{in}} + E_0 - T(S_{\mathrm{in}} - S_{\mathrm{in},0}).$$ $$TS_{\mathrm{in},0}$$ and $$E_0$$ are just constants, though, and a constant shift in energy is physically meaningless, so we can ignore them. We are thus left with only the relevant part of the total energy $$E_{\mathrm{tot}} = E_{\mathrm{in}} - TS_{\mathrm{in}},$$ which is the Helmholtz free energy.

You can get into all sorts of fun with Legendre transforms, and statements about the entropy needed to create the system being donated by the heat bath, etc, but you shouldn't let that obscure the fundamental fact that comes from the derivation: it's the relevant part of the energy. There are lots of parts we're ignoring as part of the construction, but, if we're doing our physics correctly, the parts we're ignoring aren't relevant to the questions we want to ask, anyway.

You can do identical derivations for enthalpy (put the system in mechanical equilibrium with a work bath that has approximately constant pressure, like the atmosphere), the Gibbs free energy (two baths for double the fun), etc.

• In your very last equation, I think you want an "in" subscript on the S, not an "out" subscript.
– hft
Sep 6, 2022 at 19:52