Toolbox Installation

CFDTool can be installed directly from the MATLAB APPS and Add-On Toolbar, the MathWorks File Exchange, or downloaded directly from here Download CFDTool has been verified to work with Microsoft Windows, Mac OSX, and Linux systems running MATLAB R2009b and later (4 GB or more of RAM memory is recommended).
  • For MATLAB 2012b and later extract and double click on the CFDTool.mlappinstall file, or use the Get More Apps button in the MATLAB APPS toolbar.
    CFDTool - MATLAB CFD Toolbox GUI

    A corresponding icon will be available in the toolbar to start CFDTool once the app has been installed. (Note that MATLAB may not give any indication of the app installation progress or completion.)
  • For MATLAB 2009b-2012a, extract and copy the cfdtool.p file to a directory accessible to MATLAB. (Optionally also copy the included gridgen2d binary to allow for faster and more advanced grid generation.)

    The application can then be started by entering the cfdtool command in the MATLAB CLI prompt. (One can also set up a direct Desktop shortcut with a command such as matlab -r "cfdtool" once the CFDTool function is accessible in one of the MATLAB search paths.)


Pre-defined fluid flow and heat transfer tutorial examples are available under the File > Load Example... menu option. By selecting one of these examples the chosen model will automatically be set up and defined in the CFDTool GUI, after which the corresponding simulation will be run. Moreover, the FEATool Multiphysics User's Guide also features several models and tutorials directly applicable to CFDTool, for example Basic use and how to set up and run a flow past a cylinder CFD validation and benchmark simulation is illustrated in the linked MATLAB fluid dynamics simulation video tutorial.

Basic Use

CFDTool and the CFD GUI has been specifically designed to be as convenient and intuitive to use as possible, and to make learning fluid mechanics and heat transfer simulation by experimentation both fun and easy. The modeling process is divided into six different steps with corresponding modes
GeometryDefinition of the geometry and domain to be modeled
Grid Subdivision of the geometry into smaller grid cells suitable for computation
EquationSpecification of material parameters and coefficients
BoundaryBoundary conditions specify how the model interacts with the surrounding environment (outside of the geometry)
Solve Solution and simulation of the defined model
Post Visualization and post-processing of simulation results
These modes can be accessed by clicking on the corresponding buttons in left hand side Mode toolbar of the GUI. The different modes have specialized and different Tools available in the corresponding toolbar. Advanced mode options are also available in the corresponding menus.

OpenFOAM® CFD Solver

The optional OpenFOAM GUI and CFD solver integration makes it easy to perform both incompressible, compressible, laminar and turbulent high performance CFD simulations directly in MATLAB. OpenFOAM CFD simulations often results in a magnitude or more speedup for instationary simulations compared to the built-in flow solvers. Additionally, with the multi-simulation solver integration in CFDTool it is possible to compare and better validate simulation results obtained using both the built-in and OpenFOAM CFD solvers.

The OpenFOAM solver binaries are currently not included with CFDTool and must be installed separately. The OpenFOAM MATLAB solver integration has been verified with OpenFOAM version 5. For Windows systems it is recommended to install and use the pre-compiled blueCFD-core (2017) binaries from blueCAPE. For Linux and MacOS systems the distribution from the OpenFOAM Foundation is recommended. It is necessary that the simpleFoam, pimpleFoam, rhoCentralFoam, potentialFoam, and collapseEdges binaries are installed and properly set up so they can be called from system script files (bash scripts on Linux and MacOS and bat/vbs on Windows).