To simplify a very complex phenomenon, the kinetic energy of the impact transforms into elastic and plastic deformation of the material. The elastic portion basically goes into a rebound effect, and the plastic portion becomes heat.
Of course, as the initial temperature increases, so does the plastic/elastic deformation ratio, and hence, heating. And, for a significant impact, the self-heating alters the physical properties during the course of the impact. Thus, requires computer program.
I suggest you look up impact/explosive/detonation welding for equations and modelling. Imagine there are some finite element programs out there.