Thermal effects in the erosion of ductile metals