Thermodynamics and Heat Engines