Heat transfer and internal energy