PHYM004 |
Computational Physics and Modelling |
2013-14 |
|
Dr C.D.H. Williams |
|
|
Delivery Weeks: |
T1:01-11 |
|
Level: |
7 (NQF) |
|
Credits: |
15 NICATS / 7.5 ECTS |
|
Enrolment: |
9 students (approx) |
|
Description
This continuously assessed module is delivered as two threads running in parallel. The first
develops students' skills in scientific computer programming. The second explores how
mathematical descriptions of physical systems can be evaluated and investigated numerically.
The lectures will use language and exampless that assume a working knowledge of C (e.g.
as provided by PHY2027 Scientific Programming in C)
and Octave (e.g. as provided by PHY1028 IT and Electronics Skills).
Students who wish to submit coursework in other languages must obtain the approval of the module
leader first to ensure that we will be able to assess it appropriately, but well-known
languages such as Java, Python, fortan, or Perl won't normally present any problems.
Module Aims
Computational physics is a subdiscipline lying between expeimental and theoretical
physics. Scientists use its techniques to investigate systems that are inaccessible to
experiment and/or intractable using the standard methods of theoretical techniques. Students
taking this module will develop both their programming skills and their knowledge of a range
of computer algorithms of relevance to the simulation and modelling of physical systems.
Other fields have adopted the methodologies discussed in this module.
Many computer games, for example, use 'physics engines' make their virtual world behave
in a realistic manner. The finance industry employs computational physicists to
model the financial markets and the global economy using analagous techniques.
Intended Learning Outcomes (ILOs)
A student who has passed this module should be able to:
-
Module Specific Skills and Knowledge:
- construct and evaluate mathematical and numerical models of common physical systems and processes;
- write and document well-structured scientific computer code of good quality;
- write scientific code that can import and export data in a range of formats, e.g.
suitable for visualisation by third-party applications;
- use mathematics to obtain a computational advantage in the evaluation of solutions;
- critically evaluate the success or otherwise of numerical approaches to solving problems;
- use profiling tools to identify performance bottle-necks;
-
Discipline Specific Skills and Knowledge:
- use computational methods to model physical systems;
- identify problems that are amenable to computer solution and investigation;
-
Personal and Key Transferable / Employment Skills and Knowledge:
- undertake co-operative learning by discussing the contents of the module amongst themselves;
- write clear and concise descriptions of complicated processes;
- balance workload and work independently in order to meet deadlines.
Syllabus Plan
Thread 1: Programming for Physicists
-
The Programmer's Toolkit
- Languages: Imperative, functional, constraint; high and low level
- Divide and conquer: using pipes and scripting as glue
- Useful software libraries for science
-
Simple Data Types
- Characters
- Integers: unsigned and signed
- Floating Point Numbers
- Pointers: names and values
-
Functions, Procedures and Objects
- Variables and scope
-
Memory
- The stack; the heap; allocators; reference counting; garbage collection
- Hierarchy: registers, processor cache, random access memory (RAM), disk
-
Data structures
- Arrays, character strings, linked lists, queues, stacks, trees, hash tables
-
Input and output
- Command Line Interface (CLI) vs Graphical User Interface (GUI)
- Exchange formats for data: plain text, binary, FITS, XML
- Graphics and visualisation: Gnuplot, POV-Ray, etc.
-
Algorithms
- Classification, Big-O notation
- Discrete Fourier transform (DFT), fast Fourier transform (FFT)
- Quicksort vs Mergesort
- Fused multiply add (FMA), Kahan summation
-
High performance code
- Code profiling and manual optimisation
- Optimisations performed by compilers
- Code examples that run (a) quickly, (b) slowly
-
Parallel Programming
-
Program Design and Maintenance
- Anticipated usage and user community
- Version control, documentation, release strategy, ethics, licences
- Code quality: assert statements, compiler warnings, static analysis, crash reports,
bug tracking, test driven development, code reviews
- Single processor vs multi-processor
Thread 2: Numerical Methods with Physical Applications
-
Numerical Errors
- Error Propagation: rounding errors; forwards error analysis; backwards error analysis;
- The IEEE-754 standard: precision, exceptions, rounding
-
Interpolation, Differentiation and Integration
Lagrange polylominals, Runge's phenomenon; Gaussian quadrature, Newton-Cotes forumulae,
Richardson extrapolation; Romberg's method
-
Solution of Nonlinear Equations
Bisection methods, Secant Method, Newton's method, Brent's method, coincident roots and deflation
-
Matrix Algebra
Simple matrix problems; sparse matrices; systems of equations and matrix inversion;
error propation; direct vs indirect methods; matrix eigenvalue problems
-
Ordinary Differential Equations
- Reduction of order-N equation to a set of N order-1 coupled ODEs
- Methods: forward Euler, backwards Euler, trapezoidal, higher-order methods
- Consistency, zero-stability, convergence, A-stability
- Step-size control, stiff equations
- Classical 1-, 2-, 3-, and N-body problems
-
Boundary Value Problems
- Types of boundary condition: Dirichlet, Neumann, mixed
- Methods: shooting, multiple shooting, finite difference, finite element
- Poisson's equation
-
Partial Differential Equations
- The diffusion equation
- The wave equation
- Particle in cell methods
-
Monte Carlo Methods and Simulation
- Random number generation
- Speed and quality of pseudo random number generators
- Uniform distribution
- Arbitrary distributions: inversion method, acceptance-rejection method
- Gaussian distributions: Box-Muller method
- Sub-random sequences
- Error estimates
- Variance reduction
- Percolation
- Magnetic systems
-
Function Minimisation and Maximisation
- Levenberg-Marquardt method
- Nelder-Mead (Simplex) method
- Constraints
- Genetic algorithms
- Simulated annealing
- Curve fitting
-
Case Study - Spice 3f5
Advanced Topics (If Time Permits)
-
The Quantum One-Body Problem
-
The Quantum N-Body Problem
- Quantum Chemistry Methods
- Exact Methods
-
Molecular Dynamics
-
Electronic Structure
- Variational methods
- Hartree-Fock theory
- Density functional theory
-
Polymers and Neurons
-
Quantum Monte Carlo Methods
- Systems of Fermions
- Bose-Einstein Condensation
- Diffusion Monte Carlo
- Quantum Field Theory
Learning and Teaching
Learning Activities and Teaching Methods
Description |
Study time |
KIS type |
20×1-hour lectures |
22 hours
|
SLT |
5×6-hour self-study packages |
30 hours
|
GIS |
4×4-hour problem sets |
16 hours
|
GIS |
Project 1 |
14 hours
|
GIS |
Project 2 |
28 hours
|
GIS |
Reading, private study and revision |
40 hours
|
GIS |
Assessment
Weight |
Form |
Size |
When |
ILOS assessed |
Feedback |
0% |
Guided self-study |
5×6-hour packages |
Fortnightly |
1-11 |
Discussion in class |
40% |
4 × Problems sets |
6 hours per set |
Deadlines Weeks T1:03, T1:05, T1:10, T1:12 (all Monday) |
1-11 |
Written and solutions discussed in problems classes. |
20% |
Project 1 |
12 hours work |
Deadline week T1:08, (Monday) |
1-11 |
Written and verbal |
40% |
Project 2 |
24 hours work |
Deadline week T2:01 (Monday) |
1-11 |
Written and verbal |
Resources
The following list is offered as an indication of the type & level of information that
students are expected to consult. Further guidance will be provided by the Module Instructor(s).
Core text:
Supplementary texts:
-
Atkinson K.E. (1989), An Introduction to Numerical Analysis (2nd edition), John Wiley, ISBN 978-0471500230 (UL: 519.4 ATK)
-
DeVries P.L. and Hasbun J.E. (2010), A First Course in Computational Physics, Jones and Bartlett (UL: On Order)
-
Giordano N.J. and Nakanishi H. (2006), Computational Physics (2nd edition), Pearson, ISBN 978-0131469907 (UL: On Order)
-
Kernighan B.W. and Richie D.M. (1988), The C Programming Language (2nd edition), Prentice Hall, ISBN 0-13-110362-8 (UL: 001.6424/C KER)
-
Press W.H., Teukolsky S.A., Wetterling W.T. and Flannery B.P. (2007), Numerical Recipes (3rd edition), Cambridge University Press, ISBN 978-0-521-88068-8 (UL: 518.0285 PRE/X)
-
Thijssen J. (2007), Computational Physics (2nd edition), Cambridge, ISBN 978-0-521-83346-2 (UL: On Order)
ELE:
Further Information
Prior Knowledge Requirements
Pre-requisite Modules |
Stage 1 'IT Skills', Mathematics with Physical Applications (PHY2025) and Scientific Programming in C (PHY2027) |
Co-requisite Modules |
N/A |
Re-assessment
Re-assessment is not available except when required by referral or deferral.
Original form of assessment |
Form of re-assessment |
ILOs re-assessed |
Time scale for re-assessment |
Whole module |
Project 3 (100%) |
1-11 |
August/September assessment period |
Notes: See Physics Assessment Conventions.
KIS Data Summary
Learning activities and teaching methods |
SLT - scheduled learning & teaching activities |
22 hrs |
GIS - guided independent study |
128 hrs |
PLS - placement/study abroad |
0 hrs |
Total |
150 hrs |
|
|
Summative assessment |
Coursework |
100% |
Written exams |
0% |
Practical exams |
0% |
Total |
100% |
|
Miscellaneous
IoP Accreditation Checklist |
- N/A this is an optional module
|
Availability |
MPhys and PGRS only |
Distance learning |
NO |
Keywords |
Physics; Computational physics; Computer programming; Numerical analysis; Simulation; Monte Carlo methods. |
Created |
01-Sep-13 |
Revised |
28-Sep-13 |