正在加载图片...
19.1 Flux-Conservative Initial Value Problems 843 form (19.1.12)for an eigenmode is substituted into equation (19.1.31), 2-1=-20At △E ink△x (19.1.32) whose solution is w△t 2 △t ξ=-i sink△z (19.1.33) △x Thus the Courant condition is again required for stability.In fact,in equation (19.1.33),2 =1 for any vAt<Ar.This is the great advantage of the staggered leapfrog method:There is no amplitude dissipation. Staggered leapfrog differencing of equations like(19.1.20)is most transparent if the variables are centered on appropriate half-mesh points: r+1/2三 .Oun +1-吗 RECIPES =U- 0zlj+1/2 △x (19.1.34) 9 0u/n+1/2 巧+1-吗 at\i △t This is purely a notational convenience:we can think of the mesh on which r and s are defined as being twice as fine as the mesh on which the original variable u is 8。孕是今 defined.The leapfrog differencing of equation(19.1.20)is IENTIFIC 61 △t △x (19.1.35) 2-s2=42--2 △t △x If you substitute equation(19.1.22)in equation (19.1.35),you will find that once 10.621 again the Courant condition is required for stability,and that there is no amplitude 三 Numerical dissipation when it is satisfied. 43126 If we substitute equation(19.1.34)in equation (19.1.35),we find that equation (19.1.35)is equivalent to 1-2g+="1-2%+ North (△t)2 (△x)2 (19.1.36) This is just the "usual"second-order differencing of the wave equation(19.1.2).We see that it is a two-level scheme,requiring both un and u"-1 to obtain un+1.In equation(19.1.35)this shows up as both s-1/2 and rn being needed to advance the solution. For equations more complicated than our simple model equation,especially nonlinear equations,the leapfrog method usually becomes unstable when the gradi- ents get large.The instability is related to the fact that odd and even mesh points are completely decoupled,like the black and white squares of a chess board,as shown19.1 Flux-Conservative Initial Value Problems 843 Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copyin Copyright (C) 1988-1992 by Cambridge University Press. Programs Copyright (C) 1988-1992 by Numerical Recipes Software. Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5) g of machine￾readable files (including this one) to any server computer, is strictly prohibited. To order Numerical Recipes books or CDROMs, visit website http://www.nr.com or call 1-800-872-7423 (North America only), or send email to directcustserv@cambridge.org (outside North America). form (19.1.12) for an eigenmode is substituted into equation (19.1.31), ξ2 − 1 = −2iξ v∆t ∆x sin k∆x (19.1.32) whose solution is ξ = −i v∆t ∆x sin k∆x ±  1 − v∆t ∆x sin k∆x 2 (19.1.33) Thus the Courant condition is again required for stability. In fact, in equation (19.1.33), |ξ| 2 = 1 for any v∆t ≤ ∆x. This is the great advantage of the staggered leapfrog method: There is no amplitude dissipation. Staggered leapfrog differencing of equations like (19.1.20) is most transparent if the variables are centered on appropriate half-mesh points: rn j+1/2 ≡ v ∂u ∂x n j+1/2 = v un j+1 − un j ∆x s n+1/2 j ≡ ∂u ∂t n+1/2 j = un+1 j − un j ∆t (19.1.34) This is purely a notational convenience: we can think of the mesh on which r and s are defined as being twice as fine as the mesh on which the original variable u is defined. The leapfrog differencing of equation (19.1.20) is rn+1 j+1/2 − rn j+1/2 ∆t = s n+1/2 j+1 − s n+1/2 j ∆x s n+1/2 j − s n−1/2 j ∆t = v rn j+1/2 − rn j−1/2 ∆x (19.1.35) If you substitute equation (19.1.22) in equation (19.1.35), you will find that once again the Courant condition is required for stability, and that there is no amplitude dissipation when it is satisfied. If we substitute equation (19.1.34) in equation (19.1.35), we find that equation (19.1.35) is equivalent to un+1 j − 2un j + un−1 j (∆t)2 = v2 un j+1 − 2un j + un j−1 (∆x)2 (19.1.36) This is just the “usual” second-order differencing of the wave equation (19.1.2). We see that it is a two-level scheme, requiring both un and un−1 to obtain un+1. In equation (19.1.35) this shows up as both s n−1/2 and rn being needed to advance the solution. For equations more complicated than our simple model equation, especially nonlinear equations, the leapfrog method usually becomes unstable when the gradi￾ents get large. The instability is related to the fact that odd and even mesh points are completely decoupled, like the black and white squares of a chess board, as shown
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有