Understanding Advection Equation with Finite Difference Methods

Slide Note
Embed
Share

Investigate the physical role of advection terms in the advection equation, exploring analytical and numerical solutions using forward and upwind methods. Check stability using Courant number in context of wave propagation.


Uploaded on Sep 19, 2024 | 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. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Finite difference III ex) advection equation 1 Keywords: forward scheme CFL condition boundary condition

  2. 2 What is the advection term? d dt t = + + + u v w x y z The 2nd 4th terms in RHS are the advection terms We investigate the physical role of these terms dh h h u dt t x = + = 0 advection equation u is sometimes wave speed

  3. 3 Advection equation dh dt h t h x = + = 0 u It is assumed that u is positive constant for simplicity Then, an analytical solution is = ( , ) h x t ( ) h x ut 1.2 t=0 t=30 t=70 1 0.8 move eastward h 0.6 0.4 0.2 0 10 20 30 40 50 x 60 70 80 90 100

  4. 4 Let s solve numerically LHS + ( ) ( ) h t h t dt dt h t = forward + ( ) 2 ( ) h t dt h t dt center (leapfrog) dt

  5. 5 Let s solve numerically RHS + ( ) ( ) h x h x h x dx dx h x dx dx downwind (if u > 0) = ( ) h x ( ) upwind + ( ) 2 ( ) h x dx h x dx dx center

  6. 6 1. Forward method First, we consider the forward method in time, and the upwind method in space + ( , h x t ) ( , ) h x t ( , ) h x t ( , ) dt dt h x dx t dx = u Or dt dx + = h x dx t ( , h x t ) ( , ) h x t ( ( , ) h x t ( , )) dt u

  7. 7 1. Forward method To check the stability, it is assumed that ( , h x t + = ( , ) h x t ) dt We also assume the waveform in space = ( , ) h x t ( )exp( h t ) ikx (k: wave number) If | | 1, this finite difference method is stable

  8. 8 1. Forward method ( ) h t e h t e dt ikx ikdx ikx ikx ikx ( ) ( ) ( ) h t e h t e dx = u ikdx 1 1 e dx ) = u dt dt dx ( = ikdx 1 1 u e ( ) kdx = ikdx 1 1 C e = + (1 cos ) sin C C iC kdx where C ( udt/dx) is the Courant number

  9. 9 1. Forward method (1 = + cos ) sin C C kdx iC kdx 2 = + + 2 2 2 (1 cos ) sin C C kdx C kdx = + = + + + 2 2 2 1 2 1 2 ( 1 2 ( = + cos + 2 kdx 2 cos C C C kdx C kdx C kdx 2 2 2 cos C C C C 2 ( C C sin C C C 1) 2 ( 1)(1 cos 1)(1 cos 1)cos ) 1 kdx ) kdx kdx (for stability) 0 ( 1)(1 cos ) 0 C kdx

  10. 10 1. Forward method ( C 1)(1 cos 0 C ) 0 kdx 2 1 dx dt CFL condition (Courant-Friedrichs-Lewy) u If dx and dt meet the CFL condition, this method is stable, which is called conditionally stable Practically, we decide dx first, and then decide dt

  11. 11 Example h x

  12. 12 Example 1. Why is the amplitude decayed? 2. What is the CFL condition? 1 0.8 0.6 h 0.4 0.2 0 0 20 40 60 80 100 x

  13. 13 1. Problem of the forward method ( ) h x ( ) h x h x dx dx dx dx dx + = + h x dx ( ) 2 ( ) h x = + h x dx ( ) 2 ( ) dx ( ) dx h x h x 2 2 2 dx h numerical diffusion 2 2 x

  14. 14 What is the CFL condition? dx dt u upwind method t dt x dx

  15. 15 What is the CFL condition? if udt dx, i.e., u dx/dt => stable dx dt u t udt dt x right answer: dx

  16. 16 What is the CFL condition? dx dt u Fastest advection speed t u udt dt x right answer: dx

  17. 17 What is the CFL condition? if udt > dx, i.e., u > dx/dt => unstable dx dt u t udt dt x right answer: dx

  18. 18 What is the CFL condition? dx u dx dt dt u or The fastest current (wave) in the equations should be considered In general, wave speed is faster than current speed ex) sound wave: ~ 1500 m/s surface gravity wave: ~ 100 m/s Kuroshio: ~ 1 m/s gH We usually use the governing equations that have no sound wave (and also sometimes no surface gravity wave)

  19. 19 Another spatial difference If the center method in space is used, the forward method in time is unstable (not shown) If the downwind method in space is used, the forward method in time is also unable t x

  20. 20 Which is upwind? In general, it is difficult to determine the upwind side a priori In the case of several waves, such as large-scale Rossby wave and Kelvin wave, it is possible to know the upwind side a priori

  21. 21 B0undary condition The boundary condition is usually needed to calculate the value at the westernmost (x = 0) and easternmost (x = X) grid points 1. h(0, t) = constant 2. zero gradient: h(0, t) = h(dx, t) 3. Cyclic boundary condition: h(0, t) = h(X, t) This boundary condition is useful for an idealized simulation

  22. 22 Example: cyclic boundary condition 1 0.8 0.6 h 0.4 0.2 0 0 20 40 60 80 100 x

  23. 23 Boundary condition on the plane 1. 2. no-slip condition: no flow parallel to the land slip condition: no flow gradient perpendicular to the land land u = 0 v = 0 xv = 0 1. 2. y x

Related


More Related Content