This is the course web page for MAS212 (Scientific Computing and Simulation) which will be updated as the module progresses in Semester 1, 2015. For official course information, including timetabling, please consult the list of current modules.
MAS212 is a 10-credit, Level 2, first-semester module which covers various techniques in scientific computing, and their implementation in Python. The course is intended to follow on from MAS115 Mathematical Investigation Skills
In this course we will use IPython notebooks to combine code, text, plots and media. To view a notebook, click on the link on the left. (Alternatively, copy-and-paste the notebook's URL in to the box at nbviewer.ipython.org).
To interact and modify the notebook, right-click on the link on the right (.ipynb) and download to your ipython notebook directory.
|Curve_Fit_Example||Shows how to (a) generate a data set with simulated noise; (b) save and then re-load the data; (c) fit the data to a simple model using scipy.optimize.curve_fit().||.ipynb|
|ODE_Example||Shows how to (a) solve a first-order single-variable ODE using scipy.integrate.odeint, and plot; (b) solve a second-order equation by writing as a pair of first-order equations; (c) solve predator-prey equations.||.ipynb|
|Media_Example||Shows how to load and interact with various media: data, images, web pages, YouTube videos and maps.||.ipynb|
|Fern||The Barnsley Fern: an image of a fern with self-similar (fractal) properties, generated by iterating certain affine transformations.||.ipynb|
|1||Lab Class 1: Getting started|
Lecture 2: standard library + numpy.
Lecture 3: matplotlib.
||Lab Class 3: Plotting|
Lecture 4: ODEs and scipy.integrate.
||Lab Class 4: Solving ODEs numerically|
Lecture 5: Animations with matplotlib.animate.FuncAnimation.
||Lab Class 5: Animations J Vanderplas|
Lecture 6: Numerical methods for ODEs.
||Lab Class 6: Numerical methods for ODEs: (a) explicit methods|
Lecture 7: Explicit and implicit methods.
||Lab Class 7: The LCR circuit
Lecture 8: Curve fitting.
||Lab Class 8: Fitting Data|
Lecture 9: Conditioning.
||Lab Class 9: Ill-conditioned problems.
Lecture 10: Discrete Fourier Transforms.
||Lab Class 10: The DFT and hidden signals.
A short video here shows how to take the test on the managed desktop machines.
|(2015) Class Test with answers||.ipynb|
|(2014) Class Test||.ipynb|
|(2014) Class Test with answers||.ipynb|
|(Mock) Class Test||.ipynb|
|(Mock) Class Test with answers||.ipynb|
To attempt a test, right click on ".ipynb" link, save the file in your notebooks directory, and then open the notebook. To view a test, left click on the ".html" link. Completed tests will be submitted here.
|1||Wordsearch||Use Python to find hidden words in the rows, columns or diagonals of a grid of letters.||Mon 19th Oct (23:59pm).||
|2||The van der Pol oscillator||Investigating the behaviour of a non-linear second order differential equation||Mon 23rd Nov (23:59pm)||
|3||Numerical methods for ODEs||Investigating accuracy, stability and stiffness.||Fri 4th Dec (23:59pm)|
|4||Video Project|| Key documents:
Mon 14th Dec (Video)
Fri 18th Dec (Report)