PHY307F/407F - Computational Physics I

Click here to go to the UPSCALE home page.
Click here to go to the PHY307F/407F HyperNews page.

"__________________________________

Introduction

Graphic logo for the coursePHY307F and PHY407F are a single course in computational physics, which carries these two different numbers so that students in their third or fourth year can take it. It surveys areas of physics in which computational technology is important, and explores the use of that technology in doing physics. It is not a course in numerical methods. We use the Mathematica programming environment; previous experience with Mathematica is not assumed.

This is the "home page" for the course. It was written by David Harrison, Sept 1996. This is version 3.25, date (m/d/y) 12/08/98. This year is maintained by Salam Tawfiq.

"__________________________________

Table of Contents

You may jump directly to any of the above items by clicking on it.

"__________________________________

People

Lecturer:
Salam Tawfiq
Office: MP1102
Phone: 978-5215
Email: tawfiq@medb.physics.utoronto.ca
Office Hours:
TBA
Tutor:
Rob Moucha
Office: MP504
Phone: 978-2466
Email: moucha@helios.physics.utoronto.ca
Office Hours: TBA

Click here to go to the top of this page.

"__________________________________

Curriculum

In this course we give an overview of some areas of computation of particular importance to physics. The approach is broad rather than deep. In all cases, the computation is closely tied to real physics problems. The terminology of the course closely follows that of our undergraduate laboratories. Also in common with those labs, there is an emphasis on error analysis throughout.

A recurring theme is that although in principle the computers don't do anything that we can't do by hand, in practice the technology is sufficiently fast the it feels to us that we are doing something qualitatively different from what would be possible without the computers. This in turns leads to differences in the kind of questions that we ask about a physical system, and the sorts of approaches that we take in determining the answers to our questions.

In common with many of our laboratories, we begin with an Exercise (the famous Hoop experiment in the I Year Lab is essentially an exercise). The purpose of the exercise in PHY307F/407F is to introduce you to the environment of the course in a setting with little conceptual difficulty. The exercise will consist of an investigation of techniques to solve linear equations. The techniques for solving linear equations you learn here, however, will be used throughout the term.

The Exercise is followed by five experiments:

  1. Fitting - Polynomial fits to Pearson's K-Ar data with York's weights; non-linear fitting to nuclear spectra; spline fitting to mass spectrometer data from the III & IV Year Lab.
    This is a too brief survey of techniques for modelling real-world experimental data. A major emphasis is on the correct handling of data which has associated experimental errors, a case which is often ignored outside of physics departments. Measuring the quality of the fit and choosing between different models for a given set of data are also studied, as are smoothing techniques when the theory does not provide us with an analytical model at all.
  2. Physical Pendulum - solving the differential equations of the physical pendulum in a Hamiltonian formulation; Runge-Kutta and symplectic algorithms.
    The simple pendulum, where we limit the maximum amplitude theta, so that sin(theta) is approximately equal to theta, has a solution which is, of course, simple harmonic motion. Solving the pendulum without the assumption, however, to determine the angle as a function of time is not amenable to analytic approaches. In this experiment we will investigate techniques to numerically integrate the equations of motion to produce `time series' of the position and momentum. The answers will all be slightly incorrect, and a crucial aspect of the experiment will be to determine the errors associated with the different algorithms used to integrate the equations.
  3. Heat Equation - solving the one dimensional heat equation; explicit and implicit methods and the Crank-Nicholson algorithm.
    The pendulum of the previous experiment involved solving ordinary differential equations. Here we investigate techniques for partial differential equations, concentrating on the heat equation. Schrodinger's equation is also a parabolic equation similar in some ways to the heat equation. The techniques studied here are also used for the wave equation and Poisson's equation. For many real-world sets of initial conditions and/or boundary conditions, analytic solutions are difficult or impossible to achieve for these equations. We will discover that computational methods of solution must pay attention to the stability of the algorithm: many reasonable-looking algorithms just don't work.
  4. Simulation and Statistics - Monte Carlo modelling of high energy physics data.
    Data taken from the Stanford Linear Accelerator Center is used to study the decay of the K*(1780) meson from about 100,000 possible events. The theory provides only the probability of a given type of event occurring. Thus we will be using a Monte Carlo process to `generate' simulated events that have the characteristics predicted by our theoretical model, and will compare the distributions of these generated events to the experimental data.
  5. Visualisation - studying ozone data taken from the Total Ozone Measurement Spectrometer (TOMS) aboard the Nimbus 7 spacecraft.
    A day's ozone data taken by TOMS consists of a grid of 180 by 288 data points. Here we will explore techniques to discover patterns in the data by looking at it on a computer screen. Crucial will be the use of color to display values for the data. The data itself has missing sections and discontinuities, and we will investigate techniques of dealing with these.

Click here to go to the top of this page.

"__________________________________

Days, Dates and Times

There is a one hour lecture on Monday,12.00 noon, MP713.

There is a laboratory Wednesdays from (1-4) PM. It meets in the Nortel Applied Physics Laboratory, MP239.

Here is the "calendar" for the course:

Week Week of:             Lab                          Comment 


1 Sept 13 Mathematica Introduction Will not be collected
2 22 Exercise 3 29 Exercise cont.
4 Oct 6 Expt 1 - Fitting Exercise due Monday, 1.00 PM 5 13 Fitting cont.
6 20 Expt 2 - Pendulum Expt 1 due Monday, 1.00 PM 7 27 Pendulum cont.
8 Nov 3 Expt 3 - Heat Equation Expt 2 due Monday, 1.00 PM 9 10 Heat Equation cont.
10 17 Expt 4 - Simulation Expt 3 due Monday, 1.00 PM 11 24 Simulation cont.
12 Dec 1 Expt 5 - Visualisation Expt 4 due Monday, 1.00 PM 13 8 Visualisation cont.
NA Dec 13 Final Examinations Expt 5 due Monday, 1.00 PM

Click here to go to the top of this page.

"__________________________________

Marking Scheme

The Exercise will be marked Pass/Incomplete, and must be passed before work on the experiments may begin. Each experiment will be marked out of 16 points, so the five experiments will account for 80% of your mark in the course. The remaining 20% will be for the final examination.

Although alternatives are available, past experience has shown that the most comfortable and efficient environment for you to do your work is the Mathematica notebook. This can be invoked either from the main menu within the UPSCALE menu-system or from a shell prompt by typing mathematica. UPSCALE has a growing number of pre- prepared notebooks available. One advantage of invoking from within the menu system is that you will be prompted for the Notebook you wish to load, without having to know file or directory names.

The Exercise and Experiments are written as Notebooks, and you will be able to access them both on-line and as hardcopy. They serve the same function as the "Guide Sheets" of our more traditional laboratories, and typically contain introductory text, references, sample Mathematica commands, and code listings.

Once you have loaded the notebook for the Exercise or one of the Experiments, you can save it in your own areas. Thus you can:

  1. Substitute for our text and explanation with your own description of what you did, what happened, and what you think it means. Thus, the notebook will serve the same function as a lab book in our traditional labs.
  2. Include sample Mathematica commands and their output. When you are asked to write a Mathematica procedure, the code should be included in the notebook. Typically, the text that you write explaining what you are doing, what happens and why, "flows" around the Mathematica input and output cells. When the exercise or experiment is complete, we will copy your notebook into our own areas for evaluation.

The evaluation of your work will be in part based on your descriptions of your work and in part on the code that you write. As a rough guideline, the table shows how the marks for each part of an experiment will be assessed.

    What                  Description                    Percent


Content Is the experiment completely done and 35% understood? Are the conclusions correct and meaningful? Are all questions answered? Are there suggestions for further exploration?
Clarity Are the materials easy to read and 7% understand?
Completeness Do the written materials tell me 8% everything that you did?
Correctness Do your programs work in all cases, 30% including boundary cases? Do they handle bad data gracefully? Are they efficient?
Style Good variable names? Clear and obvious 20% use of variables? Clear and logical structure? Indentation reflects the logical structure of the program? Can be easily understood and modified? Well commented?

Click here to go to the top of this page.

"__________________________________

Final Exam

A two hours final examination will take place at the end of the course. Typically, there will be one or two pronblems which cover mainely the theoretical (mathematical) aspect of the experiments you have done during the course. You will be asked to write a short programe for solving a simple problem, similar to what you have done in the bonus questions.

Click here to go to the top of this page.

"__________________________________

Supplementary Notes

In addition to the Mathematica notebooks, which will be passed out in hardcopy in class, supplementary notes distributed in electronic form are being prepared. These notes are a mixture of lecture notes plus additional information. This section provides access to those notes.

The notes are available in two formats: Postscript (PS)and Portable Document Format (PDF). PostScript is the page description language used by all UPSCALE printers, and is readable by a large number of public domain programs such as ghostview. PDF is an efficient extension of PostScript readable by the Acrobat program which is available free from Adobe (http://www.adobe.com); all the computers in the Nortel laboratory have Acrobat already installed.

What Links
Introductory Notes (16 pages) PostScript (94k) or PDF (49k)
Linear Equations (10 pages) PostScript (75k) or PDF (34k)
Fitting Techniques (12 pages) PostScript (84k) or PDF (41k)
The Pendulum (20 pages) PostScript (113k) or PDF (54k)
The Heat Equation (11 pages) PostScript (147k) or PDF (45k)
Monte Carlo Simulation (12 pages) PostScript (126k) or PDF (47k)
Visualisation (19 pages) PostScript (88k) or PDF (44k)

Click here to go to the top of this page.

"__________________________________

Click here to go to the top of this page.

"__________________________________

Standard Disclaimer

Best viewed with a computer

Warning: do not eat. Past Performance is no indication of future results. Individual earnings may vary. You must be at least this high to ride this website. In the event of continued rash or skin irritation, discontinue use immediately and consult your physician. Please..do not taunt or feed the website. Forest Fire danger rating: Low. Keep your hands and feet inside your browser at all times. Friends don't let friends get WinCEd. All Files located here are for amusement purposes only...gambling is prohibited.

From www.macduff.net, slightly modified by David Harrison