Solved Problem for Homework 4 - Time-Dependent Probability | AMATH 586, Assignments of Mathematics

Material Type: Assignment; Class: TIME DEPNDT PROBS; Subject: Applied Mathematics; University: University of Washington - Seattle; Term: Spring 2006;

Typology: Assignments

Pre 2010

Uploaded on 03/10/2009

koofers-user-9on
koofers-user-9on 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ATMS 581 / AMATH 586 Spring 06
Homework 4
1. Suppose that the time derivative in the differential-difference equation
j
dt +cφj+1 φj1
2∆x= 0,
is approximated using a fourth-order Runge-Kutta Scheme. Determine the maxi-
mum value of ct/xfor which this scheme will be stable using the stability criteria
for the oscillation equation given in Table 2.2. Explain how this value can exceed
unity without violating the CFL condition.
2. Show the false 2D Lax-Wendroff scheme
δtφj+1
2+Uδ2xφj+V δ2yφj=U2t
2δ2
xφj+V2t
2δ2
yφj
for the approximation of the two-dimensional constant wind speed advection equa-
tion ∂ψ
∂t +Uψ
∂x +Vψ
∂y = 0,
is unstable for all t. Here φj
m,n is the approximation to ψ(mx, ny, jt) and
the finite-difference operator notation is defined such that
δnxf(x) = f(x+nx/2) f(xnx/2)
nx.
(Hint: Do a Von Neumann analysis for an arbitrary 2D wave of the form φj
m,n =
Ajei(kmx+lny)and show there is at least one wave resolved on the mesh that is
unstable.)
3. Compute solutions to the one-dimensional diffusion equation
∂φ
∂t =D2φ
∂x2
on the periodic domain 0 x1, subject to the initial condition
ψ(x, 0) = sin(2πx) + cos(6πx)/2 + sin(20πx)/5 + R,
where Ris randomly distributed number in the interval [0,4×107] and D= 0.01.
Download the matlab file from the website. This code uses the trapezoidal method
and a standard second-order centered approximation to the second derivative to
compute the approximate solution over the time interval 0 t1/4.
(a) Derive an expression for the exact solution to this problem.
(b) Modify this code so that it also computes and plots (i) the exact solution
and (ii) a second approximate solution computed using forward time differenc-
ing
φn+1
jφn
j
t=D φn
j+1 2φn
j+φn
j1
(∆x)2!.
pf2

Partial preview of the text

Download Solved Problem for Homework 4 - Time-Dependent Probability | AMATH 586 and more Assignments Mathematics in PDF only on Docsity!

ATMS 581 / AMATH 586 — Spring 06 Homework 4

  1. Suppose that the time derivative in the differential-difference equation

dφj dt

  • c

φj+1 − φj− 1 2∆x

is approximated using a fourth-order Runge-Kutta Scheme. Determine the maxi- mum value of c∆t/∆x for which this scheme will be stable using the stability criteria for the oscillation equation given in Table 2.2. Explain how this value can exceed unity without violating the CFL condition.

  1. Show the false 2D Lax-Wendroff scheme

δtφj+^ (^12)

  • U δ 2 xφj^ + V δ 2 yφj^ = U 2 ∆t 2

δ^2 xφj^ + V 2 ∆t 2

δ^2 y φj

for the approximation of the two-dimensional constant wind speed advection equa- tion ∂ψ ∂t

+ U

∂ψ ∂x

+ V

∂ψ ∂y

is unstable for all ∆t. Here φjm,n is the approximation to ψ(m∆x, n∆y, j∆t) and the finite-difference operator notation is defined such that

δnxf (x) =

f (x + n∆x/2) − f (x − n∆x/2) n∆x

(Hint: Do a Von Neumann analysis for an arbitrary 2D wave of the form φjm,n = Aj^ ei(km∆x+ln∆y)^ and show there is at least one wave resolved on the mesh that is unstable.)

  1. Compute solutions to the one-dimensional diffusion equation

∂φ ∂t

= D

∂^2 φ ∂x^2

on the periodic domain 0 ≤ x ≤ 1, subject to the initial condition

ψ(x, 0) = sin(2πx) + cos(6πx)/2 + sin(20πx)/5 + R,

where R is randomly distributed number in the interval [0, 4 × 10 −^7 ] and D = 0.01. Download the matlab file from the website. This code uses the trapezoidal method and a standard second-order centered approximation to the second derivative to compute the approximate solution over the time interval 0 ≤ t ≤ 1 /4.

(a) Derive an expression for the exact solution to this problem. (b) Modify this code so that it also computes and plots (i) the exact solution and (ii) a second approximate solution computed using forward time differenc- ing φn j +1− φnj ∆t

= D

( φnj+1 − 2 φnj + φnj− 1 (∆x)^2

) .

Compute one solution using ∆x = 1 /20 and setting D∆t/(∆x)^2 = 1 /2. Then halve ∆t and ∆x computing the same solution with ∆x = 40 and D∆t/(∆x)^2 = 1. Finally halve ∆t and ∆x one additional time and submit plots for all three resolutions at t = 0.25.

(c) Repeat the same series of three simulations using the DuFort-Frankel method φn j +1− φn j−^1 2∆t

= D

( φnj+1 − (φn j +1+ φn j −^1 ) + φnj− 1 (∆x)^2

) .

Initialize the Durfort-Frankel method with a single forward step. Submit plots at t = 0.25 for the same three resolutions considered in (b).

d) Discuss the differences between the solutions produced by the two methods and their probable source. Which appears to be the more critical constraint on the values of ∆t and ∆x in this problem, those associated with insuring the stability of the forward scheme or those required for the consistency of the DuFort-Frankel method.

Due Monday May 22nd