Phys2274 Computational Physics
217 Allen Hall
4-9057 email@example.com http://fafnir.phyast.pitt.edu/CompPhys/
class meets Tuesday and Thursday, 2:30-3:45, 105 Allen Hall.
Office Hours: Tuesday and Thursday, 3:45 - 5:00.
this site in Belorussian
Modern computational methods have opened up a new realm in physics, allowing the study of complex nonlinear
phenomena for the first time. We will explore a number of classic examples in this course, including the
logistic map, nonlinear oscillators, chaotic planetary motion, molecular dynamics, and the Ising model. Additional topics are coding basics, integration, partial differential equations, quantum scattering and bound states, quantum magnetism, and the Monte Carlo method as applied to classical and quantum systems.
The primary focus of the course will be on physics, thus you will be expected to learn a computer language
(if you do not know one already). No prior computer expertise is required, but the learning curve will be steep!
The goal is to turn you into a computer-literate graduate student, with sufficient background to know what can
be done with computers and where to go for resources. An important aspect of this will be the ability to
produce and present professional quality research material.
By the end of PY2274 the student will be able to:
- assess the feasibilty of computational solutions to complex physics problems
- design an efficient approach to solving complex physics problems
- locate resources that permit the solution of complex physics problems
- produce publication quality graphs
- produce publication quality written reports
- R.H. Landau, M.J. Paez, and C.C. Bordeianu, Computational Physics [$117 at amazon]
I will also be referring to the following
These books are kinda expensive. Since the course will be largely self-contained, I recommend that you buy Numerical Recipes, which is the standard reference book and will likely be all you ever need. Sethna is a terrific introductory book, with many numerical examples. Giordano is a standard undergraduate level text. Gibbs is graduate level, but very brief.
- N.J. Giordano and H. Nakanishi, Computational Physics [$94 at amazon]
- C.M. Bender and S.A. Orszag, Advanced Mathematical Methods for Scientists and Engineers
- W.R. Gibbs, Computation in Modern Physics [$84 at amazon]
- W.H. Press, B.P. Flannery, S.A. Teukolsky, and W.T. Vettering Numerical Recipes [$55 at amazon]
- J.P. Sethna, Entropy, Order Parameters, and Complexity [$54 at amazon. Or see the free online version]
- comp phys books
- comp phys online at Cornell
0.7 assignments + 0.3 final project
- coding basics:: Arrays, matrices, loops, IO, graphing, programming style, programming tips, testing your code, understanding your problem, debugging your code.
- numbers:: binary representation of numbers, floating point precision, largest and smallest numbers, errors and stability.
- integration, differentiation, extrapolation:: discretization schemes, evaluating polynomials, continued fractions,
Borel summation, Pade approximants,
extrapolation methods, interpolation methods, integration, singular integrands, adaptive quadrature, simple Monte Carlo,
Fourier transforms and FFT.
- odes:: differencing, Euler, Euler-Cromer, Runge-Kutta, the damped, driven oscillator, chaos, the logistic map, make your own plants!
- pdes:: relaxation methods, multigrid methods, error analysis and stability, forward/backward differencing, implicit/explicit algorithms, the advection-diffusion problem.
- molecular dynamics:: gases, the equipartition theorem, melting, the Fermi-Pasta-Ulam problem.
- linear algebra::
- matrix inversion, solving integral equations
- diagonalization, tridiagonal systems, tridiagonalising, the Lanczos algorithm, stability and round-off
- quantum mechanics, 1d Schroedinger equation, basis functions, nonorthogonal bases, quantum bound states, scattering (momentum space, T-matrix), functional scattering method.
- more integral equations
- minimisation, integral equation (iii), fitting functions and data, minuit.
- Monte Carlo method:: theory, random numbers, Markov chains, ergodicity, Metropolis, heat bath, annealing,
applications to percolation, the Ising model, Z(2) lattice gauge theory.
- survey of contemporary computational physics:: (we emphasize algorithms and computational issues) lattice gauge theory, climate modelling, numerical general relativity, supernovas, protein folding, quantum spin systems, nuclear physics.
- [pdf] 1. Getting Started. due Sept.7 data file for question 2. [txt]
- [pdf] 2. Precision, Stability, and Integrals. due Sept. 16.
- [pdf] 3. Numerics and a Bit More Central Limit Theorem. due Sept. 23.
- [pdf] 4. Simple Dynamical Systems and Chaos. due Oct 5.
- [pdf] 5. Continuum Dynamics. due Oct 14.
- [pdf] 6. Molecular Dynamics. due Oct 26.
- [pdf] 7. Simple Quantum Systems. due Nov 4.
- [pdf] 8. anisotropic Heisenberg Antiferromagnet. due Nov 16.
- [pdf] 9. 2d Ising Model. due Nov 29.
- [pdf] 10. Percolation. due Dec 7.
- [pdf] 11. Z(2) Lattice Gauge Theory. due Dec 16.
Images from the Course
|Logistic Map Bifurcation Plot||
|Damped, Driven Oscillator Phase Map|
|Exponential Function with the|
Quotient-Difference Algorithm and
|Argon gas Molecular Dynamics, low temp||
|Argon gas Molecular Dynamics, high temp|
|Magnus Force and Golf Balls||
|1+1 D Advection-Diffusion||
|Argon Molecular Dynamics|
pair correlation function.
|Argon Molecular Dynamics,|
|Logistic Map Invariant Density (mu=3.8)||
|1-d anisotropic Heisenberg Antiferromagnet|
spin chain, L=24, g=-1
|Accuracy in S-wave SHO eigenvalues||
|Magnetisation in the Ising Model||
|Spin-Spin Correlation Function|
in the Ising Model
|Ising Spins at kT = 2.5||
|Z2 Gauged Spin Model|
|1d aHAF extrapolation|
This a a course in computational physics, so you will be doing a lot of coding. You will also be doing
analytical work to back up your coding! I will spend almost no time teaching programming -- you are
expected to pick this up yourself (if you have not already). Ideally, you will have ready access to
a computer with a decent operating system and support software. I recommend the following:
All algorithms will be taught in pseudo-code. I will support fortran coding (in other words if you have
a bug or a question, I will help you). Other acceptable languages are C, C++, and python.
- linux or mac osx operating system. You can do all of this within windows, although I don't know why you would.
- a good text editor such as emacs or vi
- a fortran, c, or c++ compiler or a python development environment. Use java at your own risk.
- a plotting package such as gnuplot, grace, or mathplotlib (for python). Crappy plots like produced in
spreadsheet programs are not acceptable
All of the recommended software is free and runs on any windows, mac, or linux system. You can find everything on the web with a judicious google search; I have collected much of the information here [if you find mistakes or additional information, please let me know!]
- If you have a windows laptop,
I suggest you make it dual boot. Alternatively, you can install cygwin on your machine. Its not perfect, but its
free and works.
most linux systems have built-in fortran support. This is often as f2c -- a fortran to C converter program,
f77 -- a wrapper program that generates executables using f2c, gfortran an implementation of
the fortran90 convention, gfort -- .... You can obtain many of these from fink (for the mac).
- gfortran for the mac
Python is already installed on macs, but is not quite what we want, as apple has walled it off for their own use. I
recommend installing the Enthought distribution, that includes all the modules you will likely need.
- Enthought Python Distribution
[Earn 10 points by telling me how to install python on the iPhone!]
- If you have an older version of gnuplot, you should update. The new versions have fitting functionality and
allow rotating 3d graphs; useful and very slick!
gnuplot linux binary (?) [html]
- There are many all-in-one tex packages out there.
- teTex is a nice package
programming style guide
If you have a disability for which you are or may be requesting an accommodation, you are encouraged to contact both your instructor and Disability Resources and Services, 216 William Pitt Union, (412) 648-7890/(412) 383-7355 (TTY), as early as possible in the term. DRS will verify your disability and determine reasonable accommodations for this course.
A comprehensive description of the services of that office can be obtained at www.drs.pitt.edu.