正在加载图片...
870 Chapter 19.Partial Differential Equations ADI (Alternating-Direction Implicit)Method The ADI method of 819.3 for diffusion equations can be turned into a relaxation method for elliptic equations [1-41.In $19.3,we discussed ADI as a method for solving the time-dependent heat-flow equation 贺=-p (19.5.31) By letting too one also gets an iterative method for solving the elliptic equation 2u=p (19.5.32) In either case,the operator splitting is of the form ICAL C=Cr+Cy (19.5.33) where Cr represents the differencing in x and Cy that in y. For example,.in our model problem(lg.0.6)with△x=△y=△,we have Cru 2ujl uj+1.l-uj-1.l 2 (19.5.34) Cyu 2ujl -uj.1+1-uj.l-1 More complicated operators may be similarly split,but there is some art involved. > 9 A bad choice of splitting can lead to an algorithm that fails to converge.Usually one tries to base the splitting on the physical nature of the problem.We know for our model problem that an initial transient diffuses away,and we set up the x and y splitting to mimic diffusion in each dimension. Having chosen a splitting,we difference the time-dependent equation(19.5.31) implicitly in two half-steps: un+1/2-un Crun+1/2+Lyun Num 10.621 △t/2 42 -P (19.5.35) un+1-un+1/2 Crun+1/2+Cyun+i --p △t/2 △2 (cf.equation 19.3.16).Here we have suppressed the spatial indices (j,1).In matrix notation,equations (19.5.35)are (Lz+r1)u+1/2=(r1-Lg)”-△2p (19.5.36) (Ly+r1).u"+1=(r1-Lz).u+1/2-A2p (19.5.37) where 242 r三t (19.5.38) The matrices on the left-hand sides of equations (19.5.36)and (19.5.37)are tridiagonal (and usually positive definite),so the equations can be solved by the870 Chapter 19. Partial Differential Equations 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). ADI (Alternating-Direction Implicit) Method The ADI method of §19.3 for diffusion equations can be turned into a relaxation method for elliptic equations [1-4]. In §19.3, we discussed ADI as a method for solving the time-dependent heat-flow equation ∂u ∂t = ∇2u − ρ (19.5.31) By letting t → ∞ one also gets an iterative method for solving the elliptic equation ∇2u = ρ (19.5.32) In either case, the operator splitting is of the form L = Lx + Ly (19.5.33) where Lx represents the differencing in x and Ly that in y. For example, in our model problem (19.0.6) with ∆x = ∆y = ∆, we have Lxu = 2uj,l − uj+1,l − uj−1,l Lyu = 2uj,l − uj,l+1 − uj,l−1 (19.5.34) More complicated operators may be similarly split, but there is some art involved. A bad choice of splitting can lead to an algorithm that fails to converge. Usually one tries to base the splitting on the physical nature of the problem. We know for our model problem that an initial transient diffuses away, and we set up the x and y splitting to mimic diffusion in each dimension. Having chosen a splitting, we difference the time-dependent equation (19.5.31) implicitly in two half-steps: un+1/2 − un ∆t/2 = −Lxun+1/2 + Lyun ∆2 − ρ un+1 − un+1/2 ∆t/2 = −Lxun+1/2 + Lyun+1 ∆2 − ρ (19.5.35) (cf. equation 19.3.16). Here we have suppressed the spatial indices (j, l). In matrix notation, equations (19.5.35) are (Lx + r1) · un+1/2 = (r1 − Ly) · un − ∆2ρ (19.5.36) (Ly + r1) · un+1 = (r1 − Lx) · un+1/2 − ∆2ρ (19.5.37) where r ≡ 2∆2 ∆t (19.5.38) The matrices on the left-hand sides of equations (19.5.36) and (19.5.37) are tridiagonal (and usually positive definite), so the equations can be solved by the
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有