|
|
  |
PHYS2020 Computational Physics
Information for Session 1, 2005
-
Consultation
times: During Friday laboratory classes
-
Course
notes: available via WebCT
Brief
Syllabus:
Introduction to computer software
used in Physics; the C programming language; integers/floating-point
numbers; the Mandelbrot set; generating and using
random numbers; plotting; numerical integration techniques;
many-body gravitation; cellular automata; Wolfram’s
A New Kind of Science; Conway’s Game
of Life; subtleties in apparently simple algorithms;
analysis of experimental data. Numerical techniques
for the solution of non-linear equations, for polynomial
interpolation, numerical integration, ordinary differential
equations and for waves.
Assumed Knowledge:
From the 2003 Undergraduate Handbook,
the prerequisites are: PHYS1002 or PHYS1022 or PHYS1221
or PHYS1231 or PHYS1241 and MATH1021 or MATH1231 or
MATH1241 or MATH1031. Excluded: PHYS2001.
No computer programming knowledge
in C is assumed. We will assume that you have a knowledge
of Maple and Linux, as taught in the Mathematics prerequisites.
|
Course
Goals:
The main aim of the course is to
teach you how to program a computer in order to be
able to solve a wide range of problems in Physics.
The first part of the course will
be used to teach you the elements of the C programming
language. C has been chosen since (1) it is freely
available, (2) it is commonly used, and (3) the basic
concepts used in C are common to many other programming
languages.
The remaining lectures will show
how your programming knowledge can be used to attack
a variety of interesting physics problems.
|
Learning Objectives
You will learn techniques required
to write reliable, efficient, software. This is not
easy, and you will learn that even simple problems,
such as finding the roots of a quadratic equation,
or calculating the standard deviation of a data set,
can be surprisingly subtle.
You will have a strong foundation
for picking up other programming languages and packages
during your career.
Why is computational physics
important?
Computers are one of the most powerful
tools available to the physicist. They are used
in all areas of physics: ranging from theoretical
calculations using supercomputers, analysing terabytes
of data, to controlling instrumentation. There
has even been speculation that the universe itself
is effectively a computer.
A knowledge of how to use computers
is invaluable to all scientists.
|
How
to succeed - Strategies for Learning
The only way to learn a computer
programming language is to practice programming, at
least weekly. PHYS2020 is one course where you can
not cram the day before the exam and expect to
pass. To assist with this learning process, you will
be expected to complete a series of six assignments.
Additionally a number of tutorial questions will also
be set.
It is the nature of programming
that the time required to solve a problem is difficult
to predict. You may find that you can complete
one assignment in 30 minutes, whereas the following
week you may spend three hours trying to track down
a problem that turns out to be a missing semicolon.
As you gain more experience, this unpredictability
will be reduced, and your enjoyment will be increased.
While some course notes will be
available on the web, it is vital to turn up to the
lectures. |
If
you find yourself completely lost in lectures, seek help
immediately from the lecturer or tutor. Most importantly…
Assessment
- 2 hour written examination, worth
45%
- 6 assignments, worth a total of
40%
- Mid session test, worth 15%
For rules regarding conduct of examinations,
special consideration, academic honesty, etc, see the
School website at
assessment_policy.
Resources
Textbook
No textbook is specified. The course notes are sufficient,
although you may find an introductory book on C programming
helpful. The book "The C programming Language"
by Kernigan and Ritchie remains the classic reference
for C, although you should note that it doesn't deal with
prototypes.
Additional References
-
Burden and Faires, Numerical
Analysis
-
Stephen Wolfram, A New Kind of
Science
-
Press, Teukolsky, Vetterling &
Flannery, Numerical Recipes in C, the art of scientific
computing
-
Those students having difficulties
should consult the lecturer and/or the tutor for help.
Further information on student support services may be
found on the School website at Second
Year Course Information.
Detailed Syllabus
| TOPIC |
| Introduction to the C programming
language |
| Representation of data types: integers,
floating-point, binary, hexadecimal |
| A short course on C: functions,
loops, arrays, pointers, input/output, printf/scanf,
the GNU C debugger, memory allocation, the math
library |
| The Mandelbrot set; programming
with complex numbers |
| Random numbers: generating them
and using them |
| Solution of non-linear equations |
| Polynomial interpolation |
| Numerical integration |
| Ordinary differential equations |
| Waves |
| Analysis of experimental data |
| Other possible examples: Euler and
midpoint approximations; n-body gravitation;
1D cellular automata; Stephen Wolfram's A
New Kind of Science; 2D cellular automata;
John Horton Conway's Game of Life; artificial
intelligence; Simulations of particles in a
gas |
| Subtleties in simple algorithms:
the roots of a quadratic equation; calculating
the mean and standard deviation of a data set |
Further Information
For more information
about PHYS2020 contact:
|
|
|