Beam Warmg Secod-Order Upwd Method Petr Valeta Jauary 6, 015 Ths documet s a part of the assessmet work for the subject 1DRP Dfferetal Equatos o Computer lectured o FNSPE CTU Prague. Abstract Ths documet cotas the dervato of the Beam Warmg secod-order upwd method ad subsequetly the applcato of ths method s demostrated. It s used for the dscretzato of the lear advecto ad Burgers equatos ad the the order of ths method for both equatos s examed. The stablty codto ad modfed equato were examed oly for the advecto equato accordace wth the requremets. As a part of ths work the scheme was also mplemeted the software package MATLAB R. All source fles ca be foud at http://kfe.fjf.cvut.cz/~valepe7/fles/1drp. Cotets 1 Itroducto 1 Dervato 3 Advecto equato 3 3.1 Dfferece scheme....................................... 3 3. Order of accuracy....................................... 3 3.3 Stablty............................................ 4 3.4 Modfed equato...................................... 4 4 Burgers equato 4 4.1 Dfferece scheme....................................... 5 5 Cocluso 5 1 Itroducto Ths documet cocers a specfc secod-order accurate upwd method proposed by Warmg ad Beam 1976). The Beam Warmg secod-order upwd method exemplfes some of the geeral vrtues ad lmtatos of hgher-order upwd methods [1]. I the frst secto oe ca fd the dervato of ths method, cosequetly ths method s appled to dscretze lear advecto equato ad Burgers equato. The order of accuracy s examed for both equatos as well as the mplemetato of schemes software package MATLAB R. The stablty codto s examed ad the modfed equato s prepared oly for the oe-way wave equato. 1
Dervato I our case, let us have ths goverg equato t + fu) = 0. 1) To beg wth dervato of the Beam Warmg secod-order upwd method, cosder the followg Taylor seres for ux, t + ) ux, t + ) = ux, t) + t + u t + O3 ), ) where the tme dervatves ca be replaced by space dervatves usg the goverg equato 1). Ths has bee doe by so called Cauchy Kowalewsk techque, whch mples t = fu) u ad t = where au) fu). 3) Substtute the precedg expressos for the tme dervatves 1) to the Taylor seres for ux, t + ) ) to obta ux, t + ) = ux, t) fu) x, t) + x, t) + O 3 ). 4) Assume au) > 0. To dscretze the frst space dervatve we use 3-pot secod-order backwarddfferece for costat x, whch s defed as Also let where au) fu) fu) x, t ) = 3fu ) 4fu 1 ) + fu ) + O x ). 5) x, t ) = x 1, t ) + O x) 6) ) x 1, t ) = au 1/ ) fu ) fu 1 )) au 3/ ) fu 1 ) fu )) x +O x ). The resultg method s as follows substtutg / x λ) 7) = u λ 3fu ) 4fu 1) + fu ) ) + λ [ au 1/ ) fu ) fu 1) ) au 3/ ) fu 1) fu ) )], u +1 whch s the Beam Warmg secod-order upwd method for au) > 0. 8) Assume au) < 0. To dscretze the frst space dervatve ow we use 3-pot secod-order forwarddfferece, whch s defed as fu) x, t ) = 3fu ) 4fu +1 ) + fu + ) + O x ). 9) Smlar way oe obtas = u + λ 3fu ) 4fu +1) + fu +) ) + λ [ au +3/ ) fu +) fu +1) ) au +1/ ) fu +1) fu ) )], u +1 whch s the Beam Warmg secod-order upwd method for au) < 0 [1]. 10)
3 Advecto equato The advecto equato s the hyperbolc partal dfferetal equato that govers the moto of a coserved scalar feld as t s advected by a kow velocty vector feld. Let us cosder oly oe space dmeso ad a costat velocty a. The equato takes the followg form t + a = 0. 11) It has clearly be see that the fucto fu), whch occurs the goverg equato 1) satsfes smple equalty fu) = au. The oe ca mmedately get that au) = a. 3.1 Dfferece scheme Now we apply Beam Warmg secod-order upwd method to dscretze the advecto equato 11). It gets two dfferet forms depedg o a sg of a: u +1 u +1 u u + a 3u 4u 1 + u a 3u 4u +1 + u + = a u u 1 + u x for a > 0, 1) = a u u +1 + u + x for a < 0. 13) 3. Order of accuracy I ths secto we wll exame the order of accuracy of the Beam Warmg scheme appled o the advecto equato. Usg Taylor seres expasos drectly o 1) or 13) would have resulted terms of order, x. Oe has to use followg defto []: Defto 1. A scheme P, x u = R, x f that s cosstet wth the dfferetal equato P u = f s accurate of order p tme ad order q space f for ay smooth fucto φt, x) We say that such a scheme s accurate of order p, x q ). Now we llustrate the use of ths defto. From 1) we have ad P, x φ = φ+1 φ P, x φ R, x P φ = O p, x q ). 14) + a 3φ 4φ 1 + φ a φ φ 1 + φ x 15) R, x f = 1 +1 f + f ) a 4 x 3f 4f 1 + f ) 16) We use the Taylor seres o 15) ad 16) evaluated at t, x ) to obta P, x φ = φ t + aφ x + φ tt a φ xx + O, x ) 17) ad for a smooth fucto ft, x) 16) becomes I addto, P φ = φ t + aφ x = f the R, x f = f + f t a f x + O, x ). 18) P, x φ R, x P φ = O, x ). 19) Hece the Beam Warmg scheme s accurate of order, x ). 3
3.3 Stablty I ths secto we demostrate the stablty of Beam Warmg scheme for the oe-way wave equato by usg vo Neuma aalyss, the most popular type of lear stablty aalyss. Thus perform the trasformato u +m +k g m e kξ equato 1) ad obta a solate expresso for amplfcato factor g: g = a λ cosξ) sξ) a λ sξ) + a λ cos ξ) + aλ cosξ) sξ) a λ cosξ) aλ sξ) + aλ cos ξ) aλ cosξ) + aλ + 1. 0) The scheme s stable f the followg codto s fulflled: ξ : g < 1. The orm we compute by summg the squares of the real ad magary part. Precedg codto receves the followg form aλaλ + )aλ + 1) cosξ) 1) 0. 1) The equalty 1) mples that the Beam Warmg scheme s stable f the Courat Fredrchs Lewyor CFL) codto s fulflled, x a. ) The CFL umber s, therefor the CFL lmt s larger tha 1. Ths s the major beeft of usg a wder stecl. The whole process of calculatg the amplfcato factor ca be see attached fle stab_bw.mw. 3.4 Modfed equato A useful techque for studyg the behavor of solutos to dfferece equatos s to model the dfferece equato by a dfferetal equato. The dervato of the modfed equato s closely related to the calculato of the local trucato error for a gve method [3]. I order to fd the modfed equato of the dfferece schemes 1), 13) oe has to replace dscrete varables usg the ffth degree Taylor polyomals evaluated at t, x ). If we express the tme dervatves resulted expressos terms of space dervatves we obta the modfed equato, whch s easer to aalyze u t + au x = a 3aλ + a λ ) x u xxx. 3) 6 The modfed equato s dspersve. For hgher order methods ths elmato of tme dervatves terms of space dervatves must be doe carefully ad s complcated by the eed to clude hgher order terms []. The advatage of the tegrated computer algebra systems was mafested o ths very spot. The etre process ca be observed attached fle modf_bw.mw. 4 Burgers equato Burgers equato s a fudametal partal dfferetal equato. It occurs varous areas of appled mathematcs, such as modelg of gas dyamcs ad traffc flow. We wll cosder a vscd type of ths equato oe space dmeso, whch has the followg form [3] t + u = 0. 4) It has clearly be see that the fucto fu), whch occurs the goverg equato 1) satsfes smple equalty fu) = u /. The oe ca mmedately get that au) = u. 4
4.1 Dfferece scheme Now we apply Beam Warmg secod-order upwd method to dscretze the Burgers equato. It gets ad u + 3u ) 4u 1 ) + u ) = 4 x [ 4 x u 1/ u ) u 1) ) u 3/ u 1 ) u ) )] for u > 0 u +1 u 3u ) 4u +1 ) + u + ) = 4 x [ 4 x u +3/ u + ) u +1) ) u +1/ u +1 ) u ) )] for u < 0. u +1 5) 6) 5 Cocluso The mplemetato of the Beam Warmg secod-order upwd method appled o both equatos ca be foud attached fles advecto_equato.m ad burgers_equato.m. Ulke frst-order upwd methods, hgher-order upwd methods may be extremely oscllatory. I fact, hgher-order upwd methods may be eve more oscllatory tha cetered methods, as s the case comparg the Beam-Warmg secod-order upwd method wth the Lax Wedroff method. I ther orgal paper, Warmg ad Beam 1976) recogzed the oscllatory ature of ther secod-order upwd method. They proposed a bledg that used a frst-order upwd method at shocks ad soc pots ad ther secod-order upwd method smooth regos [1]. Refereces [1] Culbert B. Laey, Computatoal Gasdyamcs. Cambrdge Uversty Press, New York, 1998. [] Joh C. Strkwerda, Fte Dfferece Schemes ad Partal Dfferetal Equatos. Socety for Idustral ad Appled Mathematcs, Phladelpha, d edto, 004. [3] Radall J. LeVeque, Numercal Methods for Coservato Laws. Sprger Basel AG, d edto, 199. 5