On studying different books and journals of electrochemistry I found that many confusions have been made in defining the term work function. A general definition of work function is that it the minimum energy required to remove an electron in vacuum level i.e. it is the energy required to remove an electron from the highest occupied energy level to the free state(where electron is not bound). Now every metal has there own work function values. But the confusion arises when we are talking about the work functions for two metal which establishes equilibrium with them selves. It can easily be guessed that the highest occupied energy level of the two metals will not be same after the equilibrium (as electrochemical potential of the two metals will be same). We also can think that the level which is considered to free state or a vacuum level should definitely be same. As a result of these two, the work functions of these two metals are going to change and become equal with each other at equilibrium. Is it the case?
The main reason to ask this question is, in many papers I found that work function does not change in equilibrium, what changes is the vacuum level. But how vacuum level or energy of the free level can be different as it corresponds to zero energy where electrons are free from the bound of metal nucleus. Can any one please provide a clear explanation.