Matlabfiler (Matlab files)

ssheat.m Steady state heat equation in 1 D. Global error computed from a truncated Taylor expansion of the local truncation error, for different values of the discretization step h. The grid-function-norm of the global error is plotted against h in a loglog plot and compared to a reference line producing numerical evidence that the norm of the global error tends to zero has O(h^2).

ssheatNeumann.m Steady state heat equation in 1 D, Neumann boundary conditions on one side and Dirichlet on the other side. Error computed using the exact solution. By modifying the matrix A and the right hand side F one can easily implement the three different approaches described in chapter 2 for imposing the Neumann buondary conditions.

pendulum.m Discretization of the pendulum boundary value problem. Dirichlet boundary conditions. Solution of the nonlinear system of equations by Newton iteration. G.m Matlab function defining the nonlinear broblem whose solution is the numerical approximation of the pendulum BVP. JacG.m Jacobian of G.

convdiff.m Boundary layer problem. Advection diffusion equation with small viscosity. Discretization of the first derivative with central differences and backward differences.

Heat equation

EEheat.m Forward Euler method for the heat equation.

CNheat.m Crank-Nicolson method for the heat equation.

HePer.m Semidiscretization of the heat equation. Periodic boundary conditions. Uses the function funcHePer.m as input to the integrator ode15s of Matlab.

HeNeu.m Semidiscretization of the heat equation. Neuman boundary conditions. Uses the functions funcHePer.m and gHeNeu.m for the boundary conditions.

Nonlinear parabolic equations

NW.m Newell Withehead equation with Dirichlet boundary conditions and two different initial conditions (one of them corresponds to a known exact solution). Semidiscretization: the function funcNW.m defines the right hand side of the system of ODEs, gNW.m and gNWex.m define the boundary conditions for the two different initial values.

NHeat.m Nonlinear heat equation with an exponential nonlinearity, with Dirichlet boundary conditions and two different initial conditions (one of them corresponds to a known exact solution). Semidiscretization: the function funcNhe.m defines the right hand side of the system of ODEs, gNhe.m defines the boundary conditions (in the same file are implemented two sets of boundary conditions corresponding to the two solutions).

2009-02-26, Elena Celledoni