Download presentation

Presentation is loading. Please wait.

Published byIrea Shaw Modified over 2 years ago

1
Finite differences1

2
2 Introduction 1j-1jj+12NN+1 Taylor series expansion:

3
Finite differences3 Finite differences approximations forward approximation = Consistent if,,…. are bounded backward approximation adding both == = centered differences

4
Finite differences4 Finite differences approximations (2) Also === fourth order approximation to the first derivative Second order approximation to the second derivative

5
Finite differences5 The linear advection equation + initial and boundary conditions Analytical solution Substituting we get Eigenvalue problems for the operators With periodic B.C. λ can only have certain (imaginary) values where k is the wavenumber The general solution is a linear combination of several wavenumbers

6
Finite differences6 The linear advection equation (2) The solution is then: Propagating with speed U 0 For a single wave of wavenumber k, the frequency is ω=kU 0 No dispersion Energy conservation If periodic B.C.

7
Finite differences7 Space discretization ; substituting whose solution is with U0U0 c kΔxkΔx The phase speed c depends on k; dispersion kΔx= π ---> λ=2Δx ==> c=0 centered second-order approximation

8
Finite differences8 Group velocity Continuous equation Discretized equation =-U 0 for kΔx=π Approximating the space operator introduces dispersion

9
Finite differences9 Time discretization Try Substituting we get α (Courant-Friedrich-Levy number) \ -- v -- / ω=a+ib If b>0, φ j n increases exponentially with time (unstable) If b<0, φ j n decreases exponentially with time (damped) If b=0, φ j n maintains its amplitude with time (neutral) Also another dispersion is introduced, as we have approximated the operator / t first-order forward approx.

10
Finite differences10 Three time level scheme (leapfrog) This scheme is centered (second order accurate) in both space and time Try a solution of the form exponential If |λ k | > 1 solution unstable if |λ k | = 1 solution neutral if |λ k | < 1 solution damped Substituting Δx--->0 Δt --->0 physical mode computational mode

11
Finite differences11 Stability analysis Energy method define Periodic boundary conditions Discretized analog : E n φ n N+1 φ n 1 If E n =const, stable

12
Finite differences12 Example of the energy method upwind if U 0 >0 downwind if U 0 <0 x j-1j E n+1 =E n if α=0 ==> U 0 =0 no motion α=1 Δt= Δx/U 0 if E n+1 > E n > unstable E n+1 < E n α > 0 ==> U 0 > 0 (upwind) α < 1 U 0 Δt/ Δx < 1 (CFL condition) damped

13
Finite differences13 Von Neumann method Consider a single wave if |λ k | < 1 the scheme is damping for this wavenumber k if |λ k | = 1 k the scheme is neutral if |λ k | > 1 for some value of k, the scheme is unstable alternatively if Im(ω) > 0 scheme unstable if Im(ω) = 0 scheme neutral if Im(ω) < 0 scheme damping V f = ω/k v g = ω/ k

14
Finite differences14 Matrix method Letfor a two-time-level scheme is called the amplification matrix And callthe eigenvectors of Expanding the initial conditionIn terms of these eigenvectors and applying n times the amplification matrix exponential therefore

15
Finite differences15 Stability of some schemes Forward in time, centered in space (FTCS) scheme Upwind or downwind using Von Neumann, we find scheme unstable upwind if U 0 > 0 downwind if U 0 < 0 Using Von Neumann: α(α-1) > > unstable α < 0 downwind α > 1 CFL limit -1/4 0 α > stable damped scheme

16
Finite differences16 Stability of some schemes (cont) Leapfrog Using von Neumann we find |α|1 as stability condition

17
Finite differences17 Lax Wendroff Stability of some schemes (cont) From (Taylor in t) Equivalent to Applying Von Neumann we can find that |α| > stable jj+1/2j+1 x

18
Finite differences18 Stability of some schemes (cont) Implicit centered scheme Krank-Nicholson where using von Neumann Always neutral Dispersion worse than leapfrog where Always neutral Dispersion better than implicit. No computational mode

19
Finite differences19 Intuitive look at stability If the information for the future time step comes from inside the interval used for the computation of the space derivative, the scheme is stable Otherwise it is unstable x--> point where the information comes from (x j -U 0 Δt) j-1jj+1 x U0ΔtU0Δt Interval used for the computation of φ/ x Downwind scheme j-1jj+1 xo x ----> α < 1 o ----> α > 1 Upwind scheme CFL number ==> fraction of Δx traveled in Δt seconds Leapfrog xo Implicit j-1jj+1

20
Finite differences20 Dispersion and group velocity ωΔt π/2π U0U0 vgvg vfvf Leapfrog K-N Implicit

21
Finite differences21 Effect of dispersion Initial Leapfrog implicit

22
Finite differences22 Two-dimensional advection equation Using von Neumann, assuming a solution of the form we obtain using we obtain, for |λ| to be 1 the condition where Δs= Δx= Δy This is more restrictive than in one dimension by a factor

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google