Direct Simulation Monte Carlo Method

Visual Simulation Programs created by GA Bird


DSn(V) Current Programs.
DSMC Short Course and Conference Notes
Older but still useful DSMC Visual and Non Visual codes.
Contact Us

The direct simulation Monte Carlo (or DSMC) method is widely used for the modeling of gas flows through the computation of the motion and collisions of representative molecules. Computation at the molecular level is necessary for studies in rarefied gas dynamics (or RGD) because the transport terms in the Navier-Stokes equations are not valid in this flow regime. The essential characteristic of a "rarefied" flow is that the molecular mean free path is not negligible and many applications involve normal and high density flows with very small physical dimensions.

the DSn(V) DSMC simulation programs

DS2V version 4 employs separate computational and visual programs that are linked by binary stream files. This has proved to have significant advantages over the integrated graphics such as are used in the current version of DS3V, especially in terms of program portability. A similar update was planned for DS3V, but the work outlined in the DSMC07 Short Course notes (Sept. 30 2007 Santa Fe) showed that both programs would benefit from basic changes to the underlying DSMC procedures and geometry models.

(1) The latest CPU's are essentially 64bit and memory capacity has been increasing at a far greater rate than processing speed. The round-off errors associated with 32 bit arithmetic have been responsible for a large proportion of the difficulties in developing he programs and for ongoing problems with the geometry-related procedures in the programs. There is now an overwhelming case for a move to programs in which all floating point variables are 64 bit.

(2) Most of the effort in recent years has been associated with the geometry models and visual interface. At the same time, most of the published "1994" basic DSMC procedures have been superseded. This has resulted in many ad-hoc changes to the coding and the programs would benefit from a complete re-write of the basic subroutines, especially those related to intermolecular collisions that involve chemical reactions (see below).

(3) While the current geometry models are generally superior to those that have been employed in earlier programs, the irregular nature of the cells has a deleterious effect on the results. It is proposed to move to a "tree-structure" of rectangular cells that can be readily adapted to a uniformly small number of simulated molecules in each collision cell. The ability to rapidly adapt he cells without having to restart the programs has proved to be one of the advantages of the current geometry models. This advantage should not only be retained, but improved upon so that the cells can be adaped, if necessary, at every output interval.

It has been decided that the new generation of programs should start with a DS1 program for one-dimensional flows and a preliminary version of this is now running. This has confirmed that there enormous advantages in all 64 bit procedures. Also, the effect of the number of molecules per collision cell on the collision rate that was found with DS2V (see the DSMC07 Short Course notes) is absent with the new collision reading. This confirms recent calculations by Michael Gallis. While the geometry model is trivial in a one-dimensional program, the array structure associated with the cell adaption in DS1 is designed to be easily scaled to two and three dimensions. This means that the DS1 program will incorporate the most advanced DSMC procedures and a structure that can serve as the basis of new versions of the DS2 and DS3 programs. An interactive visual interface is not required in one dimension.

It is intended that the source code of the completed DS1 program will be made freely available. The future of the family of programs will be best assured if the development of the new DS2 and DS3 programs is a collaborative effort. These will be all Fortran programs that can be compiled for all platforms. A collaborative approach will allow trials of many approaches to multi-threading and possibly of other forms of parallelism. Visual programs for data production production, interactive execution and post-processing could be produced in many forms.

DS2V Version 4

DS2V version 4.5.03 incorporated the first stage of the new quantum-kinetic model for vibration related chemical reactions. The model has now been extended to include exchange reactions and recombinations in addition to dissociation. It has been implemented in the DS1 program, but not yet in the DS2V and DS3V programs. The model is described in the file that can be downloaded through the following link The main advantage of the new model is that there is no longer any reference to the essentially "continuum" chemical rate equations. It has been shown that the experimentally based rates can be reproduced by simple particle-based procedures that just employ the standard gas properties. While this may appear to be a drastic step, the aim of phenomenological modeling is to accurately reproduce the gas physics through the simplest possible model. The physical understanding lies as much in what can be left out as in what must be included. Because the procedures no longer make any reference to the macroscopic temperature, the model is far more likely to provide a good representation of flows with extreme nonequilibrium. The model takes full advantage of the the ability of DSMC to cope directly with discontinuous and event-driven physical processes. There are no adjustable parameters and the only experimentally based data that is required is the value of the vibrational relaxation collision number at a single reference temperature. Finally, because the procedures are trivially simple to implement within the code, the new model is computationally far mor efficient.

DS2V Version 4 has similar capabilities to Version 3, but the DSMC calculation is made by the "all Fortran 95" program DS2.EXE. Instead of the integrated visual components, the DS2 program runs within the new DS2V program that is written in REALbasic. This means that the application can be compiled to run under Windows, Linux, or Apple. The interactive graphics have been greatly enhanced and the data input is completely new. The program can be run in a post-processing mode as well as the interactive mode and there should now be little need for external post-processing programs. The data is generated in a "parallel" rather than a "serial" fashion and this should eliminate the previously all-too-frequent need to re-start the data generation process when changes were made to the geometry. The program can run the data files produced by Version 3, but the DS2VD.DAT file should be edited so that there is a new line for each variable (this affects only the co-ordinates of the end-points of surface segments). The version number has advanced from 4.1 to 4.2 because the chemistry model now allows ionizing reactions. This has required extensions to the data file and the version number must change so that older data files can be recognized and accepted. Similarly, 4.2 has advanced to 4.3 to allow for additional data relating to the moving wall boundary condition. Note that the version numbers in DS2.EXE and DS2V.EXE must match.

The DS2.EXE program from version 4.4.10 on has been compiled by Intel Visual Fortran Verion 10 and, for the sample flow, is 33% faster than the earlier versions that were compiled by Compaq Visual Fortran Version 6. Versions 4.5.02 and up have reverted to Compaq Visual Fortran because the Intel compiler options that were used for 4.5.01 introduced errors in the compiled code.

Version 4.5 provides a choice between the new particle-based chemistry model and the continuum or temperature based model. The new model integrates dissociation with vibrational excitation, but is currently implemented only for dissociation reactions:- see CYL2501.PDF and the data file CYL2501.DAT.

Download the free Windows DS2V45.EXE (Version 4.5.06, June 5) 2008 (3.9 MB)

This program is a compressed executable and should be placed in an empty directory or folder. When run, it produces DS2V.EXE, DS2.EXE and the sample data file DS2VD.DAT. The latter is the first demonstration case from the earlier versions. DS2V is best run first, with the DS2 calculation started from within DS2V. The new (April 2) introductory window is shown above.

DS3V Version 2 and 3

A similar DS3V Version 3 is in an early stage of preparation. This will not have the two-core parallel option of Version 2, but will be followed by n-core versions of both programs. Any comments would be appreciated.

The Visual DSMC program DS3V is a general program for three-dimensional flows. Like the DS2V program, it can be applied to a very wide range of flows. It employs the same password as the DS2V program. A demonstration program with three built-in demonstation cases may downloaded and run without any requirement for a password.

Version 2 features ease of use in that all computatioal parameters, other than the initial number of simulated molecules, are set automatically by the program. It has other enhancements that make it consistent with Version 3 of the DS2V program. It comes with a support program that facilitates the production of the surface definition file.

There is now provision for a molecule file from DS2V to be used as a flow input file to DS3V. This allows the efficient calculation of flows that are part two-dimensional or axially stmmetric and part three-dimensional.

The program has an option for parallel operation on dual-core CPUs. This employs domain decomposition and is the first step in extensions to the programs that will make full use of the capabilities of the new generation of multi-core CPUs. The parallel option can be run for demonstration purposes on a conventional PC.

Version 2.6 of the general Visual DSMC program DS3V

Short Course and Conference Notes

Notes from the September 30 Short Course at DSMC07 (Sept. 30, 2007 Santa Fe)
DSMC07notes.pdf (164 KB)

New quantum-kinetic chemistry model for DSMC (July 2008 update)
Presentation from the RGD26 meeting in Kyoto - DSMCchemistry.pdf (1.4GB)

The option to produce QuickTime movies from of unsteady flows has now been implemented.
Quick Time Movie Creation

Older but still very useful DSMC visualisation codes.

DS2V Version 3

Version 3.8 of the General 2D/Axi "Visual DSMC" Program. The Visual DSMC program DS2V version 3.8 has now been superseded by version 4. but is still available from the following link Version 3.8 DS2V

Version 3 features ease of use in that all computatioal parameters, other than the initial number of simulated molecules, are set automatically by the program. It has many other enhancements and there are eight integrated tutorial/demonstration examples that can be run without any need for a password. Version 3.6 now includes molecule input/output files that allow linked DS2V runs with a change in timescale or allow DS2V output as input to DS3V. In addition, time limits may be placed on specified input flows so that, for example, pulsed jets may now be studied. Version 3.8 allows combined DS2V/3V calculations that are linked by molecule files.

View or download a description of the examples DS2VEX.PPT (855 KB) or an extended file with movies of the permanently unsteady flow cases DS2VEXM.PPT (6.45 MB)


The following Windows 95/98/NT programs do not require expertise in fluid mechanics or experience with the method. All computational parameters are set automatically and the programs employ advanced graphical user interfaces.

The "real time" interactive "VISUAL WIND TUNNEL" programs DSMCS and DSMCX promote an understanding of the DSMC method and free-molecule to near-continuum gas flows.

Version 2 of the real time Visual Wind Tunnel program DSMCS.This is an 800x600 image and is recommended for 2-400 MHz. computers.

Version 3 of the real time Visual Wind Tunnel Program DSMCX. This is a 1024x768 image and is recommended for 600+ MHz. computers.


The program DSWT is for quantitative studies of two-dimensional or axially symmetric "wind tunnel type" flows. The program is interactive with a progressive display of user-selected surface and flow properties. Modern PC's allow computations well into the continuum regime and students in introductory fluids courses are able to perform realistic and instructive CFD calculations on subsonic through to hypersonic flows.

Version 1 of the DSMC Wind Tunnel program DSWT.


The general two-dimensional/axially symmetric program DS2G (obsolete).

Corrections to Published Source

The following file is associated with the book "Molecular Gas Dynamics and the Direct Simulation of Gas Flows"
Corrigendum and source code of demonstration programs for book.