What happens when work function $\phi = hf$ What happens when the photon which hits a metal surface has energy equal to the work function of that surface?
$$\phi = hf$$
I realise the emitted electron will have no kinetic energy after escape, but then what does it do? Hover above the surface? Or does it have momentum from escaping? I also don't understand what the work function is caused by - is it the electrostatic attraction between nuclei and the electrons?
 A: When Electron "orbits" nucleus it's trapped in potential barrier caused by nucleus:

Electron needs some energy $E_0$ to escape (overcome) that barrier ($E_0$ is same as work function $\phi$), When photon with frequency $f$ (Energy of that photon is $E=hf$) comes and hits electron, it gives it energy ($E=hf$), and if it's greater than $\phi$ then electron can escape the nucleus (overcome the potential barrier):

and it will have some kinetic energy ($KE$) too. So in order to electron escape the nucleus photon which will hit it must have greater energy than $\phi$ (it's same as greater frequency than $f_0$ (where $f_0$ is minimum frequency for photon which will hit electron so it will escape the nucleus and you can calculate it using this equation $\phi = hf_0$ and $f_0=\frac{\phi}{h}$)). But when photon which will hit electron has same energy as minimum energy required for electron to escape the nucleus ($\phi = E$ or $f=f_0$) then electron will just "go up" to the top of potential barrier and then it will "go down" back to the bottom of the potential barrier:

and it wont be able to escape the nucleus. 
(sorry for my poor drawings)
A: Since we are talking about free electrons being boosted out of a metal surface, It would seem like the “potential barrier” should depend on the net positive charge on the material rather than the force from “a nucleus”. But this does not seem to be the case.  Perhaps someone with knowledge of quantum mechanics can comment on this.
