Gibbs free energy
From Academic Kids

In thermodynamics the Gibbs free energy is a state function of any system defined as
 G = H − T·S
where
 G is the Gibbs free energy, measured in joules
 H is the enthalpy, measured in joules
 T is the temperature, measured in kelvins
 S is the entropy, measured in joules per kelvin
Each unit in the equation above can be divided by the amount of substance, measured in moles, to form molar Gibbs free energy.
The Gibbs free energy is one of the most important thermodynamic functions for the characterization of a system. It determines outcomes such as the voltage of an electrochemical cell, and the equilibrium constant for a reversible reaction. Gibbs free energy also determines how much work is attainable for any given process.
Any natural process occurs spontaneously if and only if the associated change in G for the system is negative (<math>\Delta G<math> < 0). Likewise, a system reaches equilibrium when the associated change in G for the system is zero (<math>\Delta G<math> = zero). And, no spontaneous process will occur if the final value of G is positive, or, greater than zero.
It is named after American chemist Willard Gibbs.
Contents 
Useful identities
 <math>\Delta G = \Delta H  T \Delta S \,<math>
 <math>\Delta G = R T \ln K \,<math>
 <math>\Delta G = nF \Delta E \,<math>
and rearranging gives
 <math>nF\Delta E = RT \ln K \,<math>
which relates the electrical potential of a reaction to the equilibrium coefficient for that reaction.
where
 ΔG = change in Gibbs free energy
 ΔH = change in enthalpy
 T = temperature
 ΔS = change in entropy
 R = gas constant
 ln = natural logarithm
 F = Faraday constant (coulombs/mole)
Derivation of Gibbs Free Energy
Let S_{tot} be the total entropy of a thermally closed system. An isolated system cannot exchange heat with its surroundings. Total entropy is only defined for an isolated system, an open system has internal entropy instead.
The second law of thermodynamics states that if a process is possible, then
 <math> \Delta S_{tot} \ge 0 \,<math>
and if <math> \Delta S_{tot} = 0 \,<math> then the process is reversible.
Since the heat transfer Δq vanishes for a closed system, then any reversible process will be adiabatic, and an adiabatic process is also isentropic <math> \left( {\Delta q\over T} = \Delta S = 0 \right) \,<math>.
Now consider an open system. It has internal entropy S_{int}, and the system is thermally connected to its surroundings, which have entropy S_{ext}.
The entropy form of the second law does not apply directly to the open system, it only applies to the closed system formed by both the system and its surroundings. Therefore a process is possible iff
 <math> \Delta S_{int} + \Delta S_{ext} \ge 0 \,<math>.
We will try to express the left side of this inequation entirely in terms of internal state functions. ΔS_{ext} is defined as:
 <math> \Delta S_{ext} =  {\Delta q\over T} \,<math>
Temperature T is the same both internally and externally, since the system is thermally connected to its surroundings. Also, Δq_{rev} is heat transferred to the system, so Δq_{rev} is heat transferred to the surroundings, and −ΔQ/T is entropy gained by the surroundings. We now have:
 <math> \Delta S_{int}  {\Delta q\over T} \ge 0 \,<math>
Multiply both sides by T:
 <math> T \Delta S_{int}  \Delta q\ge 0 \,<math>
ΔQ is heat transferred to the system; if the process is now assumed to be isobaric, then Δq_{p} = ΔH:
 <math> T \Delta S_{int}  \Delta H \ge 0\, <math>
ΔH is the enthalpy change of reaction (for a chemical reaction at constant pressure and temperature). Then
 <math> \Delta H  T \Delta S_{int} \le 0 \,<math>
for a possible process. Let the change ΔG in Gibbs free energy be defined as
 <math> \Delta G = \Delta H  T \Delta S_{int} \,<math> (1)
Notice that it is not defined in terms of any external state functions, such as ΔS_{ext} or ΔS_{tot}. Then the second law becomes:
 <math> \Delta G < 0 \,<math> favored reaction
 <math> \Delta G = 0 \,<math> reversible reaction
 <math> \Delta G > 0 \,<math> disfavored reaction
Gibbs free energy G itself is defined as
 <math> G = H  T S_{int} \,<math> (2)
but notice that to obtain equation (2) from equation (1) we must assume that T is constant.
Thus, Gibbs free energy is most useful for thermochemical processes at constant temperature and pressure: both isothermal and isobaric. Such processes do not seem to move on a PV diagram; they do not seem to be dynamic at all. However, chemical reactions do undergo changes in chemical potential, which is a state function. Thus, thermodynamic processes are not confined to the two dimensional PV diagram. There is at least a third dimension for n, the quantity of gas.
Back to Entropy
If a closed system (Δq_{rev} = 0) is at constant pressure (Δq_{rev} = ΔH), then
 <math> \Delta H = 0 \,<math>
Therefore the Gibbs free energy of a closed system is:
 <math> \Delta G = T \Delta S \,<math>
and if <math> \Delta G \le 0 \,<math> then this implies that <math> \Delta S \ge 0 \,<math>, back to where we started the derivation of ΔG.
See also
it:Energia libera di Gibbs nl:Vrije energie ja:ギブズ自由エネルギー pl:Entalpia swobodna ru:Энергия Гиббса sl:Prosta entalpija sv:Gibbs fria energi