PY 502, Computational Physics, Fall 2018

Department of Physics, Boston University

Instructor: Anders Sandvik

Lectures: Tuesday, Thursday 11 - 12:30, in PRB 146
Discussion and programmin tutorials, Friday 2:30-3:30 PM, in PRB 146
Office hours: Monday 3 - 4 PM, Thursday 2 - 3 PM, in SCI 450A

This course provides an introduction to some of the most widely used methods of computational physics, including numerical solutions of differential equations (initial and boundary value prob- lems) in classical and quantum mechanics, Monte Carlo simulations, and numerical diagonalization of quantum many-body Hamiltonians. In addition to giving the students a basic working knowledge of these particular techniques, the goal is to make them comfortable with scientific computing in general, so that they will be prepared to tackle also other computational problem that they may encounter in the future. The Fortran 90 programming language will be used. The full syllabus is available here.

Course News

Homework assignment #7 posted.

Lecture Notes and Program Examples

1) Introduction to the Fortran 90 programming language [Notes] [Programs]
     Lecture slides: [Sep 4Sep 4(b)] [Sep 6] [Sep 11] [Sep 13(a)]
2) Numerical and Monte Carlo integration [Notes] [Programs]
     Lecture slides: [Sep 13(b)] [Sep 18]
3) Classical equations of motion [Notes] [Programs]
     Lecture slides: [Sep 20] [Sep 25] [Sep 27(anim)]
4) Quantum mechanics; the Schrodinger equation [Notes] [Programs]
     Lecture slides: [Oct 2 (anim1) (anim2) (anim3) (anim4) (anim5) (anim6)] [Oct 4] [Oct 11] [Oct 16]
     [Oct 18 (anim1) (anim2) (anim3) (anim4)]
5) Monte Carlo simulations in statistical physics [Notes] [Programs]
     Lecture slides: [Oct 23] [Oct 23 (anim1) (anim2) (anim3) (anim4) (anim5)] [Nov 6] [Nov 8]
     [Nov 13 (anim1, anim2, anim3)] [Nov 15 (anim1, anim2, anim3, anim4, anim5, anim6 anim7, anim8)]
     [Nov 20 (Quantum MC)]
6) Quantum many-body systems (quantum magnetism) [Notes] [Programs]
     Lecture slides: [Nov 27] [Nov 29] [Dec 4]

Materials for (some) discussion meetings

[(Sep 7 instructions) (code)]
[(Sep 14) (code and example)]
[(Sep 21) (solutions)]
[(Oct 26) (MC program slides)]

Homework assignments

1) Due: Tuesday, September 25 [Problem text] [Solutions]
2) Due: Thursday, October 4 [Problem text] [Solutions]
3) Due: Thursday, October 18 [Problem text] [Solutions]
4) Due: Thursday, November 1 (extended to November 6) [Problem text] [Solutions]
5) Due: Thursday, November 15 [Problem text] [Avareging program res.f90] [Solutions]
6) Due: Thursday, November 29 [Problem text] [L=4 input] [L=10 input] [L=20 input] [Solutions]
7) Due: Friday, December 14 [Problem text] [Program for a ferromagnet]

Online Fortran resources

Comprehensive collection of links, discussion, best practices
Tutorial by C. K. Shene, Michigan Technological University
Advanced Fortran 90 discussion and examples by T. Kaiser
List of intrinsic functions in Fortran 90

Online Julia resources

Home page of the Julia language; download, documentation
Julia Express; brief introduction to the Julia language

Graphics tools and resources

User's guide for Xmgrace graphing program
2D color intensity plot program
Simple line-fitting program
Tutorial on the PostScript language
File conversion and animation with ImageMagick

Other resources and reading

NIST subroutine repository (numerical analysis, linear algebra,...)
Artcicle on current status of Fortran in scientific computing (also mentions Julia)