16920J/SMA5212 Numerical Methods for Partial Differential equations Lecture 5 Finite Differences Parabolic problems B.C. Khe Thanks to franklin tan 19 February 2003
16.920J/SMA 5212 Numerical Methods for Partial Differential Equations Lecture 5 Finite Differences: Parabolic Problems B. C. Khoo Thanks to Franklin Tan 19 February 2003
16.920J/SMA 5212 Numerical Methods for PDEs OUTLINE Governing equation Stability Analysis 3 Examples Relationship between oand /h Implicit Time-Marching Scheme Summary Side 2 GOVERNING EQUATION Consider the parabolic pde in 1-D du a2u ∈[0.x] subject to u=lo atx=0, u=u atx=Tt Ifu≡ viscosity→ Diffusion Equation If u=thermal conductivity Heat Conduction Equation Side 3 STABILITY ANALYSIS Discretization Keeping time continuous, we carry out a spatial discretization of the rhs of du a at dx 0 X=丌 2
16.920J/SMA 5212 Numerical Methods for PDEs 2 OUTLINE • Governing Equation • Stability Analysis • 3 Examples • Relationship between σ and λh • Implicit Time-Marching Scheme • Summary Slide 2 GOVERNING EQUATION Consider the Parabolic PDE in 1-D If υ ≡ viscosity → Diffusion Equation If υ ≡ thermal conductivity → Heat Conduction Equation Slide 3 STABILITY ANALYSIS Discretization Keeping time continuous, we carry out a spatial discretization of the RHS of [ ] 2 2 0, u u x t x υ π ∂ ∂ = ∈ ∂ ∂ 0 subject to u u at x 0, u u at x = = = π = π x = 0 x = π 0 u uπ u ( x,t) = ? 2 2 u u t x υ ∂ ∂ = ∂ ∂ x = 0 x = π 0 x 1 x 2 x N 1 x − N x
16.920J/SMA 5212 Numerical Methods for PDEs There is a total of N+I grid points such that x=jAx, j=0,1,2 Side 4 STABILITY ANALYSIS Discretization Use the Central Difference scheme for a-u which is second-order accurate Schemes of other orders of accuracy may be constructed Construction of spatial Difference Scheme of Any Order p The idea of constructing a spatial difference operator is to represent the spatial differential operator at a location by the neighboring nodal points, each with its own The order of accuracy, p of a spatial difference scheme is represented as O(ArP) Generally, to represent the spatial operator to a higher order of accuracy, more nodal j2-1 户+1j+2 Consider the following procedure of determining the spatial operator dx cyo(△x2)
16.920J/SMA 5212 Numerical Methods for PDEs 3 Slide 4 STABILITY ANALYSIS Discretization which is second-order accurate. • Schemes of other orders of accuracy may be constructed. Slide 5 Construction of Spatial Difference Scheme of Any Order p The idea of constructing a spatial difference operator is to represent the spatial differential operator at a location by the neighboring nodal points, each with its own weightage. The order of accuracy, p of a spatial difference scheme is represented as ( ) p O ∆x . Generally, to represent the spatial operator to a higher order of accuracy, more nodal points must be used. Consider the following procedure of determining the spatial operator j du dx ✁ ✂ ✄ ☎ ✆ up to the order of accuracy ( ) 2 O ∆x : There is a total of 1 grid points such that , 0,1,2,...., N j x j x j N + = ∆ = 2 U 2 se the Central Difference Scheme for u x ∂ ∂ 2 1 1 2 2 2 2 ( ) j j j j u u u u O x x x + − + − ✝ ✞ ∂ = + ∆ ✟ ✠ ∂ ∆ ✡ ☛ j−2 • j−1 • j • j+1 • j+2 • j du dx ☞ ✌ ✍ ✎ ✏ ✑
16.920J/SMA 5212 Numerical Methods for PDEs Let d be represented by u at the nodes j-1, J, and j*l with a-1, d and a being the coefficients to be determined ie 11-+a0u+a1u O(△xP d Seek Taylor Expansions for u;-,u, and u +r about u, and present them in a (Note that p is not known a priori but is determined at the end of the analysis when the as are made known. This column consists of all the terms on the LHS of (1) 0 a1|-△xa △x3a 0 0 a1 x·C1 △x-a1 a S S2 Each cell in this row comprises the sum of its corresponding column
16.920J/SMA 5212 Numerical Methods for PDEs 4 1. Let j du dx ✁ ✂ ✄ ☎ ✆ be represented by u at the nodes j−1, j, and j+1 with α−1 , α0 and α1 being the coefficients to be determined, i.e. 1 1 0 1 1 ( ) p j j j j du u u u O x dx α− − α α + ✝ ✞ + + + = ∆ ✟ ✠ ✡ ☛ 2. Seek Taylor Expansions for j 1 u − , j u and j 1 u + about j u and present them in a table as shown below. (Note that p is not known a priori but is determined at the end of the analysis when the α’s are made known.) uj uj ′ uj ′′ uj ′′′ uj ′ 0 1 0 0 α−1uj−1 α−1 1 −∆x α− ⋅ 2 1 1 2 ∆x α− ⋅ 3 1 1 6 − ∆x α− ⋅ α0uj α0 0 0 0 1 j 1 α u + α1 1 ∆x ⋅α 2 1 1 2 ∆x ⋅α 3 1 1 6 ∆x ⋅α 1 1 k j k j k k u α u = + =− ′ + ☞ S1 S2 S3 S4 ( 1 ) This column consists of all the terms on the LHS of (1). Each cell in this row comprises the sum of its corresponding column
16.920J/SMA 5212 Numerical Methods for PDEs where S=(a1+a+a)u S2=(1-△xa1+△xa1) +-△ S4=-△x2a1+△xa1| S1+S2+S3+S4+ 3. Make as many S,'s as possible vanish by choosing appropriate as In this instance, since we have three unknowns a_, a and a, we can therefore set (Note that in the Taylor Series expansion, one starts off with the lower-order terms and progressively obtain the higher-order terms. We have deliberately set the s pertaining to the lower-order terms to zero, thereafter followed by ncreasingly higher-order terms) 0 0 0 Solving the 2△
16.920J/SMA 5212 Numerical Methods for PDEs 5 where ∴ 1 1 2 3 4 1 .... k j k j k k u α u S S S S = + =− ′ + = + + + + 3. Make as many Si ’s as possible vanish by choosing appropriate αk ’s. In this instance, since we have three unknowns α−1 , α0 and α1 , we can therefore set: 1 2 3 0 0 0 S S S = = = (Note that in the Taylor Series expansion, one starts off with the lower-order terms and progressively obtain the higher-order terms. We have deliberately set the i S pertaining to the lower-order terms to zero, thereafter followed by increasingly higher-order terms.) Hence, 1 0 1 0 1 1 1 1 1 0 1 1 0 1 0 x α α α − ✁ ✂ ✁ ✂✄✁ ✂ ☎ ✆ ☎ ✆ ☎ ✆ ☎ ✆ − = − ☎ ✆ ☎ ✆ ∆ ☎ ✆ ☎ ✆ ☎ ✆ ✝ ✞✄✝ ✞ ☎ ✆ ✝ ✞ Solving the system of equations, we obtain 1 0 1 1 2 0 1 2 x x α α α − = ∆ = = − ∆ ( ) ( ) 1 1 0 1 2 1 1 2 2 3 1 1 3 3 4 1 1 1 1 1 2 2 1 1 6 6 j j j j S u S x x u S x x u S x x u α α α α α α α α α − − − − = + + ′ = −∆ ⋅ + ∆ ⋅ ✟ ✠ ′′ = ∆ ⋅ + ∆ ⋅ ✡ ☛ ☞ ✌ ✟ ✠ ′′′ = − ∆ ⋅ + ∆ ⋅ ✡ ☛ ☞ ✌