$$ \newcommand{\uex}{{u_{\small\mbox{e}}}} \newcommand{\Aex}{{A_{\small\mbox{e}}}} \newcommand{\half}{\frac{1}{2}} \newcommand{\tp}{\thinspace .} \newcommand{\dfc}{\alpha} % diffusion coefficient \newcommand{\dx}{\, \mathrm{d}x} \newcommand{\ds}{\, \mathrm{d}s} $$

Finite difference methods for diffusion processes

Hans Petter Langtangen [1, 2]

[1] Center for Biomedical Computing, Simula Research Laboratory
[2] Department of Informatics, University of Oslo

Nov 18, 2014

Note: PRELIMINARY VERSION

Table of contents

The 1D diffusion equation
      The initial-boundary value problem for 1D diffusion
      Forward Euler scheme
      Backward Euler scheme
      Sparse matrix implementation
      Crank-Nicolson scheme
      The \( \theta \) rule
      The Laplace and Poisson equation
      Extensions
Analysis of schemes for the diffusion equation
      Properties of the solution
            Similarity solution
            Solution for a Gaussian pulse
            Solution for a sine component
      Example: Diffusion of a discontinues profile
      Analysis of discrete equations
      Analysis of the finite difference schemes
            Stability
            Accuracy
      Analysis of the Forward Euler scheme
            Stability
            Accuracy
      Analysis of the Backward Euler scheme
            Stability
      Analysis of the Crank-Nicolson scheme
            Stability
      Summary of accuracy of amplification factors
      Exercise 1: Use an analytical solution to formulate a 1D test
      Exercise 2: Use an analytical solution to formulate a 2D test
      Exercise 3: Examine stability of a diffusion model with a source term
Diffusion in heterogeneous media
      Stationary solution
      Piecewise constant medium
      Implementation
Exercises
      Exercise 4: Stabilizing the Crank-Nicolson method by Rannacher time stepping
      Project 5: Energy estimates for diffusion problems
Bibliography