Physics Demonstrations

Simple Pendulum

We are creating a simple pendulum with a mass at the end of a massless string. Using both linear and non-linear solutions, we solve the second order differential equation θ..=-gsinθl in state space. We use state space to set up our system of equations in order to use numerical integration methods like the Runge-Kutta Method. In this simulation, we use the ordinary differential equation libaray from SciPy for the nonlinear solution while the linear solution is θocos(ωt).

While the html form is my design, the solution code came from the YouTube Channel Good Vibrations with Freeball, specifically the video Coding a Numerical Solution to the Simple Pendulum Problem using Python. Download the base code from Freeball's GitHub.

Some questions to consider when viewing this demonstration:

  • Compare the effects of length and angle on the period of oscillation (the time to return to the initial position).
  • Analyze the phase differeneces (the differences in position for a specific time) betwen the linear and nonlinear for different angles, time steps.
  • What everyday objects exhibit a pendulum behaivor?