Claudio Rebbi


Professor - Physics Department

Office:  Physics Research Building (PRB), 3 Cummington Mall, room 551.
Telephone:  617-353-9058.


PY 421 - Introduction to Computational Physics - Spring term 2024

Instructor: Claudio Rebbi

This course introduces students to computational techniques for the solution of research problems in physics.

The course does not assume any prior knowledge of computer programming. During the first few weeks of the course the students learn basics aspects of programming that will be sufficient to complete the homework assignments and to follow the lectures. As the course progresses the students will further develop their programming skills.

Lectures will be held on Tuesday and Thursday from 11AM to 12:15PM in room KCB 104 and a discussion session will be held on Friday from 3:35PM to 4:25PM also in room CAS 310. In addition, meetings with groups of students may be arranged as needed for explanations, assistance with homework, or any other help with the course.

Students will have accounts on Linux servers run by the CAS Computing Services Group and on the university's high-end shared computing cluster. They will be able to access their accounts remotely. Please see http://www.bu.edu/casit/information/vdi-virtual-desktops/ for detailed instructions on how to log in to the Linux servers.
Very important: students must make sure that they can log in to their Linux accounts, dowloading the appropriate software if needed, before the first day of classes.

Prerequisites are PY 351 or equivalent, or consent of the instructor. But what is really needed to follow the course is a basic knowledge of multivariate calculus, of linear algebra, especially the notions of eigenvalues and eigenvectors of a matrix, and of complex numbers. It is assumed that physics majors who passed PY 351, "Modern Physics", will have developed these notions, but students in different majors who have that mathematical knowledge can attend the course with profit even if they did not take PY 351.

There is no required textbook: lecture notes, software and other materials for the course are distributed through a shared file system, on a server accessible to the students, in the CAS workstation classroom.

Please consult the syllabus for detailed information about lectures, exams, grading and many other matters related to the course.

Outline:

After introductory lectures on the basics of computing, the course proceeds toward modern methods of computational physics. In particular the data parallel paradigm and graphics rendering are illustrated through computationally intensive applications. All of the techniques are presented in the context of specific projects. For some problems, students are asked to play the role of application scientists, working with the computer in an interactive manner to perform a variety of numerical experiments. For other problems, students are required to take an active part in designing the code that will be used for the solution. Emphasis in all cases will be on the importance that the proper formulation of a problem plays for its ultimate computational solution.

Tentative schedule of classes

Classes will begin on Thursday January 18 and end on Tuesday April 30. The schedule of lectures shown below is tentative. The actual pace of lectures will be tailored to the students' needs. (Note: the dates shown below are the dates of the first and last meeting within a given week.)

Week 1 (Jan. 18 - Jan. 19): Basics of computer usage and of programming in C. Numerical differentiation and integration.

Week 2 (Jan. 23 - Jan. 26): Programming in C, continued. Writing to a file. Numerical solution of simple ordinary differential equations, e.g.~for projectile motion with air resistance. Graphing of the results.

Week 3 (Jan. 30 - Feb. 2): Programming in C and elementary graphics rendering. Solution of the one-dimensional wave equation with the leapfrog algorithm and visualization.

Week 4 (Feb. 6 - Feb. 9): Elements of Fortran. Array constructs and operations with arrays.

Week 5 (Feb. 13 - Feb. 16): Blurring of an image. Discretized Laplacian. The diffusion equation. Review of the finite and continuum Fourier transform and the fast Fourier transform (FFT).

Week 6 (Feb. 20 - Feb. 23): Eigenvectors of the discretized Laplacian. Instability of the algorithm for solving the diffusion equation. Unblurring the image.

Week 7 (Feb. 27 - Mar. 1): Solution of the equation for the electrostatic potential in presence of conductors. Relaxation algorithms and their relation with a diffusion process. Critical slowing down. Mention of multiscale methods.

Week 8 (Mar. 5 - Mar. 8): Solution of the one-dimensional time-dependent Schrödinger equation by a split operator formalism and the FFT. Visualization of the evolution. Importance of preserving unitarity. First midterm exam (Th. March 7.)

Week 9 (Mar. 19 - Mar. 22): Generation of (pseudo)random numbers. Monte Carlo integration.

Week 10 (Mar. 26 - Mar. 29): Monte Carlo simulation of the Ising model. Parallel computing and MPI (message passing interface).

Week 11 (Apr. 2 - Apr. 5): The path integral formulation of quantum mechanics. (Note: this uses the same mathematical ingredients already introduced for the numerical solution of the Schrödinger equation,which makes the whole notion of path integral quite natural and easy to understand.) Second midterm exam (Th. April 4.)

Week 12 (Apr. 9 - Apr. 12): Stochastic simulation of the path integral.

Week 13 (Apr. 16 - Apr. 19): Molecular dynamics simulation of a system of atoms interacting with Lennard-Jones potentials.

Week 14 and last class (Apr. 23 - Apr. 30): Make-up and summary.

Application problems:





Image manipulations.

Some simple operations are implemented by parallel algorithms on a two-dimensional array representing the intensity values of the pixels in a monochrome image. A relationship is established between the operations performed by computer (e.g. blurring of the image) on the discrete set of image data and fundamentals equations of mathematical physics for continuum fields (e.g. the diffusion equation). Advanced visualization software is presented.

Top and bottom left: the image before and after the blurring operation, which can be interpreted as a diffusion process.



Calculation of the Electrostatic Potential.

Various methods for solving Poisson's equation are evaluated in terms of their suitability for the data parallel paradigm. Students are asked to write the code for some basic iterative methods of solution on a parallel machine. Numerical experiments are used to demonstrate the occurrence of critical slowing down. Multigrid methods and other algorithms for overcoming critical slowing down are analyzed for implementation in a data parallel environment.



Solution of the One-Dimensional Schrödinger Equation.

The time-dependent Schrödinger equation in one space dimension is solved by means of an algorithm that uses repeated fast Fourier transforms in order to preserve the norm of the wave function. The complex wave function is represented graphically by means of a color map whereby its phase is encoded by the color circle. Here the student is provided with code and asked to use it as an application scientist, experimenting with a wide range of initial data.



Simulation of Phase Transitions in Spin Systems.

Stochastic algorithms (Monte Carlo methods) are introduced for the simulation of models, such as the Ising model and the N-state Potts model, which exhibit interesting thermodynamical behavior and phase transitions. Programs for the implementation of such algorithms on a parallel machine are analyzed. Students then use these programs to perform large scale numerical experiments on phase transitions. Particular attention is given to the management of the large base of data that the simulations generate and to developing the auxiliary programs required for the analysis and interpretation of the data.



Molecular Dynamics Simulations.

Students are asked to write serial code for the implementation of molecular dynamics simulations. Following optimization and numerical experimentation with this code, the students and instructor collaborate to write highly efficient code for the simulation on a parallel machine. Performance for the serial and parallel modes of computation are compared and evaluated.


Please consult the syllabus for detailed information about lectures, exams, grading and many other matters related to the course.



Last modified: Sun Sep 18 08:54:12 AM EDT 2022