Platzhalter für Bild, Bild auf Titelfolie hinter das Logo einsetzen Introduction to PDEs and Numerical Methods Tutorial 4. Finite difference methods stability, concsistency, convergence Dr. Noemi Friedman, 06.12.2013.
Stability, consistency, convergence - introduction Important definitions: Well-posedness (in the sense of Hadamard) solution exists the solution is unique continious dependence on the initial data e.g.: heat equation, Laplace-equation Ill-posed problems That are not well-posed in the sense of Hadamard e.g.: inverse problems, like the inverse of the heat equation 06. 12. 2013. Dr. Noemi Friedman PDE tutorial Seite 2
Stability, consistency, convergence - introduction Well-posedness differently: Surjective L: X Y is surjective, if every element y in Y has a corresponding element x in X such that f(x) = y. The function f may map more than one element of X to the same element of Y. (for all yєy I can find a solution in X) Bijective Injective (one-to-one mapping) every element of Y is the image of at most one element of X Continious dependence on the ininital data L 1 < C The inverse/solution operator is uniformly bounded 06. 12. 2013. Dr. Noemi Friedman PDE tutorial Seite 3
Stability, consistency, convergence - introduction Numerical stability Even if an operator is well-posed in the sense of Hadamard, it may suffer from numerical instability when solved with finite precision, or with errors in the data. L 1 1 C but L t,h C A method is numerically instable if the round-off or truncation errors can be amplified, causing the error to grow exponentially Ill-conditioned A well-posed operator may be ill-conditioned, that is a small error in the initial data can result in much larger errors in the answers. (indicated by a large condition number) 06. 12. 2013. Dr. Noemi Friedman PDE tutorial Seite 4
Stability, consistency, convergence - introduction Consistency A certain finite difference method is consistent if: lim L u L t,h(u) = 0 t,h 0 (method approximates the differential equation) where L u : original operator L t,h (u): approximated operator (discretised) For example: L u = u from the Taylor expansion u = u x + h u(x) h + O(h) u u x + h u(x) L h (u) = h u x + h u(x) Ch h (first order method) lim L u L h(u) = 0 h 0 06. 12. 2013. Dr. Noemi Friedman PDE tutorial Seite 5
Stability, consistency, convergence - introduction Convergence A finite difference method is convergent if: where u: lim u u t,h = 0 t,h 0 analytical solution u t,h : approximated solution Solution of the FD method (numerical approximation) gets closer to the exact solution of the PDE as the discretisation is made finer. Difficult to show, but Lax Richtmyer theorem A consistent finite difference method for a well-posed, linear initial value problem is convergent if and only if it is stable. Instead of analysing convergency check consistency and stability 06. 12. 2013. Dr. Noemi Friedman PDE tutorial Seite 6
Consistency Check consistency Derivatives are approximated with the help of the Taylor series (see derivation of difference operators in Tutorial 3). 1. Derivation of a consistent finite difference operator Example: derivation of uu(x) used in the Richardson scheme (1) (2) uu k = u k+1 u k 1 2h + O(h 2 ) 06. 12. 2013. Dr. Noemi Friedman PDE tutorial Seite 7
Consistency 2. Check consistency of an already defined scheme Example: prove consistency of the DuFort-Frankel scheme 06. 12. 2013. Dr. Noemi Friedman PDE tutorial Seite 8
Consistency The method is consistent if: lim E = 0 t,h 0 The second and the last term will tend to zero as discretisation if refined, but the last term will only be zero if lim t,h 0 t h = 0 Δt < h2 For example if the stability condition of Euler forward is satisfied: 2β 2 Δt = O h 2 scheme is consistent 06. 12. 2013. Dr. Noemi Friedman PDE tutorial Seite 9
Stability Stability checking from eigenvalue analysis: Method of lines Euler forward method u n+1 = I + ΔtA Euler backward method B u n eig(a) 0 eig(b) 1 unconditionally satisfied Δt < h2 2β 2 u n = I ΔtA u n+1 eig(b 1 1 ) 1 B 1 Theta method unconditionally satisfied I θδta u n+1 = I + 1 θ ΔtA B 1 B 2 u n eig(b 1 1 B 2 ) 1 for θ 1/2: unconditionaly stable for θ < 1/2: β 2 Δt h 2 < 06. 12. 2013. Dr. Noemi Friedman PDE tutorial Seite 10 1 2 1 2θ
Stability Stability checking with Von Neumann Stability Analysis Let s suppose our solution has the form of: u(t, x) = A m (t)e ik mkx m=0 With the wave number: (Fourier-expansion) m = 0.. M Let s suppose that the solution in time changes exponentialy A m t = e α m t where α m : constant The solution takes the form after discretisation: M u(n, j) = G k n m e ik mjj G k n m = A m t = e α mn t = m=0 M = L h t = n t, x = jh e α m t n gain factor/ amplifyer 06. 12. 2013. Dr. Noemi Friedman PDE tutorial Seite 11
Stability M in simpler form u(n, j) = G k n e iiii u n,j = G k n e iiii for one frequency k=0 Example: let s check the stability of the following scheme for the instationary heat equation: u n+1,j u n,j = Δt β2 h 2 u n,j 1 2u n,j + u n,j+1 (Euler forward, three point spatial discr.) G k n+1 e iiii G k n e iiii = Δt β2 h 2 G k n e ii j 1 h 2G k n e iiii + G k n eii j+1 h G(k)e iiii e iiii = Δt β2 h 2 eii j 1 h 2e iiii + eii j+1 h G(k) 1 = Δt β2 h 2 e iii 2 + e iii e iii + e iii = 2cos (kk) G k = 1 + 2Δt β2 h2 cos kk 1 06. 12. 2013. Dr. Noemi Friedman PDE tutorial Seite 12
Stability The gain factor: G k = 1 + 2Δt β2 cos kk 1 h2 In a more precise form: G k m = 1 + 2Δt β2 h 2 cos k mh 1 m = 0.. M M = L h Stability requirement: G k m 1 max G k m : lowest frequency min G k m : highest frequency m = 0 G k 0 = 1 + 2Δt β2 h 2 1 1 = 1 m = M G k M = 1 + 2Δt β2 β2 1 1 = 1 4Δt h2 h 2 06. 12. 2013. Dr. Noemi Friedman PDE tutorial Seite 13
Stability Stability requirement: G k M = 1 4Δt β2 h 2 1 4Δt β2 h 2 2 Δt h2 2β 2 Scheme for the heat equation is only stable if this condition is satisfied. (conditionally stable) If the gain factor is positive, the solution will not oscilate in time: G k m 0 G k M = 1 4Δt β2 h 2 0 h 2 4β 2 Δt Solution will give oscillatory solution if this condition is not satisfied. 06. 12. 2013. Dr. Noemi Friedman PDE tutorial Seite 14