Matlab code used for determining stability regions
 
Here, matlab code related to the stability issue will be obtainable:
 
stability3d.m Script for determining the stability region. Used for making Table III.
 
A set of small Matlab scripts are used for studying stability  for the scalar advection problem when the wavenumbers are equal, i.e. xi = eta = theta. (Likewise, the directional Courant numbers are also equal, so that stability is studied along diagonal omega_d )  These scripts are, e. g. used for making FIG. 10 in the paper.
 
stab100.m
stab110.m
stab111.m
stab210.m
stab211.m
stab220.m
stab221.m
stab222.m
Stability scripts for schemes, where the correction waves are based on centered approximations for terms like u_xx etc. (This is standard in CLAWPACK)

Typical usage,

xi = 0.0:0.01:pi;
theta = 0.2;
plot(xi,abs(stab211(xi,theta)));
 

 
stab210_Fromm.m
stab211_Fromm.m
stab220_Fromm.m
stab221_Fromm.m
stab222_Fromm.m
In these scripts, the correction waves are based on a Fromm-type approximation.
 
 
stab210_BW.m
stab211_BW.m
stab220_BW.m
stab221_BW.m
stab222_BW.m
In these scripts, the correction waves are based on a Beam-Warming-type approximation.
 

Using these scripts it is easy to compare the stability properties when the correction waves are approximated in different ways. For example, compare Method 210 for Courant number 0.5.

xi = 0.0:0.01:pi;
theta = 0.5;
plot(xi,abs(stab210(xi,theta)))
hold on
plot(xi,abs(stab210_Fromm(xi,theta)),':')
plot(xi,abs(stab210_BW(xi,theta)),'-.')
 
 

< previous topic, next topic>
 

 ©FFI, P.O. Box 25, N-2027 Kjeller, Norway
Last updated: January 16th, 2001
Jan Olav Langseth (jol@ffi.no)