Electrolysis of Water
By providing energy from a battery, water (H2O) can be dissociated into the diatomic molecules of hydrogen (H2) and oxygen (O2). This process is a good example of the the application of the four thermodynamic potentials.

The electrolysis of one mole of water produces a mole of hydrogen gas and a half-mole of oxygen gas in their normal diatomic forms. A detailed analysis of the process makes use of the thermodyamic potentials and the first law of thermodynamics. This process is presumed to be at 298K and one atmosphere pressure, and the relevant values are taken from a table of thermodynamic properties.

Quantity H2O H2 0.5 O2 Change
Enthalpy -285.83 kJ 0 0 ΔH = 285.83 kJ
Entropy 69.91 J/K 130.68 J/K 0.5 x 205.14 J/K TΔS = 48.7 kJ

The process must provide the energy for the dissociation plus the energy to expand the produced gases. Both of those are included in the change in enthalpy included in the table above. At temperature 298K and one atmosphere pressure, the system work is

W = PΔV = (101.3 x 103 Pa)(1.5 moles)(22.4 x 10-3 m3/mol)(298K/273K) = 3715 J
Since the enthalpy H= U+PV, the change in internal energy U is then

ΔU = ΔH - PΔV = 285.83 kJ - 3.72 kJ = 282.1 kJ
This change in internal energy must be accompanied by the expansion of the gases produced, so the change in enthalpy represents the necessary energy to accomplish the electrolysis. However, it is not necessary to put in this whole amount in the form of electrical energy. Since the entropy increases in the process of dissociation, the amount TΔS can be provided from the environment at temperature T. The amount which must be supplied by the battery is actually the change in the Gibbs free energy:

ΔG = ΔH - TΔS = 285.83 kJ - 48.7 kJ = 237.1 kJ
Since the electrolysis process results in an increase in entropy, the environment "helps" the process by contributing the amount TΔS. The utility of the Gibbs free energy is that it tells you what amount of energy in other forms must be supplied to get the process to proceed.