How would I calculate the work function of a metal? In the photoelectric effect, the work function is the minimum amount of energy (per photon) needed to eject an electron from the surface of a metal. Is it possible to calculate this energy from the atomic properties of the metal (atomic number, atomic mass, electron configuration, etc.), and the properties of the lattice structure, in a way that doesn't require a complex computational model? (If so, how?) Or, if not, is there a simple formula in terms of the metal's atomic/lattice properties that can approximate it to within a few percent?
 A: You can't just get it from the atomic properties, the electronic properties of a metal are dominated by "solid state"-type considerations, for instance, the fact that electrons live in a band structure rather than something more akin to the usual discrete levels that one learns about in QM 1.
Thankfully, Ashcroft and Mermin's classic book has a long discussion on the work function in chapter 18.
Their formula is $W=-\epsilon_F+W_s$, where $\epsilon_F$ is the Fermi energy, a quantity determined by the density of electrons and the properties of the crystal lattice of the metal; you can work out reasonable approximations to this for alkali metals by using the free electron approximation.  $W_s$ is a quantity related to surface effects; for this term Ashcroft and Mermin give a model with a dipole moment per unit area of $P$, so that $W_s=-4\pi e P$.
I'm not sure whether you can really get "within a few percent" with such crude techniques, but it's certainly something that's calculable.  In particular, getting a good approximation comes down to two things, 1) getting a handle on the band structure of the metal so that you can calculate $\epsilon_F$ accurately 2) having a good model for the surface of the metal.
There's a wrinkle here about how $\epsilon_F$ is defined.  One can't just use the usual expression $\epsilon_F=\hbar^2k_F^2/2m$ as one needs to add in a term corresponding to the electrostatic energy of the ions, something like the Madelung constants.
Again, I recommend the book of Ashcroft and Mermin for this (and any other just-beyond-basic questions you might have about thinking about electrons in metals and semiconductors).
Just out of curiosity, I dug into the literature a little bit to see what researchers have done.
In 1971, Lang and Kohn were able to get work functions of simple metals to about 5% and noble metals to 15%.  I think it would be possible to reproduce these calculations today quite easily.
A more recent paper (2005) by Da Silva, Stampfl, and Scheffler uses all-electron first principles calculations, as opposed to the more empirical fitted pseudopotential calculation that Lang and Kohn used.  My impression from skimming the data is that they only get marginal agreement with experiment; in particular, I noticed that the experimental values seem to have quite a bit of variance in them, consistent with the fact that work function is strongly dependent on surface properties, which are hard to get consistent.
For example, for Aluminum along the 1 1 1 crystal plane, their calculations yield 4.21eV, compared to experimental values of 4.48, 4.24 and 4.33.
By comparison, Lang and Kohn's 1979 calculation gave 4.05 eV and they quoted an experimental value of 4.19 eV.
Apparently the last big review on calculating work functions of metals is this one by Hözl et al. from 1979.  I didn't read it though.
A: In order to calculate a work function dependent on properties of the metal, the traditional method is to calculate the electronic current density $j_{z}$ by using the Richardson-Dushman equation for the thermionic emission which is
$$j_{z}=BT^{2}e^{-\frac{W}{K_{B}T}}$$
where $W$ is the work function of the metal, $T$ is the thermodynamic temperature of the metal, $B$ is a constant calculated as $1.20173 X 10^{6} \text{A} m^{-2}K^{-2}$. See more information about the constant $B$ in the thermionic emission article in Wikipedia.
Then plotting $\ln\bigg|\displaystyle \frac{j_{z}}{T^{2}}\bigg|$ against $\displaystyle\frac{1}{K_{B}T}$ produces a straight line with slope $-W$. That's the way in which most of the work functions are calculated.
The electron distribution is considered in the derivation of the Richardson-Dushman equation by using the Fermi-Dirac statistics.
