Channelflow is a software system for numerical analysis of the incompressible Navier-Stokes flow in rectangular geometries, written in C++. The core engine of channelflow is a spectral CFD algorithm for integrating the Navier-Stokes equations. This engine drives a number of higher-level algorithms that (for example) compute equilibria, traveling waves, and periodic orbits of Navier-Stokes. Channelflow provides these algorithms in an easy-to-use, flexible, and intelligible form by using relatively modern software design. Channelflow consists of a software library for rapid, high-level development of spectral CFD codes and a set of predefined executable programs that perform common tasks involving CFD.
The main goals of Channelflow are
This website is set up as a wiki to encourage collaborative maintenance and discussion. Please register and login to make changes. You can experiment with the dokuwiki system in this playground. Check out the example of latex encoding there and this outline of dokuwiki syntax.
Channelflow includes about thirty predefined command-line utility programs that perform the most common calculations in our research, such as
Most utilities read in one or more velocities fields from disk, operate on them according to command-line options, print some output, and save resulting fields to disk.
Channelflow is written as a C++ class library. The classes act as building blocks for expressing particular channel-flow simulations and associated data analysis, and underneath these, the mathematical structures needed to perform the calculations. Channelflow provides classes for representing Chebyshev expansions, Fourier x Chebyshev x Fourier expansions, DNS algorithms, and a number of differential equations. Each class has automatic memory management and a set of high-level elemental operations, so that auxiliary data fields and computations can be added to a program with a few lines of code.
In channelflow, even the DNS algorithm is an object. This greatly increases the flexibility of DNS computations. For example, a DNS can be reparameterized and restarted multiple times within a single program, multiple independent DNS computations can run side-by-side within the same program, and DNS computations can run as small components within a larger, more complex computations. As a result, comparative calculations that formerly required coordination of several programs through shell scripts and saved data files can be done within single program.
The following programs illustrate how channelflow's libraries can function as a high-level, Matlab-like language for CFD research. Each defines an initial condition and a base flow, configures a DNS algorithm method, runs a time-stepping loop, and produces output, in about a hundred lines of code. Note: these example codes are written for maximum simplicity and are not intended for production runs.
Channelflow uses object-oriented programming and data abstraction to maximize the organization and readability of its library code. Channelflow defines about a dozen C++ classes that act as abstract data types for the major components of spectral channel-flow simulation. Each class forms a level of abstraction in which a set of mathematical operations are performed in terms of lower-level abstractions, from time-stepping equations at the top to linear algebra at the bottom. The channelflow library code thus naturally reflects mathematical algorithm, both in overall structure and line-by-line. One can look at any part of the code and quickly understand what role it plays in the overall algorithm. One can learn the algorithm in stages, either top-down or bottom-up, by focusing on one level of abstraction at a time.
Channelflow is also
Channelflow's CFD core algorithm uses spectral discretization in spatial directions (Fourier x Chebyshev x Fourier), finite-differencing in time, and primitive variables (3d velocity and pressure) to integrate the incompressible Navier-Stokes equations. The algorithm is based on Kleiser and Schuman's primitive-variables formulation, which uses a Chebyshev tau method for enforcement of the no-slip conditions and influence-matrix and tau-correction algorithms to determine the pressure. Channelflow generalizes this algorithm in several ways, as described in the Channelflow User's Manual. Channelflow's generalizations include
The algorithms for computing invariant solutions for plane Couette flow were developed by Divakar Viswanath. These algorithms combine a “hookstep” trust-region modification of the classic Newton search with Krylov-subspace methods for solving the Newton-hookstep equations, and use Arnoldi iteration for linear stability analysis.
Channelflow uses the elegant and powerful FFTW library for its Fourier transforms.
Channelflow began in 1999 as a part of my Ph.D. research in Theoretical and Applied Mechanics at Cornell University. It has been under active development since; it nows serves as the primary platform for numerical research in plane Couette dynamics at the Center for Nonlinear Science in the Georgia Tech School of Physics. I know of about 10-20 other active users of channelflow. As of 2008 (release 1.3.x), channelflow contains utilities for computing equilibria, periodic orbits, and linear stability modes for plane Couette flow. Its DNS algorithms are verified as correct by the test suite: correct integration of Orr-Sommerfeld eigenfunctions, Poiseuille flow, and sinusoidal disturbances to Poiseuille flow. Channelflow has also been verified against independent Fortran codes in the computation of equilibria, eigenvalues, and periodic orbits of plane Couette flow. Channelflow's test suite is not exhaustive, so some inessential utility functions might still contain errors.
Channelflow releases are available as tar.gz files from the download page.
Would you be interested in helping improve channelflow? Here's a list of possible development projects. Please contact me and I'll help get you started.
The channelflow website is hosted on a wiki in order to encourage discussion and collaborative maintenance of documentation. Not all the structure for this is in place yet.
In the meantime, if you have comments, questions, or suggestions regarding channelflow, please email me. If you're interested in helping with development, –anything from minor improvements to major enhancements– please email me.