Thermal energy due to friction