# 25.2: Thermodynamics

Here we shall go through the basic thermodynamics that lies behind use of the Ellingham diagram. First, we will establish the link between the thermodynamics of a reaction and its chemistry.

The Gibbs free energy, G, of a system can be described as the energy in the system available to do work. It is one of the most useful state functions in thermodynamics as it considers only variables contained within the system, at constant temperature and pressure.

It is defined as:

$G=H-T S$

Here, T is the temperature of the system and S is the entropy, or disorder, of the system. H is the enthalpy of the system, defined as;

$H=U+\mathrm{p} v$

Where U is the internal energy, p is the pressure and v is the volume.

To see how the free energy changes when the system is changed by a small amount, we can differentiate the above functions:

$dG = dH - TdS -SdT$

and;

$dH = dU + pdv +vdp$

From the first law,

$dU = dq' - dw$

and from the second law

$dS = \frac{dq'}{T}$

we see that,

$dG = dq' - dw + pdv + vdp - TdS +SdT$

$= -dw + pdv +vdp -SdT$

$= vdp - SdT$

Since work, dw = pdv

The above equation shows that if the temperature and pressure are kept constant, we see that the free energy does not change. This means that the Gibbs free energy of a system is unique at each temperature and pressure.

At a constant temperature dT = 0 and so

$dG = vdp$

We can find G for the system by integration. To do this we need the system’s equation of state, to give a relationship between v and p.

We will consider an ideal gas. For one mole of an ideal gas the equation of state is;

$v = \frac{RT}{p}$

so

$dG = RT \frac{dp}{p}$

Integrating:

$G RT ln(p) + const.$

This we can express as

$G = G^{o} + RT ln(\frac{p}{p^{o}})$