Physics 305 – Computational Physics, Spring 2020
Term Project
Full project submission Due Date: Friday, May 1, 5pm
Presentation Phase: April 21 - April 30
The program in your term project can be either submitted as a python program or ipython notebook,
where the latter is prefe
ed. The program, an explanation of what the program does, along with answers to all
questions asked should be uploaded to d2l.
You are expected to write a term paper (in word or Latex) on your project that discusses the
problem you are trying to solve, the basic equations that govern the problem, includes plots that show
the solutions, and describes the solution and the numerical method involved. In addition, you must
demonstrate that your solution is co
ect by showing that the code converges at the expected order.
If your code does not converge at the expected order you should try to identify potential reasons fo
why this is the case. You are expected to work on your term project by yourself..
Your term project will receive full credit only if: (a) the program runs successfully without e
ors using python
3, (b) the programs have explanatory comments and variable names that identify with the problem equations you
are trying to solve, (c) give the co
ect output, and (d) demonstrate the validity of the solution through convergence
plots. No credit will be given to late term projects.
The term paper is as important as the code (50% of the term project credit will go to the code
and the other 50% to the paper). Answers to the questions and analysis requested below should be
elaborated in the report. Plots should be clearly labeled and be properly described in the report, and
not just shown. You will need to explain what each and every plot demonstrates. A polished pape
written in word or LaTex (prefe
ed, e.g. please try overleaf) is expected to get full credit.
Note: Before you present results from numerical integrations that answer the questions in the
project, it is critical to *first* perform the convergence tests for one case, and to estimate e
ors. This
will tell you how small a step size is necessary for accurate solutions. Only after e
ors are estimated,
does it make sense to run your code for producing results that help you learn more about the system
you study.
I. FOUCAULT’S PENDULUM: THE EFFECT OF THE CORIOLIS FORCE
In 1851, the French physicist Jean Leon Foucault hung a 67-meter pendulum from the dome of the Pantheon to
demonstrate the rotation of the earth for the first time. A pendulum swinging in a rotating frame exhibits deflection
due to the coriolis force. You will be studying this effect.
Ignoring air resistance and losses due to imperfect pivot points etc., the equations of motion describing the tip of
the pendulum on a rotating frame are given by
d2x
dt2
= − g
`
x+ 2Ω
dy
dt
+ Ω2x
d2y
dt2
= − g
`
y − 2Ωdx
dt
+ Ω2y
(1)
Note that in these equations the terms proportional to the velocity co
espond to the Coriolis acceleration due to the
otating frame with angular velocity Ω. The Ω2 terms are the usual centrifugal acceleration terms. In addition, we have
g, and ` being the gravitational acceleration and the length of the pendulum. We would like to cast these equations
in a dimensionless form. Notice that
√
`
g is related to the fundemental period of the pendulum. Introduce a new
dimensionless time t̃ = t/τ with τ =
√
`
g and rewrite the equations of motion. The dimensionless quantity
1
R0
= Ω `g
will appear in your equations. Write the resulting dimensionless time equations with the parameter R0 included.
Show your work in the term paper. This parameter is called the Rossby number and is given by R0 =
√
g/`/Ω.
Rossby number smaller than unity, means that the rotation period is shorter than swing period of the pendulum,
while R0 > 1 means that the rotation period is longer than swing period of the pendulum. You will be studying
solutions to the dimensionless equations of motion as the Rossby number varies.
To solve the dimensionless equations numerically you will need to cast them to first-order form. Show your work
in the term paper. You will need initial conditions. For all cases below assume that the pendulum at t̃ = 0 is on the
x-axis, at rest at the maximum angle. In particular choose, x(0) = 1, y(0) = 0, dxdt = 0 =
dy
dt .
2
Do the following:
1. Use RK4 to integrate numerically the first-order form of the dimensionless version of Eq. (??). You will need
to evolve for at least the longest period involved in the problem. As mentioned above there are two periods
involved: the pendulum swing period Tp = 2π
√
`/g, and the rotation period Tω = 2π/Ω. However, in the
non-dimensional form all times are normalized to τ =
√
`/g, thus in the dimensionless system of equations these
periods are T̃p = 2π, and T̃ω = 2π/Ωτ = 2πR0. This shows clearly now what we mentioned above, i.e., Rossby
number smaller than unity, means that the rotation period is shorter than swing period of the pendulum, while
R0 > 1 means that the rotation period is longer than swing period of the pendulum. Run your code for the
longest period in the problem in the following cases.
• Set R0 = 10. Show a plot of x vs t̃ and x vs t̃. Also show x vs y to see the o
it that the tip of the
pendulum traces. What do you notice happens to the pendulum? Does it stay along the x-axis on which
it starts?
• Set R0 = 2. Show a plot of x vs t̃ and x vs t̃. Also show x vs y to see the o
it that the tip of the pendulum
traces. What do the o
its look like now? How do they compare to the R0 = 10 case?
• Set R0 = 1. Show a plot of x vs t̃ and x vs t̃. Also show x vs y to see the o
it that the tip of the pendulum
traces. What do the o
its look like now? How do the o
its compare to the R0 = 2, 10 cases? Is the
pendulum swinging?
Use your judgement as to how small a step size you need to solve this system accurately. If you cannot figure
this out from pure thought, experiment with different step sizes and use the solution x, y at the final t̃ (for a
fixed choice of R0) and choose the step size such that x and y at that t̃ does not change appreciably, say within
10−3 or less. Then you have decent accuracy.
2. Self-convergence: Use a number of step sizes and for a specific choice of R0, make a plot to demonstrate that
the code solution for x, and y at t̃ of your choosing self-converges. Does the order of convergence match you
expectation? If not, try to explain why.
3. Using the order of convergence you determined, employ Richardson extrapolation to determine an e
or for the
solution for x(t̃) y(t̃), at a sufficiently large t̃ of your choosing.