Title: Dynamics and thermodynamics of planetary entry