I'm not sure how good a model a heat engine provides for internal combustion. A heat engine assumes a fixed "working fluid" operating between heat reservoirs. In an internal combustion engine, there isn't strictly a "working fluid", since air and fuel are continually added, and exhaust vented away, and combustion adds energy without providing exactly a "heat reservoir".