Computational Physics

Jaime Villate. University of Porto, Portugal.


This is a graduate course on computational methods and information systems for physicists.

Computational physics is concerned with performing computer calculations and simulations to solve physical problems. Many areas of physics lead to problems that cannot be solved analytically and must be treated numerically. The rapid evolution of the computing facilities in the last few decades has led to very active research in those areas.

Quantum computing is another area where very active research is taking place and it poses very good opportunities for cooperation among computer scientists and theoretical physicists.

Information systems and databases have also become a very important tool for most physicists. Those who work in large research facilities need an information system to manage the collaboration among the researchers and to store and handle the huge amounts of data produced in the experiments the conduct. That need for better information systems in physics research was responsible for the birth of the World Wide Web at CERN.

Even physicist who work in a small group can use the advantages of information systems and databases for tasks as data mining and even for teaching.


The main goal is to train students in the basic knowledge needed to solve computational physics problems and in the creation and use of information systems and databases.

The programming languages Python and Lisp are used but the programs developed and the methods used are general and can be easily adapted to other programming languages. The Computer Algebra System (CAS) Maxima will also be used.

The information system will be implemented in HTML+CSS, the database query language used will be SQL as implemented in Python.

Learning outcomes

After attending this course, students are expected to be able to:


It is expected that the student has finished an undergraduate program in Physics or Engineering Physics and has at least some elementary working knowledge of:


  1. Numbers representation in the computer. Integers, rational, real and complex numbers. Floating-point formats. Lists, vectors and matrices.

  2. Numerical integration. Monte Carlo technique. Ising Model. Brownian motion.

  3. Numerical solution of ordinary differential equations. Solution of Euler-Lagrange equations and Schrödinger equation. Chaotic systems.

  4. Numerical solution of partial differential equations. Solution of the wave equation.

  5. Creation of Web pages and CGI scripts.

  6. Creating an SQL database and accessing it via Web.


Thijssen, J. M. (2001). Computational Physics, Cambridge University Press.

Guttag, J. V. (2013). Introduction to Computation and Programming Using Python, MIT Press.

Python 3.5.1 documentation.

Giordano, N. J. & Nakanishi, H. (2006). Computational Physics, Pearson Prentice Hall.

Pang, T. (1999). An Introduction to Computational Physics, Cambridge University Press.

Sandvik, A. (2013). Lecture Notes for PY502, University of Boston.

Seibel, P. (2012). Practical Common Lisp, Springer Verlag.

Villate, J. E. (2015). Métodos Numéricos, Author's edition, Porto.

The first three references are mandatory, while the rest are suggested additional references.


The sections from the mandatory bibliography which the students should study will be assigned by the beginning of the course. The specific topics to be studied will be chosen taking into account each student's knowledge and research interests.

Students should meet one of the teachers every week, for a tutorial session; at the end of each of those sessions, the teacher will assign some reading material for independent study, as well as some homework, which should be submitted by the following week. During the last weeks of the semester each student will choose a project on a specific physics topic and the homework will be replaced by the work on that project with the final report due by the end of the semester.

The final grade will be obtained giving a weight of 30% to the homework assignments, 20% to the mid-term quiz and 50% to the final project.