eview of Linear Numerical Sabiliy Numerical Dispersion n he previous lecure, we considered he linear numerical sabiliy of boh advecion and diffusion erms when approimaed wih several spaial and emporal differencing schemes. To deermine he linear sabiliy of he advecion equaion, we assumed ha a model variable h has wave-lie i soluions of he form h he ˆ, where ĥ is ampliude, is a zonal wavenumber, L is wavelengh, and ω = is frequency. The frequency has boh real and imaginary componens, i i.e., i, such ha h he ˆ e. Thus, he ampliude of h may change wih ime as a funcion of he value of e. Finie difference schemes may be absoluely sable, condiionally sable, or absoluely unsable. For absoluely unsable schemes, he model soluion will grow eponenially for all chosen values of he parameers ha deermine is numerical sabiliy. Conversely, for absoluely sable schemes, he model soluion will remain sable for all chosen values of he parameers ha deermine is numerical sabiliy. For condiionally sable schemes, however, he model soluion will remain sable so long as he chosen values of he parameers ha deermine is numerical sabiliy adhere o he sabiliy crierion for he chosen differencing scheme. To deermine linear sabiliy, we considered a one-dimensional advecion equaion of he form: h j h We hen discreized his equaion ug various combinaions of spaial and emporal finie difference approimaions. The resuling equaion was hen solved for e e given and τ = ime sep number. j e, noing ha We found ha he forward-in-ime, bacward-in-space finie difference scheme is condiionally sable. When he sabiliy condiion is saisfied, he model soluion is eponenially damped wih ime. This eponenial damping is a funcion of wavelengh, wih shorer wavelenghs associaed wih he greaes damping, and he Couran number, wih inermediae sable values of he Couran number associaed wih he greaes damping. However, he cenered-in-ime, 2 nd order ceneredin-space and cenered-in-ime, 4 h order cenered-in-space finie difference schemes, while also being condiionally sable, are no associaed wih eponenial damping. nuiively, shorer wavelengh feaures where is large relaive o heir wavelengh L are poorly resolved on he model grid. Two lecures ago, we demonsraed ha shorer wavelengh feaures are associaed wih relaively large runcaion error compared o heir longer wavelengh counerpars. As we will see in his and he ne lecure, shorer wavelengh feaures are also problemaic wih respec o heir modeled propagaion and heir non-linear ineracions wih oher Numerical Dispersion, Page
shor wavelengh feaures in he model. Consequenly, he damping of such feaures, wheher via he chosen finie difference scheme or eplici numerical diffusion, is ofen desired o improve he qualiy of he model soluion. n his lecure, we inroduce he concep of numerical dispersion, describing non-physical wave and energy propagaion ha can resul from finie differencing schemes, and demonsrae ha i is paricularly roublesome for shor wavelengh feaures. Numerical Dispersion Consider he linear one-dimensional advecion equaion saed above. The advecive speed of he wave defined by h is simply equal o, a consan advecive velociy. More precisely, he phase speed of any wave defining is moion is given by: C p Here, ce ω =, Cp =. Liewise, he group velociy of any wave defining he propagaion of he wave s energy is given by: C g Here, again ce ω =, Cg =. Because Cp = Cg, he wave is said o be non-dispersive. This is rue of any advecive wave in naure. To prove his, consider he linear one-dimensional advecion i equaion saed above and he general soluion for h of he form h he ˆ. Plugging his in and solving for he parial derivaives analyically, we obain: ihe ˆ i i ihe ˆ This simplifies o he epression ha was saed wihou derivaion above. When he soluion o he advecion equaion is approimaed ug finie difference schemes, he phase speed and group velociy may no necessarily equal, nor will hey necessarily equal each oher. aher, C p and C g Consider, for insance, he forward-in-ime, bacward-in-space finie difference scheme applied o he one-dimensional advecion equaion. n our previous lecure, we found ha: Numerical Dispersion, Page 2
Numerical Dispersion, Page 3 i i e Separaing his equaion ino is real (op) and imaginary (boom) componens, we obained: e e To evaluae he linear numerical sabiliy of his scheme, we solved he sysem of equaions for e by eliminaing ω. To deermine he phase speed and group velociy of his scheme, we now wish o solve he sysem of equaions for ω by eliminaing e. We can do so by dividing he boom equaion by he op equaion o obain: To solve his equaion for ω, noe ha he lef-hand side of he above equaion is simply equal o an(ω ). Thus, ae he inverse angen (or arcangen) of boh sides o obain: arcan For ω = Cp, we can rewrie he above equaion as: C P arcan is clear ha he phase speed is no simply equal o bu is now dependen upon he model ime sep, he grid spacing, and he wavelengh L (ce = 2π/L). This dependency is visualized in Figure. (Noe ha depiced in Figure is he raio of he approimae Cp o he eac advecive velociy, similar o he mehodology used o visualize runcaion error approimae divided by eac soluion.) For waves of wavelengh 5 and longer, he phase speed is slower han for C < 0.5, equal o for C = 0.5 and, and greaer han for 0.5 < C <. As we deermined in he previous lecure,
his finie difference scheme is unsable for C >. For waves of wavelengh 4 and shorer, he phase speed is again slower han for C < 0.5 and equal o for C = 0.5. However, for larger values of C, he phase speed can be negaive or, in he case of he 4 wave, undefined when C =. Noe ha his is differen han is depiced in Figure 3.24 of he course e, upon which Figure is based; his represens an error in he course e, which one can prove by obaining Cp oneself ug he above equaion for Couran numbers beween 0.5 and. Figure. aio of he phase speed Cp o he advecive velociy for he forward-in-ime, bacward-in-space finie difference scheme applied o he one-dimensional advecion equaion for Couran numbers C beween 0.05 and and waves of wavelengh beween 2. and 20. Adaped from Warner (20), heir Figure 3.24, wih correc daa ploed for wavelenghs 4. The dependency of he phase speed upon wavelengh indicaes ha he wave-lie soluion for h is dispersive. n general, a wave wih a phase speed ha depends upon wavelengh is dispersive. We will consider wha his means concepually wih an eample laer in his lecure. Similarly, one could ae he equaion for ω, solve i for ω, and hen ae is firs parial derivaive wih respec o o obain an epression for Cg, he group velociy describing wave energy propagaion. Doing so, one would find ha Cp Cg, such ha he wave and is energy are associaed wih differen propagaion characerisics, a characerisic of a dispersive wave. The process described above for he forward-in-ime, bacward-in-space finie difference scheme can be repeaed for any finie difference scheme. For eample, doing so for he cenered-in-ime, 2 nd order cenered-in-space finie difference scheme, i can be shown ha: arc Numerical Dispersion, Page 4
Subsiuing for ω = Cp, we can rewrie he above equaion as: C p arc Because of he above: symbol, here are wo differen phase speeds for wo differen waves defined C p arc C p arc The firs is an approimaion o he physical wave ha moves in he same direcion as, bu a a slower rae of speed han, he physical wave. The second is a ficiious wave, or compuaional mode, ha moves in he opposie direcion of wih smaller magniude han he physical wave. The raios of he phase speed Cp o he advecive velociy for each wave are ploed in Figure 2. Noe ha he greaes deparures from occur for L < 8 and for smaller Couran numbers. Figure 2. aio of he phase speed Cp o he advecive velociy for he cenered-in-ime, 2 nd order cenered-in-space finie difference scheme applied o he one-dimensional advecion equaion as a funcion of wavelengh for hree seleced values of he Couran number. Solid lines depic he phase speed of he approimaion o he physical wave while dashed lines depic he phase speed of he compuaional mode. Adaped from Warner (20), heir Figure 3.25. Numerical Dispersion, Page 5
Generally speaing, a emporal differencing scheme ha involves compuaions a more han wo imes (e.g., he curren and fuure imes) will resul in one or more compuaional modes. For eample, he cenered-in-ime emporal differencing scheme is 2 nd order accurae involving hree imes and has one physical mode and one compuaional mode. The unge-kua 3 emporal differencing scheme is 3 rd order accurae involving four imes and has one physical mode and wo compuaional modes. n general, for a emporal differencing scheme ha is N h order accurae, involving N+ imes, here are N- compuaional modes. The compuaional mode(s) ypically have much smaller ampliude han does he physical mode. can be difficul o isolae he impac of he compuaional mode upon he numerical soluion from ha of wave dispersion. As depiced above, wave dispersion is mos eviden for shorer wavelengh feaures; his is generally rue for compuaional mode soluions as well. Typically, boh compuaional mode and shor wavelengh dispersive waves are dampened in he model soluion by some means. mplici numerical diffusion, which we discussed indirecly in he las lecure, and eplici numerical diffusion, which we will discuss more in he ne lecure, are wo ways of damping hese waves. Time filering may also be used o miigae he compuaional mode, bu his ypically also reduces he accuracy of he emporal differencing scheme and is associaed wih a more sringen sabiliy crierion han if i were no used. eurning o he cenered-in-ime, 2 nd order cenered-in-space differencing scheme, we can obain he group velociy Cg for he approimaion o he physical wave. To wi, f we plug in for Cp, we obain: C g C p C g arc Noing ha: arc( a) a 2 a we obain: C g 2 Numerical Dispersion, Page 6
Such ha: C g 2 Simplifying, we obain: C g 2 The raio of he group velociy o he advecive velociy is depiced in Figure 3. Wheher viewed mahemaically or in erms of acual values (c.f. Figures 2 and 3), he group velociy and phase speed are no equal, such ha he propagaion of he wave and is energy are no coinciden wih each oher. For L < 4, he group velociy is in he opposie direcion of he wave s propagaion. For L = 4, he group velociy is saionary. For L > 4, he group velociy is in he same direcion as bu slower han he wave s propagaion, paricularly for L < ~0. As wih phase speed, he greaes deparures from occur for smaller values of he Couran number. Figure 3. aio of he group velociy Cg o he advecive velociy for he cenered-in-ime, 2 nd order cenered-in-space finie difference scheme applied o he one-dimensional advecion Numerical Dispersion, Page 7
equaion as a funcion of wavelengh for hree seleced values of he Couran number. Adaped from Warner (20), heir Figure 3.25. Noe ha he wavelengh- and Couran number-dependence of Cp and Cg will vary beween finie differencing schemes. An Eample Consider a model ha solves he one-dimensional advecion equaion given by: h h Le he model grid conain 00 grid poins. se periodic boundary condiions, such ha grid poin is adjacen o grid poins 00 and 2, and grid poin 00 is adjacen o grid poins 99 and. Here, we le = m (such ha he domain lengh is 00 m) and = 0 m s -. The iniial h is defined by a shor wavelengh Gaussian wave, wih high ampliude for large and low ampliude for small, in he heigh field a he cener of he model grid. We consider hree model ime seps: = 0 s, such ha C = 0.; = 50 s, such ha C = 0.5; and = 90 s, such ha C = 0.9. n each case, he model is inegraed forward in ime unil he Gaussianlie wave reurns o is original locaion (a = 00000 m / 0 m s - = 0000 s); hus, he eac soluion is idenical o he iniial condiion. The cenered-in-ime, 2 nd order cenered-in-space finie differencing scheme is used for each inegraion; as a resul, here is no implici damping of he model soluion wih ime for any value of C. Numerical Dispersion, Page 8
Figure 4. Fluid heigh h (m) afer inegraing he one-dimensional advecion equaion for 0,000 s on he model grid described in he e above for Couran numbers C of 0. (op), 0.5 (middle), and 0.9 (boom). The hin grey curve in he op panel represens boh he iniial condiion and eac soluion. eproduced from Warner (20), heir Figure 3.27. n Figure 4, he approimae soluion for each of he above-lised Couran numbers is depiced. The iniial condiion and eac soluion are given by he hin grey line in he op panel. Though we concepualize he physical wave as a gle wave, i is beer concepualized as he linear superposiion of many waves of varying wavelengh (e.g., as may be depiced ug a Fourier series). Given our earlier analysis in Figure 2, we now ha he phase speed of each individual wave differs from ha of he ohers: shorer wavelengh feaures move a a slower rae of speed han he longer wavelengh feaures. For all wavelenghs, his effec is smalles when he Couran number is ~ and is magnified for smaller Couran numbers. Now, consider he cases where C = 0. bu cenered-in-ime, 4 h order cenered-in-space (Figure 5) and hird-order unge-kua in ime, 6 h order cenered-in-space (Figure 6) finie differencing schemes are used. There is no implici damping for he cenered-in-ime, 4 h order cenered-inspace scheme, bu here is implici damping of shorer wavelengh feaures wih ime for he hirdorder unge-kua in ime, 6 h order cenered-in-space scheme due o he unge-kua emporal differencing. Figure 5. As in he op panel of Figure 4, ecep ug he cenered-in-ime, 4 h order cenered-inspace finie differencing scheme. eproduced from Warner (20), heir Figure 3.28. Numerical Dispersion, Page 9
n boh cases, shor wavelengh feaures move slower han he physical wave, as was demonsraed above for he cenered-in-ime, 2 nd order cenered-in-space scheme. However, he ampliude of hese shorer wavelengh feaures in he more accurae schemes is reduced compared o ha in he cenered-in-ime, 2 nd order cenered-in-space scheme. Consequenly, he ampliude of he primary wave is beer preserved. Thus, uilizing more accurae finie difference schemes in boh ime and space miigaes he deleerious effecs of numerical dispersion upon he model soluion. Figure 6. As in he op panel of Figure 4, ecep ug he hird-order unge-kua in ime, 6 h order cenered-in-space finie differencing scheme. eproduced from Warner (20), heir Figure 3.30. Numerical Dispersion, Page 0