The programs in this directory integrate Orr-Sommerfeld flow with DNS.

A brief description of Orr-Sommerfeld flow: Let the total fluid velocity field
be utot(x,y,z,t) = U(y) e_x + u(x,y,z,t) on the domain 0<=x<Lx, -1<=y<=1,
0<=z<Lz. Set the base flow U(y) == 1-y^2 and constrain the system to have 
constant bulk velocity. Linearize the Navier-Stokes equations about the base
flow U(y). Then the linearized equations for the perturbation u(x,y,z,t) have 
solutions of the form

 u(x,y,z,t) = u_OS(y) exp(lambda t) exp(2pi(kx x/Lx + kz z/Lz))

for given integers kz,kx. Lambda is complex. 

The programs take kx,kz=1,0 and Lx=Lz=2pi. The function u_OS(y) and its
corresponding pressure function p_OS(y) are stored on disk (as oseig10_65.bf
and ospeig10_65.asc). The value of lambda is hard-wired into the .cpp files.

The program orrsomm.cpp uses the above equation to set an initial 
condition for u, integrates it with DNS, and compares the numerical 
solution to the above analytic solution as a function of time. Results
can be viewed with the Matlab script plotorrsomm.m.

The program orrsomm_scaling.cpp computes how the DNS error scales as a
function of the time step dt. Results can be viewed with the Matlab script 
plotscaling.m.

To run these programs:

foo$ cd channelflow/src
foo$ make libs
foo$ cd ../examples/orrsomm
foo$ make orrsomm.x
foo$ ./orrsomm.x
foo$ make orrsomm_scaling.x
foo$ ./orrsomm_scaling.x
