Review STABILITY FOR PARABOLIC SOLVERS School of Mathematics Semester 1 2008
OUTLINE Review 1 REVIEW 2 STABILITY: EXPLICIT METHOD Explicit Method as a Matrix Equation Growing Errors Stability Constraint 3 STABILITY: CRANK-NICOLSON 4 SUMMARY
Review FIRST AND SECOND ORDER METHODS FOR PARABOLIC PDES The explicit method is first order and has a stability constraint. The implicit method is first order and unconditionally stable. But requires a direct solver. The Crank-Nicolson is the average of the two schemes above. It is second order. It is unconditionally stable. Multidimensional scheme require careful consideration. ADI scheme may be preferred to Crank-Nicolson since it only requires a 1D direct solver.
Review Explicit Method as a Matrix Equation Growing Errors Stability Constraint Consider the first order explicit scheme which can be written as w k+1 j = βw k j 1 + (1 2β)w k j + βw k j+1, for 1 i n 1, with w 0, w n given. We can write the above in matrix form as w k+1 = (1 2β) β β (1 2β) β......... β (1 2β) β β (1 2β) w k
Review Explicit Method as a Matrix Equation Growing Errors Stability Constraint SOME USEFUL RESULTS FOR MATRIX NORMS 1 ca = c A for a scalar c 2 AB A B. 3 Gerschgorin s first theorem The largest of the moduli of te eigenvalues of the square matrix A cannot exceed the largest sum of the moduli of the elements along any row or column. ρ(a) A 1 or A 4 Gerschgorin s circle theorem and the norm of matrix A If the eigenvalues λ s are estimated by the circle theorem, then the condition λ s 1 is equivalent to A 1 or A.
Review Explicit Method as a Matrix Equation Growing Errors Stability Constraint THE GROWTH OF ERRORS - EIGENVALUES Now we have w k+1 = Aw k Recall that if we begin some error e 0, the error at the kth step can be written e k = A k e 0. Now express the initial error e 0 as a linear combination of the eigenvectors of A e 0 = n c s v s. s=1
Review Explicit Method as a Matrix Equation Growing Errors Stability Constraint THE GROWTH OF ERRORS - EIGENVALUES Then we may write the error at the kth step as e k = n c s λ k s v s. s=1 where λ s are the eigenvalues of the matrix A. This shows that errors will not increase exponentially if max λ s 1, s = 1, 2,...,n 1. s This is equivalent to the condition A 1
CONSTRAINT Review Explicit Method as a Matrix Equation Growing Errors Stability Constraint Stability requires A 1 for the explicit method. The infinity norm A is defined as for an n n matrix A. A = max j For the explicit method we have n i a i,j A = β + 1 2β + β The scheme is therefore stable when 2β + 1 2β 1.
CONSTRAINT Review Explicit Method as a Matrix Equation Growing Errors Stability Constraint We can evaluate the inequality to find that 2β + 1 2β 1. A 1 β 1 2. Then the size of the timestep must satisfy t x2 2κ
Review The Crank-Nicolson scheme may be written as βw k+1 j 1 + (2 + 2β)wk+1 j βwj+1 k+1 = for j = 1, 2,...,n 1. We can express this in matrix form as βw k j 1 + (2 2β)w k j + βw k j+1 Bw k+1 = Aw k So that the iteration matrix defined from w k+1 = B 1 Aw k
Review THE MATRICES A AND B A = B = (2 2β) β β (2 2β) β......... (2 + 2β) β β (2 + 2β) β......... β (2 2β) β β (2 2β) β (2 + 2β) β β (2 + 2β)
Review We may also write them as A = 2I n 1 + βs n 1, B = 2I n 1 βs n 1. where S = 2 1 1 2 1......... 1 2 1 1 2
Review The Crank-Nicolson scheme is defined by the equation w k+1 = B 1 Aw k so the scheme will be stable if B 1 A 1, or max λ s 1 s This time we will work with the eigenvalues of the matrices, rather than norms. We need to show that the maximum eigenvalue of B 1 A is less than unity. How to find the eigenvalues?
Review EIGENVALUES AND POLYNOMIALS Recall that λ is an eigenvalue of the matrix S, and x a corresponding eigenvector if Thus for any integer p Sx = λx. S p x = S p 1 Sx = S p 1 λx = = λ p x. Hence the eigenvalues of S p are λ p with eigenvector x.
Review EIGENVALUES AND POLYNOMIALS Extending this result, if P(S) is the matrix polynomial then P(S) = a 0 S n + a 1 S n 1 + + a n I P(S)x = P(λ)x, and P 1 (S)x = 1 P(λ) x Finally if Q(S) is any other polynomial in S then we see that P 1 (S)Q(S)x = Q(λ) P(λ) x.
Review BACK TO CRANK-NICOLSON... If we let and P = B(S n 1 ) = 2I n 1 βs n 1, Q = A(S n 1 ) = 2I n 1 + βs n 1 then the eigenvalues of the matrix B 1 A are given by µ = 2 + βλ 2 βλ where λ is an eigenvalue of the matrix S n 1.
Review EIGENVALUES OF A TRIDIAGONAL MATRIX It can be shown that the generic tridiagonal matrix T where b c a b c T =......... a b c a b has the eigenvalues λ s = b + 2 { } sπ ac cos, s = 1, 2,...,n 1 n + 1
Review EIGENVALUES OF B 1 A Hence the eigenvalues of S n 1 are { λ s = 4 sin 2 sπ }, s = 1, 2,...,n 1 2n and so the eigenvalues of B 1 A are µ s = 2 4β { } sin2 sπ 2n 2 + 4β sin 2 { }, s = 1, 2,...,n 1 sπ 2n
Review CONSTRAINT ON CRANK-NICOLSON For stability, we require max µ s 1, s Clearly we can choose any value of beta and this will be satisfied. Hence the scheme is unconditionally stable. If max s µ s 1 the solution may be prone to ringing.
Review Errors will propogate through the solution; e k = A k e 0. We can bound the errors by the equivalent conditions A 1, or max λ s 1 s Using the norm condition, we find the explicit scheme requires β 1 2 and from eigenvalue analysis the Crank-Nicolson scheme has no restrictions.