Always hand in:
- written solutions to any questions
- a paper print-out of well-commented code. Include a multiline comment at
the top of your code with (i) the assignment name, (ii) your name,
and (iii) the date you handed in all elements of the assignment
- paper print-out of output (graph or text)
- also, e-mail me (y-lithwick@northwestern.edu) the code with your name and
the exercise number in the subject line
Assignment #7
[5pts, due 2pm, April 19]
The equation of motion for the physical pendulum is
You will numerically integrate this equation
for a range of different parameters.
You may
use any integration algorithm
and any stepsize, as long as your solution has converged
sufficiently.
There are essentially 6 separate parameters:
g/l, q, FD, ΩD,
the initial angle θ0
and the initial angular speed
We will be doing cases 1-3 (below) in class.
For the other cases (4-6), produce two plots
-
One plot will show θ(t) ,
i.e., θ
on the y-axis vs. t on the x-axis. On the same plot, show
a number of solutions with different parameters
that illustrate the basic features of the motion for each case.
If you feel the plot is getting too messy, you
can plot some of the trajectories on separate graphs.
-
The second
plot will be a phase-space plot, i.e. dθ/dt on the
y-axis vs. θ on the x-axis.
I will leave it up to you to choose which and how many trajectories to show, but
they should show the different kinds of motion possible.
For each case, describe in words the basic
features of the motion. Your description can be
as short as a sentence or two.
Also, write the values of the parameters you chose.
The cases are as follows
-
Case 1,
friction only: FD=0, g/l=0
Fix q = 1, and explore different values of
θ0
and
ω0.
- Case 2, gravity only and small angle:
FD=0, q=0, θ<<1
Fix g/l = 1,
and explore different values of
θ0
and
ω0, such that
the small-angle approximation holds.
To be specific, make sure θ < 0.1.
- Case 3, gravity and friction only and small angle:
FD=0, θ<<1
Fix g/l = 1
and
explore different values of q.
Make sure that θ<0.1 always.
-
Case 4, gravity, friction, forcing and
small angle: θ<<1
Fix g/l = 1, FD = 0.01,
ΩD=0.1, q = 0.1,
and explore different values of θ0
and ω0.
Make sure that θ<0.1 always.
For the phase-space plot, only plot the trajectory
at times t>100.
-
Case 5, gravity only and
large angle:
FD=0, q=0
Fix g/l = 1, and explore different
values of θ0
and ω0.
You do not need to include a θ vs. t
plot for this case.
Make your phase-space plot
extend in θ
from
-3π to 3π .
(Do not reset θ in your code
to force it to lie between -π and π .)
Your phase-space plot should
show three different kinds of behavior.
The curve that separates the three is called
the separatrix. Try to include a trajectory
that lies very close to the separatrix.
-
Case 6, gravity, friction only and large angle: FD=0
Fix g/l=1 and
ω0=0. Also set
θ0 very near the vertical
position (i.e. close to π), but tipped over
by a tiny amount. You do not need to include
a θ vs. t plot for this case.
Explore
different values of q.