Computational Physics and Modelling - 2024 entry
MODULE TITLE | Computational Physics and Modelling | CREDIT VALUE | 15 |
---|---|---|---|
MODULE CODE | PHYM004 | MODULE CONVENER | Dr Pablo Loren-Aguilar (Coordinator), Prof Tim Harries (Coordinator) |
DURATION: TERM | 1 | 2 | 3 |
---|---|---|---|
DURATION: WEEKS | 11 | 9 |
Number of Students Taking Module (anticipated) | 19 |
---|
DESCRIPTION - summary of the module content
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 examples 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).
Pre-requisite modules: PHY2025 and PHY2027 or equivalent modules.
Pre-requisite modules: PHY2025 and PHY2027 or equivalent modules.
AIMS - intentions of the module
Computational physics is a subdiscipline lying between experimental 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 analogous techniques.
INTENDED LEARNING OUTCOMES (ILOs) (see assessment section below for how ILOs will be assessed)
A student who has passed this module should be able to:
Module Specific Skills and Knowledge:
1. construct and evaluate mathematical and numerical models of common physical systems and processes;
2. write and document well-structured scientific computer code of good quality;
3. write scientific code that can import and export data in a range of formats, e.g. suitable for visualisation by third-party applications;
4. use mathematics to obtain a computational advantage in the evaluation of solutions;
5. critically evaluate the success or otherwise of numerical approaches to solving problems;
6. use profiling tools to identify performance bottle-necks;
Discipline Specific Skills and Knowledge:
7. use computational methods to model physical systems;
8. identify problems that are amenable to computer solution and investigation;
Personal and Key Transferable / Employment Skills and Knowledge:
9. undertake co-operative learning by discussing the contents of the module amongst themselves;
10. write clear and concise descriptions of complicated processes;
11. balance workload and work independently in order to meet deadlines.
SYLLABUS PLAN - summary of the structure and academic content of the module
Thread 1: Programming for Physicists
I. 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
II. Simple Data Types
- Characters
- Integers: unsigned and signed
- Floating Point Numbers
- Pointers: names and values
III. Functions, Procedures and Objects
- Variables and scope
IV. Memory
- The stack; the heap; allocators; reference counting; garbage collection
- Hierarchy: registers, processor cache, random access memory (RAM), disk
V. Data structures
- Arrays, character strings, linked lists, queues, stacks, trees, hash tables
VI. 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.
VII. Algorithms
- Classification, Big-O notation
- Discrete Fourier transform (DFT), fast Fourier transform (FFT)
- Quicksort vs Mergesort
- Fused multiply add (FMA), Kahan summation
VIII. High performance code
- Code profiling and manual optimisation
- Optimisations performed by compilers
- Code examples that run (a) quickly, (b) slowly
IX. Parallel Programming
X. 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
I. Numerical Errors
- Error Propagation: rounding errors; forwards error analysis; backwards error analysis;
- The IEEE-754 standard: precision, exceptions, rounding
II. Interpolation, Differentiation and Integration
Lagrange polylominals, Runge's phenomenon; Gaussian quadrature, Newton-Cotes forumulae, Richardson extrapolation; Romberg's method
III. Solution of Nonlinear Equations
Bisection methods, Secant Method, Newton's method, Brent's method, coincident roots and deflation
IV. Matrix Algebra
Simple matrix problems; sparse matrices; systems of equations and matrix inversion; error propation; direct vs indirect methods; matrix eigenvalue problems
V. 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
VI. Boundary Value Problems
- Types of boundary condition: Dirichlet, Neumann, mixed
- Methods: shooting, multiple shooting, finite difference, finite element
- Poisson's equation
VII. Partial Differential Equations
- The diffusion equation
- The wave equation
- Particle in cell methods
VIII. 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
IX. Function Minimisation and Maximisation
- Levenberg-Marquardt method
- Nelder-Mead (Simplex) method
- Constraints
- Genetic algorithms
- Simulated annealing
- Curve fitting
X. Case Study - Spice 3f5
Advanced Topics (If Time Permits)
I. The Quantum One-Body Problem
II. The Quantum N-Body Problem
- Quantum Chemistry Methods
- Exact Methods
III. Molecular Dynamics
IV. Electronic Structure
- Variational methods
- Hartree-Fock theory
- Density functional theory
V. Polymers and Neurons
VI. Quantum Monte Carlo Methods
- Systems of Fermions
- Bose-Einstein Condensation
- Diffusion Monte Carlo
VII. Quantum Field Theory
LEARNING AND TEACHING
LEARNING ACTIVITIES AND TEACHING METHODS (given in hours of study time)
Scheduled Learning & Teaching Activities | 22 | Guided Independent Study | 128 | Placement / Study Abroad | 0 |
---|
DETAILS OF LEARNING ACTIVITIES AND TEACHING METHODS
Category | Hours of study time | Description |
Scheduled learning & teaching activities | 22 | 22×1-hour lectures |
Guided independent study | 20 | 5×4-hour self-study packages |
Guided independent study | 12 | Reading, private study and revision |
Guided independent study | 15 | Programming / Debugging Exercise |
Guided independent study | 25 | Project 1 |
Guided independent study | 6 | Numerical programming 'take-home' exam |
Guided independent study | 50 | Project 2 |
ASSESSMENT
FORMATIVE ASSESSMENT - for feedback and development purposes; does not count towards module grade
Form of Assessment | Size of Assessment (e.g. duration/length) | ILOs Assessed | Feedback Method |
---|---|---|---|
Guided self-study | 5×4-hour packages (fortnightly) | 1-5, 8, 9, 11 | Discussion in class |
SUMMATIVE ASSESSMENT (% of credit)
Coursework | 90 | Written Exams | 0 | Practical Exams | 10 |
---|
DETAILS OF SUMMATIVE ASSESSMENT
Form of Assessment | % of Credit | Size of Assessment (e.g. duration/length) | ILOs Assessed | Feedback Method |
---|---|---|---|---|
Programming / Debugging Exercise | 20 | 15 hours | 2-5, 10, 11 | Written and class discussion. |
Project 1 | 30 | 25 hours work | 1-11 | Written and verbal |
Project 2 | 50 | 50 hours work | 1-11 | Written and verbal |
DETAILS OF RE-ASSESSMENT (where 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 | Referral/deferral period |
RE-ASSESSMENT NOTES
An original assessment that is based on both examination and coursework, tests, etc., is considered as a single element for the purpose of referral; i.e., the referred mark is based on the referred examination only, discounting all previous marks. In the event that the mark for a referred assessment is lower than that of the original assessment, the original higher mark will be retained.
Physics Modules with PHY Codes
Referred examinations will only be available in PHY3064, PHYM004 and those other modules for which the original assessment includes an examination component - this information is given in individual module descriptors.
RESOURCES
INDICATIVE LEARNING RESOURCES - The following list is offered as an indication of the type & level of
information that you are expected to consult. Further guidance will be provided by the Module Convener
information that you are expected to consult. Further guidance will be provided by the Module Convener
Core text:
- 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)
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: 530 DEV )
- Giordano N.J. and Nakanishi H. (2006), Computational Physics (2nd edition), Pearson, ISBN 978-0-131-46990-7 (UL: 530.158 GIO)
- 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-0521833462 (UL: 530 THI)
Reading list for this module:
CREDIT VALUE | 15 | ECTS VALUE | 7.5 |
---|---|---|---|
PRE-REQUISITE MODULES | PHY2025, PHY2027 |
---|---|
CO-REQUISITE MODULES |
NQF LEVEL (FHEQ) | 7 | AVAILABLE AS DISTANCE LEARNING | No |
---|---|---|---|
ORIGIN DATE | Wednesday 13th March 2024 | LAST REVISION DATE | Thursday 16th May 2024 |
KEY WORDS SEARCH | Physics; Computational physics; Computer programming; Numerical analysis; Simulation; Monte Carlo methods |
---|
Please note that all modules are subject to change, please get in touch if you have any questions about this module.