Numerical Solution Of Partial Differential Equations

Parabolic Equations

<Durbo@math.hut.fi>                                           Mat-1.174   Computational PDE
                                                                                  Course Teacher    H.Apiola
  1. Matrix Method
  2. Fourier Method
References
  1. Introduction to Numerical Analysis by E. Atkinson.
  2. Numerical Analysis 5th edition by Burden and Faires
  3. Course Material

We will consider one of the well-known partial differential equation (PDE):

HEAT EQUATION

The heat equation can be written in 3-D as :
uxx+uyy+uzz=ut    where u=u(x,y,z,t).
To simplify the procedure we will take one dimensional heat equation:
uxx=ut , t>0, 0<x<1         ........(1)
u(x,0)=g(x) , 0<x<1
u(0,t)=a(t),
u(1,t)=b(t)

Equation (1)describes the temperature distribution in a rod of length one with temperatures a(t),b(t) at its ends and initial temperature g(x).

Explicit Methods

To solve equation (1) numerically we will use Finite Difference Method as follows:
1. introduce an initial discretization of the domain. tj=jk , j>0 , xi=ih ,0<i<n+1 where h and k are step sizes,  h=1/n+1
2. select some simple FD schems to approximate the derivatives, for example

f'(x)=1/h[f(x+h)-f(x)]
f'(x)=1/2h[f(x+h)-f(x-h)]
f''(x)=1/h2[f(x+h)-2f(x)+f(x-h)]

So for our problem we get :

1/h2[vi+1,j-2vi,j+vi-1,j]=1/k[vi,j+1-vi,j] ....(3)

when j=0 all the terms are known since we have  g(xi,0)=vi,0
to obtain vi,1   we rewrite equation (3) as:

vi,j+1=svi-1,j+(1-2s)vi,j+svi+1,j   where s=k/h2.....(4)

Because equation (4) gives the values vi,j+1explicitly in terms of the previous values,vi-1,j,vi,jand vi+1,jthe method is called explicit method.

Stability Analysis

1. Matrix Method

We will consider the case when a(t)=b(t))=0. Equation (4) which defines the numerical process can be written using matrix notation.for this let the vector of values at time t=jk be denoted by Vjthen we get

Vj+1=AVj where A is nxn matrix given by

                [1 - 2s       s          0  .....   0   ]
                [                                       ]
                [   s       1 - 2s       s   .....  0   ]
            A = [                                       ]
                [   0          s       1 - 2s       s   ]
                [                                       ]
                [   0          0          s  .... 1 - 2s]
Because a(t)=b(t)=0 we have v0j=vn+1,j=0
now since Vj+1=AVj we have Vj=AVj-1=A2 Vj-2=....=AjV0.
from the fact that the temperature in the bar will be zero when when time goes to infinty we therefore can say that our numerical solution is also tending to zero as the time going to infinity. and also from the fact that limAjV=0 as j gose to infinity is equivalent to have d(A)<1 where d(A) is the spectral radius of A. Therefore the parameter s/k2 must be chosen so that d(A)<1. The eigenvalues of A are . cj=1-2s(1-cos(aj)) , where aj=jpi/n+1 ,for 1<j<n.for more details about these eigenvalues please see Ref.1 and 2
For d(A) to be less than one we need
-1<1-2s(1-cosa)<1.
this is ture iff s<(1-cosaj)-1
since s is positive cosaj=-1 and since aj will be very close to pi when n=0 we must have s<1/2 this means for explicit algorithm to be stable we need to have s=k/h2<1/2. Unfortunatly this restriction makes the method very slow because for example if h=0.01 then we must have k=5x10-5,for 0<t<10 then the number of time steps must be 1/2x106 and the number of mesh points must be over 20 million!!