=== Exercises === Exercise classes will be held in **NULLROMMET** sentralbygg 2, 3rd floor (unless announced otherwise). ^Supervision date^ Topic ^ description ^ Mfiles | | 12.01 |{{:tma4212:2015v:bvpov1.pdf|Boundary value problems}} | Implementation of the numerical solution of simple boundary value problems with various boundary conditions.| Numerical solution of a convection diffusion boundary value probelm in 1D (nu*u''-u'=f, u(0)=alpha, u(1)=beta) {{:tma4212:2015v:convdiff.m|convdiff.m}}.Numerical solution of the pendulum probelm ch. 3.3 of the note {{:tma4212:2015v:pendulum.m|pendulum.m}}. You find here an example of how to compute error plots giving numerical evidence that the method is implemented correctly and achieves the expected order.| | 19.01 | {{:tma4212:2015v:parabolic_ov2.pdf|Parabolic equations}}.|Implement a finite differences discretization of the heat equation, with various boundary conditions: use the Euler method, the backward-Euler method and the Crank-Nicholson method. | Solution of the heat equation with Crank-Nicolson. You find a loglog plot of the error in time for the numerical method and for a fixed space discretization. The solution used for comparison is obtained using ode15s with a very small tolerance. Similarly to compute the error in space, since CN is an unconditionally stable method, you can fix a value for the time step and run the method with different values of h. As a reference solution you will need a numerical solution computed with the same (fixed) time step and with a tiny little space-step. If your numerical method is NOT unconditionally stable then the time step must be choosen according to the stability restriction and the size of h, so for a tiny h you'll have to use an even smaller k. This becomes a challenging numerical experiment, but still doable, unless the exact solution of the problem is available. {{:tma4212:2015v:cnheat.m|cnheat.m}} {{:tma4212:2015v:au.m|au.m}}| | 26.01 |[[Elliptic problems]]| Implement a discretization of the Laplace equation on the square. | | | 02.02 |{{:tma4212:2015v:hyperbolic_ov3.pdf|Advection equation and hyperbolic problems}} | Simple experiments with the linear advection equation and the Burgers equation. | Semi-discretization of the KdV equation. [[https://wiki.math.ntnu.no/_media/tma4212/2014v/kdv.m|Kdv.m]] [[https://wiki.math.ntnu.no/_media/tma4212/2014v/kdvfunc.m|Kdvfunc.m]] [[https://wiki.math.ntnu.no/_media/tma4212/2014v/kdvinit.m|Kdvinit.m]]. The following file is an implementation the methods of ch 7.3 for u_t+au_x=0 [[https://wiki.math.ntnu.no/_media/tma4212/2014v/owwaveeq.m|owwaveeq.m]]. | | 09.02 | From Monday 9th of February until 23rd of March supervision of the project every Monday| | |