His calculations explain the efficiency of batteries and solar cells.