Last Updated: 7/11//2018

University of Virginia
School of Engineering & Applied Science
Department of Mechanical & Aerospace Engineering

Computational Fluid Dynamics & Heat Transfer I
Spring 2010

Computers/Languages

You may program in whatever language you wish, but whatever language you choose, I strongly urge you to develop good, well-structured, readable, documented code.

In the past few years the majority of students have found Excel and its macro language Visual Basic for Applications (VBA) an excellent choice, and I will provide code snippets in VBA and a few in FORTRAN. The spreadsheet is used for input and its charting features are used for the graphical presentation of results, while the heavy-duty number-crunching is done in a highly-structured Visual Basic for Applications program. A write-up covering everything I know about VBA may be downloaded here and a little spreadsheet that demonstrates many features may be downloaded here.  Other excellent references on VBA are Walkenbach's Excel 2007 Power Programming with VBA and Power Programming with VBA/Excel by Steven C. Chapra.  The former is for the serious programmer, but the latter is aimed at beginning programmers.

You can get a free “Express” edition of Visual Basic, Visual C# and Visual C++ at this Microsoft site.

If you use FORTRAN, the traditional scientific programming language, FORTRAN 90 or 95 is preferred, Fortran 77 will be tolerated, but Fortran 66 is forbidden.  You may also want to obtain your own Fortran 90 compiler; several brands, e.g., Intel (what used to be Microsoft and then was Digital and then Compaq), NAG, Absoft and Lahey are available. The latter has a stripped-down version (ELF90) available at a student discount.

The 20-year-old program ref90.f demonstrates more than you probably need to know about Fortran 90, and a 20-year-old paper describing all the features used in that program may be downloaded here. This program is written such that it would run successfully without any changes under both the xlf90 compiler on the RS/6000's we used to have and with the NAG compiler in both fixed and free format. You may also want to special order one of the several reference books on Fortran 90 cited at the top of that program. Since Fortran 90 is a superset of Fortran 77, you needn't worry if you have had no previous exposure to Fortran 90. The initial programs will be identical to Fortran 77 (although compiled under Fortran 90), unless you decide to use the ELF90, compiler, which unlike the others, is not backwardly compatible with Fortran 77. Later in the course when we move on to multi-dimensional problems, we will discuss many of the new features of Fortran 90.

You are also welcome to use other commercial products; e.g., MATLAB, Mathematica, and Maple, but you must recognize that you will have the job of translating any of the bits and pieces of FORTRAN or VBA code that I will give you into that package.  

 

NOTE: Links to Web Sites external to the University of Virginia should not be considered endorsement of those Web sites or any information contained therein.

Back