Here we consider the amount of useful work which can be extracted from a system which is initially out of equilibrium with its surroundings, which are at temperature and pressure .
There are two factor which limit this. One is that if the system expands, it has to overcome atmospheric pressure before doing any useful work, so is wasted. The other is that if its entropy decreases (as in cooling) the entropy of the surrounding must increase enough to compensate. The system must discard heat to the surroundings so that .
So of the total energy decrease of the system, , the amount available to do work is
The equality is satisfied for reversible processes, which maximises the useful work available. (To cool reversibly with only a single cold reservoir would require the use of a heat engine to extract the heat, rather than the direct transfer depicted above.)
This explains why the availability, which we have met in a slightly different context, is so called.
Remember that it is the temperature and pressure of the surroundings that enter, not that of the system (though they end up the same).
Follow this link for an example.
References