Physics 304b  2008

Computational Physics II

Instructor: Peter Love

KINSC Link 105

795-6505 (office)                                    


Textbook and supplies
Computational Physics,  N. J. Giordano and H. Nakanishi, Pearson, Prentice Hall

We will be using the Python programming language, combined with the numpy package for numerical calculations, the scipy package for scientific python and the matplotlib (pylab) package for plotting. Homework with dependencies on other packages will not be graded.

Online documentation for these packages is available from:

Python Tutorial:

Python Documentation page:

Numpy/Scipy documentation page:

Numpy reference guide:

Scipy reference guide:

Plotting with Matplotlib tutorial:
Matplotlib documentation is available from their website

Course Requirements:

Two 90 minute class meetings per week.  Class periods will comprise a short lecture some exercises. Completing reading assignments prior to class is MANDATORY. 

Location and times:

Lecture:  TTh 2.30 – 4.00 in KINSC H110 (CS lab).  Please be on time.

Office hours: See course website

Course Description:


Physical theories such as Newtonian mechanics, Maxwell's equations and quantum mechanics give us simple descriptions of physical phenomena. Much of the undergraduate syllabus treats powerful analytical tools for the solution of the equations derived from the relevant physical law. Such solutions enable physicists to move from a general formalism to the description of specific situations and phenomena, and enable comparison with experiment. Frequently, however, the calculation of the behavior of specific physical systems is out of the reach of pencil and paper calculation. Computational physics enables us to treat such situations by a combination of brute force calculation and sophisticated algorithmic techniques.\\

The first seven weeks of the course will be devoted to lectures and exercises covering several aspects of computational physics. The course will begin by considering effects in Newtonian mechanics which are usually neglected, including air resistance in projectile motion and nonlinear and chaotic behavior of mechanical systems. We will learn how to use numerical simulation to study such effects. We will then turn to the numerical treatment of fields in physics, and consider the numerical solution of Poisson's equation. This enables the solution of problems in electromagnetism which possess insufficient symmetry for analytical treatment. The last portion of the lecture section of the course will move from deterministic algorithms to stochastic algorithms, and we shall consider the numerical treatment of systems in statistical mechanics using Monte Carlo techniques.

The remaining seven weeks of the course will be devoted to a student project. Students may choose from a selection of pre-prepared projects or propose their own. The project will include:

Students may propose their own projects or choose a project outline provided by the instructor. The schedule for proposals and completion is

Project proposals due: 03/03/2008
Projects Begin: 03/17/2008
Projects Due: 05/01/2008


Each week you will receive a worksheet containing exercise and examples to work through, many of which will be taken from your textbook. You will begin this work in class as we work through examples together, and complete the work for your homework assignment.  Written assignments should be handed in in class, however, each week you will write several computer programs, these should be collected into a folder named (YourName)Week(N) and placed in my public read-write directory on the storage server.


Grading procedures:

Course grade -- will be computed using the following weighting:

Written exercises                     50% 

Project                                    50% 


Honor Code Issues:

The important guiding principle of academic honesty is that you must never represent the work of another as your own. The following guidelines should govern your behavior in the course; please request clarification if you find yourself in any doubtful situations.

You may seek assistance for the Instructor or work together with other students (except on individual problems) in doing the weekly assigned exercises and in preparing for class discussions.  If working with other students in the course avoid situations in which you are either contributing too much or too little to the collaborative effort.  (Neither results in optimal learning, but are not violations of the honor code.)  While working together is permitted and even expected and therefore does not need to be acknowledged, merely copying the work of another student without indicating that you have done so is clearly a representation of his or her work as your own and so is a violation of the code.  

The exams must be entirely your own work.  You must also follow all procedures and respect time limits without deviation.



Students who think they may need accommodations in this course because of the impact of a disability are encouraged to meet with me privately early in the semester. Students should also contact Rick Webb, Coordinator, Office of Disabilities Services (, 610-896-1290) to verify their eligibility for reasonable accommodations as soon as possible. Early contact will help to avoid unnecessary inconvenience and delays.