Homework Solutions for Amath-Math 586/Atm S 581: Chemical Reactions and PDEs, Assignments of Mathematics

Solutions to homework 3 for amath-math 586/atm s 581, which covers chemical reactions described by systems of ordinary differential equations (odes) and partial differential equations (pdes). Topics include dominant balance, numerical methods (backward euler and bdf2), and advection in pipes with the leapfrog method and asselin filtering.

Typology: Assignments

Pre 2010

Uploaded on 03/18/2009

koofers-user-4ho
koofers-user-4ho 🇺🇸

9 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Amath-Math 586/Atm S 581 Due Wednesday, 3 May 2005
Homework 3
1. Consider the system of equations describing two chemical species a and b of concentrations
A(t) and B(t), respectively, for which species a has a source 1 - cos(t) but rapidly decays into
b, and b decays much more slowly:
dA/dt = -λA + 1 - cos(t), λ >> 1
dB/dt = λAB, A(0) = B(0) = 0. (*)
(a) By considering the dominant balance in the equation for a (please don’t go to the trouble
of an exact solution of the equation valid for finite λ), show that
B(t) = 1 – 0.5e-t - 0.5[cos(t) + sin(t)] + O(λ -1)
(b) Use a backward Euler method to solve the IVP (*) with λ = 1000 for 0 < t < T = π. In
particular, find the numerical solution Bt(T) for t = T/N, where N = 2-p, p = 2,…,7.
Since the exact solution is a bit messy, measure error for each t using the solution
increment ε(∆t) = |Bt(T) - B2t (T)|. Log-log plot ε vs. timestep t for p = 3,…,7. Does ε
converge with t at the expected rate?
(c) Now use the BDF2 method with the same range of t, with a backward Euler starting
step. Overplot the BDF2 solution increments. Are they smaller than with backward
Euler? Do they converge with t at the expected rate?
2. Consider the following IBVP, describing advection of a tracer u(x, t) introduced into water
flowing into one end of a pipe. The pipe narrows with increasing x, causing a corresponding
increase in the flow speed that carries the tracer along:
ut + (1+9x)ux = 0, 0 < x < 1, 0 < t < 0.5
u(x,0) = 0, u(0, t) = 1
(a) What is the exact solution ue(1,t)? Why is no boundary condition required for x = 1?
(b) Consider the leapfrog method with centered space differencing for the derivative, using a
midpoint second-order Runge-Kutta starting timestep. If we use a small uniform grid
spacing x, what is the CFL stability limit on t?
(c) At the right boundary x = 1, we lack the information to calculate a centered difference.
Give a second-order accurate one-sided approximation to ux that we can use there.
(d) Implement the above method using x = 0.05 and t given by the stability limit found in
(b). Use Asselin filtering with γ = 0.05. Plot a comparison of the numerical and the exact
solutions at x = 1 for 0 < t < 0.5. Are the dominant errors diffusive or dispersive? Is this
as you expected? – Explain. What happens if without Asselin filtering (i.e. γ = 0)?

Partial preview of the text

Download Homework Solutions for Amath-Math 586/Atm S 581: Chemical Reactions and PDEs and more Assignments Mathematics in PDF only on Docsity!

Amath-Math 586/Atm S 581 Due Wednesday, 3 May 2005

Homework 3

  1. Consider the system of equations describing two chemical species a and b of concentrations A ( t ) and B ( t ), respectively, for which species a has a source 1 - cos( t ) but rapidly decays into b , and b decays much more slowly: dA/dt = -λ A + 1 - cos( t ), λ >> 1 dB/dt = λ AB , A(0) = B(0) = 0. () (a) By considering the dominant balance in the equation for a (please don’t go to the trouble of an exact solution of the equation valid for finite λ), show that B ( t ) = 1 – 0.5 e - t^ - 0.5[cos( t ) + sin( t )] + O(λ -1) (b) Use a backward Euler method to solve the IVP () with λ = 1000 for 0 < t < T = π. In particular, find the numerical solution Bt ( T ) for ∆ t = T/N , where N = 2 -p , p = 2,…,7. Since the exact solution is a bit messy, measure error for each ∆ t using the solution increment ε(∆ t ) = | Bt ( T ) - B 2 ∆ t ( T )|. Log-log plot ε vs. timestep ∆ t for p = 3,…,7. Does ε converge with ∆ t at the expected rate? (c) Now use the BDF2 method with the same range of ∆ t , with a backward Euler starting step. Overplot the BDF2 solution increments. Are they smaller than with backward Euler? Do they converge with ∆ t at the expected rate?
  2. Consider the following IBVP, describing advection of a tracer u ( x , t ) introduced into water flowing into one end of a pipe. The pipe narrows with increasing x , causing a corresponding increase in the flow speed that carries the tracer along: ut + (1+9 x ) ux = 0, 0 < x < 1, 0 < t < 0. u ( x ,0) = 0, u (0, t ) = 1 (a) What is the exact solution ue (1, t )? Why is no boundary condition required for x = 1? (b) Consider the leapfrog method with centered space differencing for the derivative, using a midpoint second-order Runge-Kutta starting timestep. If we use a small uniform grid spacing ∆ x , what is the CFL stability limit on ∆ t? (c) At the right boundary x = 1, we lack the information to calculate a centered difference. Give a second-order accurate one-sided approximation to ux that we can use there. (d) Implement the above method using ∆ x = 0.05 and ∆ t given by the stability limit found in (b). Use Asselin filtering with γ = 0.05. Plot a comparison of the numerical and the exact solutions at x = 1 for 0 < t < 0.5. Are the dominant errors diffusive or dispersive? Is this as you expected? – Explain. What happens if without Asselin filtering (i.e. γ = 0)?