Gustav Robert Kirchhoff (1824–1887), Physik