Getting Started

Prerequisites: background

This section is about you, the user of Eilmer. We assume that your mathematics, science or engineering background adequately prepares you for computational fluid dynamics (CFD) analysis. In particular, we assume that you have a working knowledge of geometry, calculus, mechanics, and thermo-fluid-dynamics, at least to a second- or third-year university level. With the Eilmer code, we try to make the analysis of compressible, reacting flow accessible and reliable; we cannot make it trivial.

Prerequisites: software

The core solver and its modules are mainly written in the D programming language for speed and the benefits of compile-time checking. The pre- and post-processing modes make use of the Lua scripting language so that we get flexibility and convenient customization. There is also a little Tcl/Tk used in the automated testing scripts.

To run simulations, you need an executable version of the Eilmer program. You may build an executable version of the program from the source code, as described below.

Prerequisites: building from source

Our main development environment is Linux but the programs can be deployed on Linux, flavours of Unix such as MacOS-X, and MS-Windows. The main requirement is a D language compiler. The source code of the Lua interpreter is included in the Eilmer source code repository.

To build Eilmer, you will require:

Additionally, if you want to run the test suite, you will require:

For viewing and plotting results, we recommend:

Installing on Mac OSX

A guide to getting your development environment set up on Mac OSX is available here.

Getting the source code

The full source code for Eilmer4 and a set of examples can be found in a public repository on bitbucket. To get your own copy, use the Mercurial revision control client to clone the repository with something like the following command:

hg clone dgd

and within a couple of minutes, depending on the speed of your network connection, you should have your own copy of the full source tree and the complete repository history.


The default installation directory is $HOME/dgdinst. To compile and install Eilmer, move into the eilmer source area and use make to coordinate the compiling and installing:

cd dgd/src/eilmer
make install

If you are on a Mac, you’ll need to give the make command an extra hint:

make PLATFORM=macosx install

Setting up for first-time run

We’ll assume you are happy using the default install area $HOME/dgdinst. The next step is to configure your environment to use Eilmer. You will need to set the DGD variable to point to the top of the installation tree, and the DGD_REPO variable to point to the top of the repository tree. Note that the installation tree and repository tree are separate. You then also need to set $PATH, $DGD_LUA_PATH and $DGD_LUA_CPATH to point to the appropriate places. Some example lines from a .bashrc file are:

export DGD=$HOME/dgdinst
export DGD_REPO=$HOME/dgd
export PATH=$PATH:$DGD/bin
export DGD_LUA_PATH=$DGD/lib/?.lua
export DGD_LUA_CPATH=$DGD/lib/?.so

Remember to refresh your current shell (or log out and log back in) so that your newly configured environment is available.

Running your first simulation

To test that everything has worked, you can exercise the flow solver to simulate the supersonic flow over a 20-deg cone.

cd ~
cd dgd/examples/eilmer/2D/sharp-cone-20-degrees/sg
prep-gas ideal-air.inp ideal-air-gas-model.lua
e4shared --prep --job=cone20
e4shared --run --job=cone20 
e4shared --post --job=cone20 --vtk-xml

If all of that worked successfully, you may view the final flow field using Paraview::

paraview plot/cone20.pvd

The image below shows contours of pressure in the flow domain.

Pressure contours for supersonic flow over a cone

Where to go from here

From here, you might like to dive into the Documentation.