Physics 420/580 – Fall 2011

Previous iterations of this course: [ Fall 2008 : Fall 2009 : Fall 2010 ]

Course outline

Computational Physics / Advanced Topics in Computational Physics
Lecture: CCIS 4-285 MWF 13:00-13:50
Lab: CCIS L1-207 R 14:00-16:50
Syllabus: pdf
Schedule: pdf

Final Exam

Wednesday, December 14, 2011
14:00–15:30 (written) + 15:30–17:00 (programming)
CCIS L1-207

The exam will consist of both a written component and a programming component. One and a half hours will be apportioned for each. The emphasis will be on algorithms and numerical problem-solving strategies, with material drawn from the Lectures, Labs, and Assignments. Students will be expected to read and write programs in C++ but will not be asked to implement sophisticated class features.

I've posted previous years' exams as a study aid. The format and general style of this years' will be very similar.

Learning resources

Lectures

Class starts on Wednesday, September 7.

  1. Wednesday, September 7 — Computational physics
  2. Friday, September 9 — C++ language review
  3. Monday, September 12 — Discretization
  4. Wednesday, September 14 — Cellular automata
  5. Friday, September 16 — Self-organized criticality
  6. Monday, September 19 — Floating-point numbers
  7. Wednesday, September 21 — Integration, differentiation, and root finding
  8. Friday, September 23 — Ordinary differential equations
  9. Monday, September 26 — Boundary-value problems
  10. Wednesday, September 28 — Chaotic motion
  11. Friday, September 30N-body simulations
  12. Monday, October 3 — Multiple time scales
  13. Wednesday, October 5 — Holonomic constraints and the SHAKE algorithm
    see also:
  14. Friday, October 7 — Wave motion and spectral methods
  15. Wednesday, October 12 — Finite difference methods for PDEs
    relevant Wikipedia entries:
  16. Wednesday, October 19 — Quantum mechanics
  17. Thursday, October 20 — Solving for eigenfunctions in one dimension, stability of finite difference schemes for the time-dependent Schrödinger equation
  18. Friday, October 21 — Schrödinger equation in higher dimensions, many-body quantum problems, matrix mechanics, ground state projection via the power method, variational principle
  19. Monday, October 24 — Matrices, linking to the BLAS and LAPACK libraries
    see also: Linking to the LAPACK libraries from C++
  20. Wednesday, October 26 — Random processes, probability distributions
  21. Friday, October 28 — Random walks, enumeration of self-avoiding random walks
    see also:
    • this tutorial courtesy of the Boston University Center for Polymer Studies
    and these articles from Wolfram Mathworld:
  22. Monday, October 31 — Monte Carlo integration, Markov chains, equilibration, detailed balance
  23. Wednesday, November 2 — Monte Carlo practicalities: measurement taking, thermalization and autocorrelation times
  24. Friday, November 4 — Ising model

Labs

The first lab is on Thursday, September 15 at 14:00 in CCIS L1-207. The TA is Burkhard Ritter. You can contact him at . Burkhard has prepared a lab website with notes and tutorials that students may find useful.

  1. Lissajous figures, Mandelbrot set
    instructions [ pdf ], source code [ tar.gz ], solutions [ tar.gz ]
  2. Cellular automata
    instructions [ pdf ], source [ tar.gz ], solutions [ tar.gz ]
  3. Numerical integration, particle dynamics
    instructions [ pdf ], source [ tar.gz ], solutions [ tar.gz ]
  4. Lorentz attractor, chaos
    instructions [ pdf ], source code [ tar.gz ]
  5. Laplace and Poisson equations, relaxation methods
    instructions [ pdf ], source code [ tar.gz ], solutions [ tar.gz ]
  6. Wave equation, stability of finite-difference methods for PDEs
    instructions [ pdf ], source code [ tar.gz ]
  7. Matrix mechanics with LAPACK
    instructions [ pdf ], source code [ tar.gz ], solutions [ tar.gz ]
  8. Enumeration of self-avoiding walks
    instructions [ pdf ], source code [ tar.gz ], solutions [ tar.gz ]
  9. Percolation
    instructions [ pdf ], source code [ tar.gz ], solutions [ tar.gz ]
  10. Monte Carlo simulation of the Ising model
    instructions [ pdf ], source code [ tar.gz ], solutions [ tar.gz ]

Lab Access

Detailed instructions can be found here.

Assignments

There will be five assignments (three for students who undertake a term project) with one due roughly every two weeks.

  1. Lattice gas automata: due Wednesday, September 29
    instructions [ pdf ], source [ tar.gz ], solutions [ tar.gz ]
  2. Classical N-body simulations: due Wednesday, October 19
    instructions [ pdf ], source code [ tar.gz ], solutions [ tar.gz ]
  3. Dynamics of a quantum wave packet: due Friday, November 4
    instructions [ pdf ], source code [ tar.gz ], solutions [ tar.gz ]
  4. Monte Carlo simulation of a polymer chain: due Friday, November 18
    instructions [ pdf ], source code [ tar.gz ], solutions [ tar.gz ]
  5. Optimal packing of granular material: due Friday, December 2
    instructions [ pdf ], source code [ tar.gz ], solutions [ tar.gz ]

I would appreciate having your work for assignment n ∈ {1,2,…,5} submitted as a single tarball named studentLastName_n.tar.gz, sent to as an email attachment. When unpacked, your directory should contain your source code, compilation instructions in the form of a makefile, and a pdf document containing a concise written explanation of what you have done.

$ WEBPATH=http://www.ualberta.ca/~kbeach/phys420_580/src
$ curl $WEBPATH/Assignment1.tar.gz -O
$ tar xzf Assignment1.tar.gz
$ ls -F
Assignment1/
$ cd Assignment1
[edit / compile / test]
$ cd ..
$ mv Assignment1 beach_1
$ ls -F
mycode.cpp   makefile   writeup.pdf   LaTeX/
$ tar czf beach_1.tar.gz beach_1
$ ls -F
beach_1/   beach_1.tar.gz

I encourage students to compose the written portion of their assignments in LaTeX. I have provided a template file for that purpose. (If you are not already familiar with it, LaTeX is a typesetting language that is widely used in the mathematics and physics communities. There is a brief introduction in the notes.)

Term project

Choosing a topic

You are welcome to develop a project idea on your own, but please consult with me to see if I think it's appropriate and feasible. I'll want to know that you've identified (i) an interesting physical phenemonon, (ii) the model you'll use to study it, (iii) the simulation algorithm you intend to implement, and (iv) the numerical experiment and particular measurements you intend to perform. Keep in mind that the project must be challenging but at the same time well-defined and something that can realistically be completed in three months.

If you're having trouble coming up with a good direction. I suggest that you take a look at these books, both of which contain many interesting project ideas:

Or just come talk to me. I can suggest something.

Project proposal

Two or three typed page shoulds be sufficient. Commit to a particular topic, and flesh out how you intend to proceed. I want to get a sense of the scope of your project and what numerical techniques you intend to employ. Be sure to discuss what scientific question(s) your numerical study will attempt to answer.

Oral presentations

The final oral presentation should last no more than 20 minutes. Outline the problem of interest, the goals for the project, and the numerical strategies you've employed. Show us some of your numerical results, even if they are prelimary. Try to give the audience a meaningful interpretation of the data and a sense of how your results do or do not resolve the physics propblem you set out to investigate.

Final report

The final report should be type-written (in LaTeX, prefereably) and 15 to 25 pages in length, including figures and references. I have provided a template file that lays out the following structure:

These section headings are just a suggestion. You are free to organize your report as you see fit, so long as it adequately addresses each of these key areas: the motivation and background to the problem, the assumptions underlying the physical modelling, the choice and suitability of the numerical technique(s), the details of the C++ implementation, what tests were carried out to verify the code, and what the final results mean.

The report will be judged in part on the clarity of writing and presentation of data. I will also be looking for evidence that the numerical work was carried out carefully and that the reported results are reliable. In other words, I expect to see something along these lines: benchmark results matched against solvable cases, a systematic characterization of the errors, a stability analysis, etc.

The report and the program(s) you've written should be made available to me in the public_html directory of your AICT-provided storage space. (The projects are generally too big to send as an email attachment.) Please bundle everything in a single archive named project580.tar.gz. Along with the report (in pdf format), be sure to submit your C++ code (either well-commented or accompanied by an explanatory document). And be absolutely certain that I will be able to compile and run it.

If you haven't yet activated your AICT home page, follow the instructions below, replacing kbeach with your own CCID.

$ ssh kbeach@gpu.srv.ualberta.ca
> mkdir public_html
> fs setacl ~kbeach system:anyuser l
> fs setacl public_html system:anyuser read
> exit
Connection to gpu.srv.ualberta.ca closed.
$ scp project580.tar.gz kbeach@gpu.srv.ualberta.ca:public_html/

The last step, copying your file to public_html, can also be accomplished via sambda or ftp. See here for details. Simply notify me when the file is online.