Docsity

Math 4820: Truncation Error & Stability Analysis of Lax-Wendroff Method for Wave Equation , Assignments of Differential Equations

Toggle sidebar
bg1
Math 4820
D. Schwendeman Problem Set 10
Due:
Monday, 5/10/10
1. The first-order wave equation is
Lu =ut+cux= 0 .
Find the leading terms in the truncation error for the following approximations:
(a) Lhvn
j=1
∆tvn+1
j−vn
j+1 +vn
j−1
2+c
2∆xvn
j+1 −vn
j−1= 0
(b) Lhvn
j=1
∆tvn+1
j−vn
j+c
2∆xvn
j+1 −vn
j−1−c2∆t
2∆x2vn
j+1 −2vn
j+vn
j−1= 0
What is the order of accuracy of each approximation assuming ∆tis proportional to ∆x.
2. The Lax-Wendroff method for the first-order wave equation ut+cux= 0 has the form
vn+1
j=vn
j−σ
2δ0xvn
j+σ2
2δ2
xvn
j, σ =c∆t
∆x.
Consider Fourier modes of the form vn
j=aneiαxj, where ais an amplitude factor, αis a
wave number, and xj=j∆x, to determine a constraint on the parameter σsuch that the
approximation is stable. Hint: consider |a|2= (Re(a))2+ (Im(a))2and find σsuch that
|a|2≤1.
3. Consider the initial-boundary-value problem
ut+cux= 0,0< x < L, t > 0
with u(x, 0) = xsin(x) and u(0, t) = 0. Write a code to solve the IBVP using the Lax-
Wendroff method given in problem 2. Use
v0
j=xjsin(xj), vn
0= 0, vn
N= 2vn
N−1−vn
N−2,
where xj=j∆x, ∆x=L/N,j= 0,1, . . . , N . Run your code for the case c= 0.95 and
L= 10. Compare the numerical solution with the exact solution at t= 1 for N= 500,
1000 and 2000. Use ∆t= ∆xfor each case and and verify that the method is second-order
accurate. Plot the numerical solution for N= 500 and the exact solution on the same
graph.
pf3
pf4
pf5

Partial preview of the text

Download Math 4820: Truncation Error & Stability Analysis of Lax-Wendroff Method for Wave Equation and more Assignments Differential Equations in PDF only on Docsity!

Math 4820

D. Schwendeman Problem Set 10

Due: Monday, 5/10/

  1. The first-order wave equation is

Lu = ut + cux = 0.

Find the leading terms in the truncation error for the following approximations:

(a) Lhvnj =

∆t

( vn j +1−

vnj+1 + vjn− 1 2

)

c 2∆x

( vnj+1 − vnj− 1

) = 0

(b) Lhvnj =

∆t

( vn j +1− vjn

)

c 2∆x

( vnj+1 − vnj− 1

) − c^2 ∆t 2∆x^2

( vjn+1 − 2 vnj + vjn− 1

) = 0

What is the order of accuracy of each approximation assuming ∆t is proportional to ∆x.

  1. The Lax-Wendroff method for the first-order wave equation ut + cux = 0 has the form

vn j +1= vnj − σ 2

δ 0 xvnj + σ^2 2

δ^2 xvjn , σ = c∆t ∆x

Consider Fourier modes of the form vjn = aneiαxj^ , where a is an amplitude factor, α is a wave number, and xj = j∆x, to determine a constraint on the parameter σ such that the approximation is stable. Hint: consider |a|^2 = (Re(a))^2 + (Im(a))^2 and find σ such that |a|^2 ≤ 1.

  1. Consider the initial-boundary-value problem

ut + cux = 0, 0 < x < L, t > 0

with u(x, 0) = x sin(x) and u(0, t) = 0. Write a code to solve the IBVP using the Lax- Wendroff method given in problem 2. Use

v j^0 = xj sin(xj ), vn 0 = 0, vnN = 2vNn − 1 − vnN − 2 ,

where xj = j∆x, ∆x = L/N , j = 0, 1 ,... , N. Run your code for the case c = 0.95 and L = 10. Compare the numerical solution with the exact solution at t = 1 for N = 500, 1000 and 2000. Use ∆t = ∆x for each case and and verify that the method is second-order accurate. Plot the numerical solution for N = 500 and the exact solution on the same graph.