Tag Archives: Equation of state

Internal Energy, Enthalpy, Helmholtz free energy and Gibbs free energy are all Legebdre transformations of each other

Sometimes it pays to be persistent in thinking about things you don’t understand (if you have the time as I do). The chemical potential is of enormous interest to chemists, and yet is defined thermodynamically in 5 distinct ways. This made me wonder if the definitions were actually describing essentially the same thing (not to worry they are).

First, a few thousand definitions

Chemical potential of species i — mu(i)
Internal energy — U
Entropy — S
Enthalpy — H
Helmholtz free energy — F or A (but, maddeningly, never H)
Gibbs free energy — G
Ni — number of elements of chemical species i
Pressure — p
Volume — V
Temperature — T

Just 5 more
mu(i) == ∂H/∂Ni constant S, p
mu(i) == ∂S/∂Ni constant U, V
mu(i) == ∂U/∂Ni constant S, V
mu(i) == ∂F/∂Ni constant T, V
mu(i) == ∂G/∂Ni constant T, p

Clearly, at a given constellation of S, U, F, G the mu(i)’s won’t all be the same number, but they’re essentially the same thing. Here’s why.

Start with a simple mathematical problem. Assume you have a simple function (f) of two variables (x,y), and that f is continuous in x and y and that its partial derivatives u = ∂f/∂x and w = ∂f/∂y are continuous as well so you have

df = u dx + w dy

u and dx are conjugate variables, as are w and dy

Suppose you want to change df = u dx + w dy to

another function g such that

dg = u dx – y dw

which is basically flipping a pair of conjugate variables around

Patience, the reason for wanting to do this will become apparent in a moment.

The answer is to use what is called the Legendre transform of f which is simply

g = f – y w

dg = df – y dw – w dy

plug in df

dg = u dx + w dw – y dw – w dy == df – y dw – w dy Done.

Where does the thermodynamics come in?

Well, you have to start somewhere, so why not with the fundamental thermodynamic equation for internal energy U

dU = ∂U/∂S dS + ∂U/∂V dV + ∑ ∂U/∂Ni dNi

We already know that ∂U/Ni = mu(i)

Because of the partial derivative notation (∂) it is assumed that all the other variables say in the expression for dU e.g. V and Ni are held constant in ∂U/∂S. This will reduce the clutter in notation which is already cluttered enough.

We already know that ∂U/∂Ni is mu(i). One definition of temperature T, is as ∂U/∂S, and another for p is -∂U/∂V (which makes sense if you think about it — decreasing volume relative to U should increase pressure).

Suddenly dU looks like what we were talking about with the Legendre transformation.

dU = T dS – p dV + ∑ mu(i) dNi

Apply the Legendre transformation to U to switch conjugate variables p and V

H = U + pV ; looks suspiciously like enthalpy (H) because it is

dH = dU + p dV + V dp + ∑ mu(i) dNi

= T dS – p dV + ∑ mu(i) dNi + p dV + V dp

= T dS + V dp + ∑ mu(i) dNi

Notice how mu(i) here comes out to ∂H/dNi at constant S and P

Start with the fundamental thermodynamic equation for internal energy

dU = T dS – p dV + ∑ mu(i) dNi

Now apply the Legendre transformation to T and S and you get
F = U – TS ; looks like the Helmholtz free energy (sometimes written A, but never as H) because it is.

You get

dF = – S dT – p dV + ∑ mu(i) dNi

Who cares? Chemists do because, although it is difficult to hold U constant or S constant (and it is impossible to measure them directly) it is very easy to keep temperature and volume constant in a reaction, meaning that changes in Helmholtz free energy under those conditions is just
∑ mu(i) dNi. So here mu(i) = ∂F/∂Ni at constant T and p

If you start with enthalpy

dH = T dS + V dp + ∑ mu(i) dNi

and do the Legendre transform you get the Gibbs free energy G = H – TS

I won’t bore you with it but this gives you the chemical potential mu(i) at constant T and p, conditions chemists easily arrange all the time.

To summarize

Enthalpy (H) is one Legendre transform of internal energy (U)
Helmholtz free energy (F) is another Legendre transform of U
Gibbs free energy (G) is the Legendre transform of Enthalpy (H)

It should be clear that Legendre transforms are all reversible

For example if H = U + PV then U = H – PV

If you think a bit about the 5 definitions of chemical potential, you’ll see that it can depend on 5 things (U, S, p, V and T). Ultimately all thermodynamic variables (U, S, H, G, F, p, V, T, mu(i) ) often have relations to each other.

Examples include H = U + pV, F = U – TS, G = H -TS

Helping keep things clear are equations of state from the things you can easily measure (p,V, T). The most famous is the ideal gas law p V = nRT.


State functions, state equations, graphs of them and reversibility

Thermodynamic States are all considered to be continuous variables (the fact that Internal Energy (U) is a state variable is half of the first law).

A continuous function of state_function_1 in terms of state_function_2, . . . . state_function_n produces a graph which is an n dimensional surface in n + 1 dimensional space. If this seems rather abstract, we’ll get concrete shortly. Consider the classic calculus 101 function y = x^2. Write it like this

f : R^1 –> R^1
f : x |–> x^2

This does seem a bit stuffy, but the clarity it provides is useful, as you’ll see. R^1 is the set of real numbers. The first line tells you that f goes from the real numbers to the real numbers. The second like gives you what f does to a point in the domain. What about the graph of f? It is the parabola, which lives in the x – y plane, a 2 dimensional space. The graph of f is just a curved line with dimension 1, living in a space one dimension higher (e.g. dimension 2).

Different state functions apply to different physical systems at which point they are called equations of state, with every point on their graph representing a collection of state variables at which the system is at equilibrium (e.g. not changing with time)

The simplest state function comes from the ideal gas law PV = nRT, which was promulgated in 1834 by Claperyon. You may regard it as

T : R^2 –> R^1
T : (P, V) |–> P*V/R == T

This is Temperature (statefunction1) in terms of P (statefunction2) and V (statefunction3). What is its graph — something 2 dimensional living in 3 dimensional space — e. g. a surface.

If you’ve studied PChem, you’ve probably met the Carnot cycle. Here’s a link https://en.wikipedia.org/wiki/Carnot_cycle.  It is represented by  a bunch of curved lines in the PV plane, but each line in the diagramreally represents a line on the 3 dimensional graph of T. You can think of this like a topographic map of a mountain, but not quite. The top and bottom lines represent constant temperature (altitude) but the (semi)vertical lines are paths up and down the mountain. Just looking at the flat PV diagram is pretty misleading.

Any combination of P, V, T not satisfying PV = RT is not on the surface, and is not in equilibrium.  You won’t see any of them on the diagram of the PV plane, which is why it’s so misleading. 

P, V and T will change so they approach the surface (either by minimizing internal energy or maximizing entropy or a combination of both — these are the driving forces of Dill’s book — Molecular Driving Forces.

The definition of surface given above is quite general and applies to more complicated situations — which is why I went to the trouble to go through it. For instance, in some systems Internal Energy (U) is a function of 3 variables Entropy (S), Volume (V) and the number of molecules (N). This is a 3 dimensional surface living in 4 dimensions. It’s just as much of a surface as that for T in terms of P and V, but I can’t visualize it (perhaps you can) Note also that when you go to higher magnification N is not a continuous variable, any more than concentration is.

Any point on the surface can be reached reversibly from any other — what does reversibility actually mean?

Berry Physical Chemistry 2nd Ed 2000 p. 377. Reversibility of changes in equilibrium means 3 things.

l. The change occurs almost infinitesmally slowly (a very large class of real processes have work and heat values very close to reversible processes)

2. Changes remain infinitesmally close to equilibrium (e.g. they stay on the surface. At equilibrium, thermodynamic variables still fluctuate. If movement on the surface is slow enough that the thermodynamic variables are within 1 standard deviation of the average values of the thermodynamic state variables, no observation can show that the stat eof the system has changed

3. Intensive variables corresponding to work being done (e.g. pressure, surface tension, voltage) are continuous across the boundary of the system on which work is being done.

Objects off the surface aren’t in equilibrium and maximization of entropy or minimization of internal energy drive them toward the surface. This implies that the surface is is an attractor. Now that chaos is well known, are there thermodynamic attractors — I’ve written Dill to ask about this.

Hopefully this will be helpful to some of you. Putting it together was to me. As always, the best way to learn something is trying to explain it to someone else.