advertisement

Lecture 5 18.086 R. J. LeVeque — AMath 585–6 Notes Phase vs. group velocity time = 0 • 1 Remember from physics: group velocity 0.5 0 phase velocity −0.5 −1 −3 −2 −1 0 time = 0.4 1 0.5 0 −0.5 1 2 time = 0.8 1 0.5 0 ue — Dispersion in LW scheme AMath 585–6 Notes 187 −0.5 −1 −3 −2 −1 1 1 0.5 0.5 0 0 −0.5 −0.5 −1 −1 −2 −1 0 1 2 3 1 2 3 1 2 3 time = 1.2 time = 0 −3 0 1 2 −3 3 −2 −1 0 time = 1.6 time = 0.4 1 1 0.5 0.5 0 0 −0.5 −0.5 −1 −1 −3 −2 −1 0 1 2 3 −3 −2 −1 0 time = 0.8 Figure 13.6: The oscillatory wave packet satisfies the dispersive equation u t + aux + bu shown is a black dot, translating at the phase velocity cp (ξ0 ) and a Gaussian that is tran group velocity cg (ξ0 ). 1 0.5 0 −0.5 −1 −3 −2 −1 0 time = 1.2 1 1 2 3 Lax equivalence theorem • So far we considered stability and accuracy as independent properties, but they are linked by the Lax equivalence theorem For a consistent approximation of a well-posed linear problem: stability <=> convergence Lax equivalence thm. • Give an IVP ut = Au, u(0) = u0 • Say we have an operator S such that • For the analytical solution, the situation is ||R n t u(0)|| U (t + t) = S t U (t) = S n t U (0) u(t + t) = R t u(t) = Rn t u(0) c3 ||u(0)|| • The IVP is well-posed if • The discretization leading to S has order of accuracy p if ||S tu R p+1 u|| c ( t) t 1 If p>0, the discretization is called consistent • The {S t} The {S t} ||S • n t U || are called stable if: c2 ||U ||, for all n, are called convergent if: t with 0 n t lim t!0,n t=t ||S n t u(0) u(t)|| = 0 Lax equivalence theorem • So far we considered stability and accuracy as independent properties, but they are linked by the Lax equivalence theorem For a consistent approximation of a well-posed linear problem: stability <=> convergence Rate of convergence • • • • We can use the previous framework to redefine the accuracy (local and global error). • Nothing new… :-) Local error: tu R Global error: ||U (n t) p+1 u|| c ( t) t 1 u(n t)|| = ||(S n t Rn t )u(0)|| The global error can be estimated as (p: order of accuracy - as before!) ||(S n t • ||S Rn t )u(0)|| c1 c2 c3 tp ||u(0)|| Lecture => stability is sufficient for convergence (necessary: not shown) 2nd order PDEs (sect. 6.4): The wave equation 2 utt = c uxx • Wave equation: • Produces waves with velocities +/- c (i.e. in both directions!) • General solution: u(x,t) = F1(x+ct) + F2(x-ct) • For given initial conditions u(x,0) and ut(x,0): Z x+ct 1 1 u(x, t) = [u(x + ct, 0) + u(x ct, 0)] + ut (x̃, 0)dx̃ 2 2c x ct Lecture Numerics for the wave equation • @ Equivalent 1st order problem: @t with v1 = ut , v2 = cux ✓ v1 v2 ◆ = ✓ 0 c c 0 ◆ @ @x ✓ • Can use Lax-Wendroff/Friedrichs like for 1-way wave eq! • But there are better suited/simpler methods • Again the question is: How to discretize time (2nd order!) and space v1 v2 ◆ Numerics for the wave equation • Consider space discretization first, i.e. transform into ODE 2 d 2 Uj+1 Uj = c 2 dt 2Uj + Uj x2 1 = Uxx + O(Δx2) • Using ansatz Uj = G(t)eikj Gdisc (t) = e±icF kt (using method of lines) (check this!) x we find Gan (t) = e ±ickt F = sinc(k x/2) • • Discretized space already leads to dispersion (F=F(k)), i.e. waves with different k travel at different speeds cF(k) What happens if we also discretize time? Lecture Leapfrog scheme • Easiest numerical scheme for 2nd order problem: Leapfrog n t) Notation: Uj,n = U (j x,CFL criterion for Leapfrog scheme Uj,n+1 • 2Uj,n + Uj,n 1 !" 2!"Uj+1,n u =0 Equation: =+ c 2 !t !x t Stability: |r| ≤ 1 (equiv. CFL condition!) Lecture t n+1! Accuracy: 2nd order n-2! with physical domain of dependence n! n-1! • 2Uj,n +nU j 1,n +1 = !in –1 – " (!in+1 # !in–1 ) Scheme: !i x2 numerical domain of dependence unstable |uΔt/Δx| >1 c stable |uΔt/Δx| ≤1 c Lecture / see Mathematica notebook leapfrog_stability.nb i-3! i-2! i-1! i! i+1! i+2! i+3! x