next up previous
Next: The Poincaré section Up: The chaotic pendulum Previous: Numerical solution

Validation of numerical solutions

Before proceeding with our investigation, we must first convince ourselves that our numerical solutions are valid. Now, the usual method of validating a numerical solution is to look for some special limits of the input parameters for which analytic solutions are available, and then to test the numerical solution in one of these limits against the associated analytic solution.

Figure 26: The normalized energy ${\cal E}$ of an undamped, undriven, pendulum versus time (measured in natural periods of oscillation $\tau $). Data calculated numerically for $Q=10^{16}$, $A=10^{-16}$, $\omega =1$, $\theta (0)=0$, and $v(0)=1$. The dotted curve shows data for ${\tt Nacc}=12$. The dashed curve shows data for ${\tt Nacc} = 24$. The dot-dashed curve shows data for ${\tt Nacc} = 48$. Finally, the solid curve shows data for ${\tt Nacc} = 96$.
\begin{figure}
\epsfysize =3in
\centerline{\epsffile{valid.eps}}
\end{figure}

One special limit of Eqs. (81) and (82) occurs when there is no viscous damping (i.e., $Q\rightarrow
\infty$) and no external driving (i.e., $A\rightarrow 0$). In this case, we expect the normalized energy of the pendulum

\begin{displaymath}
{\cal E} = 1 + \frac{v^2}{2} - \cos\theta
\end{displaymath} (94)

to be a constant of the motion. Note that ${\cal E}$ is defined such that the energy is zero when the pendulum is in its stable equilibrium state (i.e., at rest, pointing vertically downwards). Figure 26 shows ${\cal E}$ versus time, calculated numerically for an undamped, undriven, pendulum. Curves are plotted for various values of the parameter Nacc, which, in this special case, measures the number of time-steps taken by the integrator per (low amplitude) natural period of oscillation of the pendulum. It can be seen that for ${\tt Nacc}=12$ there is a strong spurious loss of energy, due to truncation error in the numerical integration scheme, which eventually drains all energy from the pendulum after about 2000 oscillations. For ${\tt Nacc} = 24$, the spurious energy loss is less severe, but, nevertheless, still causes a more than 50% reduction in pendulum energy after 10,000 oscillations. For ${\tt Nacc} = 48$, the reduction in energy after 10,000 oscillations is only about 1%. Finally, for ${\tt Nacc} = 96$, the reduction in energy after 10,000 oscillation is completely negligible. This test seems to indicate that when ${\tt Nacc}\geq 100$ our numerical solution describes the pendulum's motion to a high degree of precision for at least 10,000 oscillations.

Figure 27: The parameter $R$ associated with a linearized, damped, periodically driven, pendulum versus time (measured in units of the period of oscillation $\tau $ of the external drive). Data calculated numerically for $Q=2$, $A=1$, $\omega =3$, $\theta (0)=0$, and $v(0)=0$. The dotted curve shows data for ${\tt Nacc}=12$. The dashed curve shows data for ${\tt Nacc} = 24$. The solid curve shows data for ${\tt Nacc} = 48$.
\begin{figure}
\epsfysize =3in
\centerline{\epsffile{valid1.eps}}
\end{figure}

Another special limit of Eqs. (81) and (82) occurs when these equations are linearized to give Eqs. (84) and (85). In this case, we expect

\begin{displaymath}
R = \sqrt{\theta^2 + (v/\omega)^2}
\end{displaymath} (95)

to be a constant of the motion, after all transients have died away (see Sect. 4.2). Figure 27 shows $R$ versus time, calculated numerically, for a linearized, damped, periodically driven, pendulum. Curves are plotted for various values of the parameter Nacc, which measures the number of time-steps taken by the integrator per period of oscillation of the external drive. As Nacc increases, it can be seen that the amplitude of the spurious oscillations in $R$, which are due to truncation error in the numerical integration scheme, decreases rapidly. Indeed, for ${\tt Nacc}\geq 48$ these oscillations become effectively undetectable. According to the analysis in Sect. 4.2, the parameter $R$ should take the value
\begin{displaymath}
R = \frac{A}{\sqrt{(1-\omega^2)^2+\omega^2/Q^2}}.
\end{displaymath} (96)

Thus, for the case in hand (i.e., $Q=2, A=1, \omega=3$), we expect $R= 0.122859$. It can be seen that this prediction is borne out very accurately in Fig. 27. The above test essentially confirms our previous conclusion that when ${\tt Nacc\geq 100}$ our numerical solution matches pendulum's actual motion to a high degree of accuracy for many thousands of oscillation periods.


next up previous
Next: The Poincaré section Up: The chaotic pendulum Previous: Numerical solution
Richard Fitzpatrick 2006-03-29