Document 13575429

advertisement
18.336 spring 2009
lecture 18
Intermezzo:
Boundary Conditions for Advection
Linear advection
�
ut + ux = 0
x ∈ [0, 1]
Image by MIT OpenCourseWare.
Upwind (first order) treats boundary conditions naturally correctly.
LF, LW: Need artificial/numerical boundary conditions at x = 1,
that acts as close to “do nothing” as possible.
WENO: Need information outside of domain.
Image by MIT OpenCourseWare.
Which values?
Extrapolate solution; works if u smooth.
E.g., constant/linear/etc. extrapolation.
1
04/14/09
Numerical Methods for Conservation Laws
Naive Schemes
Ex.: Burgers’
ut + uux = 0
with u > 0
upwind
�
�� �
n+1
n
n
Uj − Uj
U − Ujn−1
n j
= −Uj
Δt
Δx
Non-conservative; fine if u ∈ C 1 .
But: Wrong if u has shocks (see pset 5).
Conservative FD Methods
ut + (f (x))x = 0
Discretize in conservation form
⇒ conservation ⇒ correct shock speeds
Upwind:
⎧
f (Ujn ) − f (Ujn−1 )
⎪
⎪
n+1
⎨
n
−
f � (Ujn ) ≥ 0
Uj − Uj
Δx
if
=
⎪
Δt
f (Ujn+1 ) − f (Ujn )
⎪
⎩
−
f � (Ujn ) < 0
Δx
⎫
⎪
⎪
⎬
⎪
⎪
⎭
Lax-Friedrichs:
Image by MIT OpenCourseWare.
Ujn+1 − 12 (Ujn+1 + Ujn−1 ) f (Ujn+1 ) − f (Ujn−1 )
+
=0
Δt
2Δx
(no straightforward LW, since based on linear Taylor expansion)
Numerical Flux Function
Ujn+1 − Ujn Fj n − Fj−1 n
+
=0
Δt
Δx
�
Upwind: Fj n =
f (Ujn )
f (Uj+1 n )
if
f (Ujn+1 )−f (Ujn )
Ujn+1 −Ujn
LF : Fj n = 12 (f (Ujn ) + f (Ujn+1 )) −
≥ 0
< 0
Δx n
(U − Ujn )
2Δt j +1
2
� Image by MIT OpenCourseWare.
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.
Download