Date: 2.4.1999
Janne Viljas, 44468K

Session 5, rudiments of FEM

Exercise 1 This was, as far as I understood, simply about correcting the errors in the given Maple worksheet. Apparently there was only one actual mistake in it, which was purely syntactic in origin. When the solution is assembled as a weighted sum of the hat functions, one must be careful to use the sum-operation properly. Here is the corrected worksheet.

Exercise 2 Here a simple equation of the type -u'' = f with zero boundary conditions was solved with the simplest possible FEM. Here's the directory for the .m-files and stuff. There are images here which show Matlab-solutions for T-W example 2.5 and the problem of exercise 1.

Exercise 3 A small Matlab-script was written to solve the equation

-(a(x)*u'(x))' = f(x)  on [0,1]
with general Robin or Dirichlet boundary conditions. The code was used to solve, for example, the T-W exercise 2.14. The problem there was
-u''(x) = -exp(x-1) on [0,1]  , u(0) = 0 , u'(1) = 0.
Its exact and numerical solutions are plotted in the image below.

Exercise 4 In this exercise the PDE toolbox GUI was used to generate solutions to some of the boundary value problems of the previous exercise set (4). Here are images of solutionns of Ex 9.2.5 and Ex 9.2.6, which should be compared with the corresponding images here. The max-norm error of the pdetool-solutions with respect to the known exact solution was computed with this .m-file. The effect of mesh refinement on the error was briefly studied. In the case of T-W ex 9.2.5 the script also generates the following plot3-image.