2.4 KB · commit a9602da
We consider again the initial boundary value problem defined by ∂t∂u=∂x2∂2u(9.59) with the conditions
u(x,0)u(0,t)andu(a,t)=g(x),0≤x≤a=f1(t)=f2(t)⎭⎬⎫(9.60)where g(x), f1(t) and f2(t) are given functions. As earlier, we denote Δx=h, Δt=l and u(ih,kl)=uik. If Sk(x) denotes the cubic spline approximating the function values uik, then Eq. (9.59) is approximated by luik+1−uik=(1−θ)Mik+θMik+1(9.61) where Mik=Sk′′(xi). Using the recurrence relations for the spline second derivatives at the kth and (k+1)th time levels, both Mik and Mik+1 in Eq. (9.61) can be eliminated. When this is done, we obtain the following finite difference approximation to the one-dimensional heat equation (1−6θ)(ui−1k+1+ui+1k+1)+(4+12θ)uik+1=[1+6r(1−θ)](ui−1k+ui+1k)+[4−12r(1−θ)]uik,(9.62) where r=h2l and i=1,2,…,n−1.
Equation (9.62) is due to Papamichael and Whiteman. It is a general implicit representation of Eq. (9.59) and reduces to the explicit and Crank–Nicolson formulae for particular choices of θ. It can be verified that Eq. (9.62) reduces to the explicit formula for θ=6r1, whereas, the choice θ=21+6r1 leads to the Crank–Nicolson formula.
The following are the computational steps for solving the problem defined by Eqs. (9.59) and (9.60) using Eq. (9.62).
(i) Determine Mi0 from the relation Mi−10+4Mi0+Mi+10=h26(gi−1−2gi+gi+1),(i=1,2,…,n−1)(9.63) with M00=f1′′(0)andMn0=f2′′(0).
(ii) Solve the system in Eq. (9.62) for k=0 with u01=f1(l) and un1=f2(l). This gives the values of u11,u21,…,un−11.
(iii) Compute Mi1(i=1,2,…,n−1) using the recurrence relation with M01=f1′′(l)andMn1=f2′′(l).
At this stage, we have computed the spline solution at t=l. Obviously, this procedure can be repeated to compute the solution at t=2l,3l,…