Bead on a Wire

Developed by Steve Robinson - Published February 13, 2023

DOI: 10.1119/PICUP.Exercise.Bead

This exercise allows students to move beyond the classic problem of a block sliding down a linear ramp where acceleration is constant and independent of mass. Said problem is instructive in that it teaches students how to use trigonometry to solve for quantities such as the normal force and acceleration. However, generalizing this situation to an arbitrary curve with friction and drag forces requires advanced techniques such as those found in Lagrangian and Hamiltonian mechanics. Before students are introduced to such methods in upper-level courses, computation using Newton's laws is a viable alternative which can improve understanding via the application of computational calculus and visualization of forces and energies. In this exercise, the motion of a bead constrained to a wire described by a continuous function will be examined.
Subject Areas Mechanics and Mathematical / Numerical Methods
Levels First Year and Beyond the First Year
Available Implementations Glowscript and Spreadsheet
Learning Objectives
Students who complete this Exercise Set will be able to: * simulate the motion of an object subject to various forces (**Exercises 1** and **4**). * plot an arbitrary function as well as calculate its value, derivative, second derivative, and tangent angle at any point (**Exercises 2-4**). * relate the motion of an object to the forces acting on it and the energy it possesses (**Exercise 5**). * see that the quickest way for an object to get from one point to another is not necessarily in a straight line (**Exercise 6**).
Time to Complete 240 min

These exercises are not tied to a specific programming language. Example implementations are provided under the Code tab, but the Exercises can be implemented in whatever platform you wish to use (e.g., Excel, Python, MATLAB, etc.).

#### Exercise 1 Create an object which moves across the screen at some defined angle $\theta$. If using Glowscript, attach one arrow which points in the direction of motion and one which points perpendicularly. #### Exercise 2 Create a function $y(x)$ in code which returns the result of an arbitrary mathematical function $y(x)$ for a given $x$. For example, if the function were defined as $y(x) = x^3$, then the code ``` y(4) ``` should return the value $4^3 = 64$. Next, create a function $dy(x)$ which numerically calculates and returns the first derivative $y' = dy/dx$ of a function for a given $x$ using the finite difference method. (This removes the need to analytically calculate derivatives for each new function tried.) Using $y(x) = x^3$, ``` dy(4) ``` should return the value $3(4)^2 = 48$. Next, create a function $d2y(x)$ which numerically calculates and returns the second derivative $y^{\prime\prime} = d^2y/dx^2$ of a function using the finite difference method. Using $y(x) = x^3$, ``` d2y(4) ``` should return the value $6(4) = 24$. Finally, recognizing that the angle of a function at any point is related to $y'$, create a variable $\theta$ that calculates this angle from $y'$. Using $y(x) = x^3$, ``` atan(dy(4)) ``` should return the value $\tan^{-1}(48) \approx 1.55 \text{ rad}$. #### Exercise 3 Pick an interesting function over which the bead should move. The function is now a wire, and the object is a bead on the wire which begins its motion due to gravity, so choose the starting point to have a downward slope if there is no initial velocity. (Some interesting examples include $-x$, $\tanh(x)$, and $e^{-x}\cos(\pi x)$.) Draw your function on the screen for a given interval range of $x_\mathrm{i}\leq x \leq x_\mathrm{f}$ and place a small object at $(x_\mathrm{i}, y(x_\mathrm{i}))$. It will be helpful to numerically calculate and record the minimum value of the function in this range here to give a reference point for potential energy later on. #### Exercise 4 Using the results in the **Theory** section, create a loop which repeatedly calculates the acceleration of the bead and updates its position along the wire for given friction and drag force parameters. This will require first calculating the angle of the function at the point where the bead currently sits and updating its value at each step. If your chosen function is such that the bead reverses direction at some point, have it stop at that point. Realistic ranges for constants are $0.001 \leq m \leq 0.3$ kg, $0 \leq \mu \leq 1$, and $0 \leq D \leq 0.1$ kg/m, but trying values out of that range may also yield important physical insights. #### Exercise 5 Using the calculation of the normal force in the **Theory** section, create a graph which displays $|\vec n|$ vs. $x$, but make $|\vec n|$ negative if $n_y$ is negative. (This is an indication that the bead would fly off it weren't attached.) If using Glowscript, create an arrow that points in the direction of $\vec n$ and an arrow that points in the direction of the friction and drag forces. Finally, create a graph that displays the kinetic, potential, and total energies of the bead vs. $x$. A good check that your code is working correctly is that the total energy should remain constant if there are no friction or drag forces. When the bead has reached the end of the wire, print $|\vec v|$ and the time $t$ that has elapsed. #### Exercise 6 Try various functions without resistive forces to see which one allows the bead to reach the endpoint in the least amount of time. Be sure to scale compared functions so that the height difference between the beginning and end of each function is the same to accurately compare the results.

Download Options

Share a Variation

Did you have to edit this material to fit your needs? Share your changes by Creating a Variation

Credits and Licensing

Steve Robinson, "Bead on a Wire," Published in the PICUP Collection, February 2023, https://doi.org/10.1119/PICUP.Exercise.Bead.

DOI: 10.1119/PICUP.Exercise.Bead

The instructor materials are ©2023 Steve Robinson.

The exercises are released under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 license

Creative Commons Attribution-NonCommercial-ShareAlike 4.0 license