正在加载图片...
19.3 Initial Value Problems in Multidimensions 853 The correct way to difference Schrodinger's equation [1.2]is to use Cayley's formfor the finite-difference representation ofwhich is second-order accurate and unitary: e-illt 1-2iH△t (19.2.35) 1+2iH△t In other words, ((1+iH△t)+1=(1-iH△t)吗 (19.2.36) On replacing H by its finite-difference approximation in z,we have a complex 是言e2 tridiagonal system to solve.The method is stable,unitary,and second-order accurate in space and time.In fact,it is simply the Crank-Nicolson method once again! ICAL CITED REFERENCES AND FURTHER READING: RECIPES Ames,W.F.1977,Numerical Methods for Partial Differential Equations,2nd ed.(New York: Academic Press),Chapter 2. 9 Goldberg,A.,Schey,H.M.,and Schwartz,J.L.1967,American Journal of Physics,vol.35, pp.177-186.[1] Galbraith,I.,Ching,Y.S.,and Abraham,E.1984,American Journal of Physics,vol.52,pp.60- 68.2] 、2。 IENTIFIC 19.3 Initial Value Problems in Multidimensions 6 The methods described in $19.1 and $19.2 for problems in 1+1 dimension (one space and one time dimension)can easily be generalized to N+1 dimensions. However,the computing power necessary to solve the resulting equations is enor- mous.If you have solved a one-dimensional problem with 100 spatial grid points, solving the two-dimensional version with 100 x 100 mesh points requires at least Recipes Numerica 10.621 100 times as much computing.You generally have to be content with very modest spatial resolution in multidimensional problems. 4310 Recipes Indulge us in offering a bit of advice about the development and testing of multidimensional PDE codes:You should always first run your programs on very small grids,e.g.,8 x 8,even though the resulting accuracy is so poor as to be useless.When your program is all debugged and demonstrably stable,then you can increase the grid size to a reasonable one and start looking at the results.We have actually heard someone protest,"my program would be unstable for a crude grid, but I am sure the instability will go away on a larger grid."That is nonsense of a most pernicious sort,evidencing total confusion between accuracy and stability.In fact,new instabilities sometimes do show up on larger grids;but old instabilities never (in our experience)just go away. Forced to live with modest grid sizes,some people recommend going to higher- order methods in an attempt to improve accuracy.This is very dangerous.Unless the solution you are looking for is known to be smooth,and the high-order method you19.3 Initial Value Problems in Multidimensions 853 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). The correct way to difference Schrodinger’s equation ¨ [1,2] is to use Cayley’s form for the finite-difference representation of e −iHt, which is second-order accurate and unitary: e−iHt  1 − 1 2 iH∆t 1 + 1 2 iH∆t (19.2.35) In other words,  1 + 1 2 iH∆t ψn+1 j =  1 − 1 2 iH∆t ψn j (19.2.36) On replacing H by its finite-difference approximation in x, we have a complex tridiagonal system to solve. The method is stable, unitary, and second-order accurate in space and time. In fact, it is simply the Crank-Nicolson method once again! CITED REFERENCES AND FURTHER READING: Ames, W.F. 1977, Numerical Methods for Partial Differential Equations, 2nd ed. (New York: Academic Press), Chapter 2. Goldberg, A., Schey, H.M., and Schwartz, J.L. 1967, American Journal of Physics, vol. 35, pp. 177–186. [1] Galbraith, I., Ching, Y.S., and Abraham, E. 1984, American Journal of Physics, vol. 52, pp. 60– 68. [2] 19.3 Initial Value Problems in Multidimensions The methods described in §19.1 and §19.2 for problems in 1+1 dimension (one space and one time dimension) can easily be generalized to N + 1 dimensions. However, the computing power necessary to solve the resulting equations is enor￾mous. If you have solved a one-dimensional problem with 100 spatial grid points, solving the two-dimensional version with 100 × 100 mesh points requires at least 100 times as much computing. You generally have to be content with very modest spatial resolution in multidimensional problems. Indulge us in offering a bit of advice about the development and testing of multidimensional PDE codes: You should always first run your programs on very small grids, e.g., 8 × 8, even though the resulting accuracy is so poor as to be useless. When your program is all debugged and demonstrably stable, then you can increase the grid size to a reasonable one and start looking at the results. We have actually heard someone protest, “my program would be unstable for a crude grid, but I am sure the instability will go away on a larger grid.” That is nonsense of a most pernicious sort, evidencing total confusion between accuracy and stability. In fact, new instabilities sometimes do show up on larger grids; but old instabilities never (in our experience) just go away. Forced to live with modest grid sizes, some people recommend going to higher￾order methods in an attempt to improve accuracy. This is very dangerous. Unless the solution you are looking for is known to be smooth, and the high-order method you
向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有