← Back

Teaching · Phys 3274

Computational Physics

Modern computational methods open up a realm of physics that pencil and paper cannot reach: complex, nonlinear phenomena, from chaos to phase transitions.

E. S. Swanson · University of Pittsburgh

1About the course

The course explores classic examples of what computation makes possible: the logistic map, nonlinear oscillators, chaotic planetary motion, molecular dynamics and the Ising model. Along the way it covers the working tools: coding, numerical integration, differential equations, quantum scattering and bound states, quantum magnetism, and the Monte Carlo method for classical and quantum systems.

The focus is on physics. No prior computing experience is required, but students are expected to learn a programming language if they do not know one already, and the learning curve is steep. The aim is a computer-literate graduate student who knows what computers can do, where to find the resources, and how to produce and present research of professional quality.

By the end of the course students are able to

2Topics

Coding basics
Arrays, matrices, loops, input and output, graphing, programming style, testing and debugging, understanding the problem.
Numbers
Binary representation, floating-point precision, the largest and smallest numbers, errors and stability.
Integration, differentiation and extrapolation
Discretisation, evaluating polynomials, continued fractions, Borel summation, Padé approximants, extrapolation and interpolation, quadrature (including singular integrands and adaptive methods), simple Monte Carlo, Fourier transforms and the FFT.
Ordinary differential equations
Differencing, Euler, Euler–Cromer and Runge–Kutta methods; the damped, driven oscillator; chaos; the logistic map; fractal plants.
Partial differential equations
Relaxation and multigrid methods, error analysis and stability, explicit and implicit schemes, the advection–diffusion problem.
Molecular dynamics
Gases, the equipartition theorem, melting, the Fermi–Pasta–Ulam problem.
Linear algebra and quantum mechanics
Matrix inversion and integral equations; diagonalisation, tridiagonal systems and the Lanczos algorithm; the one-dimensional Schrödinger equation in a basis, bound states, and scattering in momentum space (the T-matrix); minimisation and fitting.
The Monte Carlo method
Random numbers, Markov chains, ergodicity, the Metropolis and heat-bath algorithms, annealing; applications to percolation, the Ising model and Z(2) lattice gauge theory.
Computational physics today
A survey, with the emphasis on algorithms: lattice gauge theory, climate modelling, numerical relativity, supernovae, protein folding, quantum spin systems, nuclear physics.

3Images from the course

Results from the course work. Click an image to see it full size.

Chaos and dynamical systems

Affine map: A plant grown from a handful of affine maps applied at random: the "make your own plants" exercise.
Affine map. A plant grown from a handful of affine maps applied at random: the "make your own plants" exercise.
Logistic map: Bifurcation diagram: the long-time values of x against the growth rate μ, with period doubling into chaos.
Logistic map. Bifurcation diagram: the long-time values of x against the growth rate μ, with period doubling into chaos.
Logistic map: Invariant density ρ(x) in the chaotic regime, μ = 3.8.
Logistic map. Invariant density ρ(x) in the chaotic regime, μ = 3.8.
Driven, damped pendulum: Phase-space trajectory for driving strength F = 1.2.
Driven, damped pendulum. Phase-space trajectory for driving strength F = 1.2.
Golf balls: Trajectories with and without backspin: the Magnus force adds lift (Euler method).
Golf balls. Trajectories with and without backspin: the Magnus force adds lift (Euler method).

Numerics and differential equations

Approximating eˣ: Relative error of Padé approximants of the exponential built with the quotient–difference algorithm.
Approximating eˣ. Relative error of Padé approximants of the exponential built with the quotient–difference algorithm.
Advection–diffusion: A point source drifting and spreading in 1 + 1 dimensions (Crank–Nicolson), at three times.
Advection–diffusion. A point source drifting and spreading in 1 + 1 dimensions (Crank–Nicolson), at three times.
Quantum bound states: Accuracy of the S-wave harmonic-oscillator eigenvalues against the size of the basis.
Quantum bound states. Accuracy of the S-wave harmonic-oscillator eigenvalues against the size of the basis.

Molecular dynamics

Argon, low temperature: Atom paths (Verlet integration): each atom rattles about its site in a crystal.
Argon, low temperature. Atom paths (Verlet integration): each atom rattles about its site in a crystal.
Argon, high temperature: The same system hotter: the crystal has melted and the atoms wander.
Argon, high temperature. The same system hotter: the crystal has melted and the atoms wander.
Pair correlation function: g(r) for argon: peaks at the neighbour distances of the lattice, marked by arrows.
Pair correlation function. g(r) for argon: peaks at the neighbour distances of the lattice, marked by arrows.
Emergent disorder: 225 argon atoms: an ordered region beside a disordered one.
Emergent disorder. 225 argon atoms: an ordered region beside a disordered one.

Quantum magnetism

Heisenberg antiferromagnet: Lanczos iterations converging to the lowest energies of an anisotropic spin chain, L = 24.
Heisenberg antiferromagnet. Lanczos iterations converging to the lowest energies of an anisotropic spin chain, L = 24.
Infinite chain: Ground-state energy per site extrapolated to infinite chain length.
Infinite chain. Ground-state energy per site extrapolated to infinite chain length.

Monte Carlo

2-d Ising model: Magnetisation against temperature (heat bath, 100 × 100): it vanishes at the critical temperature.
2-d Ising model. Magnetisation against temperature (heat bath, 100 × 100): it vanishes at the critical temperature.
Ising correlations: Spin–spin correlation function at three temperatures near the transition.
Ising correlations. Spin–spin correlation function at three temperatures near the transition.
Ising spins: A snapshot of the spins at kT = 2.5, just above the transition: large up and down domains.
Ising spins. A snapshot of the spins at kT = 2.5, just above the transition: large up and down domains.
Z(2) lattice gauge theory: Average plaquette against coupling β, with the jump at the phase transition.
Z(2) lattice gauge theory. Average plaquette against coupling β, with the jump at the phase transition.

4Books

Text: J. F. Boudreau and E. S. Swanson, Applied Computational Physics, Oxford University Press (2018).

Also useful:

← Back to Teaching