Physics 420/580 – Fall 2010
Previous iterations of this course: [ Fall 2008 : Fall 2009 ]
Course outline
Computational Physics / Advanced Topics in Computational Physics
Lecture: CEB 123 MWF 13:00-13:50
Lab: CEB 114 R 14:00-16:50
Syllabus: pdf
Schedule: pdf
Learning resources
- As you're getting started, I recommend that you work your way through these introductory notes and that you try solving some of the simple programming exercises.
- Check out these online tutorials for C++ and UNIX.
- Many of the lecture topics are covered in greater detail in various textbooks. I encourage you to at least peruse items 6–8 of this book list. You can find them on reserve in Cameron library.
- An old version of Numerical Recipes, is available for free online. The newest edition (somewhat expensive) makes the jump from C to C++.
- A rather famous article: David Goldberg, “What Every Computer Scientist Should Know About Floating-Point Arithmetic,” ACM Computing Surveys 23, 5 (1991). [ pdf : html ]
- A short guide to 2D OpenGL graphics using the GLUT library [ pdf ]
Exercises
These optional, ungraded problems touch on important issues that aren't addressed explicitly in the labs and assignments.
Lectures
Class starts on Wednesday, September 8.
- Wednesday, September 8 — Computational physics
- Friday, September 10 — C++ language review
- Monday, September 13 — Discretization
- Wednesday, September 15 — Cellular automata
- Friday, September 17 — Self-organized criticality
- Monday, September 20 — Floating-point numbers
- Wednesday, September 22 — Integration, differentiation, and root finding
- Friday, September 24 — Ordinary differential equations
- Monday, September 27 — Boundary-value problems
- Wednesday, September 29 — Chaotic motion
- Friday, October 1 — N-body simulations
- Monday, October 4 — Multiple time scales
- Wednesday, October 6 — Holonomic constraints and the SHAKE algorithm
see also:- SHAKE: J. Comput. Phys. 23, 327–341 (1977)
- RATTLE: J. Comput. Phys. 52, 24–34 (1983)
- SETTLE: J. Comput. Chem. 13, 952–962 (1992)
- MILC SHAKE: J. Comput. Phys. 227, 8949–8959 (2008)
- Friday, October 8 — Wave motion and spectral methods
- Wednesday, October 13 — Finite difference methods for PDEs
relevant Wikipedia entries: - Friday, October 15 — Quantum mechanics
- Monday, October 18 — Solving for eigenfunctions in one dimension, stability of finite difference schemes for the time-dependent Schrödinger equation
- Wednesday, October 20 — Schrödinger equation in higher dimensions, many-body quantum problems, matrix mechanics, ground state projection via the power method, variational principle
- Friday, October 22 — Matrices, linking to the BLAS and LAPACK libraries
see also: Linking to the LAPACK libraries from C++ - Monday, October 25 — Random processes, probability distributions
- Wednesday, October 27 — Random walks, enumeration of self-avoiding random walks
see also:- this tutorial courtesy of the Boston University Center for Polymer Studies
- Friday, October 29 — Monte Carlo integration, Markov chains
- Monday, November 1 — Monte Carlo dynamics, detailed balance, measurement taking, thermalization and autocorrelation times
- Wednesday, November 3 — Ising model
- Friday, November 5 — Duality of (site) clusters and (link) loops for the 2D Ising model, non-local updates, Wolff algorithm
- Monday, November 8 — Geometric disorder, continuum and lattice percolation
- Wednesday, November 10 — Global optimization, steepest descent, stochastic optimization, simulated annealing, parallel tempering
- Monday, November 15 — Genetic and swarm algorithms
- Wednesday, November 17 — Linear inverse problems, X-ray tomography, recommendation engines
- Friday, November 19 — Renormalization group, glassy energy landscapes, machine learning
- Monday, November 22 — Term project presentations (Chris Polachic, Andrew Karamaoun)
- Wednesday, November 24 — Term project presentations (Saeed Ur Rehman, Nadia Imtiaz)
- Friday, November 26 — Term project presentations (Burkhard Ritter)
Labs
The first lab is on Thursday, September 16 at 14:00 in CEB 114. Unfortunately, this time conflicts with the Distinguished Guest Speaker lectures by Werner Israel and David Mermin, scheduled as part of TPI's 50th anniversary celebrations. So if you like, drop by CEB 114 at 14:00 on Tuesday or Wednesday instead, and I'll be available to give you your account login.
- Lissajous figures, Mandelbrot set
instructions [ pdf ], source code [ tar.gz ] - Cellular automata
instructions [ pdf ], source [ tar.gz ] - Numerical integration, particle dynamics
instructions [ pdf ], source [ tar.gz ] - Lorentz attractor, chaos
instructions [ pdf ], source code [ tar.gz ] - Laplace and Poisson equations, relaxation methods
instructions [ pdf ], source code [ tar.gz ] - Wave equation, stability of finite-difference methods for PDEs
instructions [ pdf ], source code [ tar.gz ] - Matrix mechanics with LAPACK
instructions [ pdf ], source code [ tar.gz ] - Enumeration of self-avoiding walks
instructions [ pdf ], source code [ tar.gz ] - Percolation
instructions [ pdf ], source code [ tar.gz ] - Monte Carlo simulation of the Ising model
instructions [ pdf ], source code [ tar.gz ]
Lab Access
Detailed instructions can be found here.
Assignments
There will be five assignments (four for students who undertake a term project) with one due roughly every two weeks.
- Lattice gas automata: due Wednesday, September 29
instructions [ pdf ], source [ tar.gz ] - Classical N-body simulations: due Wednesday, October 13 (extended to October 20)
instructions [ pdf ], source code [ tar.gz ] - Dynamics of a quantum wave packet: due Wednesday, October 27 (extended to November 1)
instructions [ pdf ], source code [ tar.gz ] - Monte Carlo simulation of a polymer chain: due Wednesday, November 10
instructions [ pdf ], source code [ tar.gz ] - Optimal packing of granular material: due Wednesday, November 24
instructions [ pdf ], source code [ tar.gz ]
I would appreciate having your work for assignment n=1…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 (or, even better, a makefile), and a short 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 $ tar czf beach_1.tar.gz beach_1 $ ls -F beach_1/ beach_1.tar.gz
I encourage students to write up 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.) You are certainly not required to use LaTeX. A plain text file will do nicely. I do, however, want to avoid paper submissions.
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, (i) the model you'll use to study it, and (iii) the simulation algorithm you intend to implement. Keep in mind also that the project must be 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:
- Computational Physics, T. Pang, 2nd Ed., Cambridge University Press (2006) ISBN-10:0521825695
- An Introduction to Computer Simulation Methods: Applications to Physical Systems, H. Gould, J. Tobochnik, W. Christian, 3rd Ed., Addison Wesley (2006) ISBN-10:0805377581
Or just come talk to me. I can suggest something.
Project proposal
A single typed page should 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:
- Introduction
- Model
- Numerical Method
- Implementation
- Benchmark Calculations
- Results
- Discussion
- References
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 line: 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.