Gibbs Free Energy : What is it trying to say actually?

"Gibbs Energy is the useful work that can be extracted from the heat of a reaction or a thermodynamic process." I understand how it predicts the feasibility of a chemical reaction , considering the Entropy statement of the Second Law. But how does it relate with the useful work that can be extracted? (This definition is implicitly used in my textbook in deriving from Nernst Equation, the useful work that can be extracted from an electrochemical cell and I am missing the point why this actually works.) Is there an intuitive explanation? Also if this much of energy is "free", what happens to the energy that is "not free"? Why can't we extract the whole energy that is released?

Also I am interested to know if there is any direct relation between Gibbs Function and Kelvin-Planck Statement, which apparently expresses the inherent inability to convert the whole heat to useful work, or am I mixing up two very different aspects? Thanks.

You can prove that the Gibbs free energy is equal to the maximum amount of work that a certain reaction (or any physical process in general) can perform, i.e. $\Delta G = w_{max}$. Such a proof can be found in any decent Physical Chemistry textbook (such as Atkins'). The remaining energy must be "lost" as heat to basically account for the observation that is essentially stated with the Clausius inequality $\Delta S \geq 0$ (i.e. the entropy of the universe is always increasing) . Of course the definition of entropy $\Delta S = \frac{q_{rev}}{T}$ and the Clausius inequality that is derived from it (and hence the Gibbs free energy) are inherently connected to Kelvins (and Clausius') statement of the second law. You can see from the definition (don't forget the change of entropy of the surroundings!) that (since $\Delta U = q + w$) the entropy is decreasing when heat is completely converted to work.
• @Sagy you can determine the maximum theoretical efficiency - the actual efficiency is given by $\frac{w_{out}}{E_{in}}$. Note that this only applies to processes occurring at constant temperature and pressure - so an internal combustion engine wouldn't fit. – thomij Jan 22 '15 at 19:06