5.5 KB · commit a9602da
The wave equation is defined by the boundary value problem ∂t2∂2u=c2∂x2∂2u(9.64) with the boundary conditions
u(x,0)ut(x,0)u(0,t)u(1,t)=f(x),=ϕ(x)=ψ1(t)=ψ2(t)⎭⎬⎫(9.65)for 0≤t≤T. This equation is of hyperbolic type and models the transverse vibrations of a stretched string. As earlier, we use the following difference approximations for the derivatives uxx=h21(ui−1k−2uik+ui+1k)+O(h2)(9.66) and utt=l21(uik−1−2uik+uik+1)+O(l2)(9.67) where x=ih, t=kl, and u(x,t)=u(ih,kl)=uik. Further, ut(x,t) is approximated by ut(x,t)=2luik+1−uik−1+O(l2)(9.68)
Substituting from Eqs. (9.66) and (9.67) in Eq. (9.64), we obtain l21(uik−1−2uik+uik+1)=h2c2(ui−1k−2uik+ui+1k). Setting α=hcl in the above and rearranging the terms, we have uik+1=−uik−1+α2(ui−1k+ui+1k)+2(1−α2)uik(9.69) Equation (9.69) shows that the function values at the kth and (k−1)th time levels are required to determine those at the (k+1)th time level. Such difference schemes are called three level difference schemes compared to the two level schemes derived in the parabolic case.* Formula (9.69) holds good if α<1, which is the condition for stability.
There exist implicit finite difference schemes for the equation given by Eq. (9.64). Two such schemes are l2uik−1−2uik+uik+1=2h2c2(ui−1k−1−2uik−1+ui+1k−1+ui−1k+1−2uik+1+ui+1k+1)(9.70) and l2uik−1−2uik+uik+1=4h2c2[(ui−1k−1−2uik−1+ui+1k−1)+2(ui−1k−2uik+ui+1k)+(ui−1k+1−2uik+1+ui+1k+1)](9.71) Equations (9.70) and (9.71) hold good for all values of hcl. The use of formula given in Eq. (9.69) is demonstrated in the following examples.
*A three level scheme for solving parabolic equations in one dimension may be found in Sastry [1976].
Several packages are available for solving partial differential equations; but, these are often limited to the solution of simple problems involving two- and three-dimensional cases. IMSL possesses routines for solving Poisson's equation in two and three dimensions and also systems of partial differential equations in one dimension. It is well known that MATLAB has excellent display capabilities and these can be used, with advantage, for visualisation of two-dimensional spatial problems.