Stillframe from the animated gif produced by the MATLAB code (2021)
May 2021
This project models the motion of a disk which is first accelerated by an external force and then, when the force goes away, decelerated by friction. It also tracks the motion of a bead which is fixed along a track inside the disk and is free to move only along the channel as the disk rolls. To do this, the code first takes in a range of variables that are needed for the calculations. It is assumed that the external force is always applied at the edge of the disk for the amount of time specified. Because the force is applied as a torque, it is assumed that the disk rolls without slip. With a constant alpha in part one from the constant external force and a constant alpha in part two from the constant frictional force, the code finds the needed time interval for the roll. Once it knows how to describe the rotation of the disk, with the omega and theta values for the duration, it works to find the radial motion of the bead within the disk. It is assumed that the channel always starts oriented vertically with the bead resting at its center, although this could be changed by changing theta initial. Finally, the program can show the system as it progresses through time. When watching the graphic, it displays the disk rolling and bead sliding based on the parameters selected at the beginning of the program. The videos below are three animations comparing 10 newtons applied for 1 second, to 5 newtons applied for 2 seconds, to 3.33 newtons applied for 3 seconds. These situations have the same applied torque, but are different in how it is transferred to the disk bead system and so result in different outcomes. The disk is colored red when the force is being applied, and turns blue once there is only friction acting to slow it down.
There are three parts of the code. The first takes all the input values and then calculates the numerical motion of the disk bead system for the time period while the external force is being applied and the disk is accelerating. The second part takes in the data from part 1 as starting values and then calculates the system's movement from there until it stops. The second section also produces two plots at the end of its code, first a graph of the bead's path through space over the entire rolling period. Second, the section also shows a graph of the bead's distance from center against the time axis. The third section of code is more separate from the rest. It takes the data from parts one and two to create a gif of the disk and bead rolling. This part of the code takes 5-10 minutes to run since it is creating and compiling thousands of images to craft the animation. Only once interesting data is found in parts one and two should part three be run. At the end of the code there are two helper functions which are called earlier in the script.
mu = 0.8
run at 0.1 speed
mu = 0.8
run at 0.1 speed
mu = 0.8
run at 0.1 speed