AMath 586/Atm Sci 581
Numerical Methods for Time-Dependent
Differential Equations
Spring 2005
http://www.atmos.washington.edu/2005Q2/581/
MWF 2:30-3:20: ATG 310c
Course Description
Numerical methods for time-dependent ordinary and partial-differential
equations, including explicit and implicit methods for hyperbolic and parabolic
equations. Stability, accuracy, and convergence theory.
Prerequisites
Prior experience with Matlab and solution of elementary PDEs such as
the wave and diffusion equation. Amath 581 or 584/585 recommended.
Notes and Recommended Text
No text will be required and class notes will be handed
out. The presentation will loosely follow parts of Chapters 1-5 of:
- Durran, D.R., 1999: Numerical methods for wave equations in
geophysical fluid dynamics. Springer-Verlag, 465 pp.
($65, cheaper on Amazon)
This excellent and detailed book is particularly recommended for students planning to take Atm. Sci. 582.Syllabus
| Topic |
| Archetypical PDEs. Initial and boundary conditions,
well-posedness, types of numerical methods. |
| Finite difference
operators, consistency, order of accuracy |
| Stability, convergence, Von Neumann analysis, discrete dispersion
relation, CFL stability condition. |
| Time-differencing methods for ODEs and systems of ODEs. |
| Finite difference methods for the 1D advection equation |
| Finite difference methods for the heat equation |
| Pseudospectral methods for time-dependent problems |
| Finite-element, finite volume, and monotonicity-preserving methods. |
Grading
- Homework (60%), posted to class web page and assigned on a
quasi-weekly basis. Heavily oriented toward implementation of
numerical methods in Matlab and testing of their theoretical
properties. Consultation with your fellow students is encouraged, but
everyone needs to write out the homework in their own words, and write their own Matlab scripts. Late homework (after 5pm on due date, but not more than three school days late)
accepted by arrangement with instructor. There will be a late penalty of 25% on all but the first late assigment.
- Midterm assignment(20%) and final assignment(20%). Like regular homework, but no consultation with anyone.
Schedule
- No class:
- Mo 4 Apr (CB talks at Caltech)
- We 11 May (CB at EPIC meeting, APL)
- Mo 16 May-Fr 27 May (CB in Greece for pan-GCSS conference)
- Mo 30 May: Memorial Day (vacation)
- Makeup classes: Every Thursday through 5 May, and Th 2 June at 2:30-3:20 in ATG 310c
Homework and Exams
Matlab Scripts and Handouts
Class examples
Nonlinear pendulum d2theta/dt2 = - sin(theta),
theta(0) = 1, dtheta/dt = 0 treated as a system of two 1st order ODEs
-
pendulum_RK4_plot.m: Plots solution
using 4th-order Runge-Kutta for times (0-2)*2*pi and (18-20)pi for a small
timestep dt = pi/10 and a larger timestep dt = 4*pi/10 (still only ~1/2 of
stability limit). Uses pendulum_RK4.m.
-
pendulum_leapfrog_plot.m: Plots
solution to pendulum problem using leapfrog method for times (0-2)*2*pi and
(49-50)*2pi , using dt = pi/10 with and without Asselin filtering.
Forward-Euler starting step. Uses
pendulum_leapfrog.m
Stiff ODE example: stiff.m: Compares exact solution to du/dt = -lambda(u
- sin(t)), u(0) = 1 with trapezoidal and backward-Euler methods.
Fourier spectral differentiation
-
DFT-based differentiation notes
-
DFT_deriv.m: Taking a numerical derivative of
a periodic function using Matlab DFT. Uses swell.m and saw.m to generate smooth and sawtooth
periodic functions for examples.
Fourier spectral method on q_t + q_x = 0 in x = [0,1], periodic BCs,
4th order Runge Kutta (RK4) time differencing.
Fourier spectral method on KdV eqn, periodic BCs, RK4 time differencing.
- ps_KdV_RK4.m:
Advects a KdV soliton and plots vs. exact soln. Uses S_KdV.m
- ps_KdV_2soliton.m: Interacting
solitons. Uses S_KdV.m
- S_KdV.m: Calculates pseudospectral approx
to spatial derivs for KdV eqn.
pois_FFT.m: - Fourier spectral method for 2D
Poisson eqn. with periodic BC's.
PDE toolbox example using heat equation on a semicircular domain.
Homework solution scripts
- hw1g.m: FTCS method on heat
equation du/dt = d2u/dx2 with u(x,0) = 1 - cos(2*pi*x) on 00, with Neumann BCs at x = 0,1. Script plots maxnorm error
convergence of solution at time T = 0.016.
- hw2p8.m: Implementation and
convergence analysis (at t=1) of trapezoidal in time,
centered in space differencing of du/dt + du/dx = 0 on periodic
domain [0,1], u(x,0) = sin(2*pi*x).
- hw3p1bc.m: Convergence analysis
of numerical solutions to a stiff system of 2 ODEs using
backward Euler and BDF2.
- hw3p2c.m: Leapfrog and leapfrog-Asselin
centered-difference methods applied to du/dt + du/dx = 0,
u(x,0) = 0, u(0,t) = 1.
- hw4p234.m: Traffic-flow problem
dq/dt + (1-2q)dq/dx = 0, on x = [0,1], q(x,0)= 0, q(0,t) = 0.12sin^2(pi*t). Solution
at right boundary plotted for exact, leapfrog-Asselin, L-W and MC methods.
Uses hw4_fv.m
-
hw5_soln.m: Fourier pseudospectral method applied to advection of
an elliptical vortex in an incompressible 2D fluid.
- finalp1.m: FEM applied to
advection equation dq/dt + dq/dx = 0 on x = [0,1], q(x,0)=0,
q(0,t) = sin(50t), with solution plotted at time 0.9
for a uniform and stretched grid in x.
Uses finalp1_FEMsolve.m