16920J/SMA5212 Numerical Methods for Pdes Lecture 5 Finite Differences, Parabolic Problems B.C. Khoo Thanks to franklin tan SMA-HPC 2002 NUS
SMA-HPC ©2002 NUS 16.920J/SMA 5212 Numerical Methods for PDEs Thanks to Franklin Tan Finite Differences: Parabolic Problems B. C. Khoo Lecture 5
Outline Governing Equation Stability analysis 3 Examples Relationship between o and d hh Implicit Time-Marching Scheme Summary SMA-HPC 2002 NUS
SMA-HPC ©2002 NUS Outline • Governing Equation • Stability Analysis • 3 Examples • Relationship between σ and λh • Implicit Time-Marching Scheme • Summary 2
Governing Equation Consider the parabolic pde in 1-D x∈|0,元 at subject to u=uo at x=0, u=u, atx=T If U= viscosity > Diffusion Equation If u= thermal conductivity > Heat Conduction Equation SMA-HPC 2002 NUS
SMA-HPC ©2002 NUS [ 2 2 0, u x t υ π ∂ = ∂ ∂ Governing Equation 3 Consider the Parabolic PDE in 1-D 0 subject to uu at x 0, u u at x = = π = π • If υ ≡ viscosity → Diffusion Equation • If υ ≡ thermal conductivity → Heat Conduction Equation x = 0 x = π u 0 π ux ( , t) = ] u x ∂ ∈ = u ?
Discretization Stability Analysis Keeping time continuous, we carry out a spatial discretization of the rhs of -U at a 0 There is a total of N+l grid points such that x, =jAx j=0,1,2,…,NV SMA-HPC 2002 NUS
SMA-HPC ©2002 NUS Stability Analysis Discretization 4 Keeping time continuous, we carry out a spatial discretization of the RHS of There is a total of 1 grid points such that , 0,1, 2,...., N j j x j + = ∆ = x = 0 x = π 0 x 1 x 3 x N 1 x − Nx 2 2 u t υ ∂ ∂ = ∂ ∂ x N u x
Discretization Stability Analysis Use the central difference scheme for 1-21+1 +O(△x2) which is second-order accurate Schemes of other orders of accuracy may be constructed SMA-HPC 2002 NUS
SMA-HPC ©2002 NUS Stability Analysis Discretization 5 2 1 2 2 2 ( j j j u u u Ox x ∂ + − = ∆ ∂ 2 Us 2 e the Central Difference Scheme for u x ∂ ∂ which is second-order accurate. • Schemes of other orders of accuracy may be constructed. 1 2 ) u j x + − + ∆
Discretization Stability Analysis We obtain at x, t A-2(u,-2u, +uy (l1-2l2+l3) 人1-2u.+1+1 (lx=2-2ul1+1y) Note that we need not evaluate u atx=x andx=x since uo and uN are given as boundary conditions SMA-HPC 2002 NUS
SMA-HPC ©2002 NUS 6 Stability Analysis Discretization We obtain at 0 0 Note that we need not evaluate at and since and are given as boundary conditions. N N u x x x u = = 1 1 2 2 : 2 ) o du x u u dt x υ = + ∆ 2 2 2 2 3 : 2 ) du x u u dt x υ = + ∆ 2 1 : 2 ) j j j j du x u u dt x υ = − + + ∆ 1 1 2 1 : 2 ) N N N N du x u u dt x − υ − = − + ∆ x u 1 ( u − 1 ( u − 1 ( j u − 2 ( N u − −
Matrix Formulation Stability Analysis Assembling the system of equations, we obtain 0 dt 0 dt 0 SMA-HPC 2002 NUS
SMA-HPC ©2002 N US 7 Stability Analysis Matrix Formulation Assembling the system of equations, we obtain 1 1 2 2 2 2 1 1 2 21 0 1 1 0 1 1 1 0 1 o j j N N N du u u dt x du u dt du x u dt u du u x dt υ υ υ − − − ∆ − = ∆ − − ∆ 0 0 A 2 2 2 +
PDE to Coupled ODEs Stability Analysis Or in compact form due au+6 dt where u=u buo We have reduced the l-d pde to a set of Coupled oDEs. SMA-HPC 2002 NUS
SMA-HPC ©2002 NUS 8 Stability Analysis PDE to Coupled ODEs Or in compact form du Au b dt = G G G We have reduced the 1-D PDE to a set of Coupled ODEs! where [ 1 1 ]T N u u u = − G 2 0 0 T u o b x υ = ∆ G + u 2 2 0 uN x υ ∆
Eigenvalue and Stability Analysis Eigenvector of Matrix A If A is a nonsingular matrix, as in this case, it is then possible to find a set of eigenvalues 2={41,2 5j5…N-1 from det(a-nD=0 For each eigenvalue /, we can evaluate the eigenvector v consisting of a set of mesh point values v,1.e N-1 SMA-HPC 2002 NUS
SMA-HPC ©2002 NUS 9 Stability Analysis Eigenvalue and Eigenvector of Matrix A If A is a nonsingular matrix, as in this case, it is then possible to find a set of eigenvalues { 1 1 , ,...., ,...., λ = λ λ j λ − For each eigenvalue , we can evaluate the eigenvector consisting of a set of mesh point values , i.e. j j j i V v λ 1 1 Tj j j V N v v − = from det ( A − λ 0. λ 2 N } 2 j v I ) =
Eigenvalue and Stability Analysis Eigenvector of Matrix A The(N-l)x(N-1) matrix E formed by the(N-1) columns y diagonalizes the matrix A by EAE=A where A SMA-HPC 2002 NUS
SMA-HPC ©2002 NUS 10 Stability Analysis Eigenvalue and Eigenvector of Matrix A The ( 1) ( 1) matrix formed by the ( 1) columns diagonalizes the matrix by j N E N V − × − − 1 E AE − = Λ 1 2 1 where N λ λ λ − Λ = 0 0 N A