5 Stability of the simple explicit scheme

The purpose of the time-stepping scheme is to approximate u ( x , t ) at later and later times t . It is clear that the larger we take the time step δ t , the fewer steps will be necessary to reach a particular time t . One constraint on the size of δ t is that we know from our earlier look at difference methods that derivative approximations are most accurate when small increments are used. However, as we will see in the next couple of pages, a far more telling constraint on the size of δ t arises on consideration of stability . We begin with an Example.

Example 16

The temperature u ( x , t ) of a metal bar of length = 1 at a distance x from one end and at time t is modelled by the partial differential equation

u t = α u x x ( 0 < x < , t > 0 )

It is given that the metal has diffusivity α = 1 , that the two ends of the bar are kept at temperature u = 0 and that the initial temperature distribution is

u ( x , 0 ) = f ( x ) = x ( x )

Use the explicit difference scheme with δ x = 0.25 and δ t = 0.075 to approximate u ( x , t ) at t = δ t and t = 2 δ t .

Solution

In this case r = α δ t ( δ x ) 2 = 1.2 so that the numerical scheme can be written

u j n + 1 = u j n + 1.2 ( u j 1 n 2 u j n + u j + 1 n ) = 1.4 u j n + 1.2 ( u j 1 n + u j + 1 n )

The first stage is to use the given data to find u j 0

u 0 0 = 0 from the boundary condition u 1 0 = f ( δ x ) = f ( 0.25 ) = 0.188 from the initial condition u 2 0 = f ( 2 δ x ) = f ( 0.5 ) = 0.25 from the initial condition u 3 0 = f ( 3 δ x ) = f ( 0.75 ) = 0.188 from the initial condition u 4 0 = 0 from the boundary condition

The first time-step will find u j 1 . First we note that the boundary condition implies that u 0 1 = u 4 1 = 0 .

u 1 1 = 1.4 u 1 0 + 1.2 ( u 0 0 + u 2 0 ) = 1.4 × 0.19 + 1.2 ( 0 + 0.25 ) = 0.038 u 2 1 = 1.4 u 2 0 + 1.2 ( u 1 0 + u 3 0 ) = 1.4 × 0.25 + 1.2 ( 0.188 + 0.188 ) = 0.1 u 3 1 = 1.4 u 3 0 + 1.2 ( u 2 0 + u 4 0 ) = 1.4 × 0.19 + 1.2 ( 0.25 + 0 ) = 0.038

The second time-step will find u j 2 . First we note that the boundary condition implies that u 0 2 = u 4 2 = 0 . Now

u 1 2 = 1.4 u 1 1 + 1.2 ( u 0 1 + u 2 1 ) = 1.4 × 0.04 + 1.2 ( 0 + 0.1 ) = 0.067 u 2 2 = 1.4 u 2 1 + 1.2 ( u 1 1 + u 3 1 ) = 1.4 × 0.1 + 1.2 ( 0.038 + 0.038 ) = 0.05 u 3 2 = 1.4 u 3 1 + 1.2 ( u 2 1 + u 4 1 ) = 1.4 × 0.04 + 1.2 ( 0.1 + 0 ) = 0.067

Figure 6 shows the results found in Example 16.

Figure 6

No alt text was set. Please request alt text from the person who provided you with this resource.

Something has gone wrong here. And it only gets worse in subsequent time-steps. After 9 time-steps the numerical solution approximating u ( x , t ) at t = 9 δ t is

u ( 0.25 , 9 δ t ) u 1 9 = 140.5531 u ( 0.50 , 9 δ t ) u 2 9 = 198.7722 u ( 0.75 , 9 δ t ) u 3 9 = 140.5531

(to 4 decimal places). This is an example of instability . A part of the numerical solution wants to keep growing and growing in a way that is not a part of the engineering application being modelled.

There are many different definitions of (in)stability, and they often depend on the specific application in mind. For the heat conduction problem under discussion here, the following definition is sufficient.

Key Point 19

The explicit difference scheme u j n + 1 = r u j 1 n + ( 1 2 r ) u j n + r u j + 1 n r = α δ t ( δ x ) 2

u 0 n = 0 ( n > 0 ) u J n = 0 ( n > 0 ) u j 0 = f ( j δ x ) ( j = 1 , 2 , , J 1 )

where J δ x = , approximating the heat conduction problem

u t = α u x x ( 0 < x < , t > 0 ) u ( 0 , t ) = 0 ( t > 0 ) u ( , t ) = 0 ( t > 0 ) u ( x , 0 ) = f ( x ) ( 0 < x < ) .

is said to be stable if the approximations u j n do not grow in magnitude with n .

(Of course, there are applications where the principal quantity of interest does grow with time, and in these cases other definitions of stability are appropriate.)

The main stability result for the explicit scheme is proved in many textbooks on the subject, but for this Workbook it is sufficient to simply state it.

Key Point 20

The explicit scheme is stable if and only if

r 1 2

Writing this another way we see that the restriction on the time-step is that

δ t δ x 2 2 α

5.1 Why is the stability constraint a problem?

In the above account it has been stated that the stability constraint is a severe restriction on the time-step δ t . Here we discuss why this is the case.

For sake of argument let us take an example where α = 1 and choose δ x = 1 10 . The stability requirement insists that we must choose

δ t 1 2 δ x 2 = 1 200 ,

which is much smaller than δ x . If we require an even smoother approximation in the x direction we could halve δ x taking it to be equal to 1 20 . It is now necessary that

δ t 1 2 δ x 2 = 1 800 .

Decreasing δ x by a factor of 2 causes δ t to decrease by a factor of 4. The problem is that the upper bound on δ t involves the square of δ x , which is likely to be very small.

The following method overcomes the requirement of tiny time-steps.