Understanding Finite Difference Schemes and Analytic Solutions in Computational Math

the story so far n.w
1 / 19
Embed
Share

Dive into the world of finite difference schemes and analytical solutions for partial differential equations. Explore concepts like convergence, consistency, and stability while learning how to apply these principles to solve complex mathematical problems effectively.

  • Computational math
  • Finite difference schemes
  • Analytic solutions
  • Convergence
  • Stability

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. The story so far ATM 562 Fovell Fall, 2021 1

  2. Convergence We will deploy finite difference (FD) approximations to our model partial differential equations (PDEs) We want to know we can converge on the true solution as time step t and grid spacing x decrease The Lax-Richtmyer theorem states that convergence is attained if the FD scheme is both consistent and stable 2

  3. The problem Here is a selected model equation, which has no analytic solution We simplify this to a 1D PDE, the linear wave equation with constant advection speed c, which does have an analytic solution 3

  4. Analytic solution The analytic solution of of a wave feature that propagates at constant speed c (to the right if c > 0), preserving shape independent of wavelength(s) To observe this, we assume a wave-like solution with wavelength Lx and wavenumber k consists where phase speed is with aR the real part of the analytic frequency 4

  5. Analytic solution Plugging and simplifying yields into but since we know that that ca = c, which means that the wave moves with the advection velocity c. Note that ca = c independent of the chosen wavelength Lx or wavenumber k. If the solution is a linear combination of waves with different wavelengths, they all move at speed c, so the wave shape is preserved. Note that c and k are real, so a is also purely real. then this implies 5

  6. Finite difference scheme Consider the explicit upstream scheme, which is forward in time (from n to n+1) and upwind in space (from i to i-1 for c > 0) 6 c > 0

  7. Consistency Is our FD scheme consistent with our PDE? We check by using Taylor expansions for about . We discovered the upstream scheme became Where The good news is that for c t/ x fixed. Thus, our scheme is consistent. The bad news is that for finite t and x, the upstream scheme is really solving is discretization or truncation error as t, x go to 0 implicit diffusion 7

  8. Stability Stability of the upstream scheme will depend on our choices for t and x. First, look at the analytic solution to confirm that it is stable. Our usual wave-like solution becomes at time t + n t into the future 8

  9. Stability for analytic But Where controls how the present [u(x,t)] evolves over the next n time steps This change can be translation in space and/or amplitude growth or decay. We need to separate them is the change function*that 9 * transmogrifier!

  10. Amplification and phase The frequency amay be complex As a result Write in polar form may be complex as well where Amplification factor Phase function 10

  11. Amplification and phase We saw the amplification factor is based on the imaginary part of the frequency How it grows So that aI < 0 is exponential decay, aI > 0 is exponential growth, and aI = 0 being constant amplitude and the phase function is based on the real part of the frequency, so (since ca = aR/k) How it moves 11

  12. Analytic vs. FD solutions For the analytic solution, aI = 0, so | a| = 1 and the amplitude does not change with time. Also, since ca = c, a = -kc t. For the FD solution, the frequency d will be complex and the FD change function is with 12

  13. FD amplitude error For the FD solution, | d| is not necessarily 1. Thus, in contrast with the analytic solution, the wave amplitude may decay or grow. Either represents amplitude error in this case. If it grows, the growth is unbounded, because of the exponent n. The scheme would be unstable. 13

  14. FD phase error FD phase error will be quantified as the ratio of the FD and analytic phase functions, which is the ratio of the FD and analytic phase speeds For the FD scheme, cd is not necessarily equal to ca. That represents phase error. The wave propagation is either too fast or too slow. 14

  15. Even worse Both amplitude error and phase error can be wavelength-dependent. For the analytic solution, all waves share the same amplification factor (= 1) and phase speed; this preserves shape. In FD solution, some waves may decay (or grow) faster than others. This will change the wave feature shape. Phase error may be larger for some waves. This is dispersion error. This will also change the wave feature shape, as some wavelengths travel faster or slower than others. 15

  16. Finding |d|, d for upstream scheme The upstream scheme again is We need to relate ujn+1 and uj-1n to ujn. Our FD change function relates the future time to the present 16

  17. Finding |d|, d for upstream scheme Since then Plug into upstream scheme 17

  18. Finding |d|, d for upstream scheme Solve for d [where c = (c t/ x)] real imaginary So amplification factor (squared) is: Need | d|2 1 for stability. This implies c 1. The CFL criterion . 18

  19. [end of review] 19

More Related Content