Using Computers to Build Insight

Extracts from the proposal

Laboratory for Computational Physics: Using Computers to Build Insight

submitted to the NSF Instrumentation and Laboratory Improvement program

We propose to offer a new course entitled "Introduction to Computational Physics." This course takes advantage of the many cases in which the physical question and its algorithmic solution are intimately linked, so the physics and the algorithm illuminate each other. Because it exploits this link to the fullest, the course has only one prerequisite physics course, and thus will be taken by students as early as their freshman year. The course will 1) excite and attract students at an early stage in their college careers, 2) allow appropriate use of computation throughout the physics curriculum, and 3) develop the students' physical insight.

A. Current Situation

Oberlin College offers the standard sort of graduate school preparation curriculum that can be found at any top-notch college or university. We do not want to disparage this curriculum: it has become standard precisely because it has proven itself so successful. However the standard does have widely acknowledged flaws, such as:

This proposal is an attempt in the direction of rectifying the faults while retaining the manifold and obvious benefits of the standard curriculum.

B. Course Philosophy

The typical computational physics course is offered to juniors or seniors as a "value added" course: The students are already familiar with the physical problems and with analytic methods of solving them, and they are taught a new set of methods, the algorithmic methods, to glue onto those already known. Because this course comes so late in the curriculum, it gives the impression that numerical methods are second-rate and are to be used only when analytic methods fail. This approach ignores the fact that, in many cases, the algorithmic solution to a problem is directly related to the fundamental concept of the problem, and thus a knowledge of the algorithmic solution actually helps the student understand the fundamental concept. As an example, consider the initial value problem dx/dt = x, x(0) = 1. The analytic (symbol manipulating) method of solving this problem relies on facts such as \integral dx/x = ln(x), which are conceptually very far removed from the fundamental idea that the derivative is a slope. In contrast the algorithmic method (say Runge-Kutta) is a direct embodiment of that fundamental idea. By understanding the Runge-Kutta method and coding it into a program, the student not only builds a practical tool for solving differential equations, but also builds up his own understanding of the idea of a derivative. This is a situation where teaching the algorithm at an early stage will aid the student's conceptual development and will build his physical insight. [Note: No one will deny the many advantages of analytic over numerical solutions (it is, for example, impossible to choose the wrong step size in an analytic solution), nor will anyone deny that sometimes the algorithmic technique is not conceptually enlightening (e.g. the QR algorithm for the eigenvalue problem). The approach advocated here will not cure all ills. Nothing will. Instead, we expect the two sorts of instruction to complement and reinforce one another.]

Our proposed computational physics course takes advantage of such mutually advantageous situations to teach algorithms as aids for understanding physics rather than as (somewhat distasteful) mechanisms for getting answers. In order to develop the connection between formal approaches and informal, physical (and largely pictorial) approaches, the course will use computer graphics in an essential way. The course will have only one prerequisite, namely the introductory "Mechanics and Relativity" course (which in turn has a prerequisite of one semester of calculus). Thus students will be ready for the course as early as the second semester of the freshman year (if they arrive at college with calculus advanced placement, as many do). In this position, we will use the course to inject excitement, research problems, and physical insight early on in a physics student's career. Also in this position, it will to useful to students in allied sciences such as chemistry, computer science, and geology. We will select examples to make the course attractive to such students.

C. Course Outline

The course consists of four equal sections: 1) groundwork, 2) ordinary differential equations and chaos, 3) spectral analysis, and 4) harmonic functions. The groundwork section presents instruction in the FORTRAN language through straightforward applications to zero-finding in polynomials. FORTRAN was selected over Pascal or C because i) it has a relatively straightforward syntax, ii) it posseses the necessary language features to support numerical work, and iii) it is the de facto standard for scientific work. We will be able to condense the actual language instruction into three weeks because many features, such as character variables, pointers, and recursion, will not be taught.

The ordinary differential equation section will build directly upon the student's background in the "Mechanics and Relativity" course. The numerical technique taught will be Runge-Kutta and examples will be drawn from the field of chaos. This field will contribute excitement, of course, but is also valuable in building a student's physical insight. Chaos relies heavily on visualization techniques, such as the Poincare section, whose entire purpose is to generate a good qualitative picture of the motion. These techniques are also valuable for building qualitative understanding in situations where analytic solutions are available. They are not commonly used as such simply because the analytic solution is used as a crutch to avoid a deep qualitative understanding of the situation.

Every professional physicist has a qualitative understanding of spectral analysis. Students usually do not, because Fourier techniques are introduced accompanied by such a cacophony of difficult integrals and convergence theorems that the student misses the fundamental qualitative point. These topics are essential for a second encounter with the subject, but for our introduction we will stress examples and qualitative pictures. This section will give the course a much-needed experimental component.

The last section would normally be called "solutions of Laplace's equation," but our students will not even know what a partial derivative is! We will instead speak of harmonic functions, defined at those which satisfy the mean value relation. It is no more mysterious to say that the temperature of a plate must be a harmonic function than it is to say that the temperature obeys Laplace's equation. The mean value relation leads directly to relaxation techniques and then to random walk techniques. Multigrid methods (which apply relaxation to grids of varying size) will be introduced both to speed the computations and to reinforce the qualitative understanding of wavelength components developed in the spectral analysis section.