Numerical Partial Differential Equations
Part 1 of Advanced Engineering Mathematics A
Contents
Note: in order to download content of any file referred to at this
page you should right-click on the link and choose the option "Save Link
As ..." or "Save Target As..." from the menu, specify the name of the directory
where you want to save the file and click OK.
Tutorials
In order to access tutorial solutions type "student" as a User ID.
The passwords will be given to daytime students in the end of each practical
session. External students will need to email their codes to the lecturer before requesting the passwords.
- Tutorial
1. Numerical solution of the Poisson's equation on a unit square
by direct method. Click here
to download or to view the file with the suggested MATLAB code structure
and detailed comments. You will need to complete some of the lines before
running this code. Run your code for the progressively larger number of
discretisation points and determine the maximum value N which can
be handled by your computer. Click here
to see the structure of the resulting matrix. Compare it with the one
given on pages 480-482 and note the differences associated with the node
numbering and treatment of the boundary conditions. The matrix given here
is more general and will be used in further developments of other numerical
schemes while the one in the textbook is suitable for solving the Laplace's
equation with explicitly given boundary conditions only. Solution
- Tutorial 2. Solve the problem from
Tutorial 1 using
iterations. Start with N=4 and zero initial guess,
perform a few iterations by hand. Write a computer code which performs
each of the above iterations and compute solution for N=20 to the
accuracy of 0.001. Count how many iterations of each kind you need and conclude
which method is the most efficient. Play with different values of the relaxation
parameter and conclude how sensitive the SOR iterations are to its choice.
Click here
to download a MATLAB code skeleton which you may use to complete this
problem. Solution
- Tutorial 3.
- Part 1. Final exam preparation. Solve
Problem 1 from the 1999 Final
Examination Paper. Discuss any difficulties which you may
find with the lecturer.
- Part 2.
Numerical solution of nonlinear diffusion/advection equation using explicit
and Crank-Nicolson methods. Click here to
download a MATLAB code skeleton (explicit method) which you may use to
complete this problem. Solution.
The code implementing the Crank-Nicolson method for a linearized problem
is given here. Study it on your own.
Hints for Assignment 1
- Question 1. The left-hand side determines the point about
which the Taylor series should be written for the entries in the right-hand
side.
- Question 2(d). Make sure you know when the formula for the
optimal value of the SOR parameter can be used.
- Question 3(a). "Steady solution" means solution independent
of time. What does equation (2) become in this case? You should be able to
solve it using your knowledge of differential equations from Algebra and Calculus
2.
- Question 4 (a). Substitute the suggested solution into
the equation, use the chain rule to show that it is satisfied.
Errata for Study Book for 2003
- Page 27. The corrections for equations (7.19) and (7.20) assume
h=2 as stated on page 489 of the text. If h=1 as stated
(all of a sudden, for no good reason) on page 490 of the text then the original
equations are correct.
Please, report any errors to the lecturer.
Back
to the course home page