File Exchange

image thumbnail

CFDTool - MATLAB CFD Toolbox

version 1.3.1 (2.27 MB) by Precise Simulation
Easy to Use Computational Fluid Dynamics (CFD) GUI Toolbox for MATLAB

499 Downloads

Updated 02 Dec 2018

View License on GitHub

Based on FEATool Multiphysics™ (https://www.featool.com), CFDTool is specifically designed to make light and simple fluid dynamics and heat transfer simulations both easy and fun.

The CFDTool MATLAB Toolbox includes the following features:

- completely stand-alone and self-contained CFD simulation toolbox for MATLAB
- fully integrated and easy to use GUI (Graphical User Interface)
- seamless OpenFOAM CFD solver integration
- modeling and simulation in 1D, 2D, and axisymmetric/cylindrical coordinates (with swirl/non-zero azimuthal velocity)
- built-in geometry and CAD tools (supporting planar STL CAD file import)
- automatic mesh and grid generation (with import for FEniCS, Gmsh, GiD, GMV, and Triangle mesh formats)
- pre-defined equations and boundary conditions:
+ incompressible viscous fluid flows (Navier-Stokes equations)
+ compressible inviscid flows (Euler equations)
+ heat transfer (Convection and Conduction)
- multiphysics support for fluid flow and thermal analysis
- simulation of laminar and turbulent flows (k-epsilon and k-omega turbulence models available together with OpenFOAM)
- time-dependent and steady state analysis types
- postprocessing and visualization with boundary and subdomain integration

*) SYSTEM REQUIREMENTS

Verified to work with Windows, Mac, and Linux systems running MATLAB R2009b and later.

*) INSTALLATION

Search for and install CFDTool by using the "Get More Apps" button in the MATLAB "APPS" toolbar.

Alternatively, download and extract the CFDTool archive

- For MATLAB 2012b and later double click on the "CFDTool.mlappinstall" file, or use the "Install App" button in the MATLAB "APPS" toolbar. Once the app has been installed, a corresponding icon will be available in the toolbar to start CFDTool. (Note that MATLAB may not give any indication of the app installation progress or completion.)

- For MATLAB 2009b-2012a, copy the "cfdtool.p" file to a directory accessible to MATLAB, and then enter "cfdtool" on the MATLAB command line to start the application.

*) OpenFOAM CFD Solver

The optional OpenFOAM CFD solver integration makes it easy to perform both 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 (http://bluecfd.github.io/Core). For Linux and MacOS systems the distribution from the OpenFOAM Foundation (https://openfoam.org/download) 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).

*) BASIC USE

CFDTool and its GUI has been specifically designed to be as easy to use as possible, and making learning CFD by experimentation possible.

The modeling process is divided into six different steps or modes

Geometry - Definition of the geometry to be modeled
Grid - Subdivision of the geometry into smaller cells suitable for computation
Equation - Specification of material parameters and coefficients
Boundary - Boundary conditions specify how the model interacts with the surrounding environment (outside the geometry)
Solve - Solution and simulation of the defined model problem
Post - Visualization and postprocessing

These modes can be accessed by clicking on the corresponding buttons in left hand side "Mode" toolbar. The different modes may have specialized and different "Tools" available in the corresponding toolbar. Advanced mode options may also be available in the corresponding menus.

A number of pre-defined fluid flow and heat transfer tutorial examples are available under the "File" > "Load Example..." menu option.

Basic use and how to set up and model laminar flow past a cylinder is explained in the video tutorial linked below (https://www.youtube.com/watch?v=ZnnXl7ryBMI).

Cite As

Precise Simulation (2018). CFDTool - MATLAB CFD Toolbox (https://www.github.com/precisesimulation/cfdtool), GitHub. Retrieved .

Comments and Ratings (3)

@Tem Gebekristos: Thank you for your feedback and sorry to hear CFDTool does not work for you. Please try using the "built-in" mesh generation algorithm instead of external ones. Please include full MATLAB version, system configuration, and error messages in the future to better be able to pinpoint issues.

Does not work. Unable to generate grids. When I try to generate grids, I get tens of error messages. Can't use any equations for the solver (Navier Stokes, Euler). Nothing like the video tutorials

kkkaimm

Updates

1.3.1

- OpenFOAM integration improvements

1.3

- Support for supersonic and inviscid compressible flows (compressible Euler equations)
- OpenFOAM support for inviscid compressible flows
- Monitoring of OpenFOAM convergence curves
- NACA 4-series pre-defined wing geometry object

1.2

- OpenFOAM external CFD solver integration
- Support for k-epsilon/omega turbulence models (with OpenFOAM)
- Potential flow velocity field initialization
- Improved resolution of curved geometry boundaries
- Added descriptions for tutorial models

1.1

- Support for 1D, 2D Axisymmetry and flows with swirl
- Support for importing 2D planar STL CAD geometry files
- Advanced and improved mesh generation and mesh import
- Advanced postprocessing
- Improved and more efficient flow discretization

MATLAB Release Compatibility
Created with R2018b
Compatible with R2009b to any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor