Scientific Computing for Physical Systems (Physics 2300)
Department of Physics,
Weber State University
Students: Please see the links below for copies of useful course materials.
Instructors: Please let me know if you are interested in using any of these materials
in your own courses. I'll try to keep you informed of updates. At the August 2005 AAPT meeting
I presented a poster advertising the lab manual to other instructors; here is
a gif image of the poster for screen viewing and a
pdf version for printing.
Here is a table summarizing what the lab manual
covers. Here is the TeX source (and figures) for
the lab manual, in case you would like to modify it. Comments
and suggestions are always welcome.
This course will be taught in a lab format, divided into nine projects for students
to complete. The tentative list of projects is as follows:
- Hello, World! How to compile and run a Java program. Introduction to program
structure, classes, objects, and methods.
- Range of a Projectile. Storing and manipulating numerical data using variables,
expressions, conditional statements, loops, text output, and plotting graphs.
- Adding Sine Waves. More practice with variables, expressions, loops, and
graphics. Introduction to integer variables and function definitions. Fourier series.
- Simulating Projectile Motion. Algorithms for simulating Newton's second law.
Projectile motion with and without air resistance, in one and two dimensions. Introduction
to graphical user interfaces.
- Pendulum. Simulation of pendulum motion at small and large angles, including
the effects of friction and driving forces. Chaos. Threads, graphics primitives, and
- Orbits. More algorithms for simulating Newton's second law. Circular and noncircular
orbits, Kepler's laws, and the three-body problem.
- Molecular Dynamics. Intermolecular forces. Arrays. Simulating many-particle
systems. Optimizing performance. Phase transformations and other emergent behavior.
- Random Processes. Computer-generated pseudo-random numbers. Simulation of
an expanding gas, random walks, and nuclear decay.
- [The Ising Model. Two-dimensional arrays. The Metropolis algorithm. Phase behavior
of a magnetic system.] (This project is in the lab manual but will not be assigned
in the course this year.)
- Independent Project. Each student will design and carry out an independent
physics programming project, and report on it both orally and in writing.
- Course policies
- Lab manual (.pdf, 1 MB)
- TeX source of the manual (.zip, 2.2 MB) (slightly out of date)
- Quick reference sheet (html);
first page only; second page only;
- Table summarizing what's covered in each project
- Source code of plotting class, Plot.java
- Source code of labeled scrollbar class, DoubleScroller.java
- AnimationDemo.java, a complete program to demonstrate graphics,
threads, and animation
- SimplePaint.java, a complete program to demonstrate mouse interaction,
selected GUI controls, and double-buffering
- New: Advanced course project instruction handouts:
Last modified on 5 March 2012.