正在加载图片...
19.1 Flux-Conservative Initial Value Problems 837 ,0 Lax x or/ Figure 19.1.2.Representation of the Lax differencing scheme,as in the previous figure.The stability criterion for this scheme is the Courant condition. where k is a real spatial wave number(which can have any value)and =(k)is a complex number that depends on k.The key fact is that the time dependence of a single eigenmode is nothing more than successive integer powers of the complex nted for number Therefore,the difference equations are unstable (have exponentially growing modes)if (k)>1 for some k.The number g is called the amplification factor at a given wave number k. To find (k),we simply substitute (19.1.12)back into (19.1.11).Dividing by gr,we get 2 )=1-i Ar sinkAr (19.1.13) whose modulus is 1 for allk:so the FTCS scheme is unconditionally unstable. If the velocity v were a function of t and r,then we would write v in equation (19.1.11).In the von Neumann stability analysis we would still treat v as a constant, the idea being that for v slowly varying the analysis is local.In fact,even in the SCIENTIFIC( case of strictly constant v,the von Neumann analysis does not rigorously treat the end effects atj=0 and j=N. More generally,if the equation's right-hand side were nonlinear in u,then a von Neumann analysis would linearize by writing u=uo+ou,expanding to linear order in ou.Assuming that the uo quantities already satisfy the difference equation 是 exactly,the analysis would look for an unstable eigenmode of ou. Despite its lack ofrigor,the von Neumann method generally gives valid answers Numerica 10.621 and is much easier to apply than more careful methods.We accordingly adopt it exclusively.(See,for example,[1]for a discussion of other methods of stability 431 analysis.) (outside Recipes Lax Method North Software. The instability in the FTCS method can be cured by a simple change due to Lax. One replaces the term u?in the time derivative term by its average(Figure 19.1.2): 1 u巧一2(+1+u-) (19.1.14 This turns (19.1.11)into 吗1-+-小-器-- (19.1.15)19.1 Flux-Conservative Initial Value Problems 837 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). t or n x or j Lax Figure 19.1.2. Representation of the Lax differencing scheme, as in the previous figure. The stability criterion for this scheme is the Courant condition. where k is a real spatial wave number (which can have any value) and ξ = ξ(k) is a complex number that depends on k. The key fact is that the time dependence of a single eigenmode is nothing more than successive integer powers of the complex number ξ. Therefore, the difference equations are unstable (have exponentially growing modes) if |ξ(k)| > 1 for some k. The number ξ is called the amplification factor at a given wave number k. To find ξ(k), we simply substitute (19.1.12) back into (19.1.11). Dividing by ξn, we get ξ(k)=1 − i v∆t ∆x sin k∆x (19.1.13) whose modulus is > 1 for all k; so the FTCS scheme is unconditionally unstable. If the velocity v were a function of t and x, then we would write v n j in equation (19.1.11). In the von Neumann stability analysis we would still treat v as a constant, the idea being that for v slowly varying the analysis is local. In fact, even in the case of strictly constant v, the von Neumann analysis does not rigorously treat the end effects at j = 0 and j = N. More generally, if the equation’s right-hand side were nonlinear in u, then a von Neumann analysis would linearize by writing u = u0 + δu, expanding to linear order in δu. Assuming that the u0 quantities already satisfy the difference equation exactly, the analysis would look for an unstable eigenmode of δu. Despite its lack of rigor, the von Neumann method generally gives valid answers and is much easier to apply than more careful methods. We accordingly adopt it exclusively. (See, for example, [1] for a discussion of other methods of stability analysis.) Lax Method The instability in the FTCS method can be cured by a simple change due to Lax. One replaces the term un j in the time derivative term by its average (Figure 19.1.2): un j → 1 2  un j+1 + un j−1  (19.1.14) This turns (19.1.11) into un+1 j = 1 2  un j+1 + un j−1  − v∆t 2∆x  un j+1 − un j−1  (19.1.15)
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有