I have been working for quite a while with computational methods for solving complex fluid flows (both single and two phase). Although initially my interest was focused on the numerical techniques, the codes were frequently used to solve problems that appeared in my research, such as the simulation of instrumentation used to measure cloud condensation nuclei (CCN) (Chuang et al., 2000; Nenes et al, 2001), the simulation of a Differential Mobility Analyzer (Collins et al, 2000), and the design of new CCN instrumentation (Roberts and Nenes, in preparation). The codes have seen a wide variety of applications: from simulating a silicon nanoparticle deposition chamber for nonvolatile memory devices (Ostraat, 2001) to two-phase batch sedimentation (Latsa et al., 1999), aeration tank design, airlift pump design (Nenes et al, 1996), flows of viscoelastic fluids, simulations of solidification/freezing processes and two-phase mass transfer across distillation plates. Over the years, both the solvers and the graphical post-processors evolved to a fairly capable (and free) CFD package. I finally decided to post representative samples of this work on the web.

All of thecodes presented here numerically solve the Navier-Stokes equations by using a finite volume descretization formulation. A hybrid upwind-central differencing scheme is used for calculating the convective-diffusive fluxes over each cell of the computational grid. A staggered grid is used for representation of the velocity and scalar fields. The hydrodynamic equations for single-phase flows are solved using the Semi-Implicit Method for Pressure-Linked Equations (Patankar, 1980), while the corresponding cycle for two-phase flows is solved by using the Interspersed Phase Solution Algorithm (Markatos, 1993). The codes are also capable of solving for turbulent flows: the standard two-parameter k-epsilon model can be used to estimate the Reynolds stresses.

Comments or Questions can be directed to By downloading these codes, you agree to abide with these terms of usage. If you do not agree to any of these terms, you may not download the codes.

Laminar single-phase flow simulations

Problem 1: Flow against abackward-facing step with buoyancy forces (brief summary).

Problem 2: Lid-driven flow in a rectangular cavity (brief summary).

Problem 3: Natural convection in a rectangular cavity (brief summary).

Problem 4: Concurrent lid- and buoyancy-driven flow in a rectangular cavity (brief summary).

Problem 5: Isothermal flow against a sudden expansion (brief summary).

Problem 6: Development of thermal and hydrodynamic pipe flow entry region (brief summary).

Problem 7: Viscoelastic fluid flow in a tube (brief summary).

Problem 8: Flow through an orifice (brief summary).

Problem 9: Simulation of a tubular reactor.

Problem 10: Flow around a rectangular body placed in a free stream (brief summary).

Problem 11: Simulation of a silicon nanoparticle deposition chamber for nonvolatile memory devices (brief summary).

Problem 12: Diffusion and flow through a microfluidic device (brief summary, movie, paper).

Turbulent one-phase flow simulations

Problem 1: Flow through an abrupt circular tube expansion (brief summary).

Problem 2: Turbulent diffusion within a canyon (brief summary).

Laminar two-phase flow simulations

Problem 1: Simulation of a T-By plate design for distillation columns (brief summary, sample movie, 5.9 MBytes).

Problem 2: Simulation of two-phase batch sedimentation (brief summary, sample movie, 327 KBytes).

Problem 3: Simulation of two phase batch sedimentation in tanks with internal obstructions (brief summary, sample movie, 730 KBytes)

Problem 4: Simulation of flow in an airlift pump.

How to run the CFD codes

The compiledcodes accesible from this page will run on MS-DOS, Windows 3.x, 9x, ME, 2000, NT and XP platforms. For best performance, run the programs in full-screen mode.Versions of the packages are also available for text-based UNIX and X-Windows platforms.

The idea behind these collection of codes is that each type of problem is implemented as an executable; all geometric, flow conditions, BC's and numerical solution controls can be specified at runtime (in a parameter file called 'PROB.INP'). Once you have downloaded the executable and the parameter file PROB.INP for the problem you are interested in, place both files in a directory. Run the EXE file through explorer (best results would be if you switch to full-screen mode, Ctrl+Enter, as it is an MS-DOS application). The interface is menu-driven, so you use arrows to move around, and Enter to select the iterm.

To see a summary of the problem being solved, select Edit Prob --> View Summary.

To change the parameters of the problem (i.e., geometric parameters, flow conditions, and grid density) you can either edit PROB.INP with an ASCII editor, or within the program by selecting Edit Prob --> Alter Prob.

The program uses iterative methods to attain the numerical solution, so an initial estimate for the flow fields is assumed and the algorithm corrects over and over until all the conservation equations are satisfied for all the points in the flow field. When you first execute the program, the flow fields are to their the initial estimates.

At anytime, you can visualize the fields by selecting:

View fields --> Vector (for flow field vectors)

View fields --> Streamlines (for visualizing flow streamlines)

View feilds --> Contours (for visualizing contours), etc.

To proceed with solving the problem, select Solve Prob from the main menu and let it iterate until it finishes. You can temporarily suspend the solution (e.g., to see the current solution state) by pressing the Esc button; if you select 'Solve Prob', the iteration procedure will resume.

Finally, you can save a current solution state into file so you can resume it some other time in the future. This is done through the File Utils --> Read Flow field (or Save flow field) menu items. The flow fields of individual variables can be saved in an ASCII file for postporcessing through the File Utils --> Variable File submenu.

Graphics post-processors

I have also developed a suite of programs to visualize the simulation results. The ones most frequently used are:

Arrow: A package to plot vector fields and streamlines (Compressed package with MS-DOS executable: ARROW.ZIP)

Contour: A package to generate contour plots (Compressed package with MS-DOS executable: CONTOUR.ZIP)

In addition to these packages, I have developed routines that generate animations (AVI movies) of vector and contour fields for visualization of transient problems. These programs will be posted on the website sometime in the future. Versions of the packages for both TOOLBOX (MS-DOS) and text-based (MS-DOS, UNIX) user interface are available.

You can test these programs with these sample data files (Compressed Package: DEMO.ZIP):

demo1.dat (generated from the natural covection problem, single phase problem 3): Velocity vectors, Streamlines, U-Velocity contours

demo2.dat (inviscid flow over a mountain; non-orthogonal grid example): Grid plot, Velocity vectors, Streamlines

demo3.dat (non-orthogonal grid example): Grid plot, Field vectors

demo4.dat (Torus-type flow; non-orthogonal grid example): Velocity vectors, U-Velocity contours, U-Velocity contours over grid

Development history and acknowledgments

All the codes (solver and post-processors) are written in FORTRAN can run on virtually any platform with a FORTRAN compiler. The single-phase flow solver was based on the original TEACH-2E code (Ideriah and Gosman, 1976), and many contributions from undergraduate and graduate students have brought it to its current version. The solver for the two-phase flow solver was independantly developed by me between 1994-1995; subsequent development and additions were done by Marina Latsa. The graphical interface, and all the post-processing sofware was developed by me during the years 1992-2001. The programs utilize a general graphical user interface library (called "TOOLBOX") I developed for Lahey Fortran. If you are interested, a short programmer's manual for this TOOLBOX interface library is available.


Chuang, P.Y., Nenes A., Smith, J.N., Flagan, R., and Seinfeld, J.H. (2000) Design of a CCN Spectrometer for Airbourne Measurement, J.Atmosph.Ocean.Tech., 17, 1005-1019 (Journal reprint) Note

Collins, D.R., Nenes, A., Flagan, R.C, and Seinfeld, J.H. (2000) The Scanning Flow DMA, J.Aerosol.Sci., 31, 1129-1144 (Journal reprint) Note

Latsa, M., Assimacopoulos, D., Stamou, A. and Markatos, N. (1999) Two-phase modeling of batch sedimentation, Appl.Math.Modeling, 23, 881-897

Markatos, N.C. (1993) Mathematical modeling of single and two-phase flow problems in the process industries, Rev. Inst. Franc. Petr., 48, 631-662

Nenes, A., Chuang, P.Y, Flagan, R., and Seinfeld, J.H. (2001) A Theoretical Analysis of Cloud Condensation Nucleus (CCN) Instruments, J.Geophys.Res., 106 (D4), 3449-3474 (Journal reprint, erratum) Note

Nenes, A., Assimacopoulos, D., Markatos, N., Mitsoulis, E. (1996) Simulation of Airlift Pumps for Deep Water Wells, Can. J. Chem. Eng., 74, 448-456 (Preprint)

Ostraat, M., PhD Thesis, California Institute of Technology, Pasadena, CA, 2001

Patankar, S.V., Numerical Heat Transfer and Fluid Flow, McGraw-Hill, New York, 1980

Other links

Athanasios Nenes Webpage

Last modified: July 25, 2014