Here's the equation for the combustion of octane:
The moles of C8H18 needed to produce 6831.5 J of energy is:
(6831.5 J)(5225.0 J/mol) = 1.3075 moles
grams of C8H18 needed = (1.3075 mol)(115.0g/mol) = 150.4 g C8H18
Grams of O2 needed can be found from the mole ratio of O2 to C8H18 in the balanced equation, 11/2:
(1.3705 mol C8H18)(11 mol O2/2 mol C8H18)(32.0 g/mol) =
230.1 g O2 needed
This assumes complete combustion of octane. When insufficient oxygen is available hydrocarbons will combust incompletely, producing some CO and sometimes even C in place of some of the CO2.
The heat generated by burning octane in the cylinders of an internal combustion engine causes the exhaust gases to expand and exert pressure on the pistons in the cylinder. The pistons move up and down as gas is expanded and exhausted. This motion is transferred to the drive shaft which turns the wheels of the vehicle.