正在加载图片...
19.1 Flux-Conservative Initial Value Problems 839 where V2 =82/0x2 in one dimension.We have,in effect,added a diffusion term to the equation,or,if you recall the form of the Navier-Stokes equation for viscous fluid flow,a dissipative term.The Lax scheme is thus said to have numerical dissipation, or numerical viscosity.We can see this also in the amplification factor.Unless vAt is exactly equal to Ax,<1 and the amplitude of the wave decreases spuriously. Isn't a spurious decrease as bad as a spurious increase?No.The scales that we hope to study accurately are those that encompass many grid points,so that they have kAx<1.(The spatial wave number k is defined by equation 19.1.12.)For these scales.the amplification factor can be seen to be very close to one,in both the stable and unstable schemes.The stable and unstable schemes are therefore about equally 8 accurate.For the unstable scheme,however,short scales with kAx1,which we are not interested in,will blow up and swamp the interesting part of the solution. Much better to have a stable scheme in which these short wavelengths die away innocuously.Both the stable and the unstable schemes are inaccurate for these short 大分 wavelengths,but the inaccuracy is of a tolerable character when the scheme is stable. When the independent variable u is a vector,then the von Neumann analysis is slightly more complicated.For example,we can consider equation (19.1.3). RECIPES I rewritten as 9 「r (19.1.20) Oxvr The Lax method for this equation is 9 +1= *1+-)+ 2△x (s+1-s-1) v△t (19.1.21) IENTIFIC +1 1+s号-)+a+--) The von Neumann stability analysis now proceeds by assuming that the eigenmode is of the following (vector)form, (19.1.22) Numerica 10621 Here the vector on the right-hand side is a constant(both in space and in time) 431 eigenvector,and is a complex number,as before. Substituting (19.1.22)into (19.1.21),and dividing by the power "gives the homogeneous vector equation (outside Recipes (cosk△x)-E -sink△a 0 North v△ (19.1.23) sink△x (cosk△x)-& 0 △x This admits a solution only if the determinant of the matrix on the left vanishes,a condition easily shown to yield the two roots g S=coskA士iVAt sink△x (19.1.24) △x The stability condition is that both roots satisfy<1.This again turns out to be simply the Courant condition (19.1.17).19.1 Flux-Conservative Initial Value Problems 839 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). where ∇2 = ∂2/∂x2 in one dimension. We have, in effect, added a diffusion term to the equation, or, if you recall the form of the Navier-Stokes equation for viscous fluid flow, a dissipative term. The Lax scheme is thus said to have numerical dissipation, or numerical viscosity. We can see this also in the amplification factor. Unless |v|∆t is exactly equal to ∆x, |ξ| < 1 and the amplitude of the wave decreases spuriously. Isn’t a spurious decrease as bad as a spurious increase? No. The scales that we hope to study accurately are those that encompass many grid points, so that they have k∆x 1. (The spatial wave number k is defined by equation 19.1.12.) For these scales, the amplification factor can be seen to be very close to one, in both the stable and unstable schemes. The stable and unstable schemes are therefore about equally accurate. For the unstable scheme, however, short scales with k∆x ∼ 1, which we are not interested in, will blow up and swamp the interesting part of the solution. Much better to have a stable scheme in which these short wavelengths die away innocuously. Both the stable and the unstable schemes are inaccurate for these short wavelengths, but the inaccuracy is of a tolerable character when the scheme is stable. When the independent variable u is a vector, then the von Neumann analysis is slightly more complicated. For example, we can consider equation (19.1.3), rewritten as ∂ ∂t  r s  = ∂ ∂x  vs vr  (19.1.20) The Lax method for this equation is rn+1 j = 1 2 (rn j+1 + rn j−1) + v∆t 2∆x(sn j+1 − sn j−1) sn+1 j = 1 2 (sn j+1 + sn j−1) + v∆t 2∆x(rn j+1 − rn j−1) (19.1.21) The von Neumann stability analysis now proceeds by assuming that the eigenmode is of the following (vector) form,  rn j sn j  = ξneikj∆x  r0 s0  (19.1.22) Here the vector on the right-hand side is a constant (both in space and in time) eigenvector, and ξ is a complex number, as before. Substituting (19.1.22) into (19.1.21), and dividing by the power ξ n, gives the homogeneous vector equation   (cos k∆x) − ξ i v∆t ∆x sin k∆x i v∆t ∆x sin k∆x (cos k∆x) − ξ   ·   r0 s0   =   0 0   (19.1.23) This admits a solution only if the determinant of the matrix on the left vanishes, a condition easily shown to yield the two roots ξ ξ = cos k∆x ± i v∆t ∆x sin k∆x (19.1.24) The stability condition is that both roots satisfy |ξ| ≤ 1. This again turns out to be simply the Courant condition (19.1.17)
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有