In 1999, James Madison & North Carolina Central Universities were awarded a two-year NSF CCLI grant for development of "A Collaborative Computational Sciences Program" for undergraduates. We are happy to make available for public dissemination the following computational software that has been developed and/or customized for use in our Computational-Sciences program, subject to the Copyright notice located at that web-site.
nav2df90.tar.gz |
Math/Phys. 365--Computational Fluid Dynamics--at JMU uses as its text the 1998 SIAM monograph Numerical Simulation in Fluid Dynamics: A Practical Introduction by Michael Griebel (Director of the Institute for Scientific Computing and Numerical Simulation at the University of Bonn), Thomas Dornseifer, and Tilman Neunhoeffer. The authors provide companion software in C from their site listed in the preface to the monograph. For the use of our computational-science students, we have translated the original C code into Fortran 90 code, which can be downloaded at the right. The Fortran 90 version we provide is unsupported, is not guaranteed to be free of bugs, and is available only on a "use at your own risk basis." However, we would welcome any reports of known bugs. [SERIAL CODE] |
poisson.tar |
All methods for solving the incompressible Navier-Stokes equations require the numerical solution of Poisson's equation either for the pressure or the streamfunction. Poisson's equation is of elliptic type; consequently, its solution can be very computationally intensive, depending upon the approach. The suite of algorithms at left solves Poisson's equation in two dimensions on a rectangular domain by three very different methods: successive over-relaxation (SOR); the multi-grid method (MG); and the fast direct (FD) method using fast Fourier transforms (FFTs). These Fortran 90 routines are instrumented with timing calls and are designed to instruct students as to the efficiency of various methods used to solve Poisson's equation. Moreover, a MatLab M file is included to generate animations of convergence for the two iterative methods (SOR and MG). [SERIAL CODE] |
wave1D_mpi.tar |
Solution of the linear 1D wave equation by the first-order upwind method. This program is designed to introduce students to parallel computation. The code is written in Fortran 90 and MPI. MatLab M files are included to plot the time evolution of the solution as a movie. A file containing execution flop rates for 1,2,4,8, and 16 processors is also enclosed. [PARALLEL CODE] |
fsl.hpf.tar.gz |
A very efficient method for solving the incompressible Navier-Stokes equations in two or three dimensions is that of Kim and Moin [J. Comput. Phys., 1985]. The algorithm exploits semi-implicit time advancement, in which the linear (viscous) terms are advanced by the Crank-Nicolson method, and the nonlinear (advection) terms are advanced by the second-order Adams-Bashforth method. The method further uses approximate factorization of the linear diffusion operator to yield a scheme that looks much like the alternating direction implicit (ADI) method. The current 2D implementation is a vorticity-streamfunction formulation. Following the vorticity update via the Kim and Moin method, the streamfunction is updated by solution of Poisson's equation by a fast direct method. The entire algorithm is extraordinarily efficient, with a global operation count of O(mn log_2 m) operations per full time step, where m and n define the grid resolution. The algorithm is also second-order accurate in space and time. The method is applied to the simulation of a forced free-shear layer (FSL). The orginal fortran code has been upgraded to f90 and ported from there to high-performance fortran ( HPF notes). NOTES: Once again, the code is unsupported, so use at your own risk. In particular, the outflow boundary condition is problematic for the vorticity. [PARALLEL CODE] |