Diagonalized Upwind Navier Stokes Code

Tutorial Page


The DUNS project is quite different from most software packages that are downloadable from the web. CFD tends to be a very computationally intensive field, so much so that a great deal of consideration has to go into making a program efficient or else you end up waiting forever to obtain a solution. For large problems, even a slowdown of 10% can result in several hours of computational time, especially if you are working on a very large problem or have a fairly slow computer.

The overall drive in software design today is to make things flexible, so that you compile a set of sources once and run it for every case that it's applicable for. There are several advantages to this approach. First, compilation of large programs is a computationally intensive procedure, and not much fun to do. This point is not terribly relevant for CFD because the time used for compiling is generally very small compared to execution time and set up time.

A more important consideration, however, is the difficulty of keeping track of changes in source code if you have several different copies of the source laying around. Often times, 95% of the code between different sources will be the same, except for small changes to treat slightly different conditions. Trouble starts when you want to update one small item in the basic code. For this, you have to change the source in several different sets of sources, and although it is a straightforward job, it is tedious and error prone.

In creating DUNS, we have tried to solve the above problems while retaining an efficient code base from which to work. Our solution is to have one set of distribution files from which all of the source codes for the slightly different projects are derived. The distribution files (labeled *.F, *.cpp, and *.Inc), are interspersed with C preprocessor directives which separates the code between the different projects. Utility scripts are then supplied to help manage differences occuring between the main distribution files and derived source directories. This is described in more detail below.

Next Previous Contents