8.9 KB · commit a9602da
The heat equation in one dimension is a typical parabolic partial differential equation and is a time variable problem. Equation (9.12), derived in Section 9.2, models two-dimensional heat conduction in a plate. Instead of a plate, if we consider a long thin insulated rod and equate the amount of heat absorbed to the difference between the amount of heat entering a small element and that leaving the element in time Δt, we obtain the partial differential equation ∂t∂u=α2∂x2∂2u(9.44) where α2=sρk(9.45) In Eq. (9.45), k is the coefficient of conductivity of the material, ρ is its density and s is its specific heat. Analytical solutions of Eq. (9.44), obtained by the method of separation of variables are given by
u(x,t)u(x,t)=e−p2α2t(c1cospx+c2sinpx)=ep2α2t(c2epx+c3e−px)}(9.46)From Eq. (9.46), the appropriate form of solution should be chosen depending upon the boundary conditions given. It is clear that to solve Eq. (9.44), we need one initial condition and two boundary conditions. In the sequel, we shall discuss the finite difference and cubic spline approximations to this equation.
We divide the (x,t) plane into smaller rectangles by means of the sets of lines
xt=ih,i=0,1,2,…=kl,k=0,1,2,…where h=Δx and l=Δt. Denoting u(ih,kl)=uik, we have ∂t∂u≈luik+1−uik(9.47)
and ∂x2∂2u≈h21(ui−1k−2uik+ui+1k)(9.48) Equation (9.44) is replaced by the finite difference analogue luik+1−uik=α2h2ui−1k−2uik+ui+1k, which simplifies to uik+1=λui−1k+ui+1k+(1−2λ)uik,(9.49) where λ=h2α2l(9.50) In Eq. (9.49), uik+1 is expressed explicitly in terms of ui−1k,ui+1k and uik. Hence it is called the explicit formula for the solution of one-dimensional heat equation. It can be shown that Eq. (9.49) is valid only for 0≤λ≤21, which is called the stability condition for the explicit formula.
If we set λ=21 in Eq. (9.49), we obtain the simple formula uik+1=21(ui−1k+ui+1k)(9.51) which is called Bender–Schmidt recurrence formula. It is clear that Eqs. (9.49) and (9.51) have limited application because of the restriction on the values of λ. A formula which does not have any restriction on λ is that due to Crank and Nicolson. In Eq. (9.44), if we replace ∂x2∂2u by the average of its finite difference approximations on the kth and (k+1)th time levels, we obtain ∂x2∂2u=2h21(ui−1k−2uik+ui+1k+ui−1k+1−2uik+1+ui+1k+1) Hence, Eq. (9.44) is approximated by luik+1−uik=2h2α2(ui−1k−2uik+ui+1k+ui−1k+1−2uik+1+ui+1k+1) which simplifies to −λui−1k+1+(2+2λ)uik+1−λui+1k+1=λui−1k+(2−2λ)uik+λui+1k(9.52) On the left side of Eq. (9.52) we have three unknowns and on the right side, all are known quantities. This is called Crank–Nicolson formula for the one-dimensional heat equation and it is an implicit formula.
It is convergent for all finite values of λ. If there are N internal mesh points on each time row, then Eq. (9.52) gives N simultaneous equations for the N unknowns. In a similar way, values of u on all time rows can be calculated.
By symmetry, we have u11=u41andu21=u31 Solving the above system, we obtain u21=u31=0.6460 Hence, u(0.6,0.04)≈0.6460, the error in which is 0.0052. ◀
Corresponding to i=1,2 and 3, we obtain the three equations
−3u11−u21u11−3u21+u31u21−3u31=0=0=−81.Solving the above system, we obtain u21=u(21,81)≈561=0.01786 (error = 0.00092). ◀