next up previous
Next: Crank-Nicolson method Up: Numerical solutions of PDEs Previous: Numerical solutions of PDEs

Forward Time Central Space - method

With the Forward Time Central Space - method (FTCS), the exact function $u(x,t)$ is approximated by a grid function $u_{h,k}(x_l,t_m)$, $x_l=l\cdot h$, $l=1,2,\ldots,n$ with $\displaystyle{h=\frac{L}{n+1}}$ and $t_m=m\cdot k$, $m=0,1,2,\ldots$ .
With this grid function we implement a Carthesian Grid on the region
$\Omega=[0;L]\times [0;\infty)$ with $h$ as step size in space direction and step size $k$ in time direction.

\begin{displaymath}u_{h,k}(x_l,t_m)\equiv u_l^m\end{displaymath}

.

The Taylor Series for a function $u(x)$ enables an analysis of the function around a specific $x$ using $u(x)$ and derivatives of $u$:

$\displaystyle u(x+h)=u(x)+h\cdot u'(x)+\frac{h^2}{2}u''(x)+
\frac{h^3}{6}+u'''(x)+\frac{h^4}{24}u^{IV}(\xi).$     (28)

If we stop the Taylor Series right after the linear term we get an approximation for the first derivative:

$\displaystyle u'(x)=\frac{u(x+h)-u(x)}{h}.$     (29)

The error is proportional to the step size $h$.
Similar to $u(x+h)$ we can approximate $u(x-h)$:

$\displaystyle u'(x)=\frac{u(x)-u(x-h)}{h}.$     (30)

By subtracting (30) from (29) and dividing by $2h$, we obtain the symmetrical difference

\begin{eqnarray*}
u'(x)=\frac{u(x+h)-u(x-h)}{2h}.
\end{eqnarray*}

With the same idea we can get an approximation for the second derivative:

$\displaystyle u''(x)=\frac{u(x+h)-2u(x)+u(x-h)}{h^2}.$     (31)

Considered is again the Diffusion equation $u_t\;=\;Du_{xx}$:

$\displaystyle \frac{\partial u(x,t)}{\partial t}$ $\textstyle =$ $\displaystyle D\frac{\partial^2u(x,t)}
{\partial x^2}.$  

By applying (29) and (31) on the Diffusion equation with respect to the Cartesian Grid values $u_l^m$ we obtain an approximation for $u_l^{m+1}$:
$\displaystyle \frac{u_l^{m+1}-u_l^m}{k}$ $\textstyle =$ $\displaystyle D\frac{u_{l-1}^m-2u_l^m+u_{l+1}^m}{h^2}$ (32)
       
$\displaystyle u_l^{m+1}$ $\textstyle =$ $\displaystyle Dk\frac{u_{l-1}^m-2u_l^m+u_{l+1}^m}{h^2}+u_l^m$  
$\displaystyle u_l^{m+1}$ $\textstyle =$ $\displaystyle (1-2r)u_l^m+r(u_{l-1}^m+u_{l+1}^m),
\quad\mbox{with }r=\frac{Dk}{h^2}.$ (33)

with $k$ being the step size in time direction and $h$ being the step size in space direction. Crucial to the convergence of this method is the condition

\begin{displaymath}r=\frac{k}{h^2}\le\frac{1}{2}.\end{displaymath}

With this approximation we obtain the value of $u(x,t)$ at position $x$ at time $t$ ($u_l^m$) from the values of $x$ at time $t-1$ and the neighbours of $x$ ($x-1$, $x+1$) at time $t-1$.


\begin{picture}(160,110)
%vertical lines
\color{cyan}
\put(60,35){\line(0,0){55}...
...20}}
\put(85,35){\vector(0,1){20}}
\put(110,35){\vector(-1,1){20}}
\end{picture}


next up previous
Next: Crank-Nicolson method Up: Numerical solutions of PDEs Previous: Numerical solutions of PDEs
Heiko Enderling 2003-11-13