PY 502, Computational Physics, Fall 2016

Department of Physics, Boston University

Instructor: Anders Sandvik

Lectures: Tuesday, Thursday 11 - 12:30, in CAS 327
Programming help & tutorials, Friday 1:30-2:30 PM, in CAS 327
Office hours: Wednesday 11 AM - noon, 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 #7 posted, due Dec. 8.

Lecture Notes and Program Examples

1) Introduction to the Fortran 90 programming language [Notes] [Programs]
     Lecture slides: [Sep 6] [Sep 8] [Sep 13] [Sep 15]
2) Numerical integration and Monte Carlo sampling [Notes] [Programs]
     Lecture slides: [Sep 20] [Sep 22]
3) Solving classical equations of motion [Notes] [Programs]
     Lecture slides: [Sep 27] [Sep 29] [Oct 04] [Oct 06(animation)]
4) Solving the Schrodinger equation [Notes] [Programs]
     Lecture slides: [Oct 6] [Oct 13 (anim1, anim2, anim3, anim4, anim5, anim6)] [Oct 18] [Oct 20]
     [Oct 25 (anim1, anim2, anim3, anim4)] [Nov 1 (anim1, anim2, anim3, anim4)]
5) Monte Carlo simulation [Notes] [Programs]
     Lecture slides: [Nov 3] [Nov 4 (anim1, anim2, anim3, anim4, anim5, anim6, anim7)] [Nov 8] [Nov 10]
     [Nov 15] [Nov 17 (anim1, anim2, anim3)] [Nov 29 (anim1, anim2, anim3, anim4, anim5, anim6)],
     [Dec 1 (anim1, anim2), we also discussed the background material of hw-7]
6) Quantum spin systems [Notes] [Programs]
     Lecture slides: [Dec 2]

Homework assignments

1) Due: Tuesday, September 27 [Problem text] [Solutions]
2) Due: Tuesday, October 4 [Problem text] [Solutions]
3) Due: Thursday, October 13 [Problem text] [Solutions]
4) Due: Tuesday, October 25 [Problem text] [Solutions]
5) Due: Thursday, November 10 [Problem text] [Solutions]
6) Due: Tuesday, November 29 [Problem text][averaging program res.f90] [Solutions]
7) Due: Thursday, December 8 [Problem text] [Input data files:,,] [Solutions]

On-line Fortran resources

Tutorial by C. K. Shene, Michigan Technological University
List of intrinsic functions in Fortran 90

Graphics tools and resources 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