MAS212 Scientific Computing and Simulation
|Semester 1, 2019/20||10 Credits|
|Lecturer:||Dr Sam Dolan||Home page||Timetable||Reading List|
The module further develops the students’ skills in computer programming and independent investigation. The students will learn how to solve algebraic and differential equations using Python. The students will learn basic numerical methods, and methods to visualize and analyse numerical results. The students will apply the knowledge to explore the physical behaviours of model equations.
Prerequisites: MAS115 (Mathematical Investigation Skills)
Corequisites: MAS211 (Advanced Calculus and Linear Algebra); MAS222 (Differential Equations)
The following modules have this module as a prerequisite:
|MAS316||Mathematical modelling of natural systems|
|MAS414||Mathematical Modelling of Natural Systems|
- To further develop the students’ programming skill in the context of scientific computing;
- To further develop the students’ independent investigation skills;
- To introduce the knowledge of scientific computing;
- To further develop the skills of data analysis.
- To be able to use Python to investigate mathematical problems numerically.
- To learn basic numerical methods for solving ordinary differential equations and linear algebraic equations.
- To be able to implement basic numerical methods using Python.
- To be able to analyse the basic properties of the methods.
10 lectures, no tutorials, 10 practicals
Three assessed courseworks, 90%. Two class tests, 10%.
- Week 1: The Python language. Revision: variables; data types; arithmetic; list construction, comprehension, indexing, slicing & manipulation; for & while loops; control flow (if-elif-else; strings; string formatting.
Introduction to IPython Notebook: Tab completion, getting help and %magic commands (e.g. %timeit).
- Week 2: Functions. Modules & scripts. Built-in modules (math, cmath, random, decimal, datetime, io, os). Simple file I/O and string processing. Debugging and testing. Workflow.
- Week 3: Introduction to numpy. Arrays (initialization, slicing). Basic linear algebra. Efficiency.
Introduction to matplotlib. Simple plotting.
Examples: (1) Estimating π by Monte Carlo integration; (2) the logistic map.
- Week 4: Introduction to scipy. Solving differential equations with odeint. Initial conditions. Time-domain plots. Phase plots. Critical points and limit cycles.
Examples: (1) Logistic equation; (2) Damped harmonic oscillator; (3) van der Pol oscillator; (4) Predator-prey equations.
- Week 5: Animation with matplotlib.animation.FuncAnimation. Saving an animation. Examples: (1) The logistic map (again); (2) Driven damped oscillator and resonance.
- Week 6: Elementary numerical methods: Runge-Kutta and Adams-Bashforth methods. Implementation for initial value problems.
- Week 7: Error, order and stability of numerical methods.
- Week 8: Fitting models to data. scipy.optimize.curve_fit. Least-squares method and linear algebra.
- Week 9: Linear algebra. Gaussian elimination; iterative methods; convergence; condition number.
- Week 10: Fourier series. Convergence and the Gibbs phenomenon.
|B||Christian Hill||Learning Scientific Programming with Python||Blackwells||Amazon|
(A = essential, B = recommended, C = background.)
Most books on reading lists should also be available from the Blackwells shop at Jessop West.
|Wed||10:00 - 10:50||tutorial||(group 413)||Hicks Room G39a|
|Fri||11:00 - 11:50||tutorial||(group 414)||Bartolome House Computer Room ALG04|