Computational Methods in Engineering: Introduction to Partial Differential Equations

eso 208a computational methods in engineering n.w
1 / 21
Embed
Share

Explore the basics of Parabolic Partial Differential Equations (PDE) and their semi-discretization techniques in computational engineering. Learn about common Finite Difference methods for solving various types of PDEs. Dive into the world of PDEs with a focus on diffusion, advection-diffusion, Laplace, and wave equations.

  • Engineering
  • Partial Differential Equations
  • Finite Difference Methods
  • Computational Methods
  • PDEs

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. ESO 208A: Computational Methods in Engineering Partial Differential Equations: Introduction, Parabolic Equation Department of Civil Engineering IIT Kanpur

  2. Introduction A general 2ndOrder PDE: ????+ 2????+ ????+ ???+ ???+ ? ?,?,? = 0 ?2 ?? = 0: Parabolic PDE, e.g., Diffusion and Advection-Diffusion Equation ?2 ?? < 0: Elliptic PDE, e.g., Laplace Equation ?2 ?? > 0: Hyperbolic PDE, e.g., Wave equation We will learn a few Finite Difference methods for most common PDEs in Engineering Problems!

  3. Parabolic PDE: semi-discretization ?? ??= ??2? ? 0,? = ?0; ? ?,? = ??; ? ?,0 = ? ? ??= ??2? ?? ??+ ??? ??2 ??2 O(h2) ??? ?? ??? ?? ??+1 2??+ ?? 1 ??2 ??+1 ?? 1 2?? = ?? O(h2) O(h2) ??+1 2??+ ?? 1 ??2 = ?? + ??

  4. Parabolic PDE: semi-discretization ?? ??= ??2? ? 0,? = ?0; ? ?,? = ??; ? ?,0 = ? ? ; ? = 4 ??? ?? ??+1 2??+ ?? 1 ??2 ??2 = ?? ??1 ?? Now, ?0 = ? 0,? ?2 2?1+ ?0 ??2 = ?1 ??1 ?? ??2 ?? ??3 ?? 2?1 ??2 ?2 ??2 ?1 ??2 2?2 ??2 ?3 ??2 ?0?1 ??2 0 ???3 ??2 0 = ?0 ?1 ?2 ?3 ?2 ??2 2?3 ??2 = + 0

  5. Parabolic PDE: semi-discretization ??= ??2? ?? ??+ ??? ? 0,? = ?0; ? ?,? = ??; ? ?,0 = ? ? ??? ?? ??+1 ?? 1 2?? ??+1 2??+ ?? 1 ??2 ??2 = ?? + ?? ??1 ?? ??2 ?? ??3 ?? 2?1 ??2 ?2 2??+ ?1 2??+ 2?2 ??2 ?3 2??+ ?1 ??2 ?1?0 2??+?0?1 0 ?3?? 0 ?1 ?2 ?3 ??2 ?2 ??2 ?2 2??+ 2?3 ??2 ?2 ??2 = + 2??+???3 ?3 ??2 ??2 0

  6. Parabolic PDE: semi-discretization ?? ??= ??2? ? 0,? = ?0; ? ?,? = ??; ? ?,0 = ? ? ??= ??2? ?? ??+ ??? ??2 ??2 ? ?1 ? ?2 ? ?3 ?1 ?2 ?3 d ? dt= ? ? + ? ? = ? 0 =

  7. Parabolic PDE: semi-discretization ? ?1 ? ?2 ? ?3 ?1 ?2 ?3 d ? dt= ? ? + ? ? = ? 0 = ?? ??= ? ?,? ??+?= ??+ ?? (Euler F) or ??+?= ??+ ??+? (Euler B) ??+1= ??+ ?? ? ?? ??+ ??+ 1 ? ??+1 ??+1+ ??+1 = 0: Euler Backward; = 1: Euler Forward = 1/2: Trapezoidal ? ?? 1 ? ??+1 ??+1 = ? + ????? ??+ ?? 1 ? ??+1+ ???

  8. Parabolic PDE: full-discretization ?? ??= ??2? ? 0,? = ?0; ? ?,? = ??; ? ?,0 = ? ? ??2 O(h) ?+1 ?? ?? ???+1 ? ?? O(h2) O(h2) ? ?+ ?? 1 ? ?+1 2?? ?+1+ ?? 1 ??2 ?+1 2?? ??2 ?+1??+1 = ??? + 1 ? ??

  9. Parabolic PDE: full-discretization ??= ??2? ?? ??+ ??? ? 0,? = ?0; ? ?,? = ??; ? ?,0 = ? ? ??2 O(h) ?+1 ?? ?? ? ?? O(h2) O(h2) ? ? ? ?+ ?? 1 ? ???+1 ?? 1 2?? ?+1??+1 ???+1 2?? ??2 ?+1??+1 O(h2) = ? ?? + ?? ?+1 ?? 1 2?? ?+1 ?+1 2?? ?+1+ ?? 1 ??2 ?+1 + 1 ? ?? + ??

  10. Types of Boundary Conditions Dirichlet Condition (1st Type): Variable value is specified ? 0,? = ?0; ? ?,? = ?? Neumann Condition (2nd Type): Gradient is specified dj dx = c ( ) and/or L,t ( ) 0,t Robin Condition (3rd Type): A linear combination of the variable and gradient is specified at (0, t) and/or (L, t) adj dx+bf = c

  11. Example ??= ??2? ?? ??+ ??? ??2 ? = 0.1; ? = 0.01;? 0,? = 0; ? 1,? = 0; ? ?,0 = 50sin?? Solve Using: (a) Euler Forward in time and Central Difference in space (EF-CD) (b) Euler Backward in time and Central Difference in space (EB-CD) (c) Crank Nicholson method (d) A 2nd order R-K method in time and Central Difference approximation in space. Use x = 0.25 and t = 0.5 3 2 0 1 4

  12. Example ??= ??2? ?? ??+ ??? ? = 0.1; ? = 0.01;? 0,? = 0; ? 1,? = 0; ? ?,0 = 50sin?? ??2 3 2 0 1 4 O(h2) O(h2) +uTj+1-Tj-1 2Dx =aTj+1-2Tj+Tj-1 dTj dt Dx2 dTj dt Tj-1+ -2a Tj+ - Tj+1 2Dx+a 2Dx+a u u = Dx2 Dx2 Dx2 dTj dt = 0.36Tj-1-0.32Tj-0.04Tj+1

  13. Example ??= ??2? ?? ??+ ??? ? = 0.1; ? = 0.01;? 0,? = 0; ? 1,? = 0; ? ?,0 = 50sin?? ??2 3 2 0 1 4 dT dt dTj dt = AT = 0.36Tj-1-0.32Tj-0.04Tj+1 T1 T2 T3 0 T1 T2 T2 -0.32 0.36 0 -0.04 -0.32 0.36 0 35.3553 50.0 35.3553 T = A = -0.04 -0.32 T0= = 0 0

  14. Example 0 -0.32 0.36 0 -0.04 -0.32 0.36 T1 T2 T2 0 T1 T2 T3 35.3553 50.0 35.3553 dT dt A = -0.04 -0.32 = AT T0= = 0 T = 0 Euler Forward: Tn+1= I +DtA Tn 0.5 T1 T2 T2 -0.02 0.84 0.18 0.84 0.18 0 0 35.3553 50.0 35.3553 28.6985 47.6568 38.6985 T0.5= = -0.02 0.84 = 0.5 0.5

  15. Example 0 -0.32 0.36 0 -0.04 -0.32 0.36 T1 T2 T2 0 T1 T2 T3 35.3553 50.0 35.3553 dT dt A = -0.04 -0.32 = AT T0= = 0 T = 0 Euler Backward: Tn+1= Tn I -DtA 0.5 T1 T2 T2 1.16 -0.18 0 0.02 1.16 -0.18 1.16 0 35.3553 50.0 35.3553 = 0.5 0.02 0.5 0.5 T1 T2 T2 29.6674 47.0556 37.7804 T0.5= = 0.5 0.5

  16. Example 0 -0.32 0.36 0 -0.04 -0.32 0.36 T1 T2 T2 0 T1 T2 T3 35.3553 50.0 35.3553 dT dt A = -0.04 -0.32 = AT T0= = 0 T = 0 Crank-Nicholson: Tn+1= I +0.5DtA Tn I -0.5DtA 0.5 T1 T2 T2 -0.01 0.92 0.09 1.08 -0.09 0 0.01 1.08 -0.09 1.08 0 0.92 0.09 0 0 35.3553 50.0 35.3553 32.0269 48.8284 37.0269 = -0.01 0.92 = 0.5 0.02 0.5 0.5 T1 T2 T2 29.2166 47.2923 38.2252 T0.5= = 0.5 0.5

  17. Example 0 -0.32 0.36 0 -0.04 -0.32 0.36 T1 T2 T2 0 T1 T2 T3 35.3553 50.0 35.3553 dT dt A = -0.04 -0.32 = AT T0= = 0 T = 0 2nd Order Runge-Kutta (Heun s Predictor-Corrector Form): n+1= I +DtA Tn Tp This is same as Euler-Forward. EF solution is the Predictor. = Tn+Dt n+1= Tn+Dt n+1+ATn n+1+Tn Tc 2ATp 2A Tp 0.5 T1c T2c T2c -0.08 0.09 0 -0.01 -0.08 0.09 35.3553 50.0 35.3553 0 28.6985 47.6568 38.6985 35.3553 50.0 35.3553 29.2544 47.2118 38.2201 0.5= = + -0.01 -0.08 + = 0.5 Tc 0.5

  18. Convergence What about Consistency, Stability, Convergence? How does one choose x and t? Are they interdependent? Diffusion Equation: ?? ?? ???+1 2?? ??2 ?+1 ?? ? ? ?+ ?? 1 ? ?+1 2?? ?+1+ ?? 1 ??2 ?+1 ?+1??+1 = ??? + 1 ? ?? fi+1 fi fi fi-1 n+1Dt Dx2 n+1Dt Dx2 n+1Dt Dx2 - 1- m ( )ai ( )ai ( )ai n+1+ 1+2 1- m nDt Dx2 n+1+ - 1- m n+1 fi+1 fi-1 nDt Dx2 nDt Dx2 = mai n+ 1-2mai n+ mai n

  19. Convergence Advection-Diffusion Equation: ?+1 ?? ?? = ? ?? ? ?? ? ? ? ?+ ?? 1 ? ???+1 ?? 1 2?? ?+1??+1 ???+1 2?? ??2 ?+1??+1 + ?? ?+1 ?? 1 2?? ?+1 ?+1 2?? ?+1+ ?? 1 ??2 ?+1 + 1 ? ?? + ?? fi+1 fi-1 fi n+1Dt 2Dx-ai n+1Dt Dx2 n+1Dt Dx2 n+1Dt 2Dx-ai n+1Dt Dx2 1- m ( ) ui ( )ai n+1+ 1- m ( fi ) -ui n+1+ 1+2 1- m n+1 fi+1 fi-1 nDt 2Dx+ai nDt Dx2 nDt Dx2 n Dt 2Dx+ai nDt Dx2 = m -ui n+ 1-2mai n+ m ui n Groups ? ? ? ?2 govern the equations. ? and ?

  20. Convergence Peclet Number: ??=?? ?=?? ? Grid Peclet Number: ??=? ? =? ? ? ? CFL (Courant-Friedrich-Lewy) Number: ? = ? ? ? Therefore, ? ?? ? ?2 = ?

  21. Convergence If u and ? are constants (not function of x): fi+1 fi-1 fi ) uDt 2Dx-aDt )aDt ) -uDt 2Dx-aDt 1- m ( = m -uDt ( n+1+ 1- m ( fi n+1+ 1+2 1- m 2Dx+aDt Dx2 n+1 Dx2 Dx2 Dx2 fi-1 fi+1 n+ 1-2maDt n+ m uDt 2Dx+aDt n Dx2 Dx2 C 2-C )C Pg ) -C 2-C 1- m ( ) ( 1- m ( n+1+ 1+2 1- m n+1+ n+1 fi+1 fi fi-1 Pg Pg = m -C 2+C n+ 1-2mC C 2+C fi+1 fi n+ m fi-1 n Pg Pg Pg Then the solutions depend on these two dimensionless groups or numbers. Therefore, stability and convergence will also depend on these two!

Related


More Related Content