# Why is the Gibbs Free Energy $F-HM$?

With magnetism, the Gibbs Free Energy is $F-HM$, where $F$ is the Helmholtz Free Energy, $H$ is the auxiliary magnetic field, and $M$ is magnetization.

Why is this? Normally, in thermodynamics, we Legendre Transform the various free energies into each other to maximize the global entropy. In these cases, we subtract $TS$ when we are imagining a system exchanging heat with a thermal reservoir (i.e. heat bath at constant temperature $T$), add $PV$ when we exchange volume $V$ with a constant pressure reservoir at pressure $P$, and subtract $\mu N$ when we exchange particles with a chemical reservoir at constant chemical potential $\mu$.

In every other case, we exchange heat, volume, and particles with the reservoir. How do we justify writing $G=F-HM$. Though it is true that $H$ is maintained constant, we don't exchange magnetization with a "magnetic reservoir".

## 3 Answers

According to the first law of thermodynamics

\begin{align}U=TS+YX+\sum_j\mu_jN_j.\end{align}

Where $Y$ is the generalized force, $dX$ is the generalized displacement.

Helmholtz Free Energy

\begin{align}F=U-TS=YX+\sum_j\mu_jN_j. \end{align}

Gibbs Free Energy

\begin{align}G=U-TS-YX=\sum_j\mu_jN_j.\end{align}

Therefore that

\begin{align}G=F-YX.\end{align}

In your case, $Y=H$, $X=M$, so we get

\begin{align}G=F-HM.\end{align}

You can see the textbook:

A Modern Course in Statistical Physics by L. E. Reichl, 2nd, ed (1997), p23, 42, 45.

Firstly, from the middle paragraph it seems you imply that adding, subtracting or changing variables of potentials stands in literal connection to energy transfers and but that's not the case. You can write down all quantities for all situations and in any case, there is only one and the same second law of thermodynamics at work. For any system parameter which is a priori left open, that law tells the system which configuration must be chosen. The change of parameters is the consequence of this and then, as a consequence of this, the energy in the system is changed. That's the math of thermodynamics in its beautiful abstract form.

Now you say

In every other case, we exchange heat, volume, and particles with the reservoir. How do we justify writing $G=F−HM$. Though it is true that H is maintained constant, we don't exchange magnetization with a "magnetic reservoir".

and what you do is put the focus on particular applications of the theory. In particular, you put emphasis on some parameters (volume and particle number) which are, in some models, conserved in total. However, thermodynamics only wants the total energy you set up to be constant. What the first and second law do is make the system pull energy until the maximal entropy state is reached and, in your case here, that energy is stored in form of magnetization.

Likely, there is no reservoir of vibrational excitation of $\mathrm N\mathrm H_3$, but you can still transfer translational energy to vibrational energy. Your analogies lack anyway. There are many field theories with non-conserved particle number and if the system is free to produce them, it will do. And I'd also not say that "volume is exchanged" if you do chemical reactions out in the wild. You have you vessel with volume $V_1$ and when your system blows up, due to exoterthermic reactions say, would you say you "exchange" volume with rest of the world volume $V_2=\infty$? What really is at work in the $P$-$V$ case is the process towards a force-equlibirum, bound again by energy conservation, here manifest in Newtons third. The vessel-volume $V_1$ pushes against gravitational/atmospheric force until it doesn't, and then equlibirum is reached. The energy contribution for ideal gas is $PV$. Likely, magnetizable systems work with or against the magnetic field until they have enough.

PS: I ranted about the different potentials and the Legendre transformation in thermodynamics here.

• Perhaps I need to be a little more explicit. If we couple a system (labeled 1) to a heat bath (labeled 2) we maximize the total entropy $S=S_1+S_2$. The total energy is conserved $E=E_1+E_2$. If we take the heat bath energy to be $E_2=T S_2$, then $S=S_1+E_2/T=S_1+(E-E_1)/T$. Maximizing $S$ is the same as minimizing $E_1-T S_1$, which is the Helmholtz Free Energy. You can do the exact same analysis for $PV$ and $\mu N$, and it doesn't really matter if particles aren't conserved and that $V=\infty$. However, how do you prove that $F-HM$ maximizes global entropy? – ChickenGod Mar 27 '14 at 23:49
• @ChickenGod: I don't know what the first half of your response has to do with the question at the end, or what you set $E_2=TS_2$ for, but let me ask you something in return: How does "$V$" in the derivation of the extremal conditions for the various potential single out that it has to do with volume. If you have a proof for $V$ and $P$, why doesn't it work if you use the other $M$ and $H$ in their place instead? – Nikolaj-K Mar 28 '14 at 0:04
• The first half of my response is a proof that the Helmholtz Free Energy is minimized at equilibrium, and $E_2=T S_2$ comes from integrating the definition of temperature: $1/T=\partial S/\partial E$, modulo a constant. Note that a crucial part of this proof is $E=E_1+E_2$, or $V=V_1+V_2$ or $N=N_1+N_2$, something that we can't write for the magnetic case. It doesn't matter that $V=\infty$ because $dV_1=-dV_2$ is what is really important, and also $\mu=-T\partial S/\partial N$ covers non-conservation of particles. – ChickenGod Mar 30 '14 at 0:02
• @ChickenGod: You can use $\mathrm dV_1=-\mathrm dV_2$ to show equilibration of the intensive variables $P_1,P_2$, but it's not, I think, relevant in the proof to show that $T\mathrm dS\ge \delta Q = \mathrm d(U-\frac{\partial U}{\partial q}\cdot q)$, were $q$ is $V, M, \dots$. – Nikolaj-K Mar 30 '14 at 3:18

Without magnetism, you have $F(T, V, N)$ and $G(T, P, N)$. So you did a Legendre transform so that your potential depends on $P$ instead of $V$. It also means that you move from an extensive to an intensive quantity.

The free energy $F$ comes via $U = TS$ from the internal energy, which depends purely on extensive quantities. By going from $U$ to $F$, you exchange $T$ and $S$. $U$ will depend on $M$, which is also extensive. If you want $G$ to depend mostly intensive quantities, you will have to transform $M$ as well. That is why you get an additional $- HM$.

In my lecture, I was just told that we could transform the potentials into each other so that they depend on the variables that we are interested in. $U$ is fine for no interaction, $F$ for energy exchange and $\Omega$ for energy and particle exchange, and they are related to the micro canonical, canonical and grand canonical treatment. You choose the parameters such that the entropy is maximized, but the Legendre transform will not do that, since it leaves the value of the function unaltered.

• What do you mean the Legendre Transform leave the value of the function unaltered? It changes the value of the function by $-HM$. – ChickenGod Mar 30 '14 at 0:04