Getting Started

This is a quick tutorial to walk you through the setup of the virtual wind tunnel environment. The virtual wind tunnel is build around OpenFOAM, which has excellent support in Linux, but less so for Mac and Windows. The following guide is based on Ubuntu 14.04 LTS. The key requirements for the virtual wind tunnel are OpenFOAM and PyFOAM, a Python interface to OpenFOAM. PyFoam lacks Python 3 support, so Python 2.7 is used for the project.


Install OpenFOAM 2.3.0. Currently for 14.04, this means building from source. The instructions can be found here.

Install PyFoam following the directions found here

Installing the Virtual Wind Tunnel:

You'll need to make sure you have setup tools installed before running droneCFD:

sudo apt-get install python-setuptools

droneCFD can be installed with from pypy:

sudo pip install droneCFD

Alternatively, latest version the development version can be pulled from Github:

cd ~
git clone
cd droneCFD
sudo python install

Verifying Functionality:

The first step is to verify that droneCFD can find the installed OpenFOAM installation. This is accomplished with the following:
cd ~

Next, run a simulation! For convenience, droneCFD ships with a test geometry. Simulating this geometry may take over two hours to run, depending on the hardware. To launch the simulation, just type:

cd ~
dcRun --preview final --resolution low

Once the simulation has finished (~1:35 hours on an i7-3370k processor), Paraview will open and display the results.

Using your own geometry

DroneCFD was designed to make it simple for you simulation your own geometries. DroneCFD expects a specific aircraft orientation, which is lift in the +Z direction and drag in the +X direction. Once you have an STL file that satisfies these constraints, you can simulate your aircraft using the following command:

dcRun --geometry <path_to_your_geometry>

For a full list of command line arguments, just type:

dcRun -h
usage: dcRun [-h] [--caseFolder CASEFOLDER] [--templatePath TEMPLATEPATH]
             [--geometryPath GEOMETRYPATH] [--resolution ]
             [--aoa AOA [AOA ...]] [--airspeed AIRSPEED [AIRSPEED ...]]
             [--cofg COFG [COFG ...]] [--refarea REFAREA [REFAREA ...]]
             [--convergence CONVERGENCE] [--preview ]

Run cfd simulations around a small unmanned aircraft.

optional arguments:
  -h, --help            show this help message and exit
  --caseFolder CASEFOLDER
                        The directory used to store all the simulations.
  --templatePath TEMPLATEPATH
                        Template path to use, for advanced users only.
  --geometryPath GEOMETRYPATH
                        Path to the STL geometry, if omitted, the reference
                        geometry is used.
                        Resolution of the CFD evaluation. The default value is
  --aoa AOA [AOA ...]   Angles of attack used in simulations. Default is 0.0
  --airspeed AIRSPEED [AIRSPEED ...]
                        Airspeed in the domain.
  --cofg COFG [COFG ...]
                        The X position of the Center of Gravity (cog) as
                        measured from the nose.
  --refarea REFAREA [REFAREA ...]
                        The reference area of the wing being simulated, used
                        for force coefficient calcuations
  --convergence CONVERGENCE
                        Convergence value to terminate the simulation.
                        Controls Paraview previews of the simulation.

Have fun!