Thermodynamics is the study of heat, work and how both transform to and from other forms of energy, particularly mechanical energy.