The system is described by a single degree of freedom, , the distance along the track.
However, the free body diagrams give the second derivative of , the acceleration. This
requires both the position and velocity to be calculated as state variables, since the integration
routine to be used will solve for the derivative of the state variables. Thus, the acceleration will
be calculated from the integration routine, and used with the equations produced from the free
body diagram to calculate the forces on the car. The state variables are intoduced below.
Equations 3.6, 3.8, 3.9, and 3.10 can be combined to determine . First, equations 3.8 and 3.9 are combined to eliminate
. The result is then combined with equation 3.10 to eliminate . Finally, equation 3.6 was used to eliminate . The resulting seat force equation is shown here.
Many quantities in the equations for and are geometric variables, and depend on which element the car is traveling in. These include ,
. The independent variable, , is used to calculate the distance into the current element, as shown in equation 3.12. Let represent the distance into the element, and let represent the total length of that element.
The values of the state variables come from the integration routine. The values of and used in the calculation of the current and are those from the previous iteration. The time step used should be small, as a smaller time step will result in more accurate results. The limiting factor in this will typically be the computer on which the program is run. Many data values are created, and a smaller time step requires more calculations to be performed and more memory to store the results.
A discussion of the Runge-Kutta-Fehlburg method can be found in many numerical methods texts. C code is also available to perform the routine.