Professional Documents
Culture Documents
lecture 1
02/03/09
PDE = partial dierential equation b.c. = boundary conditions (if time involved, also i.c. = initial conditions) Def.: An expression of the form F (Dk u(x), Dk1 u(x), ..., Du(x), u(x), x) = 0, x Rn (1)
a (x)D u = f (x)
(iv) fully nonlinear, if neither (i), (ii) nor (iii). Def.: An expression of the form F (Dk u(x), Dk1 u(x), ..., Du(x), u(x), x) = 0, is called k th order system of PDE, where F : Rmn Rmn ... Rmn Rm Rm and u : Rm , u = (u1 , ..., um ). Typically: # equations = # unknowns , i.e. n = m. Some examples:
ut + ux = 0 linear advection equation
ut = uxx heat equation
uxx = f (x) Poisson equation (1D)
2 u = f Poisson equation (nD)
ut + cux = Duxx convection diusion equation
ut + ( 1 u2 )x = 0 ut + u ux = 0 Burgers equation (quasilinear)
2 2 u = u2 a semilinear PDE utt = uxx wave equation (1D) u 0 1 u wave equation, written as a system = v t 1 0 v x utt = vxt = vtx = uxx ut + uux = uxxx Korteweg-de-Vries equation ut + ( u ) u = p + 2 u incompressible Navier-Stokes equation u=0 [dynamic-algebraic system] shallow water equations ht + (uh)x = 0 ut + uux = ghx [system of hyberbolic conservation laws] |u| = 1 Eikonal equation (nonlinear) 2
k k1
x Rn
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 2
02/05/09
Well-Posedness
Def.: A PDE is called well-posed (in the sense of Hadamard), if (1) a solution exists (2) the solution is unique (3) the solution depends continuously on the data
(initial conditions, boundary conditions, right hand side)
Careful: Existence and uniqueness involves boundary conditions Ex.: uxx + u = 0 a) u(0) = 0, u( ) = 1 unique solution u(x) = sin(x) 2 b) u(0) = 0, u( ) = 1 no solution c) u(0) = 0, u( ) = 0 innitely many solutions: u(x) = A sin(x) Continuous dependence depends on considered metric/norm.
We typically consider || ||L , || ||L2 , || ||L1 .
Ex.: heat equation
ut = uxx u(0, t) = u(1, t) = 0 boundary conditions
u(x, 0) = u0 (x) initial conditions backwards heat equation
ut = uxx u(0, t) = u(1, t)
boundary conditions
u(x, 0) = u0 (x) initial conditions
well-posed
no continuous dependence
on initial data [later]
Notions of Solutions
Classical solution k th order PDE u C k Ex.: 2 u = 0 u C ut + ux = 0 u(x, t) C 1 u(x, 0) C 1 Weak solution k th order PDE, but u / Ck.
w=
+ k=
Solution:
u0 (x)eikx dx
u(x, t) =
k k
k
u k (0)eikx e(ik)
nt
2 t)
4t
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 3
02/10/09
f 0 Laplace equation 2 u = 0
u = harmonic function
Physical example: Heat equation: ut 2 u = f Dirichlet: prescribe u = g Neumann: prescribe ux u =h n
source
stationary (t ) : ut = 0 2 u = f
(x)
x (x y )f (y ) dy =
R2
(x y )f (y ) dy = f (x).
is a Greens function for the Poisson equation on Rn . Properties of harmonic functions: Mean value property u harmonic u(x) = B (x,r) u ds u(x) = B (x,r) u dy for any ball B (x, r) = {y : ||y x|| r}.
Implication: u harmonic u C
Proof: u(x) = Rn B (0,r) (x y )u(y ) dy
u Ck
convolution average average
u C k+1
f dS = n
h dS.
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 4
02/12/09
Ficks law: ux F
= au d mass balance: u dx = b F n dS = b divF dx dt V V V ut = b div(au) = c 2 u
simple: c = 1
Superposition: u(x, t) = (x y, t)u0 (y ) dy Rn ut = 2 u in Rn ] 0, [ solves u(x, 0) = u0 (x) Maximum Principle Rn bounded T := [0, T ], T = ( {0}) ( ] 0, T [ )
C u C
If u is the solution to ut = 2 u in T
u = u0 on {0}
u=g on ] 0, T [
then (i) max u = max u
T T
(weak)
(strong)
u(x, t) = u0 (x tb) +
0
f (x + (s t)b, s) ds 2
t transport
u(x, t) = =
1 2 0
a(x + (t s) s) ds + b(x + t)
x+t
a(y ) dy + b(x + t)
xt
initial conditions: b = g, a = h gx
u(x, t) =
1 (g (x + t)+ g (x t))+ 1 2 2
x+t
h(y ) dy
xt
Ex.: g 0, h = . 3D u(x, t) = t
1 |x| = t
(y ) dy = 4t B (x,t) 0 else
sharp front t2 1 t2
1 ( y ) dy = 2D
u(x, t) = 2 2 2 1/2 2t2 (t2 |x|2 )1/2 B (x,t) (t |y x| ) 1 xt 2 2 1 / 2 = 2 (t |x| ) 0 else
signal never vanishes
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 5
02/19/09
Vector of coecients a = (a0 , a1 , , am ) is called FD stencil. How to get stencil? Taylor expansion In 1D: u(x) = u(x0 ) + ux (x0 ) (x x0 ) + 1 u (x ) (x x0 )2 2 xx 0 +1 u (x ) (x x0 )3 + O(|x x0 |4 ) 6 xxx 0 Name x i = x i x0
1 = u(xi ) = u(x0 ) + ux (x0 ) x i + 1 u (x ) x 2 3 i |4 ) i + 6 uxxx (x0 ) x i + O (|x 2 xx 0 m m m = ai u(xi ) = u(x0 ) ai + ux (x0 ) ai x i i=0 i=0 i=0 m i=0
ai x 2 i + O(h3 ) where x i h i.
+uxx (x0 )
1 2
ai x 2 i
small ai x 3 i
ai = 0,
ai x i = 0,
ai x 2 i
=2
small
etc. 1
Vandermonde matrix
1 1 1 1 1 x m 0 x 0 x 1 x m 2 2 x
x V = V (x0 , x1 , , xm ) = 0 m =
. . .
. . .
. . . . .
.
. .
.
. . .
k 0 x 1 x k k m x
k 0 x m V a=b linear system k=1:
ai u(xi ) ux (x0 ) : 1
1
x 0 x m
1
1
0 x m k=2: ai u(xi ) uxx (x0 ) :
x 2 x 0 x 2 m
If m = k = In general one unique stencil a If m > k = Multiple stencils Can add additional criteria, e.g. require higher order. Ex.: k = 1, m = 1 1 1 a0 0 = x 0 x 1 1 a1
1 , a1 = 1 = h = a0 = h x 0 = 0, x 1 h
1 1 x 0 = 0, x 1 = h = a0 = h , a1 = h
Ex.: k = 1, m = 2
x = (x0 , x0 + h, x0 h)
a0 1
1 1 1
0 a a = 1 2
a1
=
=
h 0 h h
1
a0 = a1 a2 a2 One-parameter family of stencils Additional criterion: second order accuracy
1 1 1 a0 0
0 h h
a1
=
1
=
a0 = 0, a1 = 2 2 0
h h a2 0
1 , a2 2h
=
21 h
Ex.: k = 2, m = 2
1 1
0 x 1 0 x 2 1
a0 = a1 a2 1 a0 0
2
( x1 x 2 ) x 2
a1 =
0
=
a1 = x 1 2 x 2 a2 2
2 a2 = x ( x2 x 1 ) 2
1 h2
Equidistant: x = (x0 , x0 + h, x0 h)
2 a0 = h 2 , a1 = a2 =
1 0 0 0
0 0
1 x 1 y 1 2 x
1 x 1 y 1 2 y 1
1
x m y m x 2 m x m y m 2 y m
a0 a1 . . .
.
. .
.
. . am
0
0
0
=
stencil a for uxx (x0 ) 2
0
0
3D
1 0 0 0 0 0 0 0
0 0 Ex.:
1 x i y i z i 2 x
i 2
y i
z i2 x i y i x i z i y i z i 2D
a0 1
a1 . .
. .
.
.
.
. .
. . .
.
.
.
.
. . am
0
0
0
0
2 2
stencil for
u(x0 ) = =
2
uxx + uyy + uzz 2
0
0
0
2
u(x0 )
4 1 1 1 1 2 1 2 1 1 1 a =
h =
h2 , h2 , 0, h , 0, h 2 , h2 , h2 , h2 , h2 2 , 0 +
2 , 0, h2 h2
a = ( exercise )
Poisson Equation
uxx = f (x) in ]0, 1[
u(0) = a Dirichlet boundary condition 1D
ux (1) = c Neumann boundary condition Discretize on regular grid x = (0, h, 2h, , nh, 1), where h =
1 n+1
u(xi1 ) + 2u(xi ) u(xi+1 ) Interior: f (xi ) = uxx (xi ) = + O(h2 ) 2 h u i 1 1 2 1 = h ui + O(h2 ) 2 , h2 , h2 ui+1 Dirichlet boundary condition: u0 = u(x0 ) = a (exact) Neumann boundary condition: Naive choice: c = ux (1) un+1 un 1 1 un = + O(h) = , +O(h) un+1 h h h O(h) on a single cell = Could preserve O(h2 ) globally, or drop accuracy to O(h). Here the bad event happens.
Second order approximation:
u(xn+2 ) u(xn ) c = ux (1) = + O(h2 ) 2h un + 2un+1 un+2 Obtain un+2 by = f (1) 2 h 1 1 h un = , = c + f (1) un+1 2 h h
Alternative:
un1
1 2 2h , h , 23 un = c
h un+1
nd 2 order one-sided stencil (check by V a = b).
5
a f (x1 ) .
.
.
=
.
.
.
f (xn )
c +
h f (1)
2
()
.
.
.
2 h2 1 h 1
h 2 1 h
u1 . . . .
. .
. . .
un
1 f (x1 ) + h 2a f ( x ) 2 .
.
.
=
.
. .
f (xn1 )
c f (xn )+ h +
f (1) 2
()
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 6
02/24/09
u(0) =
u(1) = Approximation: ui1 2ui + ui+1 ui+1 ui1 ai + bi + ci ui = fi 2 h 2h
where ai = a(xi ), bi = b(xi ), ci = c(xi ).
Linear system: A
u=f 1 h2 c1 2a1 a1 + hb 2 a hb2 2 h2 c2 2a2 a2 + hb 2 2 2 ... ... ... 1 A = h2 .. .. .. . . . hbn1 1
an1 2 h2 cn1 2an1 an1 + hbn 2 n an hb h2 cn 2an 2 a1 b1 f1 h 2 2h f2 .
. f =
.
n1 f
an bn fn h2 + 2h
Potential Problems: A non-symmetric If |a(x)| |b(x)|, instabilities possible due to central dierences. Often better approximations possible. 1
Ex.: Heat equation in rod with variable conductivity ( ) ((x)ux )x = f (x) (x)uxx + x (x)ux = f (x) () Can discretize () as before. Suboptimal results. Better: discretize () directly (in line with physics)
1 =
h (i 1
ui1 (i 1
+ i+ 1
)ui + i+ 1
ui+1 )
2
2
2
2
1
A =
h 2
(
1
+ 3
)
3
2
2
2
3
(
3
+ 5
)
5
2
2
2
2
. .
. .
.
.
.
. .
3
3
1
1
(
+ )
n2
n2
n2
n2
3
1
1
n (n
+ n+ )
2
2
2
Ui
u(x1 )
. . . u(xn )
1
. F
= . . =AU n =F + AU Global Truncation Error (GTE) Error vector: E : U U AU = F AE = and E = 0 at boundaries =F + AU e (x) = (x) ]0, 1[ Discretization of e(0) = 0 = e(1) T (x) e(x)
1 u (x)h2 12 1 12 u (x)h2
1 2 h (u (0) 12
Message: Global error order = local error order if method stable. Stability Mesh size h : Ah E h = h E h = (Ah )1 h 1 ||E h || = ||(Ah ) h || ||(Ah )1 || || h ||
O(h2 )(LTE)
Stability: ||(Ah )1 || C h < h0 Inverse FD operators uniformly bounded. ||E h || C || h || h < h0 . Consistency || h || 0 as h 0 LTE goes to 0 with mesh size Convergence
||E h || 0 as h 0 GTE goes to 0 with mesh size Lax Equivalence Theorem
consistency + stability convergence Proof: (only = here) ||E h || ||(Ah )1 || || h || C || h || 0 as h 0
stability consistency Also: O(hP ) LTE + stability = O(hP ) GTE Stability for Poisson Equation Consider 2-norm 2 1 2
||U ||2 = i Ui ||A||2 = (A) = maxp |p | largest eigenvalue
||A1 ||2 = (A1 ) = maxp |p 1 | = (minp |p |)1
Stable, if eigenvalues of Ah bounded away from 0 as h 0
In general, dicult to show. But for Poisson equation with Dirichlet boundary conditions, it is known that p =
2 (cos(ph) 1) h2 2 1 2 2 4 1 = h 2 ( 2 h + O (h ))
= 2 + O(h2 )
1 || h ||2 . 2
Stable
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 7
02/26/09
Spectral Methods
[ Reference: Trefethen, Spectral Methods in MATLAB, SIAM 2000 ] Classical Methods: error = O(hp ), p = 1, 2, 3... xed
Spectral: error = O(hp ) p
Error decays (with h) faster than any polynomial order
1 e.g. error = O(h h ) exponential decay
Only true if solution smooth: u C
Otherwise: u C p , u / C p+1 error = O(hp )
Message 1: Spectral methods have a restricted area of application: Linear problems on simple domains with simple boundary conditions and smooth solution. [often times subproblems] But for those, they are awesome. Two Cases: 1. Periodic: = [0, 2 ], where 0 = 2 u(x + 2 ) = u(x)
ck eikx
Use polynomials on Chebyshev points (non-equidistant). Message 2: FD/FE/FV methods are local. Spectral methods are global. 1
ij uj
j
. .
.
... 1 12 .. 2 . 3 2 3 0 2
Spectral N = 6 :
3 4 5 0 1 2 1 0 1 2 3 4 2 1 0 1 2 3 full matrix
D6 =
3 2 1 0 1 2
4 3 2 1 0 1
5 4 3 2 1 0 j = 1 cot jh 2 2 How to obtain spectral dierentiation matrices? Fourier Basis: u periodic on [0, 2 ] = u(x) = u k eikx (Fourier series, bounded)
k Z
where h =
2 N = N h 2
N
[here: N even]
2 1
uj = 2
N
u k eikxj
k=
+1
uj eikxj k =
N N + 1, . . . , 2
2
u k eikxj
k=
+1
2 1 = u k eikxj 2
N
k=
N 2
where
k= N 2
1 N N ,
u ck = 1 c
N + c
N N +1 +
+ c
1 +
2 c
N =
u 2
2 2 2 2 2 2
N 2 1
u(xj ) = u k eikxj 2 N
k=
Dene interpolant:
N 2 1
p(x) =
u k eikx 2 N
k=
uj = j u k = h
N 2
DFT
N j =1
j eikxj = h k
sin( x ) h
ikx
p(x) =
e = =
2 h x =: SN (x) 2
N tan( 2 )
h
k=
2
um j m p(x) =
um SN (x xm )
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 9
03/05/09
u(x) as N p(x)
j xj = cos N
PN (x) u(x) as N
Spectral Dierentiation:
Given (u0 , u1 , . . . , uN ) interpolating polynomial N k=j (x xk ) p(x) = uj
k=j (xj xk ) j =0 ai
aj (xi xj ) i = j p (x) p (xj ) Dij =
1
i=j
xj xk k=j
aj = k=j (xj xk ) Chebyshev Dierentiation Matrix: 2N 2 + 1 6 (1)j 2 1 xj (1)i+j xi xj DN = 1 2 (1)i 1 xi (1)i+j xi xj 1 (1)N 2 2 (1)N +j 1 + xj 2N 2 + 1 6 xj 2(1 x2 j)
1 2 1 (1)N 2
(1)N +i 1 + xi
n cos(n)
Tn (x) = Chebyshev polynomial Tn+1 (x) = 2xTn (x) Tn1 (x) nn sin(n)
P ( ) p (x) = = n=0
dx sin
d
N nn sin(n)
= n=0
1 x2
N
2 DN
v0 [= 0] v1 .
. .
v N 1 vN [= 0]
Interior points
p13.m
Linear system:
2 u=f D
n
= (e4x1 , . . . , e4xN 1 ) where u = (u1 , . . . , uN 1 ), f Nonlinear Problem uxx = eu , x ] 1, 1[ Ex.: u(1) = 0 initial guess Need to iterate: u(0) = 0, u(1) , u(2) , . . .
(k+1) 2 = exp( u(k) ) xed point iteration
D Nu Can also use Newton iteration... Eigenvalue Problem uxx = u, x ] 1, 1[ Ex.: u(1) = 0 2 Find eigenvalues and eigenvectors of matrix D N Matlab: >> [V,L] = eig(D2) Higher Space Dimensions uxx + uyy = f (x, y ) =] 1, 1[2 Ex.: f (x, y ) = 10 sin(8x(y 1)) u=0
Tensor product grid: (xi , yj ) = (cos( i ), cos( j ))
N N
p14.m
p15.m
p16.m Matrix approach: Matlab: kron, 2 + D 2 I LN = I D N N >> L = kron(I,D20)+kron(d2,I) Linear system: LN u=f
Image by MIT OpenCourseWare.
spectral Helmholtz Equation Wave equation with source vtt + vxx + vyy = eikt f (x, y ) Ansatz: v (x, y, t) = eikt u(x, y ) Helmholtz equation: uxx + uyy + k 2 u = f (x, y ) =] 1, 1[2
u=0
classical FD
p17.m
Fourier Methods So far spectral on grids (pseudospectral). Can also work with Fourier coecients directly. Ex.: Poisson equation (uxx + uyy ) = f (x, y ) = [0, 2 ]2 periodic boundary conditions
f (x, y ) = u(x, y ) =
k,lZ
i(kx+ly ) f kl e
k,lZ
uxx (x, y ) =
2
k,l
u(x, y ) = u kl =
k,l
f kl (k, l) = (0, 0) k 2 + l2
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 10
03/10/09
K1D =
sparse
2D discretization:
I K1D
K1D I
K2D =
K1D =
full
2D discretization:
I K1D
K1D I
K2D =
Kronecker product:
1 2 3 4 a b
c d a b c d =
3a 3b 3c 3d 2a 2c 4a 4c 2b 2d 4b
4d
Lexicographic ordering:
2D = K
1 h2
1 h2
1 6h2
5-point stencil
2 2
9-point stencil
Advantage of 9-point stencil: deferred correction h2 9 2 uij = f (xi , yi ) 2 f (xi , yi ). 12 Fourth order scheme.
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 11
03/12/09
Adding rows creates nonzero entries and may thus destroy sparsity. Matlab: [L,U] = lu(A); spy(L) spy(U) Minimum degree algorithms: Reduce ll-in by reordering of rows and columns Ex.: Red-black ordering for K2D
Matlab:
A non-symmetric p = colamd(A) [L,U] = lu(A(p,:)) A symmetric p = symamd(A) [L,U] = lu(A(p,p)) or [L,U] = chol(A(p,p)) Strategy: Choose remaining meshpoint with fewest neighbors
Strategy: Choose remaining column with fewest nonzeros Further: Graph separators
Nested dissection
Elimination is great for small matrices whose entries are directly accessible. Preconditioning A
x = b Condition number: = cond(A) = ||A|| ||A1 ||
|max |
A symmetric: cond2 (A) = |min |
cond(A) 1 small error in b can yield large error in x Formulate equivalent system which is better conditioned.
Left preconditioning: solve (P 1 A) x = P 1 b
Right preconditioning: 1. solve (AP 1 ) y = b 2. solve P x = b 1 1 Ex.: A = {0.999, 1000.001} cond(A) 1000 1 1000 1 0 P = diag(A) = 0 1000
cond2 (P 1 A) = cond(AP 1 ) 2.65
Ex.: P = D P = D + L A=
Image by MIT OpenCourseWare.
P = Lapp Uapp (ILU = Incomplete LU factorization) [Matlab: luinc] Iterative Methods Ax=b x = (I A) x + b splitting
(k+1) (k) = (I A) x + b x iteration
(0) x = x0 (AP 1 )y = b Apply to precondition system: Px = y y (k+1) = (I AP 1 )y (k) + b
P x(k+1) = (P A)x(k) + b
x(k+1) = (I P 1 A) x(k) + P 1 b
=M
P (x Error:
(k+1)
=z (k)
(k) x )= bA x =r(k)
(k)
update
residual
A=
Image by MIT OpenCourseWare.
Theorem:
If A diagonal dominant |aii | >
j =1
ne grid (h = 1 ) 8
1
. . 1 . . . . Ah = 64 ... ...
1 1 2 2
coarse grid
A2h = . . .
Interpolation: Linear
1 2 1 1 1 73 2
I =
2 R 1 1
2
1 Restriction: Full Weighting
1 2 1
1 2 1
R =
1 4 1 2 1 R= 1 IT 2 Coarse Grid Matrix: Galerkin: A2h 2 1 = R Ah I = 16
1 2 1
1
2
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 12
03/17/09
Ah u = bh
h
I2 h
Iterate Ah u = bh (1 GS) uh 2h Restrict residual rh = bh Ah uh by r2h = Rh rh Solve for coarse error: A2h e2h = r2h h Interpolate error: eh = I2 h e2h
Update u h = uh + eh
(5) Iterate Ah u = bh (2 GS) starting with u h (1) (2) (3) (4) v-cycle:
Multigrid:
Consider A x = b already preconditioned. Iterative scheme: x(k+1) = x(k) + (b Ax(k) ) x(0) = 0 x(1) = b x(2) = 2b Ab x(3) = 3b 3Ab + A2 b Observe: x(k) Kk Kk = span{b, Ab, . . . , Ak1 b} where
Krylov subspace K1
x(1) K2
x(2) K3 x(3)
...
Find sequence x(k) Kk which converges fast to x = A1 b. Only requirement: Apply A (can be blackbox). Examples of Krylov Methods: Choose x(k) Kk , such that (1) rk = b Axk Kk conjugate gradients (CG) (2) ||rk ||2 minimal GRMES & MINRES (3) rk Kk (AT ) BiCG (4) ||ek ||2 minimal SYMMLQ 2
CG nds unique minimizer of E (x) = 1 xT A x xT b 2 using conjugate directions after at most n steps.
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 13
03/19/09
ut = Lu u = u0
u=g where L in ]0, T [ PDE
on {0} initial condition on ]0, T [ boundary condition dierential operator.
Ex.: L = 2 Poisson equation heat equation Lu = b u advection equation 2 2 Lu = ( u) not done yet.
biharmonic equation beam equation
Lu = F |u| nonlinear
Eikonal equation level set equation
etc. Stationary solution of IVP: Lu = 0 in
(if it exists) u = g on
Later: second order problems
systems u 0 1 u utt = uxx =
1 0 t v x v (wave equation) Semi-Discretization In space (method of lines): Approximate u(, t) by u(t) Approximate Lu by A u (for linear problems) [FD, FE, spectral] d system of ODE: u = A u
dt In time:
Approximate time derivative by step: d u(x, t + t) u(x, t) u(x, t) [explicit Euler] dt t Stationary problem: unew (x) = u(x) + tLu(x) = (I + tL)u(x) Need to know about ODE solvers. 1
y n y (t), y n+1 y (t + t)
y n+1 y n
Linear approximation: y t Explicit Euler (EE): y n+1 = y n + t f (y n ) Implicit Euler (IE): y n+1 t f (y n+1 ) = y n nonlinear system Newton iteration. Local truncation error (LTE):
EE: n = y (t + t) (y (t) + tf (y (t))) = 1 y (t)t2 = O(t2 )
2 IE: n = O(t2 ) Global truncation error (GTE): T Over N = time steps. t
E n = y n y (tn )
E n+1 = E n + t(f (y n ) f (y (tn ))) + n
= |E n+1 | |E n | + tL|E n | + | n
| T = |E N | eLT maxn | n | = O(t) t Time Stepping: GTE = one order less than LTE. Higher Order Time Stepping Taylor Series Methods: Start with EE, add terms to eliminate leading order error terms. PDE Lax-Wendro Runge-Kutta Methods: Each step = multiple stages k1 = f (y n + t aij kj )
. . . kr y n+1
= f (y n + t arj kj )
j
= y n + t bj kj
alj )
c1 . . . cr
a11 . . . . .. . . . ar1 . . . b1 . . .
a1r . . c A . = bT arr br 0 1 1 1 1 0
1 2 1 2
EE: IE:
k1 = f (y n ) n+1 y = y n + tk1
=y n+1
k1 = f (y n + t k1 ) y n+1 = y n + t k1
Explicit midpoint:
0 1 Heuns: 0 1 1
1 2 1 2
0 RK4:
1 2 1 2 1 2 1 2
1
1 2 1 6 1 2 1 3
1
1 3 1 6
Implicit trapezoidal:
PDE Crank-Nicolson
Explicit Adams-Bashforth: = EE y n+1 = y n + tf (y n ) 3 1 n+2 n+1 n+1 n y = y + t [ 2 f (y ) 2 f (y )] . . . Implicit Adams-Moultion: f (y n ) + 1 (y n+1 )) y n+1 = y n + t ( 1 2 2 5 8 n+2 n+1 n+2 y = y + t ( 12 f (y ) + 12 f (y n+1 ) . . . BDF (backward dierentiation): y n+1 = y n + tf (y n+1 ) = IE 3y n+2 4y n+1 + y n = 2tf (y n+2 ) . . . 3
O(t) O(t2 )
= trapezoidal
1 f (y n )) 12
O(t2 ) O(t3 )
O(t) O(t2 )
Ex.:
2 1 . .
. .
.
.
1
1
A= 2 . .. ... 1 (x)
1 2
4<i <0
heat equation
4
( A ) <
(x)2
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 14
03/31/09
(seen before)
Fast version:
ei 2 + ei 2D
G1 =D = (cos() 1) t (x)2 (x)2 G = 1 2r (1 cos ), = k x Ex.: Crank-Nicolson Ujn+1 Ujn 1 =D t 2
+1 n+1 +1 n n Ujn + Ujn Ujn +1 2Uj 1 +1 2Uj + Uj 1 + (x)2 (x)2
G1 1 ei 2 + ei = D (G + 1) t 2 (x)2
1 r (1 cos )
G= 1 + r (1 cos ) Always |G| 1 unconditionally stable. Ex.: 2D heat equation ut = uxx + uyy Forward Euler n+1 n n n n n n U1 Uij Uin Ui,j j +1,j 2Ui,j + Ui1,j +1 2Ui,j + Ui,j 1
= + t (x)2 (y )2
x u(x, y, tn ) = ei(k,l)( y ) = eikx eily
G1 eikx 2 + eikx eily 2 + eily
= + t (x)2 (y )2
t t
G=12 (1 cos(k x)) 2 (1 cos(ly )) 2 (x) (y )2 t t Worst case: k x = = ly G = 1 4 4 2 (x) (y )2 Stability condition: 1 1 1 h2 t t 1 1 + t + = (x)2 (y )2 2 2 (x)2 (y )2 4
if x=h=y
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 15
02/13/08
Solution: u(x, t) = u0 (x + ct) Information travels to the left with velocity c. Three Approximations: n Ujn +1 Uj c upwind x
n Ujn+1 Ujn Uj Ujn 1
= c downwind t x U n Ujn 1 c j +1 centered 2x Accuracy: Taylor expansion of solution u u(x, t + t) u(x, t) 1 1 = ut + utt t + uttt (t)2 + O((t)3 ) t 2 6
1 1
u(x + x, t) u(x, t) = ux + uxx x + uxxx (x)2 + O((x)3 ) x 2 6
1
u(x + x, t) u(x t, t) = ux + uxxx (x)2 + O((x)4 ) 2x 6 Substitute into FD scheme: 1 Upwind: ut + utt t cux 1 cuxx x + O(t2 ) + O(x2 ) 2 2
=cux
=1 c2 uxx t
2
Leading order error: 1 u t 1 cuxx x = 1 c2 uxx t 1 cuxx x = 1 cuxx x(r 1) 2 tt 2 2 2 2 = 0 if r = 1 1 First order if r = 1 ct x
Courant number
r=
Messages: 1. Upwind works (CFL-condition on stability) 2. Centered needs a x Add Diusion: n n n Ujn+1 Ujn Ujn Ujn +1 Uj 1 +1 2Uj + Uj 1 =c + t 2x (x)2
Replace Ujn by average:
n n n n Ujn+1 U + (1 ) U + U Ujn j +1 j j 1 +1 Uj 1 2 2 =c t 2x t where = 2 (x)2
How much diusion?
Lax-Friedrichs:
Eliminate Ujn by = 1 = Ujn+1 = 1+r 2 Ujn +1 + (x)2
2t
1 r
Ujn 1 2
r=
ct x
0(for |r|1)
0(for |r|1)
Monotone scheme
Accuracy: First in time, Second in space (exercise)
Stability: G = ir sin(k x) + cos(k x)
central dierence diusion
t 2 c uxx 2
=0
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 16
02/19/08
Modied Equation
Idea: Given FD approximation to PDE Find another PDE which is approximated better by FD scheme. Learn from new PDE about FD scheme. Ex.: ut = cux
n n n Ujn+1 Ujn Ujn Ujn +1 Uj 1 +1 2Uj + Uj 1 Lax-Friedrichs: c =0 t 2x 2t 1 1 1 1 Taylor: ut + utt t cux cuxxx x2 uxx x2 uxxxx x4 + . . . 2 6 2t 24t 1 x2 = (ut cux ) + utt t uxx + ... 2 t =c2 uxx 1 2 x2 = (ut cux ) + c t uxx 2 t
Modied equation:
x2
ct ut cux = (1 r2 )uxx r= 2t x
Advection-diusion equation with diusion constant
x2 D= ( 1 r2
) 2t added diusion antidiusion by central dierencing
(exercise)
Compare:
DLF = 3 x , DUW = 1 x
For c = 1, r = 1 2 4 4 Upwind less diusive than LF. Ex.: Lax-Wendro cx2 (r2 1)uxxx ut cux = 1 6 (uxx cancels by construction)
e = O(t) + O(x)
A = A eigenvalues purely imaginary Need time discretization that is stable for u = u with = i, R
Linear Stability for ODE:
= u}
Region of absolute stability = { C : method stable for u
Ex.: Forward Euler un+1 = un + tun = (1 + t)un Stable if |1 + t| 1 Backward Euler 1 un+1 = un 1 t Trapezoidal 1+ 1 t 2 n+1 u = 1 1 t 2
RK4
RK2
Adams-Bashforth 3
Can also use higher order discretization of ux (up to spectral). If central need ODE solver for timestep that is stable for u = iu. Spurious Oscillations Stable does not imply no oscillations. Ex.: Lax-Wendro
Overshoots remain bounded stable. Still bad (e.g. density can become negative) 3
ENO: At each point consider multiple interpolating polynomials (through various choices of neighbors). Select the most stable one to dene ux . WENO: Dene ux as weighted average of multiple interpolants. Higher order when u smooth, no overshoots when u non-smooth.
s1 = s2 = s3 = a1 = a2 =
13 (v 12 1 13 (v 12 2 13 (v 12 3 1 /( 10 6 /( 10 3 /( 10
Uj +1 Uj
x
= 106 max(vj 2 )
j
a3 = + s3 )2 sa = a1 + a2 + a3 1 w1 = a sa
w2 = w3 = w=
a2
sa
a3
sa 1 (w1 6
(2v1 7v2 + 11v3 ) + w2 (v2 + 5v3 + 2v4 ) + w3 (2v3 + 5v4 v5 )) Left sided approximation to ux at x4
Right sided approximation to ux at x3
ut + cux = 0
Upwind WENO with FE:
Ujn+1 Ujn c WENOleft Ujn > 0 = c WENOright Ujn 0 t TVD time stepping Consider method that is TVD with FE. Is it also TVD with high order time stepping? In general: no. But for special class of ODE schemes: yes. Strong Stability Preserving (SSP) methods
WENO5-stencil
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 17
04/09/09
Conservation Laws
ut + (f (u))x = 0
if uC 1
ut + f (u) ux = 0
=c(u)
Conservation form Dierential form d b u(x, t)dx = f (u(a, t)) f (u(b, t)) dt a Integral form Ex.: Transport equation f (u) = cu c(u) = f (u) = c Ex.: Burgers equation
f = ux function
m(t) =
a
Equation:
vehicle velocity
Velocity function v = v () = 1
Weak Solutions ut + (f (u))x = 0 () u(x, 0) = u0 (x) Solution for u0 C 1 smooth until characteristics cross. x1 + f (u0 (x1 )) t = x2 + f (u0 (x2 )) t x2 x1 1 t= = x [x1 , x2 ] (f u0 ) ( x) f (u0 (x2 )) f (u0 (x1 )) 1 = f (u0 ( x))u0 ( x) ts = 1 infx f (u0 (x))u0 (x)
Ex.: Burgers
s =
2
1
2
uR
1 2 2 uL uL + uR = uR uL 2
Entropy Condition to single out unique weak solution: Characteristics go into shock: f (uL ) > s > f (uR ) Solution to ut + (f (u))x = 0 is limit of ut + (f (u))x = uxx as 0 Vanishing viscosity Many more... All equivalent.
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 18
04/14/09
Intermezzo:
Boundary Conditions for Advection
Which values?
Extrapolate solution; works if u smooth.
E.g., constant/linear/etc. extrapolation.
Lax-Friedrichs:
n n (Ujn Ujn+1 1 f (Ujn +1 + Uj 1 ) +1 ) f (Uj 1 ) 2 + =0 t 2x (no straightforward LW, since based on linear Taylor expansion)
if
n )f (U n ) f (Uj +1 j n U n Uj +1 j
LF : Fj n = 1 (f (Ujn ) + f (Ujn +1 )) 2
x n (U Ujn ) 2t j +1 2
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 19
04/10/09
n Fj 1 n Ujn+1 Ujn Fj + 1 2 2 +
=0 t x
Burgers equation
If f (u) > 0 (convex ux function) n Ujn 1 > us , s > 0 f (Uj 1 ) n n n f (Uj ) if Uj < us , s < 0
Fj 1 = 2
n f (Us ) Ujn 1 < us < Uj s=
n f (un j ) f (uj 1 )
n un j uj 1
(1)
(2)
(3)
Shock speed
Sonic point [Burgers: us = 0 ]
f (us ) = 0
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 Godunovs method
n un j +1 uj x Lax-Wendro
j n =
Riemann Problem
High order not TVD need limiters. 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 TV(u(, t2 )) TV(u(, t1 )) t2 t1 [TV(u) = |u(x)|dx] ux (, t1 ) 0 ux (, t2 ) 0 if 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
TV(U
n+1
) TV(U n ) |Uj +1 Uj |]
[TV(U ) =
Theorem (Godunov):
A linear, monoticity preserving method is at most rst 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 uxes:
TVD-ux (e.g. upwind) F High order ux F Smoothless indicator: uj uj 1 1 j = away from 1 uj +1 uj j + (F j F j ) (j ) Flux: Fj = F Ex.: ut + cux = 0 c t Fj = cUj + 2 1 c (Uj +1 Uj ) (j ) x
Fupwind FLW Fupwind
van Leer
() =
| | + 1 + ||
B. Slope Limiters
Slope limiters
relation
Flux limiters
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 20
04/23/09
Operator Splitting
IVP: ut = Au + Bu where A, B dierential operators.
Most accurate: Discretize Au + Bu, and time step with high order.
But: Sometimes not possible, or too costly.
Alternative: fractional steps
Time step t t + t : (1) Solve ut = Au (2) Solve ut = Bu Special case: A,B linear
Solution operators:
etA u0 : solution of ut = Au, u(0) = u0
tB e u0 : solution of ut = Bu, u(0) = u0
et(A+B ) u0 : solution of ut = Au + Bu, u(0) = u0
True solution: Lie splitting: Strang splitting: SWSS splitting: u(t + t) = et(A+B ) u(t)
uL (t + t) = etA etB u(t)
1 1 uS (t + t) = e 2 tA etB e 2 tA u(t) uSW (t + t) = 1 (etA etB + etB etA )u(t) 2
Local Truncation Errors: 2 Lie: uL (t + t) u(t + t) = 2t [A, B ]u(t) + O(t3 ) 1 1 Strang: us (t + t) u(t + t) = t3 ( 12 [B, [B, A]] 24 [A, [A, B ]])u(t) + O(t4 ) SWSS: usw (t + t) u(t + t) = O(t3 )
Commutator: [A, B ] = AB BA
If operators A and B commute, then all splittings are exact; Otherwise: Lie (globally) rst order accurate, Strang and SWSS (globally) second order accurate. Ex.: Convection-Diusion equation ut + cux = duxx Solution: u(x, t) = h(x ct, t), where h solves ht = dhxx Au = cux and Bu = duxx ABu = c(duxx )x = cduxxx = BAu [A, B ] = 0 splitting exact use Lie splitting
Ex.: Convection-Reaction equation ut + cux = a bu Au = cux and Bu = a bu ABu = c(a bu)x = bcux BAu = a b(cux ) = a + bcux [A, B ] = 0 use Strang splitting to be second order accurate Ex.: Dimensional splitting 2D Advection ut + aux + buy = 0 (1) ut + aux = 0 for t (2) ut + buy = 0 for t
Au = aux , Bu = buy , [A, B ] = 0
Remark: No error due to splitting, if ut = Au and ut = Bu solved exactly. If discretized in time, results will in general dier. Ex.: FE unsplit:
n+1 n n n n Uij Uij Uij Uin Uij Ui,j 1,j 1 = a b t x y n n Uij Uij Uij Uin 1,j Lie-splitting: (1) = a t x n+1 Uij Uij Uij Ui,j 1 (2) = b t y Hence: n+1 n Uij =Uij
[a, b > 0]
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 21
04/28/09
Systems of IVP
Fully Coupled (hard) ht + (uh)x = 0 shallow water equations ut + uux + ghx = 0 h uh + 1 2 = 0 u t u + gh x 2 hyperbolic conservation law Linear Hyperbolic Systems Linearize SW h u + u t g
Image by MIT OpenCourseWare.
() is called hyperbolic, if A is diagonalizable with real eigenvalues, and strictly hyperbolic, if the eigenvalues are distinct. A = R D R1 ; change of coordinates: v = R1 u vt = D vx = 0 Decoupled system
(vp )t + p (vp )x = 0 p = 1, . . . , m
vp (x, t) = vp (x p t, 0) Simple wave Solution is superposition of simple waves
Numerics: Implement simple waves into Godunovs method.
1
Wave Equation
1D utt = c2 uxx u 0 c u t = x v c 0 v Ex.: Maxwells Equations Et = cHx Ht = cEx Ett = (Et )t = (cHx )t = c(Ht )x = c(cEx )x = c2 Exx Htt = = c2 Hxx Schemes based on hyperbolic systems =u+v c 0 t cx = 0 t x = =uv 0 c
t + cx = 0 Upwind for , :
j n+1 j n j +1 n j n
= c
t x
n+1 n n n
j j j 1 j = c
t x
u= 1 ( + ) and v = 1 ( ) 2 2 Ujn+1 Ujn 1 j n+1 j n j n+1 j n c j +1 n j n j n j 1 n = + = + t 2 t t 2 x x n n n n c Uj +1 Uj Vj +1 n Vj n Uj Uj 1 Vj n Vj 1 n
= + + 2 x x x x
n n n n n Vj +1 Vj 1 cx Uj +1 2Uj + Uj 1 =c + 2x 2 x2 n Ujn Vj n+1 Vj n cx Vj +1 n 2Vj n + Vj 1 n +1 Uj 1 = = c + t x 2 x2
Lax-Friedrichs-like Scheme for u, v :
n
n+1 n n cx Uxx
U U 0 c U U 1 1 = + t V j c 0 2x V j +1 V j 1 Vyy V j 2
articial diusion
= O(t2 ) + O(x2
) second order
ct r= x Courant number
n+1 Uj Ujn Vj n Vj 1 n = c t x n+1 n+1 n+1 n U Vj j +1 Uj Vj = c t x Both are explicit central dierences. Two step update:
Image by MIT OpenCourseWare.
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 22
04/30/09
Ex.: Interface between water and oil (surface tension) Propagating front of bush re Deformable elastic solid Movement of surface under velocity eld v .
Tangential motion does not change surface.
Only velocity component normal to surface is important.
v = Fn
Explicit Tracking I. Lagrangian Markers: Place markers on surface: x1 , . . . , xn Rd xk = v ( xk , t) Move markers by ODE: xk (0) = xk Fast, easy to move Accurate (high order ODE solvers)
Topology changes
II. Volume of Fluid: Regular grid Store volume/area inside surface Update volume value according to v Very robust Simple in 3D Not very accurate Exact surface shape and topology? Curvature reconstruction?
Image by MIT OpenCourseWare.
Implicit Representation
Dene function ( x), s.t. > 0 outside = 0 interface
< 0 inside Store on regular Eulerian grid PDE IVP for , yielding correct movement Recover n , K from n = | |
xx y 2 2x y xy + yy x 2 = =
3 || (x 2 + y 2 ) 2
PDE Movement under given velocity eld v: t + v = 0 Linear advection Special case: normal velocity v = Fn =F t + F || = 0 Level set equation 3
||
Higher order: WENO and SSP-RK. Reinitialization Desirable || = 1. But in general t + F || = 0 does not preserve || = 1. Fixes: Solve IVP + sign()(|| 1) = 0
In each time step, for 0 ?
Solve Eikonal equation
s.t. Given , nd , | = 1 | = 0} = { = 0}
{ Use fast marching method by Sethian.
Extension velocity:
, s.t.
Change velocity eld v to v = v v at { = 0}
v = 0 || = 1 preserved
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 23
05/05/08
Navier-Stokes Equations
ut + (u )u = p + u=0
1 2 u Re
U = Characteristic velocity L = Characteristic length scale = Kinetic viscosity u in 2D: u = v 1 (1) ut + uux + vuy = px + Re (uxx + uyy ) (2) vt + uvx + vvy = py + (3) ux + vy = 0 Famous Problems: Lid driven cavity
1 (v Re xx
+ vyy )
But: Central dierences on grid allow solution Uij = Vij = 0, P1 i + j even for Pij = P2 i + j odd Fix: Staggered grid
Boundary Conditions:
ij
(use ux + vy = 0)
(Ui+ 1 ,j )2 (Ui 1 ,j )2
2 2
Uij
(U V ) y
=
ij
y Ui,j + 1
2
Ui+ 1 ,j Vi+ 1 ,j Ui 1 ,j Vi 1 ,j (U V )
2 2 2 2 =
x x ij (V 2 ) y =
ij
(Vi,j + 1 )2 (Vi,j 1 )2
2 2
(U V )
y ij
Image by MIT OpenCourseWare.
where Ui+ 1 ,j =
I. b) Implicit Diusion U U 1 = K 2D U t Re V V 1 = K 2D
V t Re
5 point Laplace stencil with Dirichlet boundary conditions II. Pressure Correction 1 U V K 2D P = + t x y with Neumann boundary conditions p = 0
n
U x
U P = t x n+1 V V P = t y U
n+1
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
lecture 24
05/07/09
Pseudospectral Methods
Vorticity: w = u ut + ( u ) u = p + 1 2 u Re 1 ut + (( u ) u) = (p) + ( 2 u) Re =0 w t + u w = 1 2 w Re
and 2 commute
u = y
v = x
2 = xx + yy = vx + uy = w
Thus: w u
F (2 f ) = 4 2 | k |2 F (f ) F (f g ) = F (f ) F (g ) F (f g ) = F (f ) F (g )
2D FT (| k |2 = kx 2 + ky 2 )
Use Here:
1
4 2 2 1 4 2 2 n+1 n n
+
|k |
w = N + |k
|
w
t 2Re
t 2Re
2 1 2 2 n n +
N | k |
w
t Re
w n+1 = 1 2 2 2 |k | + t Re :
Computation of N = N = u w N u w Inecient in Fourier space.
So perform multiplication in physical space.
Numerical Method: n+1 : Time step w n w
n n = 1 w 1. |k | n n u = 2iky n n v = 2ikx 2. n w = 2ikx w n xn w y = 2iky w n n u n v 3. iFFT wx n wy n
5. FFT
n ) (N
4. N n = un wx n + v n wy n
Particle Methods
Linear advection ut + cux = 0
u(x, 0) = u0 (x)
Solution:
u(x, t) = u0 (x ct)
Need to work hard to get good schemes for advection, on a xed grid.
Reason: Represent sideways motion by up and down motion. Alternative: Move computed nodes, rather than having a xed grid. Ex.: 1D Advection ut + cux = 0
u(x, 0) = u0 (x)
Particle method: 1. Sample initial conditions xj = j x, uj = u0 (xj ) 2. Move particles along characteristics: x j = c xj (t) = xj (0) + ct Exact solution on particles. u j = 0 uj (t) = u0 (xj (0))
Ex.: 2D Advection t + v ( x) = 0
( x, 0) = 0 ( x)
Particle method: 1. xj , j = 0 ( xj ) j = x v ( xj ) 2. j = 0 Solve characteristic ODE, e.g. by RK4; very accurate on particles.
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
18.336 spring 2009 Ex.: Continuity Equation (t) + (v (x))x = 0 t + v (x)x = v (x)
Characteristic ODE
x j = v (xj ) j = v (xj )j Ex.: Nonlinear conservation law
2 ut + ( 1 u
)x = 0 Burgers equation
2 x j = uj if solution smooth u j = 0
05/12/09
v = v (x)
Image by MIT OpenCourseWare.
Observe: If we have a piecewise linear function initially, then the exact solution is a piecewise linear function forever (including shocks).
j :|xj x0 |r
or = e
or . . .
Dene (x u)(xj ) = u (x0 ) Smoothed Particle Hydrodynamics (SPH) Quantity f f (x) = f ( x) (x x )dx
Rd
Also:
W h (x) = wh (||x||),
w(d) = 0 d > h smoothing length
Approximation I: h f (x) = f ( x)W h (x x )dx
Rd
Sequence of point clouds {X (n) }hN X (n) = (x1 (n) , . . . , xn (n) ) Point measure n (m) X = mi (n) x(n)
i=1
i
f ( x) h W (x x )dX (n) ( x) ( x)
f (xi (n) ) h W (x xi (n) ) =: f h,n (x) (n) ) ( x i i=1 n f (xi (n) ) h,n W h (x xi (n) ) f (x) = mi (n) (n) ) ( x i i=1 hard-code n m i fk h = fi Wki h i i=1 n mi fk h = fi Wki h i i=1 mi (n) Apply to Euler equations of compressible = ( u) density t D p u velocity = Dt De p energy = u Dt gas dynamics: D = u ( u) Dt p p D u = 2 Dt De p p u = u Dt
k u k ek k k u ek
= = = = = =
p = p(s, e)
uk mi Wki mi u i h Wki i i pk m i pi Wki mi Wki i i (k )2 i i mi pi mi pi vi uk Wki Wki i i i i i i mi ( uk ui )Wki i k pi mi + W ki (k )2 (i )2 i pi ( u u ) W mi k i ki 2 ( ) i i
d Since dt
i = 0 k =
mi Wki
mi
pk pi + 2 (k ) (i )2
Wki
mi
pi ( uk ui )Wki (i )2
mi Wki
pk = p(k , ek )
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.