Skip to content

bethel-physics/hw_pendulum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

hw_pendulum

Homework for Garcia Ch. 2, pendulum

Contents

Problem 1 (in class)

Modify the MATLAB program pendul.m such that it includes the option to use the Leap-Frog method. Compare the results for the different methods for a simulation of 300 steps with a time step size of 0.1 sec.

Problem 2 (in class)

Modify pendul.m so that the angular velocity is updated at each step when using the Verlet method. Display your results for θ vs. t, ω vs. t, and ω vs. θ as subplots similar to the format shown below.

Problem 2

Comment: The figure was produced running 1000 time steps with the Verlet method, for θ0 = 160° and with a time step size of τ = 0.1 sec.

Problem 3 (homework)

Modify pendul.m to include a velocity-dependent damping term, such that the equation of motion for the pendulum is described by:

where γ is the damping constant. Also, modify the program to terminate the simulation after the mechanical energy (i.e. potential + kinetic energy) is less than five percent of the original mechanical energy. Run the program with Verlet method for the following conditions:

  • θ(0) = 175°
  • ω(0) = 5 rad/s
  • τ = 0.02 s (time step size)
  • γ = 0.1 (damping coefficient)

Display plots of θ vs. t, ω vs. t, and ω(t) vs. θ(t) as in Problem 2.

About

Homework for Garcia Ch. 2, pendulum

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages