正在加载图片...
19.1 Flux-Conservative Initial Value Problems 841 0 ● upwind tor n http://www.nr. 1" -800472 co granted for (including this one) xor /Cambridge NUMERICAL RECIPES IN Figure 19.1.4.Representation of upwind differencing schemes.The upper scheme is stable when the advection constantis negative,as shown,the lower scheme is stable when the advection constantis (North server positive,also as shown.The Courant condition must,of course,also be satisfied. America users to make one paper computer UnN电.t THE The simplest way to model the transport properties"better"is to use upwind differencing (see Figure 19.1.4): 9 Progra u吗-u吲-1 >0 OF SCIENTIFIC -明 -vn △x u+1-4吗 (19.1.27) 61 △x 吲<0 Note that this scheme is only first-order,not second-order,accurate in the COMPUTING (ISBN calculation of the spatial derivatives.How can it be "better"?The answer is 188810920 one that annoys the mathematicians:The goal of numerical simulations is not always“accuracy”in a strictly mathematical sense,but sometimes“fidelity”to the Numerical Recipes 10-621 underlying physics in a sense that is looser and more pragmatic.In such contexts, some kinds of error are much more tolerable than others.Upwind differencing 4310-5 generally adds fidelity to problems where the advected variables are liable to undergo sudden changes of state,e.g.,as they pass through shocks or other discontinuities. (outside You will have to be guided by the specific nature of your own problem. Software. For the differencing scheme(19.1.27),the amplification factor(for constant v)is 首 =1- a-mska)- sink△z 19.1.28 =1-2(-a -cosk△x) (19.1.29) So the stability criterion 2<1 is (again)simply the Courant condition(19.1.17). There are various ways of improving the accuracy of first-order upwind differencing.In the continuum equation,material originally a distance vAt away19.1 Flux-Conservative Initial Value Problems 841 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 v upwind v Figure 19.1.4. Representation of upwind differencing schemes. The upper scheme is stable when the advection constant v is negative, as shown; the lower scheme is stable when the advection constant v is positive, also as shown. The Courant condition must, of course, also be satisfied. The simplest way to model the transport properties “better” is to use upwind differencing (see Figure 19.1.4): un+1 j − un j ∆t = −vn j    un j − un j−1 ∆x , vn j > 0 un j+1 − un j ∆x , vn j < 0 (19.1.27) Note that this scheme is only first-order, not second-order, accurate in the calculation of the spatial derivatives. How can it be “better”? The answer is one that annoys the mathematicians: The goal of numerical simulations is not always “accuracy” in a strictly mathematical sense, but sometimes “fidelity” to the underlying physics in a sense that is looser and more pragmatic. In such contexts, some kinds of error are much more tolerable than others. Upwind differencing generally adds fidelity to problems where the advected variables are liable to undergo sudden changes of state, e.g., as they pass through shocks or other discontinuities. You will have to be guided by the specific nature of your own problem. For the differencing scheme (19.1.27), the amplification factor (for constant v) is ξ = 1 − v∆t ∆x (1 − cos k∆x) − i v∆t ∆x sin k∆x (19.1.28) |ξ| 2 = 1 − 2 v∆t ∆x  1 − v∆t ∆x (1 − cos k∆x) (19.1.29) So the stability criterion |ξ| 2 ≤ 1 is (again) simply the Courant condition (19.1.17). There are various ways of improving the accuracy of first-order upwind differencing. In the continuum equation, material originally a distance v∆t away
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有