1 LECTURE 6 Stability of Parabolic PDEs
2 Aim of Lecture Last week we discussed Parabolic PDEs –Looked at Explicit and Implicit Methods –Advantages and disadvantages of each approach –Use of Excel to solve Parabolic PDEs This week we will discuss –Errors and Quality of Numerical Approximations to PDEs –Stability Analysis for Parabolic PDEs –Explicit and Implicit Methods.
3 Explicit – Implicit Methods Explicit Fully Implicit Crank Nicholson
4 Explicit / Implicit Comparisons i-1 i i+1 j-1 j j+1 i-1 i i+1 j-1 j j+1 Explicit Crank-Nicholson j-1 j j+1 Fully Implicit O( t, x 2 ) O( t 2, x 2 ) Computational molecules show differences between the schemes If there is more than one node at timestep j+1 the scheme is implicit
5 Boundary conditions for Parabolic PDEs Again these can be Dirichlet or Neumann Dirichlet boundaries are easy to implement Neumann are approximated using central difference approximation. For example i=
6 Explicit - Implicit Methods Comparisons EXPLICIT Unknown values at current time step depend only on known values at previous time step Advantage: Easy to implement in software and solve Disadvantage: Restrictions on time step for stability. IMPLICIT Unknown values at current time step depend on known values at previous time step and on each other Disadvantage: Requires solution of system of equations Advantage: No restrictions on time step
7 Errors in PDEs Modelling Errors –These are the difference between the mathematical modelling and the real world it is trying to represent. Discretisation Errors –Difference between the exact solution to the mathematical model and the discretised equations used to approximate it. Convergence Errors –Difference between the iterative solution results and the exact solution to the discretised equations. Other Errors –Other errors, such as rounding errors and overflow errors, can creep in if the programmer is not careful.
8 Quality of Numerical Solutions Consistency –Discretisation method should become exact as mesh spacing tends to zero. Therefore truncation error becomes zero as mesh spacing tends to zero. Stability –Numerical solution is stable if it does not magnify errors that appear during the course of solution. For example with iterative methods the solution does not diverge. Conservation –The numerical scheme used ensures that the dependent variable, for example temperature, is conserved. (i.e energy is not created nor destroyed). Boundedness –Numerical solution should lie within specific bounds. For example temperature should be within boundary conditions or temperature cannot be less than -273°C (0 Kelvin).
9 STABILITY
10 Stability Need to avoid errors magnifying over time Von-Neumann Method is used to analyse stability Consider the error at node i,j represented by E i,j How will this error grow as j increases This is the basis of stability If (Unstable) If (Stable) j-1 j j+1 i-1 i i+1
11 Errors Explicit Fully Implicit Crank Nicholson The explicit/implicit schemes for u can also be used for the errors E. Assume that so that Therefore, we have
12 Von-Neumann Stability Method Based on Fourier Series Consider the following set of errors at time step j. The above error distribution over the mesh can be represented as a Fourier Series. i=0 1 2 i-1 i i+1 N X=0 X = L
13 Von-Neumann Stability Method Consider a single harmonic given by: A j is a coefficient whose value will depend on time j. The amplification factor (or growth factor) is given by: For stability this growth factor must be less than or equal to unity (i.e. the errors will not grow), therefore
14 For the explicit method the errors are given by: Substitute the Fourier approximation for the error Therefore Divide through by Stability – Explicit Method
15 Stability – Explicit Method Therefore the growth factor is given by: Now the trig identities give: Therefore we have: Again a trig identity gives: Therefore:
16 Stability – Explicit Method For stability we require the errors not to grow as j increases. Therefore: Upper bound is always satisfied (since - slide 11). Therefore we require Now has values from 0 to 1. Worst case is 1. Therefore
17 Stability – Implicit Method For the fully implicit method the errors are given by: Substitute the Fourier approximation for the error Therefore Divide through by
18 Stability –Implicit Method Therefore the growth factor is given by: Now the trig identities give: Therefore we have: Again a trig identity gives: Therefore:
19 Stability –Implicit Method For stability we require the errors not to grow as j increases. Therefore: Now r is always positive (since - slide 11). Also is always positive ranging from 0 to 1. Therefore the above is always the case for any value of r. The implicit scheme does not place any restriction on r, hence no restriction on mesh size or time step.
20 Demonstrations Tutorial 5, Lab work question 1 Tutorial 5, Lab work question 2 (same problem but using Crank-Nicholson)