Numerical Methods for Hyperbolic Conservation Laws Lecture 4 Wen Shen Department of Mathematics, Penn State University Email: wxs7@psu.edu Oxford, Spring, 018 Lecture Notes online: http://personal.psu.edu/wxs7/notesnumcons/ Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation LawsOxford, LectureSpring, 4 018 1 / 49
Nonlinear scalar conservation law Traffic flow: q: density of cars, u: velocity of cars. u = u(q) = u m (1 q) f (q) = qu(q) = u m q(1 q): flux q t + f (q) x = 0 Quasilinear form characteristics: X (t) = f (q(x (t), t)) q t + f (q)q x = 0 d dt q(x (t), t) = X (t)q x + q t = 0 characteristics (if exist) are straight lines with slope f (q), along which q remains constant. Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation LawsOxford, LectureSpring, 4 018 / 49
Rarefaction Waves Assume q x (x, 0) < 0 in traffic flow. Then f (q) = u m (1 q) f (q) = u m < 0 f is increasing in x. The characteristics are spreading out. In case of a Riemann problem, with q l > q r, we get a centered rarefaction wave. Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation LawsOxford, LectureSpring, 4 018 3 / 49
Formation of shocks If q x (x, 0) > 0 then characteristic can cross each other. multi-valued solutions Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation LawsOxford, LectureSpring, 4 018 4 / 49
Vanishing viscosity and Equal-area rule Viscous equation: q t + f (q) x = ɛq xx Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation LawsOxford, LectureSpring, 4 018 5 / 49
Shock speed Apply conservation law: xq r xq l = tf (q l ) tf (q r ) With s t = x: s(q r q l ) = f (q l ) f (q r ) so shock speed: s = f (q l) f (q r ) q l q r Rankine-Hugoniot jump condition Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation LawsOxford, LectureSpring, 4 018 6 / 49
Solution of Riemann problem is self-similar, i.e, solution is constant along rays of x/t = c q(x, t) = q(x/t) Solve for rarefaction waves: q t (x, t) = x t q (x/t) = f (q) x = 1 t f ( q(x/t)) q (x/t) so f ( q(x/t)) = x/t Traffic flow: so q(x/t) = 1 [1 u m [1 q(x/t)] = x/t, x u m t ], for f (q l ) x/t f (q r ) Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation LawsOxford, LectureSpring, 4 018 7 / 49
Weak solution Definition: The function q(x, t) is a weak solution of the conservation law q t + f (q) x = 0 with initial data q(x, 0) if the following holds for all test function φ C0 1 (i.e. C 1 functions with compact support): [qφ t + f (q)φ x ] dx dt = q(x, 0)φ(x, 0) dx 0 Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation LawsOxford, LectureSpring, 4 018 8 / 49
Manipulating conservation laws Burgers equation shock speed: u t + (u /) x = 0 s = 1 ul ur = 1 u l u r (u l + u r ). Multiply the equation by u and manipulate: (u ) t + ( 3 u3 ) x = 0 shock speed s 1 = ul 3 ur 3 3 ul ur s s 1 Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation LawsOxford, LectureSpring, 4 018 9 / 49
Entropy conditions Lax entropy condition A discontinuity (q l, q r ) with speed s (satisfying Rankine-Hogoniot condition) must satisfy f (q l ) > s > f (q r ) characteristics enter the shock from both sides. Oleinik entropy condition Assume f (q) > 0. The q(x, t) is the entropy solution if there is a constant E > 0 such that for all a > 0, t > 0 and x R, q(x + a, t) q(x, t) a < E t. decay of positive waves Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 10 / 49
Read: entropy functions, ch 11.14 N-Wave decay, ch 11.15 Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 11 / 49
Non-convex flux function Example: Two-phase flow and the Buckley-Levrett equation q: saturation of water 1 q: saturation of oil fractional flow: Conservation laws: f (q) = q q + a(1 q) (a < 1) q t + f (q) x = 0 Plot of f : S-shaped with an inflection point, where f changes sign. Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 1 / 49
Solution of Riemann problem with q l = 1, q r = 0. Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 13 / 49
Entropy condition for non-convex flux Lax condition is NOT enough! O-condition (by Oleinik) A discontinuity (q l, q r ) with speed s (satisfying R-H condition) is entropy admissible if f (q) f (q l ) s f (q) f (q r ) q q l q q r for all q between q l and q r. Graphical interpretation: If q l < q r, then the graph of f on [q l, q r ] must lie above the secant line connecting (q l, f (q l )) and (q r, f (q r )). If q l > q r, then the graph of f on [q r, q l ] must lie below the secant line connecting (q l, f (q l )) and (q r, f (q r )). Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 14 / 49
Convex Hull construction Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 15 / 49
Convex Hull construction example Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 16 / 49
FVM for nonlinear scalar conservation laws Conservative form Q n+1 i = Qi n t [ ] F n x i+ F n 1 i 1 Godunov s method of first order: F n i = f (Q ) 1 i 1 Q : solution of Riemann problem with Q i 1 i 1, Q i along ξ = 0. Assume either f < 0 or f > 0 (i.e. genuinely nonlinear/convex flux). Riemann solution consists of one simple wave, either a shock or a rarefaction. Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 17 / 49
5 cases: Only in (c) is Q i 1 different from Q i 1, Q i. Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 18 / 49
In (c) the solution is a rarefaction wave, with f (Q i 1 ) < 0 < f (Q i ). called transonic rarefaction (in gas dynamics). Recall solution of a rarefaction wave f ( q(ξ)) = ξ At ξ = 0, one has f (q s ) = 0. q s : stagnation point q s is between Q i 1 and Q i. Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 19 / 49
Summary: Godunov flux for f > 0: f (Q i 1 ), if Q i 1 > q s and s > 0 F n i = f (Q 1 i ), if Q i < q s and s < 0 f (q s ), if Q i 1 < q s < Q i where s = f (Q i) f (Q i 1 ) Q i Q i 1 RH speed (similar for f < 0... leave as exercise.) Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 0 / 49
Also, one can use: F n i = 1 min f (q), if Q i 1 < Q i Q i 1 q Q i ( ) max f (q), if Q i 1 > Q i Q i q Q i 1 (*) holds for both convex and non-convex flux! Verify it (as an exercise). Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 1 / 49
If a shock with s = 0 occurs: By RH condition, one has f (Q i 1 ) = f (Q i ) one can use either f (Q i 1 ) or f (Q i ). Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 / 49
Define the fluctuations: A + Q i 1 A Q i 1 = f (Q i ) f (Q i 1 ) = f (Q i 1 ) f (Q i 1 ) Godunov method takes the same form as for linear equation: Q n+1 i = Q n i dt x (A+ Q i 1 + A Q i+ 1 ) Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 3 / 49
A simplified version: Solving every Riemann problem with a jump. W i 1 s i 1 = Q i Q i 1 { [f (Q i ) f (Q i 1 )]/(Q i Q i 1 ), if Q i 1 Q i = f (Q i ) if Q i 1 = Q i (Useful in high resolution correction terms.) Use A + Q i 1 A Q i 1 = s + i 1 W i 1 = s i 1 W i 1 (+) Simple (-) Trouble with a transonic rarefaction Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 4 / 49
Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 5 / 49
Entropy fix for transonic rarefaction: if f (Q i 1 ) < 0 < f (Q i ), use instead A + Q i 1 A Q i 1 = f (Q i ) f (q s ) = f (q s ) f (Q i 1 ) Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 6 / 49
Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 7 / 49
High resolution methods: Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 8 / 49
The Engquist-Osher method Approach: Treat all the solution of Riemann problem as a rarefaction. Set A + Q i 1 A Q i 1 = = Qi Q i 1 (f (q)) + dq Qi Q i 1 (f (q)) dq Then F i 1 Qi = f (Q i 1 ) + (f (q)) dq Q i 1 (or) = f (Q i ) Qi Q i 1 (f (q)) + dq = 1 [f (Q i 1) + f (Q i )] 1 Qi Q i 1 f (q) dq Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 9 / 49
F i 1 = 1 [f (Q i 1) + f (Q i )] 1 Qi Q i 1 f (q) dq If f > 0: F i 1 = f (Q i 1) If f < 0: F i 1 = f (Q i) If in transonic rarefaction: F i 1 = f (q s) If in transonic shock, i.e., f (Q i 1 ) > 0 > f (Q i ), then consistent F i 1 = f (Q i 1) + f (Q i ) f (q s ) (+) avoided expansion shock, and entropy condition always holds (+) extension to system is possible Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 30 / 49
E-scheme Osher showed that, if (E-scheme) then sign(q i Q i 1 ) [F i 1 f (q)] 0 q between Q i 1, Q i TVD if CFL number sufficiently small (leave as exercise) convergent to entropy weak solutions at most first order Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 31 / 49
High-resolution TVD methods One can extend from the method for linear problems. where Q n+1 i = Qi n t [ ] A + Q x i 1 + A Q i+ 1 t [ Fi+ 1 x F ] i 1 s i 1 : R-H speed F i 1 = 1 s i 1 W i 1 : limited version of the wave [ 1 t x s i 1 ] W i 1 Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 3 / 49
If one uses a TVD limiter φ(θ), the the method is TVD. convergence (NB! Only valid for scalar conservation laws!) Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 33 / 49
A partial informal analysis: Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 34 / 49
The important of the conservative form Burger equation u t + 1 (u ) x = 0 with u > 0. Using Upwind method: U n+1 i = Ui n 1 t [ (U n x i ) (Ui 1) n ] Discretize directly the quasilinear form u t + uu x = 0 U n+1 i = U n i t x Un i (U n i U n i 1) Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 35 / 49
Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 36 / 49
Lax-Wendroff Theorem Lax-Wendroff Theorem Let Q ε (x, t) denote the numerical approximation computed by a consistent and conservative method on grid ( t, x). Suppose that, as ε 0 (i.e. t, x 0), Q ε (x, t) converges to q(x, t), i.e., T b 0 a Q ε (x, t) q(x, t) dx dt 0 TV(Q ε (, t)) < M 0 t T, ε > 0 Then q(x, t) is a weak solution of the conservation law, i.e. 0 (qφ t + f (q)φ x ) dx dt = φ(x, 0)q(x, 0) dx ( ) for all test function φ C 1 0. Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 37 / 49
Proof: Denote by (Q n i, Φn i ) the discrete values of (Qε, φ) at a grid point. Conservative method: Multiply with Φ n i and sum over i, n: n=0 i= Φ n i (Q n+1 i Using summation-by-parts: m k=1 Q n+1 i = Qi n t x [F n i+ F n 1 i ] 1 Q n i ) = t x n=0 i= Φ n i [F n i+ F n 1 i ] 1 m 1 a k (b k b k 1 ) = a m b m a 1 b 0 (a k+1 a k )b k Since φ has compact support, we have k=1 i Φ 0 i Q 0 i (Φ n i Φ n 1 i )Qi n = t x n=1 i (Φ n i+1 Φ n i )F n i 1 n=0 i Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 38 / 49
i Φ 0 i Q 0 i (Φ n i Φ n 1 i )Qi n = t x n=1 i (Φ n i+1 Φ n i )F n i 1 n=0 i Can write as I + II = III where I = x t II = x t (Φ n i Φ n 1 n=1 i n=0 i t i ) Qi n (Φ n i+1 Φn i ) F n x i 1 III = x i Φ 0 i Q 0 i Since φ C0 1, the limit as x 0, t 0 I 0 φ t q dx dt, III φ(x, 0)q(x, 0) dx Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 39 / 49
For II: use the consistence of the numerical flux. II = x t For example, F n = F(Q i 1 i 1 n, Qn i ), Use q = Q n i : n=0 i (Φ n i+1 Φn i ) F n x i 1 F(Q n i 1, Q n i ) f ( q) L max( Q n i q, Q n i 1 q ) F(Q n i 1, Q n i ) f ( q) L Q n i Since TV(Q n ) < M, as ε 0, we must have Q n i so F i 1 f (Qn i ) as ε 0 for almost all i. Then II q(x, t) is a weak solution. 0 Qi 1 n, 0 for almost all i. Q n i 1 φ x (x, t)f (q(x, t)) dx dt Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 40 / 49
Entropy condition But: weak solutions are not unique. Need entropy conditions. η(q): convex entropy function ψ(q): entropy flux, with ψ (q) = η (q)f (q) Entropy condition: η(q(x, t)) + ψ(q(x, t)) 0 t x in the weak sense Discrete version: enough to require η(q n+1 i ) η(qi n ) t ( ) Ψ n x i+ Ψ n 1 i 1 where Ψ n = Ψ(Q i 1 i 1 n, Qn i ): numerical entropy flux Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 41 / 49
Entropy consistency of Godunov method Given q n (x, t n ) piecewise constant. Let q n (x, t) be the exact entropy solution on [t n, t n+1 ]. Integrating η(q(x, t)) t + ψ(q(x, t)) x 0 over (x i 1, x i+ 1 ) (t n, t n+1 ): xi+ 1 x i 1 tn+1 xi+ η( q n 1 (x, t n+1 )) dx η( q n (x, t n )) dx x i 1 tn+1 ψ( q n (x i 1, t)) dt ψ( q n (x i+ 1 t n t n = t ψ(q ) t ψ(q ) i 1 i+ 1, t)) dt Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 4 / 49
So 1 xi+ 1 η( q n (x, t n+1 )) dx η(qi n ) t x x x (ψ(q ) ψ(q )) i+ 1 i 1 i 1 Since η (q) > 0, Jensen s inequality gives η(q n+1 i ) = η 1 xi+ 1 q n (x, t n+1 ) dx 1 x x x i 1 xi+ 1 x i 1 η( q n (x, t n+1 )) dx This leads to the discrete entropy condition: η(q n+1 i ) η(qi n ) t x (ψ(q ) ψ(q )) i+ 1 i 1 Solutions of Godunov method converges to entropy weak solutions. Wen Shen (Penn State) Numerical Methods for Hyperbolic Conservation Laws Oxford, Lecture Spring, 4 018 43 / 49