For our final project in Dynamics, my partner and I developed a group of files that run pendulum simulations. The project took an input of the total number of pendulums and then created the equations for the system. These equations were run through MatLab and animated.. The equations generated were managed in python and could go up to any length of n number pendulums.. Below is one of the final runs of the code we did, with 20 pendulums attached to each other..
In order to check if our code was correct, we also plotted energy over time; specifically potential, kinetic, and total energy. Due to the straight line, we can say that energy was conserved, since friction was assumed to be negligible.