The most basic modelling equation is that the force we can use for forward acceleration is the propelling force transmitted through the wheels minus drag and rolling resistance:
F = FW - Fd - Fr (8)
The force of drag we get from Part 6:
(9)
Note that to calculate the force at step i, we can use the velocity at step i. This force goes into calculating the acceleration at step i, which is used to calculate the velocity and distance at step i + 1 by equations (5) and (7). Those two equations represent the only "backward references" we need. Thus, the only inputs to the integration are the initial distance, 0, and the entrance velocity, v0.
The rolling resistance is approximately proportional to the velocity:
Fr = rr v i = 0.696 vi (10)
This approximation is probably the weakest one in the model. I derived it by noting from a Corvette book that 8.2 hp were needed to overcome rolling resistance at 55 mph. I have nothing else but intuition to go on for this equation, so take it with a grain of salt.
Finally, we must calculate the forward force delivered by the ground to the car by reaction to the rearward force delivered to the ground via the engine and drive train:
(11)
This equation simply states that we take the engine torque multiplied by the rear axle ratio and the transmission drive ratio in the k-th gear, which is the torque at the drive wheels, TW, and divide it by the radius of the wheel, which is half the diameter of the wheel, d.
To calculate the forward force, we must decide what gear to be in. The logic we use to do this is the following: from the velocity, we can calculate the wheel rpm:
(12)
From this, we know the engine rpm:
E = W Rgk (13)
At each step of integration, we look at the current engine rpm and ask "is it past the torque peak of the engine?" If so, we shift to the next highest gear, if possible. Somewhat arbitrarily, we assume that the torque peak is at 4200 rpm. To keep things simple, we also make the optimistic assumption that the engine puts out a constant torque of 330 ft-lbs. To make the model more realistic, we need merely look up a torque curve for our engine, usually expressed as a function of rpm, and read the torque off the curve at each step of the integration. The current approximation is not terrible however; it merely gives us artificially good times and speeds. Another important improvement on the logic would be to check whether the wheels are spinning, i.e., that acceleration is less than about ½g, and to "lift off the gas" in that case.