von neumann stability analysis
play

Von Neumann stability analysis In numerical algorithms for - PDF document

Von Neumann stability analysis In numerical algorithms for differential equations the concern is the growth of round-off errors and/or initially small fluctuations in initial data which might cause a large deviation of final answers from the


  1. Von Neumann stability analysis In numerical algorithms for differential equations the concern is the growth of round-off errors and/or initially small fluctuations in initial data which might cause a large deviation of final answers from the exact solution. The method of stability analysis shown next was developed by the mid-twentieth century Hungarian mathematician β€” and father of the electronic computer β€” John von Neumann. The von Neuman stability analysis is based on the decomposition of numerical errors of numerical approximations into Fourier series. Fourier series decomposes any periodic function or periodic signal into the sum of a (possibly infinite) set of simple oscillating functions, namely sines and cosines (or, equivalently, complex exponentials). We have chosen complex exponentials to represent errors as they are much easier to work with than real trigonometric functions. Consider the one-dimensional heat equation πœ–π‘’ = 𝛽 πœ– 2 𝑉 πœ–π‘‰ πœ–π‘¦ 2 [1] Stability Analysis of FTCS scheme. Approximate the numerical error. Using the FTCS method the discretized form of equation [1] is: π‘œ+1 = 𝑉 π‘œ + πœ‡(𝑉 π‘œ + 𝑉 π‘œ ) [2] π‘œ 𝑉 βˆ’ 2𝑉 π‘˜ π‘˜ π‘˜+1 π‘˜ π‘˜βˆ’1 where πœ‡ = π›½βˆ†π‘’/βˆ†π‘¦ 2 (called the mesh ratio), π‘˜ is the space index, and π‘œ is the time index. Define the error in the numerical approximation as π‘œ = 𝑉 π‘œ βˆ’ 𝑣 π‘˜ π‘œ [3] πœ— π‘˜ π‘˜ π‘œ is the exact solution at grid point (π‘˜, π‘œ) . Both the numerical solution 𝑉 π‘œ and the exact solution where 𝑣 π‘˜ π‘˜ π‘œ satisfy equation [2], therefore, the error πœ— π‘˜ π‘œ also follows the discretized ODE equation [2] 𝑣 π‘˜ π‘œ+1 = πœ— π‘˜ π‘œ + πœ‡(πœ— π‘˜+1 π‘œ + πœ— π‘˜βˆ’1 π‘œ ) [4] π‘œ πœ— π‘˜ βˆ’ 2πœ— π‘˜ The equations [2] and [4] show that both the error and the numerical solution have the same growth or decay behavior with respect to time. For linear differential equations with periodic boundary condition, the spatial variation of error may be expanded in a finite Fourier series, in the interval L, as 𝑁 πœ—(𝑦) = βˆ‘ 𝐡 𝑛 𝑓 𝑗𝑙 𝑛 𝑦 [5] 𝑛=1 πœŒπ‘› where the wavenumber 𝑙 𝑛 = 𝑀 where 𝑛 = 1,2, … , 𝑁 and 𝑁 = 𝑀/βˆ†π‘¦ , 𝑗 = βˆšβˆ’1 , and 𝑦 is the independent space variable. 𝑓 𝑗𝑙 𝑛 𝑦 is the complex exponential (recall the Euler’s formula: 𝑓 π‘—πœ’ = cos πœ’ + 𝑗 sin πœ’ , where 𝑓 is the base of natural logarithm and πœ’ is a real number). [Von Neumann stability analysis-Presentation-V5] Page 1 of 6

  2. The time dependence of the error is included by assuming the amplitude of error 𝐡 𝑛 is a function of time. Since the error tends to grow or decay exponentially with time, it is reasonable to assume that the amplitude varies exponentially with time; hence 𝑁 π‘œ = βˆ‘ 𝑓 𝑏𝑒 𝑓 𝑗𝑙 𝑛 𝑦 πœ—(𝑦, 𝑒) = πœ— π‘˜ [6] 𝑛=1 where 𝑏 is a constant. Since the difference equation for error is linear (the behavior of each term of the series is the same as the series itself), it is enough to consider the growth of error of a typical term: π‘œ = 𝑓 𝑏𝑒 𝑓 𝑗𝑙 𝑛 𝑦 [7] πœ— 𝑛 (𝑦, 𝑒) = πœ— π‘˜ The stability characteristics can be studied using just this form for the error with no loss in generality. Define a Stability Criterion . The goal is to show that the error incurred by a particular numerical scheme doesn’t grow in the evolving steps of time. Define the amplification factor π‘œ+1 πœ— π‘˜ 𝐻 ≑ π‘œ [8] πœ— π‘˜ Then, the necessary and sufficient condition for the error to remain bounded, maintaining numerical stability is |𝐻| ≀ 1 𝑝𝑠 [βˆ’1 ≀ 𝐻 ≀ 1 ] [9] How the FTCS scheme complies with the Stability Criterion . The goal now is to show that equation [9] holds for the particular FTCS numerical scheme. To find out how the error varies in steps of time, substitute equation [7] into each term of equation [4], as shown below π‘œ = 𝑓 𝑏𝑒 𝑓 𝑗𝑙 𝑛 𝑦 [10.𝑏] πœ— π‘˜ π‘œ+1 = 𝑓 𝑏(𝑒+βˆ†π‘’) 𝑓 𝑗𝑙 𝑛 𝑦 [10.𝑐] πœ— π‘˜ π‘œ = 𝑓 𝑏𝑒 𝑓 𝑗𝑙 𝑛 (𝑦+βˆ†π‘¦) [10. 𝑑] πœ— π‘˜+1 π‘œ = 𝑓 𝑏𝑒 𝑓 𝑗𝑙 𝑛 (π‘¦βˆ’βˆ†π‘¦) [10.𝑒] πœ— π‘˜βˆ’1 By eqs. [10] in equation [4], the last yields 𝑓 𝑏(𝑒+βˆ†π‘’) 𝑓 𝑗𝑙 𝑛 𝑦 = 𝑓 𝑏𝑒 𝑓 𝑗𝑙 𝑛 𝑦 + πœ‡(𝑓 𝑏𝑒 𝑓 𝑗𝑙 𝑛 (𝑦+βˆ†π‘¦) βˆ’ 2𝑓 𝑏𝑒 𝑓 𝑗𝑙 𝑛 𝑦 + 𝑓 𝑏𝑒 𝑓 𝑗𝑙 𝑛 (π‘¦βˆ’βˆ†π‘¦) ) [11] Divide by 𝑓 𝑏𝑒 𝑓 𝑗𝑙 𝑛 𝑦 to yield after simplification 𝑓 π‘βˆ†π‘’ = 1 + πœ‡(𝑓 𝑗𝑙 𝑛 βˆ†π‘¦ + 𝑓 βˆ’π‘—π‘™ 𝑛 βˆ†π‘¦ βˆ’ 2) [12] Using the identities (see Appendix) [Von Neumann stability analysis-Presentation-V5] Page 2 of 6

  3. π‘—π‘™π‘›βˆ†π‘¦ βˆ’π‘“ βˆ’ π‘—π‘™π‘›βˆ†π‘¦ 𝑙 𝑛 βˆ†π‘¦ 𝑓 2 2 π‘‘π‘—π‘œ ( 2 ) = [13] , and 2𝑗 ) = βˆ’ [𝑓 𝑗𝑙 𝑛 βˆ†π‘¦ + 𝑓 βˆ’π‘—π‘™ 𝑛 βˆ†π‘¦ βˆ’ 2] sin 2 (𝑙 𝑛 βˆ†π‘¦ [14] 2 4 By eq. [14] in eq. [12], the last may be written as 𝑓 π‘βˆ†π‘’ = 1 βˆ’ 4Ξ» sin 2 (𝑙 𝑛 βˆ†π‘¦ ) [15] 2 However, by eqs [10] in eq [8], the last yields π‘œ+1 π‘œ = 𝑓 𝑏(𝑒+βˆ†π‘’) 𝑓 𝑗𝑙 𝑛 𝑦 πœ— π‘˜ = 𝑓 π‘βˆ†π‘’ [16] 𝐻 = 𝑓 𝑏𝑒 𝑓 𝑗𝑙 𝑛 𝑦 πœ— π‘˜ Thus, by equations [15], [16] plugged into [9], the condition for stability is given by (1 βˆ’ 4πœ‡ sin 2 (𝑙 𝑛 βˆ†π‘¦ )) β‰₯ βˆ’1 [17.𝑏] 2 [17] |𝐻| = |1 βˆ’ 4πœ‡ sin 2 (𝑙 𝑛 βˆ†π‘¦/2)| ≀ 1 { (1 βˆ’ 4πœ‡ sin 2 (𝑙 𝑛 βˆ†π‘¦ )) ≀ 1 [17.𝑐] 2 For the above conditions, equations [17.a] and [17.b], to hold for all m (and therefore all sin 2 (𝑙 π‘›βˆ†π‘¦ /2) ), we need to consider [17.a] and [17.b], separately. Equation [17.a] yields [18] 4πœ‡ sin 2 (𝑙 𝑛 βˆ†π‘¦/2) ≀ 2 Note that the term 4πœ‡ sin 2 (𝑙 𝑛 βˆ†π‘¦/2) is always positive, i.e., always in the range [0,1]. The worst case is when sin 2 (𝑙 𝑛 βˆ†π‘¦/2) = 1 , therefore, equation [18] yields 1 π›½βˆ†π‘’ 1 [19] πœ‡ ≀ 2 or πœ‡ = βˆ†π‘¦ 2 ≀ 2 Equation [17.b] yields [20] 4πœ‡ sin 2 (𝑙 𝑛 βˆ†π‘¦/2) β‰₯ 0 Since sin 2 (𝑙 𝑛 βˆ†π‘¦/2) range is [0,1] equation [20] yields [21] πœ‡ β‰₯ 0 1 which always holds. Hence, combining [19] and [21]: 0 ≀ πœ‡ ≀ 2 Equation [19] gives the stability requirement for the FTCS scheme as applied to the one-dimensional heat equation. We say that the method is conditionally stable ; for a given βˆ†π‘¦ , the allowed value of βˆ†π‘’ must be small enough to satisfy equation [19] or [Von Neumann stability analysis-Presentation-V5] Page 3 of 6

  4. [22] βˆ†π‘’ ≀ βˆ†π‘¦ 2 2𝛽 Usually we establish the space discretization by assuming βˆ†π‘¦ , then we compute the allowed βˆ†π‘’ with equation [22 ] so to be sure our method won’t ex ceed the stability requirement. For instance, if we have βˆ†π‘¦ = 0.01 , and 𝛽 = 1 , then we can only use a time step size βˆ†π‘’ ≀ 0.00005 , which is minuscule. It would take an inordinately large number of time steps to compute the value of the solution at even moderate final times, e.g., t = 1. Moreover, owing to the limited accuracy of computers, the propagation of round-off errors might then cause a significant reduction in the overall accuracy of the final solution values. Since not all choices of space and time steps lead to a convergent scheme, that’s the reason the explicit scheme FTCS is called conditionally stable , capisce my friend? Stability Criterion for the Crank-Nicolson Scheme By the CN scheme, the discretized form of equation [1] 𝑙 = πœ‡ 𝑙+1 ] + πœ‡ 𝑙+1 βˆ’ 𝑉 𝑗 𝑙+1 βˆ’ 2𝑉 𝑗 𝑙+1 + 𝑉 𝑗+1 𝑙 + 𝑉 𝑗+1 𝑙 ] [23] 𝑙 𝑉 𝑗 2 [𝑉 π‘—βˆ’1 2 [𝑉 π‘—βˆ’1 βˆ’ 2𝑉 𝑗 𝑛 also follows the discretized ODE equation Using similar arguments as in the FTCS method, the error πœ— π‘˜ of the CN scheme 𝑙 = πœ‡ 𝑙+1 ] + πœ‡ 𝑙+1 βˆ’ πœ— 𝑗 𝑙+1 βˆ’ 2πœ— 𝑗 𝑙+1 + πœ— 𝑗+1 𝑙 + πœ— 𝑗+1 𝑙 ] [24] 𝑙 πœ— 𝑗 2 [πœ— π‘—βˆ’1 2 [πœ— π‘—βˆ’1 βˆ’ 2πœ— 𝑗 𝑙 Divide [24] by πœ— 𝑗 𝑙+1 𝑙 𝑙+1 𝑙+1 𝑙+1 𝑙 𝑙 𝑙 πœ— 𝑗 𝑙 βˆ’ πœ— 𝑗 𝑙 = πœ‡ 2 [πœ— π‘—βˆ’1 𝑙 βˆ’ 2πœ— 𝑗 + πœ— 𝑗+1 𝑙 ] + πœ‡ 2 [πœ— π‘—βˆ’1 𝑙 βˆ’ 2πœ— 𝑗 𝑙 + πœ— 𝑗+1 𝑙 ] [25] 𝑙 πœ— 𝑗 πœ— 𝑗 πœ— 𝑗 πœ— 𝑗 πœ— 𝑗 πœ— 𝑗 πœ— 𝑗 πœ— 𝑗 Simplify each term in equation [25]: 𝑙+1 𝑙 = 𝐻 = 𝑓 𝑏(𝑒+βˆ†π‘’) πœ— 𝑗 [26. 𝑏] 𝑓 𝑏𝑒 πœ— 𝑗 𝑙+1 = 𝑓 𝑏(𝑒+βˆ†π‘’) 𝑓 𝑗𝑙 𝑛 (π‘¦βˆ’βˆ†π‘¦) = 𝐻 𝑓 𝑗𝑙 𝑛 𝑦 𝑓 𝑗𝑙 𝑛 (βˆ’βˆ†π‘¦) πœ— π‘—βˆ’1 = 𝐻𝑓 βˆ’π‘—π‘™ 𝑛 βˆ†π‘¦ [26. 𝑐] 𝑙 𝑓 𝑏𝑒 𝑓 𝑗𝑙 𝑛 𝑦 𝑓 𝑗𝑙 𝑛 𝑦 πœ— 𝑗 𝑙+1 𝑙 = 𝑓 𝑏(𝑒+βˆ†π‘’) 𝑓 𝑗𝑙 𝑛 (𝑦+βˆ†π‘¦) = 𝐻 𝑓 𝑗𝑙 𝑛 𝑦 𝑓 𝑗𝑙 𝑛 βˆ†π‘¦ πœ— 𝑗+1 = 𝐻𝑓 𝑗𝑙 𝑛 βˆ†π‘¦ [26. 𝑑] 𝑓 𝑏𝑒 𝑓 𝑗𝑙 𝑛 𝑦 𝑓 𝑗𝑙 𝑛 𝑦 πœ— 𝑗 𝑙 𝑙 = 𝑓 𝑏𝑒 𝑓 𝑗𝑙 𝑛 (π‘¦βˆ’βˆ†π‘¦) = 𝑓 𝑗𝑙 𝑛 𝑦 𝑓 𝑗𝑙 𝑛 (βˆ’βˆ†π‘¦) πœ— π‘—βˆ’1 = 𝑓 βˆ’π‘—π‘™ 𝑛 βˆ†π‘¦ [26. 𝑒] 𝑓 𝑏𝑒 𝑓 𝑗𝑙 𝑛 𝑦 𝑓 𝑗𝑙 𝑛 𝑦 πœ— 𝑗 [Von Neumann stability analysis-Presentation-V5] Page 4 of 6

Recommend


More recommend