Thermal Energy Formula With Friction