Two-Dimensional Navier-Stokes Equations in 
High-Performance Fortran Using Multigrids

Project Description

The project that was partially completed during the summer of '94 involved porting Fortran 77 code to High-Performance Fortran (HPF). The Fortran 77 code existed as a numerical solver to the two-dimensional Navier-Stokes equations. The method of choice studied in this version was multigrid methods as the title suggests. Just as HPF is just being introduced to significant applications, the Navier-Stokes solver is evolving from old standards to a modern day implementation on parallel systems. This evolution of the Fortran 77 code is taking the path of Fortran 77 to Fortran 90, and then to HPF. The idea behind this is based on Fortran 90 being the foundation of HPF and the many new features in Fortran 90 as compared to Fortran 77.

Fortran 90

Fortran 90 introduces many new features for array manipulation and array handling. The concept of data parallelism, which is treatment of data as parallel data structures, of which parallel arrays come to mind, is highlighted in Fortran 90. This reveals why HPF is based on Fortran 90 and why Fortran 90 is the next logical step from Fortran 77. The goal of my project was to incorporate many new Fortran 90 features to make the code robust, but readable and understandable by the readers. Efficiency took a back seat, due to the fact that even Fortran 90 compilers are relatively new and the ultimate step is to make the program run in HPF and on distributed parallel systems.

High-Performance Fortran

HPF is an extremely new language, officially released in 1993, and even now, only a few compilers exist to various institutions. Even then, the compilers that are released are incomplete, that is not every feature of HPF is implemented in the compiler as of August 1994. Therefore, the work that is done in HPF is going to be, frankly, a test of the compiler in as much as it is a test of HPF. The HPF aspect of this project will show how feasible Computational Fluid Dynamics (CFD) is to HPF. The other side of this project, is to see how well HPF holds up to CFD applications, such as the Navier-Stokes equations.

Brief Computational Fluid Dynamics and Multigrid Methods

To mention briefly the algorithm used in this particular method, the initial problem is discretized into a bunch of mesh points, and then using the Gauss-Seidel iterative method, a residual is produced. Now, the the initial grid is then made "finer" by adding more grid points and decreasing the width of a grid square to produce a fine grid. Then the fine grid is used to fine tune the initial conditions to produce a closer residual. Ideally, the residual will converge towards the actual answer, but realistically, the code relies on a user given tolerance for controlling the iterations.

The following is a snippet of color contour maps of various fluid dynamic properties obtained by running the Fortran 90 version with 2500 time steps. The level for each contour map was 50 levels and each image was produced in AVS. Please note that there a slight problem with most of the slides, as the y-axis plot should be stretched to twice the x-axis distance but appears not to have worked correctly. The more interesting maps are the stream function and the pressure.


Pressure contour. Grid coordinates are simply units of space.

Vorticity contour.

Stream function contour.

For more information

For more information, please follow this link to the hypertext version of my 1994 REU project and for details of my progress this summer and what I am going to work on during the next semester.

Multigrid Solutions of the 2D Navier-Stokes Equations Using High-Performance Fortran.

To go back to find the home pages of the other REU participants and their projects, please click here


Click here to get back to my home page.


Jay Hui
1011 East Adams St Apt#33, Syracuse NY, 13210
EMAIL jayhui@rodan.syr.edu or jayhui@npac.syr.edu
PHONE (315) 423-3675