18.336 spring 2009 lecture 19 04/10/09 Finite Volume Methods (FVM) FD: Ujn ≈ function value u(jΔx, nΔt) 1 � 1 (j+ 2 )Δx n FV: Uj ≈ cell average u(x, nΔt)dx Δx (j− 12 )Δx Fluxes through cell boundaries n n Ujn+1 − Ujn Fj+ 12 − Fj− 12 + =0 Δt Δx Image by MIT OpenCourseWare. Godunov Method REA = Reconstruct-Evolve-Average Burgers’ equation Image by MIT OpenCourseWare. CFL Condition: Δt ≤ C · Δx Local RP do not interact 1 If f �� (u) > 0 (convex flux function) ⎧ n Ujn−1 > us , s > 0 ⎪ ⎨ f (Uj −1 ) n f (Ujn ) if Ujn < us , s < 0 Fj− 1 = ⎪ 2 ⎩ f (Us ) Ujn−1 < us < Ujn s= f (unj ) − f (unj −1 ) unj − unj−1 ⎫ ⎪ ⎬ (1) (2) ⎪ ⎭ (3) Shock speed f � (us ) = 0 Sonic point [Burgers’: us = 0 ] Transsonic rarefaction If no transsonics occur, we recover exactly upwind. ⇒ FV Close Relation ←→ Image by MIT OpenCourseWare. FD. High Order Methods Linear case: Taylor series approach → LW FD: Larger stencils FV: Reconstruct with linear, quadratic, etc. functions in each cell. σj n = 0 ⇒ Godunov’s method unj +1 − unj Δx ⇒ Lax-Wendroff σj n = � �� � ũn (x,tn )=Ujn +σin ·(x−xj ) Image by MIT OpenCourseWare. 2 Riemann Problem High order not TVD ⇒ need limiters. Image by MIT OpenCourseWare. Nonlinear Stability Property Monotone ⇓ L -contracting ⇓ 1 Conservation law Initial conditions v0 (x) ≥ u0 (x) ∀x ⇒ v(x, t) ≥ u(x, t) ∀x, t. ||u(·, t2 )||L1 ≤ ||u(·, t1 )||L1 ∀t2 ≥ t1 Numerical scheme Vj n ≥ Ujn ∀j ⇒ Vj n+1 ≥ Ujn+1 ∀j ||U n+1 − V n+1 ||1 ≤� ||U n − V n ||1 [||U ||1 = Δx |uj |] j TVD ⇓ TV(u(·, t2 )) ≤ TV(u(·, t1 )) ∀t2 �≥ t1 [TV(u) = |u(x)|dx] TV(U n+1 [TV(U ) = ) ≤ TV(U n ) � |Uj+1 − Uj |] j Monotonicity preserving TVB (bounded) ux (·, t1 ) ≥ 0 ⇒ ux (·, t2 ) ≥ 0 if t2 > t1 n Ujn ≥ Uj+1 ∀j n+1 n+1 ⇒ Uj ≥ Uj+1 ∀j TV(U n+1 ) ≤ (1+αΔt)· TV (U n ) α independent of Δt Remark: Discontinuous solution ⇒ L1 −norm is appropriate ||uh (x) − u(x)||L∞ = 1 ∀h h→0 ||uh (x) − u(x)||L1 −→ 0 Theorem (Godunov): Image by MIT OpenCourseWare. A linear, monoticity preserving method is at most first order accurate. ⇒ Need nonlinear schemes. 3 High Resolution Methods A. Flux Limiters ut + (f (u))x = 0 Ujn+1 − Ujn Fjn − Fjn−1 + =0 Δt Δx Use two fluxes: • TVD-flux (e.g. upwind) F̂ • High order flux F̃ Smoothless indicator: � uj − uj−1 ≈1 θj = away from 1 uj+1 − uj where smooth near shocks Flux: Fj = F̂j + (F̃j − F̂j ) · Φ(θj ) Ex.: ut + cux = 0 � � Δt Fj = cUj + 2c 1 − c Δx · (Uj+1 − Uj ) · Φ(θj ) ���� � �� � Fupwind FLW −Fupwind Conditions for Φ(θ): • TVD: 0 ≤ Φ(θ) ≤ 2θ 0 ≤ Φ(θ) ≤ 2 • Second order: Φ(1) = 1 Φ continuous Image by MIT OpenCourseWare. Two Popular Limiters: Superbee van Leer Φ(θ) = max(0, min(1, 2θ), min(θ, 2)) 4 Φ(θ) = |θ| + θ 1 + |θ| Images by MIT OpenCourseWare. B. Slope Limiters Image by MIT OpenCourseWare. Upwind: σj = 0 Uj+1 − Uj LW: σj = Δx Minmod-limiter: � � Uj − Uj−1 Uj+1 − Uj , σj = minmod Δx Δx ⎧ ⎫ |a| < |b| & ab > 0 ⎬ ⎨ a minmod(a, b) = b if |a| > |b| & ab > 0 ⎩ ⎭ 0 ab < 0 Many more... Slope limiters relation ←→ Flux limiters 5 MIT OpenCourseWare http://ocw.mit.edu 18.336 Numerical Methods for Partial Differential Equations Spring 2009 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.