422 Chapter 7 Numerical Methods
i
m 1256
01111
1 12 34 34 1
(^238169121316)
(^3176416725643964)
Table 9 Numerical solution of Eqs. (2)–(5)
..
.
u 5 ( 2 )=
1
4
(
u 1 ( 1 )+u 6 ( 1 )+u 9 ( 1 )+ 0
)
=
3
4 ,
u 6 ( 2 )=^14
(
u 2 ( 1 )+u 5 ( 1 )+u 7 ( 1 )+u 10 ( 1 )
)
= 1.
The 0’s in these equations stand for boundary temperatures.
An alert calculator will notice that only the unknownsu 1 ,u 2 ,u 5 ,u 6 need be
calculated, since, in this example, the others will be given at each time step by
symmetry
u 1 (m)=u 4 (m)=u 9 (m)=u 12 (m), u 5 (m)=u 8 (m),
u 6 (m)=u 7 (m), u 2 (m)=u 3 (m)=u 10 (m)=u 11 (m).
InTable9arecomputedvaluesofthesignificantu’s at a few times.
Now consider this heat problem, which is not solvable by separation of vari-
ables:
∂^2 u
∂x^2 +
∂^2 u
∂y^2 =
∂u
∂t inR, (9)
u=f(t) onC, (10)
u=0inRatt= 0. (11)
Here,Ris anL-shaped region andCis its boundary. The functionfwe take
to bef(t)=t, but more complicated functions can be used.
To start the numerical solution, we set up a square grid, as shown in Fig. 7.
The spacing is x= y= 1 /5 and the numbering of the points is shown. The
typical replacement equation is just as given in Eqs. (7) and (8). We must bear
in mind, however, that some points are adjacent to boundary points where the
temperature is given byf(t).