Download presentation
Presentation is loading. Please wait.
Published byGiles Wilkinson Modified over 8 years ago
1
The story so far… ATM 562 Fovell Fall, 2015 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 consists 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 L x and wavenumber k where phase speed is with aR the real part of the analytic frequency 4
5
Analytic solution Plugginginto and simplifying yields …but since we know that then this implies that c a = c, which means that the wave moves with the advection velocity c. Note that c a = c independent of the chosen wavelength L x 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. 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) c > 0 6
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 is discretization or truncation error The good news is that as ∆t, ∆x go to 0 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 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 is the change function that 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 9
10
Amplification and phase The frequency a may be complex – As a result may be complex as well Write in polar form – where Amplification factor Phase function 10
11
Amplification and phase We saw the amplification factor is based on the imaginary part of the frequency – So that 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 c a = aR /k) How it grows 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 c a = 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, c d is not necessarily equal to c a. 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 u j n+1 and u j-1 n to u j n. Our FD change function relates the future time to the present 16
17
Finding | d |, d for upstream scheme Sincethen Plug into upstream scheme… 17
18
Finding | d |, d for upstream scheme Solve for d [where c’ = (c∆t/∆x)] – So amplification factor (squared) is: – Need | d | 2 ≤ 1 for stability. This implies c’ ≤ 1. The “CFL criterion”. real imaginary 18
19
[end of review] 19
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.