Generating functions (which are quite distinct from the generating functions of mathematics) are very useful in Hamiltonian mechanics as well as thermodynamics.