Subsections

FTCS methods

So far, we haven't defined how the spatial derivatives are to be calculated numerically. It is usually most accurate to discretise these in a symmetric way around the current spatial point, essentially through a Taylor expansion around the current point. This leads to a `Centered Space' discretisation, so that the matrix $ \mathcal{D}^{i,j}_{l,m}$ is a spatially symmetric discretised version of the spatial differential operator.

Gradient operator

An example is the discretised spatial differential operator for the scalar gradient, $ \partial /\partial x$. First, consider the Taylor expansion:

$\displaystyle \mbf{A}(t_n,\mbf{x}_{l+1}) = \mbf{A}(t_n,\mbf{x}_l) + \Delta x \f...
...^2}{2} \frac{\partial ^2}{\partial x^2} \mbf{A}(t_n,\mbf{x}_l) + O(\Delta x^3).$ (A.4)

Next, we can write a similar expression for the value of $ \mbf{A}(t_n,\mbf{x}_{l-1})$:

$\displaystyle \mbf{A}(t_n,\mbf{x}_{l-1}) = \mbf{A}(t_n,\mbf{x}_l) - \Delta x \f...
...^2}{2} \frac{\partial ^2}{\partial x^2} \mbf{A}(t_n,\mbf{x}_l) + O(\Delta x^3).$ (A.5)

Subtracting these two equations gives the accurate CS discretisation, of form:

$\displaystyle \frac{\partial }{\partial x} \mbf{A}(t_n,\mbf{x}_l) = \frac{1}{2 ...
...a x} [\mbf{A}(t_n,\mbf{x}_{l+1}) - \mbf{A}(t_n,\mbf{x}_{l-1})] + O(\Delta x^2).$ (A.6)

If this derivative term was the only spatial derivative, then:

$\displaystyle \sum_{j,m} \mathcal{D}^{i,j}_{l,m} A^j_m = \frac{1}{2\Delta x} \left( A^i_{l+1} - A^i_{l-1} \right)$ (A.7)

Matrix Representation

Suppose we consider a scalar field $ A$, and regard this as a column vector over its spatial indices, defined at each point in time. Then for a $ 6 \times 6$ case, the discretisation matrix $ \mbf{D}$ for the operator $ \frac{\partial }{\partial x}$ is:

$\displaystyle \mbf{D}= \frac{1}{2\Delta x} \left[ \begin{array}{cccccc} 0 & 1 &...
...\  & & -1 & 0 & 1 & \\  & & & -1 & 0 & 1 \\  & & & & -1 & 0 \end{array} \right]$ (A.8)

Here we assume Dirichlet boundary conditions, with the boundary values set to zero at the boundaries, which are located at $ \mbf{x}=
\mbf{x}_0$ and $ \mbf{x}= \mbf{x}_{L+1}$. The lattice does not have to include these points, in this case, since the values of the fields at these locations doesn't change.

Diffusion operator

Adding the two equations gives an approximation for the diffusion operator, or second order derivative, of form:

$\displaystyle \frac{\partial ^2}{\partial x^2} \mbf{A}(t_n,\mbf{x}_l) = \frac{1...
...{l+1}) - 2\mbf{A}(t_n,\mbf{x}_l) + \mbf{A}(t_n,\mbf{x}_{l-1})] + O(\Delta x^2).$ (A.9)

Note that the error estimate is proportional to $ \Delta x^2$, because it is proportional to fourth order derivative terms. The CS method causes a cancellation to occur in the error terms proportional to third order derivatives, which otherwise would give errors proportional to $ \Delta x$ . If this derivative term was the only spatial derivative, then:

$\displaystyle \sum_{j,m} \mathcal{D}^{i,j}_{l,m} A^j_m = \frac{1}{\Delta x^2} \left( A^i_{l+1} - 2A^i_l + A^i_{l-1} \right)$ (A.10)

The combination of the Euler method in time, with a spatially centered discretisation for the spatial differential operator is called an FTCS algorithm.

Matrix Representation

Suppose we consider a scalar field $ A$, and regard this as a column vector over its spatial indices, defined at each point in time. Then for a $ 6 \times 6$ case, the discretisation matrix $ \mbf{D}$ for the operator $ \frac{\partial ^2}{\partial x^2}$ is:

$\displaystyle \mbf{D}= \frac{1}{\Delta x^2} \left[ \begin{array}{cccccc} -2 & 1...
...\  & & 1 & -2 & 1 & \\  & & & 1 & -2 & 1 \\  & & & & 1 & -2 \end{array} \right]$ (A.11)

Here we assume Dirichlet boundary conditions, with the boundary values set to zero at the boundaries, which are located at $ \mbf{x}=
\mbf{x}_0$ and $ \mbf{x}= \mbf{x}_{L+1}$. The lattice does not have to include these points, in this case, since the values of the fields at these locations doesn't change. For periodic boundary conditions, which are often useful for obtaining traveling wave solutions, define:

$\displaystyle \mbf{D}= \frac{1}{\Delta x^2} \left[ \begin{array}{cccccc} -2 & 1...
...\  & & 1 & -2 & 1 & \\  & & & 1 & -2 & 1 \\  & & & & 1 & -2 \end{array} \right]$ (A.12)

Paul Cochrane 2002-04-18