MODULE TITLE

Computational Physics and Modelling

 

CREDIT VALUE

15

MODULE CODE

PHYM004

MODULE CONVENER

Dr P. Loren-Aguilar and Prof. T.J. Harries

 

 

DURATION

TERM

1

2

3

Number Students Taking Module (anticipated)

19

WEEKS

T1:01-11

T2:01-09

 

DESCRIPTION – summary of the module content (100 words)

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).

MODULE AIMS – intentions of the module

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) (see assessment section below for how ILOs will be assessed)

 On successful completion of this module you 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:

  1. use computational methods to model physical systems;
  2. identify problems that are amenable to computer solution and investigation;

Personal and Key Transferable / Employment Skills and Knowledge:

  1. undertake co-operative learning by discussing the contents of the module amongst themselves;
  2. write clear and concise descriptions of complicated processes;
  3. 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

  1. 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
  2. Simple Data Types
    1. Characters
    2. Integers: unsigned and signed
    3. Floating Point Numbers
    4. Pointers: names and values
  3. Functions, Procedures and Objects
    1. Variables and scope
  4. Memory
    1. The stack; the heap; allocators; reference counting; garbage collection
    2. Hierarchy: registers, processor cache, random access memory (RAM), disk
  5. Data structures
    1. Arrays, character strings, linked lists, queues, stacks, trees, hash tables
  6. 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.
  7. 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
  8. High performance code
    1. Code profiling and manual optimisation
    2. Optimisations performed by compilers
    3. Code examples that run (a) quickly, (b) slowly
  9. Parallel Programming
  10. 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

  1. Numerical Errors
    1. Error Propagation: rounding errors; forwards error analysis; backwards error analysis;
    2. The IEEE-754 standard: precision, exceptions, rounding
  2. Interpolation, Differentiation and Integration
    Lagrange polylominals, Runge's phenomenon; Gaussian quadrature, Newton-Cotes forumulae, Richardson extrapolation; Romberg's method
  3. Solution of Nonlinear Equations
    Bisection methods, Secant Method, Newton's method, Brent's method, coincident roots and deflation
  4. Matrix Algebra
    Simple matrix problems; sparse matrices; systems of equations and matrix inversion; error propation; direct vs indirect methods; matrix eigenvalue problems
  5. 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
  6. Boundary Value Problems
    1. Types of boundary condition: Dirichlet, Neumann, mixed
    2. Methods: shooting, multiple shooting, finite difference, finite element
    3. Poisson's equation
  7. Partial Differential Equations
    1. The diffusion equation
    2. The wave equation
    3. Particle in cell methods
  8. Monte Carlo Methods and Simulation
    1. Random number generation
      1. Speed and quality of pseudo random number generators
      2. Uniform distribution
      3. Arbitrary distributions: inversion method, acceptance-rejection method
      4. Gaussian distributions: Box-Muller method
      5. Sub-random sequences
    2. Error estimates
    3. Variance reduction
    4. Percolation
    5. Magnetic systems
  9. Function Minimisation and Maximisation
    1. Levenberg-Marquardt method
    2. Nelder-Mead (Simplex) method
    3. Constraints
    4. Genetic algorithms
    5. Simulated annealing
    6. Curve fitting
  10. Case Study - Spice 3f5

Advanced Topics (If Time Permits)

  1. The Quantum One-Body Problem
  2. The Quantum N-Body Problem
    1. Quantum Chemistry Methods
    2. Exact Methods
  3. Molecular Dynamics
  4. Electronic Structure
    1. Variational methods
    2. Hartree-Fock theory
    3. Density functional theory
  5. Polymers and Neurons
  6. Quantum Monte Carlo Methods
    1. Systems of Fermions
    2. Bose-Einstein Condensation
    3. Diffusion Monte Carlo
  7. Quantum Field Theory

 

LEARNING AND TEACHING

 

LEARNING ACTIVITIES AND TEACHING METHODS (given in hours of study time)

Scheduled Learning & Teaching activities  

22 hours

Guided independent study  

128 hours

Placement/study abroad

0 hours

 

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 the assessment e.g. duration/length

ILOs assessed

Feedback method

Guided self-study

5×4-hour packages

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 the assessment e.g. duration/length

 ILOs assessed 

Feedback method

Programming / Debugging Exercise

15%

15 hours

2-5,10,11

Written and class discussion.

Project 1

25%

25 hours work

1-11

Written and verbal

Numerical programming 'take-home' exam

10%

6 hours work

1-5

Written and class discussion.

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

August/September assessment period

RE-ASSESSMENT NOTES  

See Physics Assessment Conventions.

 

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.

Core text:

Supplementary texts:

ELE:

CREDIT VALUE

15

ECTS VALUE

7.5

PRE-REQUISITE MODULES

Stage 1 'IT Skills', Mathematics with Physical Applications (PHY2025) and Scientific Programming in C (PHY2027)

CO-REQUISITE MODULES

N/A

NQF LEVEL (FHEQ)

7

AVAILABLE AS DISTANCE LEARNING

NO

ORIGIN DATE

01-Sep-13

LAST REVISION DATE

28-Jun-19

KEY WORDS SEARCH

Physics; Computational physics; Computer programming; Numerical analysis; Simulation; Monte Carlo methods.

Module Descriptor Template Revised October 2011