Mathematicians and physicists study the art of making a good espresso.