Chapter 4 The Wave Equaton Another classcal example of a hyperbolc PDE s a wave equaton. The wave equaton s a second-order lnear hyperbolc PDE that descrbes the propagaton of a varety of waves, such as sound or water waves. It arses n dfferent felds such as acoustcs, electromagnetcs, or flud dynamcs. In ts smplest form, the wave equaton refers to a scalar functon u = u(r,t), r R n that satsfes: u t = c u. (4.) Here denotes the Laplacan n R n and c s a constant speed of the wave propagaton. An even more compact form of Eq. (4.) s gven by u =, where = c t s the d Alembertan. 4. The Wave Equaton n D The wave equaton for the scalar u n the one dmensonal case reads u t = u c x. (4.) The one-dmensonal wave equaton (4.) can be solved exactly by d Alembert s method, usng a Fourer transform method, or va separaton of varables. To llustrate the dea of the d Alembert method, let us ntroduce new coordnates (ξ, η) by use of the transformaton ξ = x ct, η = x+ct. (4.3) 35
In the new coordnate system one can wrte and Eq. (4.) becomes u xx = u ξ ξ + u ξ η + u ηη, c u tt = u ξ ξ u ξ η + u ηη, u =. (4.4) ξ η That s, the functon u remans constant along the curves (4.3),.e., Eq. (4.3) descrbes characterstc curves of the wave equaton (4.) (see App. B). Moreover, one can see that the dervatve u/ ξ does not depends on η,.e., η ( u ξ After ntegraton wth respect to ξ one obtans ) = u ξ = f(ξ). u(ξ,η) = F(ξ)+G(η), where F s the prmtve functon of f and G s the constant of ntegraton, n general the functon of η. Turnng back to the coordnates (x, t) one obtans the general soluton of Eq. (4.) u(x,t) = F(x ct)+g(x+ct). (4.5) 4.. Soluton of the IVP Now let us consder an ntal value problem for Eq. (4.): u tt = c u xx, t, u(x,) = f(x), (4.6) u t (x,) = g(x). To wrte down the general soluton of the IVP for Eq. (4.), one needs to exspress the arbtrary functon F and G n terms of ntal data f and g. Usng the relaton one becomes: t F(x ct) = cf (x ct), where F (x ct) := ξ F(ξ) u(x,) = F(x)+G(x) = f(x); u t (x,) = c( F (x)+g (x)) = g(x).
After dfferentaton of the frst equaton wth respect to x one can solve the system n terms of F (x) and G (x),.e., F (x) = ( f (x) ) c g(x), G (x) = ( f (x)+ ). c g(x) Hence F(x) = f(x) c x g(y)dy+c, G(x) = f(x)+ c x g(y)dy C, where the ntegraton constant C s chosen n such a way that the ntal condton F(x) + G(x) = f(x) s fullfeld. Alltogether one obtans: u(x,t) = ( ) f(x ct)+ f(x+ct) + x+ct g(y) dy. (4.7) c x ct 4.. Numercal Treatment 4... A Smple Explct Method The frst dea s just to use central dfferences for both tme and space dervatves,.e., u j+ u j + u j t = c u j + u j + u j x, (4.8) or, wth α = c t/ x u j+ = u j + ( α )u j + α (u j + + u j ). (4.9) Schematcal representaton of the scheme (4.9) s shown on Fg. 4.. Note that one should also mplement ntal condtons (4.6). In order to mplement the second ntal condton one needs the vrtual pont u, u t (x,) = g(x ) = u u t +O( t ). Fg. 4. Schematcal vsualzaton of the numercal scheme (4.9) for (4.). x x x + t j+ t j t j
Wth g := g(x ) one can rewrte the last expresson as u = u tg +O( t ), and the second tme row can be calculated as u = tg +( α ) f + α ( f + f + ), (4.) where u(x,) = u = f(x ) = f. von Neumann Stablty Analyss In order to nvestgate the stablty of the explct scheme (4.9) we start wth the usual ansatz (.) ε j+ = g j e kx, whch leads to the followng expresson for the amplfcaton factor g(k) g = ( α )g +α gcos(k x). After several transformatons the last expresson becomes just a quadratc equaton for g, namely g β g+ =, (4.) where β = α sn ( k x). Solutons of the equaton for g(k) read g, = β ± β. Notce that f β > then at least one of absolute value of g, s bgger that one. Therefor one should desre for β <,.e., and g, = β ± β g = β + β =. That s, the scheme (4.9) s condtonal stable. The stablty condton reads ( ) k x α sn, what s equvalent to the standart CFL condton (.7)
t j+ Fg. 4. Schematcal vsualzaton of the mplct numercal scheme (4.) for (4.). x x x + t j t j α = c t x. 4... An Implct Method One can try to overcome the problems wth condtonal stablty by ntroducng an mplct scheme. The smplest way to do t s just to replace all terms on the rght hand sde of (4.8) by an average from the values to the tme steps j + and j,.e, u j+ u j + u j ( t = c x u j + j u +u j +uj+ + ) j+ u +u j+. (4.) Schematcal dagramm of the numercal scheme (4.) s shown on Fg. (4.). Let us check the stablty of the mplct scheme (4.). To ths am we use the standart ansatz leadng to the equaton for g(k) wth ε j+ = g j e kx β g g+β = ( ) k x β = +α sn. One can see that β for all k. Hence the solutons g, take the form and g, = ± β β g = ( β ) β =. That s, the mplct scheme (4.) s absolute stable. Now, the queston s, whether the mplct scheme (4.) s better than the explct scheme (4.9) form numercal pont of vew. To answer ths queston, let us analyse dsperson relaton for the wave equaton (4.) as well as for both schemes (4.9) and
Fg. 4.3 Dsperson relaton for the one-dmensonal wave equaton (4.), calculated usng the explct (blue curves) and mplct (red curves) methods (4.9) and (4.). ω t/α 3.5 3.5.5.5 α= α=.8 α=. α= α=.8 α=...4.6.8 k x/π (4.). The exact dsperson relaton s ω = ±ck,.e, all Fourer modes propagate wthout dsperson wth the same phase velocty ω/k = ±c. Usng the ansatz u j ekx ωt j for the explct method (4.9) one obtans: whle for the mplct method (4.) cos(ω t) = α ( cos(k x)), (4.3) cos(ω t) = +α ( cos(k x)). (4.4) One can see that for α both methods provde the same result, otherwse the explct scheme (4.9) always exceeds the mplct one (see Fg. (4.3)). For α = the scheme (4.9) becomes exact, whle (4.) devates more and more from the exact value of ω for ncreasng α. Hence, for Eq. (4.) there are no motvaton to use mplct scheme nstead of the explct one. 4..3 Examples Example. Use the explct method (4.9) to solve the one-dmansonal wave equaton (4.): u tt = 4u xx for x [, L] and t [,T] (4.5) wth boundary condtons u(, t) = u(l, t) =.
u 5 5 t Fg. 4.4 Space-tme evoluton of Eq. (4.5) wth the ntal 5 dstrbuton u(x, ) = sn(π x), u t (x,) =. 4 x 6 8 Assume that the ntal poston and velocty are Other parameters are: u(x,) = f(x) = sn(πx), and u t (x,) = g(x) =. Space nterval L= Space dscretzaton step x =. Tme dscretzaton step t =.5 Amount of tme steps T = Frst one can fnd the d Alambert soluton. In the case of zero ntal velocty Eq. (4.7) becomes u(x,t) = f(x t)+ f(x+t) = snπ(x t)+snπ(x+t) = sn(πx) cos(πt),.e., the soluton s just a sum of a travellng waves wth ntal form, gven by f(x). Numercal soluton of (4.5) s shown on Fg. (4.4). Example. Solve Eq. (4.5) wth the same boundary condtons. Assume now, that ntal dstrbutons of poston and velocty are, x [, x ]; u(x,) = f(x) = and u t (x,) = g(x) = g, x [x, x ];, x [x, L]. Other parameters are:
Fg. 4.5 Space-tme evoluton of Eq. (4.5) wth the ntal dstrbuton u(x, ) =, u t (x,) = g(x). Intal nonzero velocty g =.5 Intal space ntervals x = L/4, x = 3L/4 Space nterval L= Space dscretzaton step x =. Tme dscretzaton step t =.5 Amount of tme steps T = 4 Numercal soluton of the problem s shown on Fg. (4.5). Example 3. Vbratng Strng Use the explct method (4.9) to solve the wave equaton for a vbratng strng: u tt = c u xx for x [, L] and t [,T], (4.6) where c = wth the boundary condtons u(,t) = u(l,t) =. Assume that the ntal poston and velocty are u(x,) = f(x) = sn(nπx/l), and u t (x,) = g(x) =, n =,,3,.... Other parameters are: Space nterval L= Space dscretzaton step x =. Tme dscretzaton step t =.5 Amount of tme steps T = Usually a vbratng strng produces a sound whose frequency s constant. Therefore, snce frequency characterzes the ptch, the sound produced s a constant note. Vbratng strngs are the bass of any strng nstrument lke gutar or cello. If the speed of propagaton c s known, one can calculate the frequency of the sound pro-
duced by the strng. The speed of propagaton of a wave c s equal to the wavelength multpled by the frequency f : c = λ f If the length of the strng s L, the fundamental harmonc s the one produced by the vbraton whose nodes are the two ends of the strng, so L s half of the wavelength of the fundamental harmonc, so f = c L Solutons of the equaton n queston are gven n form of standng waves. The standng wave s a wave that remans n a constant poston. Ths phenomenon can occur because the medum s movng n the opposte drecton to the wave, or t can arse n a statonary medum as a result of nterference between two waves travelng n opposte drectons (see Fg. (4.6)) n = n = n = 3.5.5.5.5.5.5..4.6.8..4.6.8..4.6.8 n = 4 n = 5 n = 6.5.5.5.5.5.5..4.6.8..4.6.8..4.6.8 Fg. 4.6 Standng waves n a strng. The fundamental mode and the frst fve overtones are shown. The red dots represent the wave nodes.
4. The Wave Equaton n D 4.. Examples 4... Example. Use the standart fve-pont explct method (4.9) to solve a two-dmansonal wave equaton u tt = c (u xx + u yy ), u = u(x,y,t) on the rectangular doman [, L] [, L] wth Drchlet boundary condtons. Other parameters are: Space nterval L= Space dscretzaton step x = y =. Tme dscretzaton step t =.5 Amount of tme steps T = Intal condton u(x,y,) = 4x y( x)( y) Numercal soluton of the problem for two dfferent tme moments t = and t = 5 can be seen on Fg. (4.7) t = t = 5 Fg. 4.7 Numercal soluton of the two-dmensonal wave equaton, shown for t = and t = 5.