Breadcrumbs

 

 

 

Download ModelDownload SourceembedLaunch Website ES WebEJS

About

introduction

Plane Rigid Pendulum

Developed by K. Roos

Easy JavaScript Simulation by Fremont Teng and Loo Kang Wee

In this set of exercises the student builds a computational model of a simple plane rigid pendulum using the Euler-Cromer numerical scheme. The student is guided to explore the accuracy of the computational model, and to compare the computational results with the popular analytical solution for the pendulum via the small angle approximation. Damping and driving terms are added to the computational model, and the student is lead to discover chaotic trajectories in phase space.

Subject Area Mechanics
Levels First Year and Beyond the First Year
Available Implementations C/C++, Fortran, IPython/Jupyter Notebook, Mathematica, Octave*/MATLAB, Python, Spreadsheet and Easy JavaScript Simulation
Learning Objectives

Students who complete this set of exercises will be able

  • to build a computational model of a simple rigid pendulum using the Euler-Cromer algorithm (Exercise 1);
  • to produce graphs of the angular displacement and angular velocity of the pendulum as a function of time from the results of their computational model (Exercises 1-5);
  • to assess the accuracy of the computational results of their model (Exercises 1);
  • to identify the limitations of the small angle approximation for the plane pendulum (Exercises 2)
  • to produce phase space plots for various system parameters (Exercises 3); and
  • to produce chaotic phase space trajectories by varying model parameters (Exercise 4 and 5);

instructorguide

For this Exercise Set, I have chosen a rigid pendulum, rather than a mass suspended from a massless string, so that angular displacements of magnitude greater than π/2 can be studied, without concern for the mass remaining at the same location relative to the support. The stable Euler Cromer method is employed; however, the instructor could have the students start out with an “Exercise 0” that asks students to use the simple Euler method to model the pendulum. The Euler algorithm is unstable for oscillatory systems (total energy grows every time step), and this exercise could provide a valuable lesson in the control of artificial behavior in computational models, and the importance of using stable algorithms. Even if this “Exercise 0” were implemented, it might be best if students have already had experience modeling and studying the dynamics of a simpler oscillatory system, such as the Simple Hanging Harmonic Oscillator in the PICUP collection, before encountering the Rigid Pendulum exercise set.

Exercise 1 asks the students to build the computational model of the hanging spring-mass system. Depending on instructor preference, a working version of the computational model could be directly provided to the student; or the student could be required to modify, or add to, a nearly completed computational model; or the student required to build the model from scratch; or really anything in between these scenarios. Another possibility for producing a working model, time permitting, is to build it, or parts of it, together with the students in class. To carry out the subsequent exercises the student must have the working program, and also access to either a plotting program, or a programming environment with built-in graphics capabilities.

The student should be made aware of the analytic solution of the (undamped and unforced) rigid pendulum accessible via the small angle approximation. The second exercise in this set has the students compare this small angle solution to their computational one. Also, the concept of phase space is presented in the exercises as simply another way of plotting and observing the system dynamics. Adding the damping and driving terms in exercises 4 and 5, and guiding the students to explore the behavior for different parameter values, serves as a basic introduction to nonlinear dynamics.

This computational approach to the rigid pendulum has the educational advantage of allowing introductory students to study the dynamics of a nonlinear, chaotic system with relative computational ease.

Theory

Consider a uniform rigid bar of mass m and length L that has been fastened to a stationary support at point P, as shown in the figure below. Assume that the bar is constrained to rotate in a 2D vertical plane when it is displaced from its vertical equilibrium position and released.

The figure shows the pendulum at an instant in time in which it is rotating in a counterclockwise direction with angular speed θ˙, and has an angular displacement of θ with respect to its equilibrium (θ=0) position. If we neglect forces that produce any damping or driving torques, then the bar’s weight is the only force exerted on the bar that produces a torque about point P. In the figure the weight mg of the bar is represented by the force vector drawn at the position of the bar’s center of mass CM. We shall use a sign convention such that any torque that tries to produce an angular acceleration in the counterclockwise direction contributes a positive amount to the total torque acting on the bar, and any torque that tries to accelerate the bar in the clockwise direction is a negative contribution. With this sign convention the torque exerted on the rigid bar by its weight is

(1)τmg=mgL2sinθ.

The rotational analog to Newton’s 2nd Law of motion is

(2)τ=Iθ¨,

where I is the moment of inertia of the bar about the point P, and θ¨ is the angular acceleration. If we consider all of the bar’s mass to be concentrated at the position of its center of mass, then

(3)I=m(L/2)2.

Inserting Equations (1) and (3) into (2), and a little rearranging produces

(4)θ¨=2gLsinθ

for the angular acceleration.

If we include the influence of a damping torque, that acts to oppose the rotational motion of the bar, and a sinusoidal driving torque, then

(5)τ=τmg+τdamping+τdriving=m(L2)2θ¨.

With the bar rotating in a counterclockwise direction, the damping torque tries to accelerate the bar in the clockwise direction. Thus, like the torque due to gravity, the sign of the damping torque is negative. For the damping torque we use τdamping=bθ˙, where b is a constant, and has units of kgm2/s. The constant bcan be thought of as an effective “damping strength” that characterizes the damping effects due to air resistance as the bar rotates through the atmospheric fluid, and any friction between the bar and the supporting mechanism at point P. For the driving torque we use τdriving=τdcosωt, where τd is the amplitude and ω is the driving frequency in rad/s. Thus, Equation (5) becomes

(6)mgL2sinθbθ˙+τdcosωt=m(L2)2θ¨.˙

Solving for the angular acceleration we arrive at

(7)θ¨=2gLsinθ4bmL2θ˙+4τdmL2cosωt

for the rigid damped driven pendulum.

See the pseudocode for the implementation of the Euler-Cromer algorithm for solving Equation 7.

exercises

Exercise 1: Euler-Cromer Model of the Rigid Pendulum

Build a computational model of a plane undamped, unforced rigid pendulum using the Euler-Cromer method. Assume your pendulum consists of a rigid metallic rod, one meter in length, with a mass of 1kg. Also assume that one end of the rod is fixed to an immovable support, and that the rod is free to rotate without bound in a plane. For initial conditions, assume the rod is displaced at some angle, greater than 90, relative to its vertical minimum potential energy configuration, and released from rest. This physical situation has no exact analytical solution with which you will be able to compare the results of your computational model, so you must carefully determine a value of Δt that produces an accurate approximation without the benefit of making a comparison. Describe in detail the procedure you used in arriving at an acceptably small value of Δt, show plots of the angular displacement and angular velocity as functions of time, and comment on the pendulum’s dynamic behavior. Is the behavior of your computational model what you expect for a real pendulum?

Exercise 2: Comparison with Analytical Small Angle Approximation Solution

Once you have determined a value of Δt that produces an acceptably accurate computational solution, compare the computational results (angular displacement as a function of time) with the analytically determined function for the angular displacement

(8)θ(t)=θ0cos(2gLt)

for the rigid pendulum, resulting from the small angle approximation. Comment in detail on your observations.

Exercise 3: Phase Space

A very useful plot for analyzing periodic systems is known as a phase space plot, and is simply a graph of velocity vs. position. The resulting curve is known as a phase space trajectory. In the case of the plane rigid pendulum, the phase space trajectory is found by graphing angular velocity vs. angular displacement. Produce a phase space plot for the plane pendulum using the parameters and initial conditions you used (including an accurate value for Δt !) in Exercise 1. Comment in detail on the resulting phase space trajectory.

Exercise 4: Damped Rigid Pendulum

Now, add a damping term to your pendulum model. Explore, and produce graphs of (time dependent behavior as well as phase space), the behavior of the model by systematically varying the damping strength b . Use the same values for the physical parameters and initial conditions as before. Describe the effect of increasing the damping strength, while keeping the other parameters the same. Can you damp the pendulum to such an extent that it doesn’t actually oscillate?

Exercise 5: Damped, Driven Rigid Pendulum

Next add a driving torque to your pendulum model. Once you’re sure that your model is accurately computing the damped, driven pendulum’s dynamics, systemically explore the behavior of the model by varying the driving torque amplitude τd . Use the same physical parameters and initial conditions as before, including values of b = 0.2 and ω = 3 rad/s for the damping strength and angular frequency of the driving torque, respectively. Then, vary the magnitude of the driving torque amplitude from 2 Nm to 10 Nm, in 1 Nm increments, producing time-dependent and phase space plots for each value of τd. For the time-dependent graphs of angular displacement and angular velocity, only a few periods (perhaps 5-6) are necessary to plot, but for the phase space trajectories it will be most interesting if you take the computations out to a few hundred thousand time steps or more. Of particular interest will be the phase space trajectories. The rigid pendulum is a type of nonlinear system, and therefore the dynamics actually become chaotic for certain physical parameters and initial conditions. To best observe the chaotic behavior, restrict the values of the angular displacement to the range - π to +π , by including two if-then constructions at the very end of the loop in which you implement the Euler-Cromer algorithm. If the angular displacement θ becomes less than -π then its value is increased by 2π . If θ becomes greater than π then its value is decreased 2π. Since θ is an angular variable, values that differ by 2π correspond to the same physical position of the pendulum. This restriction is not necessary, but will be convenient for your analysis. Describe in detail the dynamical behavior of your model as you vary the driving torque. Can you identify the behavior that corresponds to chaotic?

Exercise 1

Exercise 1: Euler-Cromer Model of the Rigid Pendulum

Build a computational model of a plane undamped, unforced rigid pendulum using the Euler-Cromer method. Assume your pendulum consists of a rigid metallic rod, one meter in length, with a mass of 1kg. Also assume that one end of the rod is fixed to an immovable support, and that the rod is free to rotate without bound in a plane. For initial conditions, assume the rod is displaced at some angle, greater than , relative to its vertical minimum potential energy configuration, and released from rest. This physical situation has no exact analytical solution with which you will be able to compare the results of your computational model, so you must carefully determine a value of  that produces an accurate approximation without the benefit of making a comparison. Describe in detail the procedure you used in arriving at an acceptably small value of , show plots of the angular displacement and angular velocity as functions of time, and comment on the pendulum’s dynamic behavior. Is the behavior of your computational model what you expect for a real pendulum?

Exercise 2

Exercise 2: Comparison with Analytical Small Angle Approximation Solution

Once you have determined a value of  that produces an acceptably accurate computational solution, compare the computational results (angular displacement as a function of time) with the analytically determined function for the angular displacement

for the rigid pendulum, resulting from the small angle approximation. Comment in detail on your observations.

Exercise 3

Exercise 3: Phase Space

A very useful plot for analyzing periodic systems is known as a phase space plot, and is simply a graph of velocity vs. position. The resulting curve is known as a phase space trajectory. In the case of the plane rigid pendulum, the phase space trajectory is found by graphing angular velocity vs. angular displacement. Produce a phase space plot for the plane pendulum using the parameters and initial conditions you used (including an accurate value for  !) in Exercise 1. Comment in detail on the resulting phase space trajectory.

Exercise 4

Exercise 4: Damped Rigid Pendulum

Now, add a damping term to your pendulum model. Explore, and produce graphs of (time dependent behavior as well as phase space), the behavior of the model by systematically varying the damping strength  . Use the same values for the physical parameters and initial conditions as before. Describe the effect of increasing the damping strength, while keeping the other parameters the same. Can you damp the pendulum to such an extent that it doesn’t actually oscillate?

Exercise 5

Exercise 5: Damped, Driven Rigid Pendulum

Next add a driving torque to your pendulum model. Once you’re sure that your model is accurately computing the damped, driven pendulum’s dynamics, systemically explore the behavior of the model by varying the driving torque amplitude  . Use the same physical parameters and initial conditions as before, including values of  = 0.2 and  = 3 rad/s for the damping strength and angular frequency of the driving torque, respectively. Then, vary the magnitude of the driving torque amplitude from 2 Nm to 10 Nm, in 1 Nm increments, producing time-dependent and phase space plots for each value of . For the time-dependent graphs of angular displacement and angular velocity, only a few periods (perhaps 5-6) are necessary to plot, but for the phase space trajectories it will be most interesting if you take the computations out to a few hundred thousand time steps or more. Of particular interest will be the phase space trajectories. The rigid pendulum is a type of nonlinear system, and therefore the dynamics actually become chaotic for certain physical parameters and initial conditions. To best observe the chaotic behavior, restrict the values of the angular displacement to the range -  to + , by including two if-then constructions at the very end of the loop in which you implement the Euler-Cromer algorithm. If the angular displacement  becomes less than - then its value is increased by 2 . If  becomes greater than  then its value is decreased 2. Since  is an angular variable, values that differ by 2 correspond to the same physical position of the pendulum. This restriction is not necessary, but will be convenient for your analysis. Describe in detail the dynamical behavior of your model as you vary the driving torque. Can you identify the behavior that corresponds to chaotic?

Plane_Rigid_Pendulum_Python.py

# Written by:

# Kelly Roos

# Engineering Physics

# Bradley University

# rooster@bradley.edu | 309.677.2997

import numpy as np

import matplotlib.pyplot as plt

# Input parameters for model

g=9.8 # accel due to gravity (m/s^2)

m=1 # mass of pendulum in kg

l=1 # length of pendulum in meters

b=0.2 # damping strength (kg m^2/s)

omega=3 # driving frequency in rad/sec

tau_d=1 # driving torque in Nm

dt=0.01 # time step (s)

t_steps=100000 # total number of iterations

theta_i=120*3.14159/180 # convert to radians

theta_dot_i=0

# Defines the 1D arrays to be used in the computation and

# sets all values in the arrays to zero

time = np.zeros(t_steps)

theta = np.zeros(t_steps)

theta_dot = np.zeros(t_steps)

alpha = np.zeros(t_steps)

theta_sa = np.zeros(t_steps)

# Initial conditions

time[1] = 0

theta[1] = theta_i

theta_dot[1] = theta_dot_i

theta_sa[1] = theta_i*np.cos(np.sqrt(2*g/l)*time[1])

alpha[1] = -2*g*np.sin(theta[1])/l-4*b*theta_dot[1]/(m*l*l)+4*tau_d*np.cos(omega*time[1])/(m*l*l)

# Main loop: Euler algorithm, euler-Cromer, and evaluation of exact solutions for v and y

for i in range(2, t_steps):

time[i] = time[i-1] + dt

# Euler-Cromer

theta_dot[i]=theta_dot[i-1]+alpha[i-1]*dt

theta[i]=theta[i-1]+theta_dot[i]*dt

alpha[i]=-2*g*np.sin(theta[i])/l-4*b*theta_dot[i]/(m*l*l)+4*tau_d*np.cos(omega*time[i])/(m*l*l)

# small angle approximation

theta_sa[i]=theta_i*np.cos(np.sqrt(2*g/l)*time[i])

# constrain theta between -pi and +pi

if theta[i] > 3.14159265:

theta[i]=theta[i]-2*3.14159265

elif theta[i] < -3.14159265:

theta[i]=theta[i]+2*3.14159265

else:

theta[i]=theta[i]

# Plotting Results

#plt.plot(theta,theta_dot)

plt.plot(time,theta,time,theta_sa)

plt.ylim((-3, 3))

plt.xlim((0, 20))

plt.xlabel('time (s)')

plt.ylabel('ang. position (rad)')

plt.title('ang. position vs. time')

plt.show()

solutions

Exercise 1: Exercise 1: Euler-Cromer Model of the Rigid Pendulum

With a properly working model, and no exact solution with which to compare, the student should look for some kind of convergence behavior in the computational solution as Δt is systematically made smaller. Figure 1 demonstrates this convergence behavior.


In EJSS, Using Runge Kutta 4 as solver, dt = 0.01 to 0.05 is an acceptable time step for accuracy.

The parameters used to produce the computational solutions shown in figure 1 were: g=9.8 ms2,m=1.0 kg,L=1.0 m,b=0,ω=0,τd=0,θ0=120,θ0˙=0. There a four curves in figure 1, that represent four different time steps. Lines are shown connecting the points that represent the discrete computational solutions. As Δt is decreased the solution asymptotically approaches a specific shape and position. Upon close examination, one can just barely see the green dots (Δt=0.01) to the left of the blue curve (Δt=0.001). Reducing Δt by the factor of ten from Δt=0.01 to Δt=0.001 does not produce a very significant change in the computational solution. Lowering Δt even further may not produce a sufficient improvement in accuracy to be worth the extra computational time required.

Figures 2 and 3 show the angular displacement and angular velocity, respectively, as a function of time for the parameters listed above, and Δt=0.001 s.

 

These graphs represent the oscillatory behavior of a pendulum. The angular velocity is 90 out of phase with the angular displacement, as expected.

The parameters used for these plots were:g=9.8 ms2,m=1.0 kg,L=1.0 m,b=0,ω=0,τd=0,θ0=120,θ0˙=0.

Exercise 2: Comparison with Analytical Small Angle Approximation Solution

Figure 4 shows a comparison between the computational solution and the function

(9)θ(t)=θ0cos(2gLt)

for the angular displacement in the small angle approximation. The parameters used were: g=9.8 ms2,m=1.0 kg,L=1.0 m,b=0,ω=0,τd=0,θ0=15,θ0˙=0,Δt=0.001 s.




i speculate the suggested answers are wrong.

For an initial angular displacement of 0.26 radians (15), the computational solution matches the small angle approximation well until about the 3rd or 4th period. Figure 5 shows a zoomed-in view of the 4th maximum, showing that the difference between the two curves grows in time.

Figure 6 shows the same comparison for an initial angular displacement of 2.1 radians (120). There is a clear deviation between the computational solution and the small angle approximation observed at the outset. The small angle approximation underestimates the period of oscillation, and obviously isn’t a good approximation for large angles.

Exercise 3: Phase Space

Figure 7 shows a phase space plot (angular velocity vs. angular displacement) for three initial angular displacements, 0.26 rad (15), 1.3 rad (75), and 2.1 rad (120).

The parameters used for figure 7 were g=9.8 ms2,m=1.0 kg,L=1.0 m,b=0,ω=0,τd=0,θ0=120,θ0˙=0,Δt=0.001 s. For the undamped, unforced SHO, the phase space trajectory is a well-defined closed path. It should also be emphasized that there is a direction of circulation around the closed orbit, the direction of which depends on the initial conditions.

Exercise 4: Damped Rigid Pendulum

Figure 8 shows the angular displacement and corresponding phase space plots for three different values of the damping strength, as labeled in the figure. The other parameters used were g=9.8 ms2,m=1.0 kg,L=1.0 m,ω=0,τd=0,θ0=120,θ0˙=0,Δt=0.001 s.



As expected, the oscillations become damped, and the corresponding phase space trajectory spirals in towards zero as the energy approaches complete dissipation. For a value of roughly b=1.5 kgm2s and above, there are no longer oscillatory solutions.

Exercise 5: Damped, Driven Rigid Pendulum

Figure 9 shows shows the angular displacement and corresponding phase space plots for three different values of the driving torque as labeled in the figure. The other parameters used were g=9.8 ms2,m=1.0 kg,L=1.0 m,b=0.2 kgm2s,ω=3.0 rad/s,θ0=120,θ0˙=0,Δt=0.001 s. The phase space plots were generated with 200,000 time steps.

For the lowest value of the driving torque, after the transient response, the system settles into predictable oscillatory behavior, and a well defined elliptical orbit in phase space. But, with higher driving torques, the system shows an apparently unpredictable non-repeating oscillatory behavior, with the corresponding phase space characterized by many orbits that can appear, as the case of τd=5 Nm, to be completely random. This behavior is chaotic.

Though chaos identification is beyond the scope of this exercise set, the phase space results of Exercise 5 provide a good opportunity to demonstrate to students the chaotic coincidental nature of deterministic solutions and unpredictability.

 

Translations

Code Language Translator Run

Credits

Fremont Teng; Loo Kang Wee; based on python codes by K. Roos

background, computational approach, and the exercises designed for students. This resource, developed by K. Roos with Easy JavaScript Simulation by Fremont Teng and Loo Kang Wee, is designed to help first-year and beyond students understand the dynamics of a plane rigid pendulum through computational modeling using the Euler-Cromer numerical scheme. The exercises guide students to explore the accuracy of their models, compare them to analytical approximations, and investigate more complex phenomena like damping and chaotic behavior.

Main Themes and Important Ideas/Facts:

  1. Computational Modeling of a Rigid Pendulum: The core of this resource is the use of computational modeling to study the behavior of a rigid pendulum. Unlike a simple pendulum (mass on a massless string), the rigid pendulum allows for the study of large angular displacements without physical constraints. The resource emphasizes building a computational model using the Euler-Cromer algorithm.
  • Quote: "In this set of exercises the student builds a computational model of a simple plane rigid pendulum using the Euler-Cromer numerical scheme."
  1. Euler-Cromer Algorithm: The resource specifically employs the Euler-Cromer method, which is presented as a stable algorithm for oscillatory systems. The instructor guide even suggests an optional "Exercise 0" to highlight the instability of the simpler Euler method, providing a valuable lesson in numerical methods.
  • Quote: "The stable Euler Cromer method is employed; however, the instructor could have the students start out with an “Exercise 0” that asks students to use the simple Euler method to model the pendulum. The Euler algorithm is unstable for oscillatory systems (total energy grows every time step), and this exercise could provide a valuable lesson in the control of artificial behavior in computational models, and the importance of using stable algorithms."
  1. Learning Objectives: The exercises are structured to achieve specific learning objectives, including:
  • Building a computational model using the Euler-Cromer algorithm.
  • Generating graphs of angular displacement and velocity over time.
  • Assessing the accuracy of the computational model.
  • Identifying the limitations of the small angle approximation.
  • Producing and interpreting phase space plots.
  • Generating chaotic phase space trajectories by varying parameters.
  • Quote: "Students who complete this set of exercises will be able to build a computational model of a simple rigid pendulum using the Euler-Cromer algorithm ( Exercise 1 ); to produce graphs of the angular displacement and angular velocity of the pendulum as a function of time from the results of their computational model ( Exercises 1-5 ); to assess the accuracy of the computational results of their model ( Exercises 1 ); to identify the limitations of the small angle approximation for the plane pendulum ( Exercises 2 ) to produce phase space plots for various system parameters ( Exercises 3 ); and to produce chaotic phase space trajectories by varying model parameters ( Exercise 4 and 5 );"
  1. Comparison with Small Angle Approximation: A key exercise involves comparing the computational results with the analytical solution derived using the small angle approximation. This highlights the limitations of the approximation for larger angular displacements.
  • Quote: "The student should be made aware of the analytic solution of the (undamped and unforced) rigid pendulum accessible via the small angle approximation. The second exercise in this set has the students compare this small angle solution to their computational one."
  • Quote (from Exercise 2 Solution): "The small angle approximation underestimates the period of oscillation, and obviously isn’t a good approximation for large angles."
  1. Phase Space Analysis: The resource introduces the concept of phase space plots (angular velocity vs. angular displacement) as a tool for analyzing the system's dynamics, particularly for periodic systems and for visualizing the effects of damping and driving forces.
  • Quote: "A very useful plot for analyzing periodic systems is known as a phase space plot, and is simply a graph of velocity vs. position. The resulting curve is known as a phase space trajectory. In the case of the plane rigid pendulum, the phase space trajectory is found by graphing angular velocity vs. angular displacement."
  1. Damping and Driving Forces: The exercises progressively introduce damping and driving torques to the pendulum model, allowing students to explore their effects on the pendulum's motion and to observe phenomena like damped oscillations and resonance (though not explicitly named).
  • Quote: "Adding the damping and driving terms in exercises 4 and 5, and guiding the students to explore the behavior for different parameter values, serves as a basic introduction to nonlinear dynamics."
  1. Chaotic Behavior: A significant aspect of the resource is the exploration of chaotic trajectories in the damped, driven rigid pendulum. By varying the driving torque amplitude, students can observe the transition from predictable oscillations to seemingly unpredictable, non-repeating behavior characterized by complex phase space plots.
  • Quote: "The rigid pendulum is a type of nonlinear system, and therefore the dynamics actually become chaotic for certain physical parameters and initial conditions. To best observe the chaotic behavior, restrict the values of the angular displacement to the range - π to + π..."
  • Quote (from Exercise 5 Solution): "But, with higher driving torques, the system shows an apparently unpredictable non-repeating oscillatory behavior, with the corresponding phase space characterized by many orbits that can appear, as the case of τd = 5 Nm , to be completely random. This behavior is chaotic ."
  1. Numerical Accuracy and Time Step (Δt): Exercise 1 emphasizes the importance of selecting an appropriately small time step (Δt) for accurate computational results, especially when no analytical solution is available for direct comparison. Students are expected to describe their procedure for determining an acceptable value of Δt, often by looking for convergence in the simulation results as Δt is reduced.
  • Quote: "so you must carefully determine a value of Δ t Δ t that produces an accurate approximation without the benefit of making a comparison. Describe in detail the procedure you used in arriving at an acceptably small value of Δ t Δ t..."
  • Quote (from Exercise 1 Solution): "With a properly working model, and no exact solution with which to compare, the student should look for some kind of convergence behavior in the computational solution as Δ t Δ t is systematically made smaller."

Python Implementation:

The resource includes a Python script (Plane_Rigid_Pendulum_Python.py) that implements the Euler-Cromer algorithm for the damped, driven rigid pendulum. The code includes parameters for gravity, mass, length, damping strength, driving frequency, and driving torque, as well as the time step and total number of iterations. It calculates and plots the time evolution of angular displacement and compares it with the small angle approximation. The code also includes a constraint to keep the angular displacement within the range of -π to +π for better visualization of chaotic behavior.

Educational Advantages:

The computational approach offers several educational advantages:

  • Allows students to study a nonlinear, potentially chaotic system with relative computational ease.
  • Provides a hands-on experience in building and analyzing physical models.
  • Facilitates exploration of system dynamics by varying parameters.
  • Visually demonstrates the limitations of approximations.
  • Introduces fundamental concepts in numerical methods and nonlinear dynamics.

Target Audience:

The resource is primarily aimed at first-year university students and beyond who are studying mechanics and oscillations, and who have some basic programming knowledge or are learning computational modeling.

In Conclusion:

The PICUP Plane Rigid Pendulum JavaScript Simulation Applet and its associated exercises provide a comprehensive and engaging way for students to learn about the dynamics of a rigid pendulum. By combining computational modeling with theoretical concepts and visualization techniques like phase space plots, this resource allows students to develop a deeper understanding of linear and nonlinear oscillations, the limitations of analytical approximations, and the emergence of chaotic behavior in physical systems. The inclusion of a Python implementation further enhances its value for students learning computational physics.

 

 

Study Guide: Computational Modeling of a Rigid Pendulum

Key Concepts

  • Rigid Pendulum: A pendulum where the mass distribution and shape are fixed, unlike a simple pendulum which approximates a point mass on a massless string.
  • Euler-Cromer Algorithm: A numerical method for solving differential equations, often used in physics simulations, known for its stability in oscillatory systems.
  • Computational Model: A simulation of a physical system created using a computer program, allowing for the exploration of its behavior under different conditions.
  • Small Angle Approximation: A simplification of the pendulum equation of motion that is valid only for small angular displacements (sin θ ≈ θ). This leads to an analytical solution for simple harmonic motion.
  • Phase Space: A graphical representation of a dynamical system where the axes represent the system's state variables (e.g., angular displacement and angular velocity for a pendulum).
  • Phase Space Trajectory: The path traced in phase space as the system evolves over time. Closed loops often indicate periodic motion.
  • Damping: A force that opposes the motion of an oscillating system, causing its amplitude to decrease over time (e.g., air resistance, friction).
  • Driving Torque: an external torque applied to the system, often periodic, that can influence its oscillations.
  • Nonlinear Dynamics: The study of systems where the equations of motion are nonlinear, often exhibiting complex behaviors like chaos.
  • Chaos: A state of a deterministic system characterized by extreme sensitivity to initial conditions, leading to seemingly random and unpredictable behavior.
  • Angular Displacement (θ): The angle of the pendulum relative to its equilibrium position.
  • Angular Velocity (θ̇): The rate of change of the angular displacement.
  • Angular Acceleration (θ̈): The rate of change of the angular velocity, determined by the net torque and moment of inertia.
  • Torque (τ): A rotational force that tends to cause rotation.
  • Moment of Inertia (I): A measure of an object's resistance to changes in its rotation.
  • Time Step (Δt): The discrete intervals of time used in a numerical simulation. The size of the time step affects the accuracy and stability of the computational model.

Quiz

  1. Explain why the Euler-Cromer algorithm is preferred over the simple Euler method for modeling oscillatory systems like a pendulum.
  2. Describe the limitations of the small angle approximation for a pendulum and under what conditions it provides a reasonably accurate analytical solution.
  3. What information can be gained by examining a phase space plot of a pendulum's motion, specifically the relationship between angular displacement and angular velocity?
  4. How does the introduction of a damping torque affect the time-dependent behavior and the phase space trajectory of a rigid pendulum?
  5. What is a driving torque, and how does adding a sinusoidal driving torque influence the motion of a damped rigid pendulum?
  6. Define chaotic behavior in the context of a dynamical system like the driven rigid pendulum. What are some characteristic features of chaotic trajectories in phase space?
  7. Explain the physical significance of the sign convention used for torques acting on the rigid pendulum.
  8. What is the moment of inertia of the uniform rigid bar about the pivot point P, and how does it relate to the bar's mass and length?
  9. Describe the process a student should undertake to determine an acceptably small time step (Δt) when building a computational model without an exact analytical solution for comparison.
  10. How does restricting the angular displacement to the range -π to +π in the computational model of a driven pendulum aid in the analysis of chaotic behavior?

Answer Key

  1. The Euler-Cromer algorithm is more stable for oscillatory systems because it uses the updated velocity to calculate the new position, which helps to conserve energy (or at least prevents artificial growth of energy) over time. The simple Euler method tends to be unstable for oscillations, leading to a continuous increase in the system's total energy.
  2. The small angle approximation (sin θ ≈ θ) is only valid when the angular displacement θ is small (typically less than about 15-20 degrees or 0.26-0.35 radians). Beyond this range, the approximation becomes less accurate, leading to discrepancies in the predicted period and amplitude of oscillation compared to the actual behavior of the pendulum.
  3. A phase space plot (angular velocity vs. angular displacement) reveals the nature of the pendulum's motion. For example, a closed loop indicates periodic motion, the direction of the loop shows the evolution in time, and the shape of the loop can provide insights into the energy and stability of the oscillations.
  4. The introduction of a damping torque causes the amplitude of the pendulum's oscillations to decrease over time, eventually leading to a stop at the equilibrium position. In phase space, this is represented by a trajectory that spirals inward towards the origin (zero angular displacement and zero angular velocity), indicating the dissipation of energy.
  5. A driving torque is an external rotational force applied to the pendulum, often varying periodically (sinusoidally in this case). It can add energy to the system, counteracting damping, and can lead to a variety of behaviors depending on its amplitude and frequency, including resonance and chaos.
  6. Chaotic behavior in a deterministic system is characterized by a high sensitivity to initial conditions, meaning that even tiny differences in the starting state can lead to drastically different trajectories over time. In phase space, chaotic trajectories often appear complex, unpredictable, and do not repeat, filling a region of space without forming closed loops.
  7. The sign convention for torques is crucial for correctly applying Newton's second law for rotation (∑τ = Iθ̈). A positive torque produces a counterclockwise angular acceleration, while a negative torque produces a clockwise angular acceleration. This ensures that the mathematical model accurately reflects the physical forces acting on the pendulum.
  8. The moment of inertia of the uniform rigid bar about the pivot point P (at one end) is given by I = (1/3)mL². The source incorrectly states I = m(L/2)², which would be the moment of inertia of a point mass m located at the center of mass. For a uniform rod pivoted at one end, the formula is different, affecting the equation of motion.
  9. To determine an acceptably small time step (Δt), a student should start with a relatively large Δt and run the simulation. Then, they should systematically decrease Δt and observe how the results (e.g., plots of angular displacement vs. time) change. When further reductions in Δt no longer produce significant changes in the simulation's output (convergence), the current Δt can be considered acceptably small for accuracy.
  10. Restricting the angular displacement to the range -π to +π helps in visualizing and analyzing the long-term behavior of the driven pendulum, particularly when exploring chaos. Since angular displacements differing by 2π correspond to the same physical position, this restriction prevents the phase space trajectory from becoming overly cluttered and allows for a clearer observation of the complex, non-repeating patterns characteristic of chaos within a defined range.

Essay Format Questions

  1. Discuss the importance of computational modeling in studying physical systems like the rigid pendulum, particularly when analytical solutions are limited or non-existent. Highlight the role of numerical methods like the Euler-Cromer algorithm in obtaining approximate solutions and exploring system dynamics.
  2. Compare and contrast the behavior of an undamped, unforced rigid pendulum with the analytical solution obtained using the small angle approximation. Analyze the conditions under which the approximation is valid and explain the deviations observed for larger angular displacements.
  3. Explain the concept of phase space and its utility in analyzing the dynamics of the rigid pendulum. Describe how damping and driving torques are manifested in the phase space trajectories and what information these representations provide about the system's energy and periodicity.
  4. Investigate the effects of damping on the rigid pendulum's oscillations. Discuss how varying the damping strength influences both the time-dependent behavior and the phase space trajectories. Can the pendulum be overdamped to the point where oscillations cease, and what physical parameters determine this critical damping?
  5. Explore the complex dynamics of a damped, driven rigid pendulum, focusing on the phenomenon of chaos. Describe how varying the driving torque amplitude can lead to transitions from predictable periodic motion to unpredictable chaotic behavior, and discuss the characteristics of chaotic trajectories in phase space.

Sample Learning Goals

[text]

For Teachers

Instructions

Combo Box and Functions

Toggling the Combo Box will give you their respective functions.
 


 
Pendulum and Others will give you their fieldboxes that are editable.
 
Toggling the bottom options will toggle their visibility.
 
(Show Solution)


(Hide Solution)
 
Toggling the Solution will toggle the visibility of the orange curve.
 
(Position Time Selected)


(Velocity Time Selected)


(Phase Space Selected)
 
Selecting the rest of the options will toggle the visibility of the above graphs.
 

Toggling Full Screen

Double clicking anywhere in the panel to toggle full screen.
 

Play/Pause, Initialise and Reset Buttons

Plays/Pauses, initialises and resets the simulation respectively.
 
Do take a look at the spreadsheet from this link as well:
 

Research

[text]

Video

[text]

 Version:

  1. https://www.compadre.org/PICUP/exercises/exercise.cfm?I=139&A=RigPend 
  2. http://weelookang.blogspot.com/2018/06/plane-rigid-pendulum-javascript.html 

Other Resources

[text]

# What is the purpose of the PICUP Plane Rigid Pendulum JavaScript Simulation Applet?

The primary purpose of this simulation is to allow students to build and explore a computational model of a plane rigid pendulum. Through guided exercises, students can investigate the pendulum's motion, the accuracy of computational models, the limitations of the small angle approximation, and the emergence of chaotic behavior when damping and driving forces are introduced.

# How does the simulation utilize the Euler-Cromer algorithm?

The simulation guides students to build a computational model of the pendulum using the Euler-Cromer numerical scheme. This method is a stable algorithm for oscillatory systems and is used to approximate the angular displacement and angular velocity of the pendulum over time by iteratively updating these values based on the calculated angular acceleration.

# What are the learning objectives for students using this simulation?

Upon completing the exercises associated with this simulation, students will be able to: build a computational model of a rigid pendulum using the Euler-Cromer algorithm; produce graphs of angular displacement and velocity as a function of time; assess the accuracy of their computational model; identify the limitations of the small angle approximation; produce phase space plots; and observe chaotic trajectories by varying system parameters.

# Why is a rigid pendulum used in this simulation instead of a simple pendulum (mass on a string)?

A rigid pendulum, modeled as a uniform rigid bar, allows for the study of larger angular displacements (greater than π/2) without the concern of the mass's position relative to the support becoming ill-defined. Additionally, the rigid pendulum provides a more direct path to exploring nonlinear dynamics and chaotic behavior.

# What is the significance of comparing the computational model with the small angle approximation?

Comparing the computational results with the analytical solution obtained via the small angle approximation helps students understand the limitations of this approximation. They can observe that for small initial angles, the approximation is reasonably accurate, but for larger angles, the approximation deviates significantly from the computational solution, particularly in predicting the period of oscillation.

# How is phase space analysis used in the context of this simulation?

Phase space plots (angular velocity vs. angular displacement) are introduced as a valuable tool for analyzing the periodic and more complex behaviors of the pendulum. Students are asked to produce these plots for different system parameters (e.g., damping, driving force) and initial conditions to visualize the system's dynamics and identify characteristics such as closed orbits for periodic motion and complex, non-repeating trajectories indicative of chaos.

# How do damping and driving forces affect the pendulum's behavior, as explored in the simulation?

The simulation allows students to add damping and driving torques to their model. By varying the damping strength, they can observe how oscillations decay and eventually cease. Introducing a sinusoidal driving torque can lead to resonance and, more interestingly, to chaotic behavior for certain parameter values, where the pendulum's motion becomes unpredictable and non-repeating.

# What evidence of chaotic behavior can be observed using this simulation?

By exploring the damped, driven pendulum with varying driving torque amplitudes and plotting the phase space trajectories over a large number of time steps, students can observe behavior characteristic of chaos. This includes seemingly random, non-repeating patterns in the phase space plots, contrasting with the well-defined orbits seen in periodic or quasi-periodic motion. The simulation provides a hands-on introduction to the concept that deterministic nonlinear systems can exhibit unpredictable behavior.

0.5 1 1 1 1 1 1 1 1 1 1 Rating 0.50 (1 Vote)