Skip to main content

Study information

Computational Physics and Modelling - 2023 entry

MODULE TITLEComputational Physics and Modelling CREDIT VALUE15
MODULE CODEPHYM004 MODULE CONVENERProf Tim Harries (Coordinator), Dr Pablo Loren-Aguilar (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).
 
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
  1. Languages: Imperative, functional, constraint; high and low level
  2. Divide and conquer: using pipes and scripting as glue
  3. Useful software libraries for science
II. Simple Data Types
  1. Characters
  2. Integers: unsigned and signed
  3. Floating Point Numbers
  4. Pointers: names and values
III. Functions, Procedures and Objects
  1. Variables and scope
IV. Memory
  1. The stack; the heap; allocators; reference counting; garbage collection
  2. Hierarchy: registers, processor cache, random access memory (RAM), disk
V. Data structures
  1. Arrays, character strings, linked lists, queues, stacks, trees, hash tables
VI. Input and output
  1. Command Line Interface (CLI) vs Graphical User Interface (GUI)
  2. Exchange formats for data: plain text, binary, FITS, XML
  3. Graphics and visualisation: Gnuplot, POV-Ray, etc.
VII. Algorithms
  1. Classification, Big-O notation
  2. Discrete Fourier transform (DFT), fast Fourier transform (FFT)
  3. Quicksort vs Mergesort
  4. Fused multiply add (FMA), Kahan summation
VIII. High performance code
  1. Code profiling and manual optimisation
  2. Optimisations performed by compilers
  3. Code examples that run (a) quickly, (b) slowly
IX. Parallel Programming
X. Program Design and Maintenance
  1. Anticipated usage and user community
  2. Version control, documentation, release strategy, ethics, licences
  3. Code quality: assert statements, compiler warnings, static analysis, crash reports, bug tracking, test driven development, code reviews
  4. Single processor vs multi-processor
 
Thread 2: Numerical Methods with Physical Applications
 
I. Numerical Errors
  1. Error Propagation: rounding errors; forwards error analysis; backwards error analysis;
  2. 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
  1. Reduction of order-N equation to a set of N order-1 coupled ODEs
  2. Methods: forward Euler, backwards Euler, trapezoidal, higher-order methods
  3. Consistency, zero-stability, convergence, A-stability
  4. Step-size control, stiff equations
  5. Classical 1-, 2-, 3-, and N-body problems
VI. Boundary Value Problems
  1. Types of boundary condition: Dirichlet, Neumann, mixed
  2. Methods: shooting, multiple shooting, finite difference, finite element
  3. Poisson's equation
VII. Partial Differential Equations
  1. The diffusion equation
  2. The wave equation
  3. Particle in cell methods
VIII. Monte Carlo Methods and Simulation
  1. 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
  2. Error estimates
  3. Variance reduction
  4. Percolation
  5. Magnetic systems
IX. Function Minimisation and Maximisation
  1. Levenberg-Marquardt method
  2. Nelder-Mead (Simplex) method
  3. Constraints
  4. Genetic algorithms
  5. Simulated annealing
  6. Curve fitting
X. Case Study - Spice 3f5
 
Advanced Topics (If Time Permits)
 
I. The Quantum One-Body Problem
II. The Quantum N-Body Problem
  1. Quantum Chemistry Methods
  2. Exact Methods
III. Molecular Dynamics
IV. Electronic Structure
  1. Variational methods
  2. Hartree-Fock theory
  3. Density functional theory
V. Polymers and Neurons
VI. Quantum Monte Carlo Methods
  1. Systems of Fermions
  2. Bose-Einstein Condensation
  3. 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
DETAILS OF LEARNING ACTIVITIES AND TEACHING METHODS
Category Hours of study time Description
Scheduled learning & teaching activities 22 hours 22×1-hour lectures
Guided independent study 20 hours 5×4-hour self-study packages
Guided independent study 12 hours Reading, private study and revision
Guided independent study 15 hours Programming / Debugging Exercise
Guided independent study 25 hours Project 1
Guided independent study 6 hours Numerical programming 'take-home' exam
Guided independent study 50 hours 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 (0%) 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 (Deadline Term 1, Week 6 (Friday)) 2-5, 10, 11 Written and class discussion.
Project 1 30% 25 hours work (Deadline Term 1, Week 12 (Friday)) 1-11 Written and verbal
Project 2 50% 50 hours work (Deadline Term 2, Week 9 (Friday)) 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 August/September assessment period

Re-assessment is not available except when required by referral or deferral.

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
ELE:
 

Reading list for this module:

Type Author Title Edition Publisher Year ISBN
Set Kernighan, B.W. and D. M. Richie The C Programming Language 2nd edition Prentice Hall 1988 0-13-110362-8
Extended Atkinson, K.E. An Introduction to Numerical Analysis 2nd edition John Wiley 1989 978-0471500230
Extended DeVries, P.L. and J. E. Hasbun A First Course in Computational Physics Jones and Bartlett 2010
Extended Giordano, N.J. and H. Naskanishi Computational Physics 2nd edition Pearson 2006 978-0131469907
Extended Press, W.H., S. A. Teukolsky, W. T. Wetterling and B. P. Flannery Numerical Recipes 3rd edition Cambridge University Press 2007 978-0-521-88068-8
Extended Thijssen, J. Computational Physics 2nd edition Cambridge 2007 978-0521833462
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 Tuesday 7th December 2021 LAST REVISION DATE Thursday 26th January 2023
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.