Docsity

Problem Set 9 Solved | Numerical Methods for Differential Equations | MATH 4820, Assignments of Differential Equations

Toggle sidebar
bg1
Math 4820
D. Schwendeman Problem Set 9
Due:
Monday, 5/3/10
1. Heat flow in an annulus with circular symmetry solves the PDE
ut=urr +1
rur+Q(r),1< r < 2, t > 0,
with an initial condition and boundary conditions taken to be
u(r, 0) = f(r), u(1, t) = α(t), u(2, t) = β(t).
(a) Write a code to solve the heat flow problem on a uniform grid rj= 1 + j∆r,j=
0,1, . . . , N , ∆r= 1/N using the Crank-Nicolson method.
(b) Find Q(r), f(r), α(t) and β(t) such that u(r, t) = (1 + t+t2)(1 −r+r2) is an exact
solution. Compute the numerical solution for this problem using N= 50, tfinal = 1 and
∆t=.01. Verify that your code is behaving correctly.
(c) Let Q= (r−1)(2 −r), f= sin(3π(r−1)) and α(t) = β(t) = 0. Compute the numerical
solution for this problem using N= 50, tfinal = 1 and ∆t=.01. Plot the numerical solution
at t=tfinal.
2. The wave equation is
Lu =utt −c2uxx = 0 .
Consider the finite-difference approximation
Lhvn
j=1
∆t2δ2
tvn
j−c2
∆x2δ2
xvn
j−c2
12∆x2 c2∆t2
∆x2−1!δ4
xvn
j,
where δ4
xvn
j=δ2
x(δ2
xvn
j). Show that the approximation is consistent and find its order of
accuracy.
3. Small vertical vibrations of a plucked string satisfy
utt =c2uxx ,0< x < 10 , t > 0,
with initial conditions and boundary conditions taken to be
u(x, 0) = 1
cosh(3x−9)2
, ut(x, 0) = 0 , u(0, t) = u(10, t) = 0 .
Write a code to solve the problem based on the second-order explicit scheme
vn+1
j= 2vn
j−vn−1
j+σ2δ2
xvn
j, σ =c∆t
∆x.
Solve the problem numerically for the case c=.95 using a grid with ∆x= ∆t= 0.05.
Make a surface plot of the numerical solution for 0 ≤x≤10 and 0 ≤t≤15. Discuss the
behavior of the solution in terms of waves traveling with speeds equal to ±c.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Problem Set 9 Solved | Numerical Methods for Differential Equations | MATH 4820 and more Assignments Differential Equations in PDF only on Docsity!

Math 4820

D. Schwendeman Problem Set 9

Due: Monday, 5/3/

  1. Heat flow in an annulus with circular symmetry solves the PDE

ut =

( urr +

r

ur

)

  • Q(r) , 1 < r < 2 , t > 0 ,

with an initial condition and boundary conditions taken to be

u(r, 0) = f (r) , u(1, t) = α(t) , u(2, t) = β(t).

(a) Write a code to solve the heat flow problem on a uniform grid rj = 1 + j∆r, j = 0 , 1 ,... , N , ∆r = 1/N using the Crank-Nicolson method.

(b) Find Q(r), f (r), α(t) and β(t) such that u(r, t) = (1 + t + t^2 )(1 − r + r^2 ) is an exact solution. Compute the numerical solution for this problem using N = 50, tfinal = 1 and ∆t = .01. Verify that your code is behaving correctly.

(c) Let Q = (r − 1)(2 − r), f = sin(3π(r − 1)) and α(t) = β(t) = 0. Compute the numerical solution for this problem using N = 50, tfinal = 1 and ∆t = .01. Plot the numerical solution at t = tfinal.

  1. The wave equation is Lu = utt − c^2 uxx = 0.

Consider the finite-difference approximation

Lhvjn =

∆t^2 δ^2 t vjn −

c^2 ∆x^2 δ x^2 vnj −

c^2 12∆x^2

( c^2 ∆t^2 ∆x^2

) δ^4 xvnj ,

where δ^4 xvjn = δ^2 x(δ^2 xvnj ). Show that the approximation is consistent and find its order of accuracy.

  1. Small vertical vibrations of a plucked string satisfy

utt = c^2 uxx , 0 < x < 10 , t > 0 ,

with initial conditions and boundary conditions taken to be

u(x, 0) =

[ 1 cosh(3x − 9)

] 2 , ut(x, 0) = 0 , u(0, t) = u(10, t) = 0.

Write a code to solve the problem based on the second-order explicit scheme

vn j +1= 2vnj − vn j −^1 + σ^2 δ^2 xvnj , σ = c∆t ∆x

Solve the problem numerically for the case c = .95 using a grid with ∆x = ∆t = 0.05. Make a surface plot of the numerical solution for 0 ≤ x ≤ 10 and 0 ≤ t ≤ 15. Discuss the behavior of the solution in terms of waves traveling with speeds equal to ±c.