CFD Toolbox is now 25% faster
QuickerSim is a MathWorks partner that developed a Computational Fluid Dynamics (CFD) Toolbox on top of MATLAB. QuickerSim CFD Toolbox for MATLAB version 2.4 provides a series of improvements allowing users to tackle a broader range of CFD cases. The tools included in the latest release improve reliability, performance, and speed of CFD simulations as well as user experience. Now you can perform your CFD simulations more easily on laptops and home computers with limited RAM. The QuickerSim toolbox is used by more than 4,000 people worldwide in over 90 companies.
You really helped us gain an in-depth understanding of our code’s performance, coverage, and compatibility across different MATLAB releases. This would have taken us substantial resources to investigate on our own.
Jakub Gałeki CFD Engineer @ QuickerSim
Challenge
Any company that develops software on top of MATLAB and sells it, is always confronted with similar challenges as the ones that QuickerSim expressed:
- Will the same MATLAB code work in every version?
- Are the results exactly the same across all versions?
- Are there any performance regressions?
- Is the code platform independent?
- When is it worth adopting new features at the cost of not supporting older versions?
Due to the combination of a new version of the CFD Toolbox about to be released and the fact that it is used by more and more people around the world, QuickerSim asked VersionBay to:
- analyze the updated toolbox for MATLAB version compatibility
- quantify the increase in performance of the updated code
- quantify the performance improvements of the MATLAB engines for CFD simulations
Solution
QuickerSim shared the source code of their CFD Toolbox version 2.3 and 2.4 and VersionBay wrote over 50 compatibility tests and plugged this into the VersionBay Testing System (VTS). The VTS ran the same tests on all 13 MATLAB versions from R2013a to R2019a. VTS collected code execution coverage, performance measurements and analyzed code compatibility. VersionBay delivered initial compatibility insights to QuickerSim within a week. After validating the complete test suite with the technical lead at QuickerSim, VersionBay delivered a comprehensive and detailed report.
Asking VersionBay to assess our code was really the smart move to make. Setting up the required infrastructure on our own would have been way too time- and resource-consuming.
Jakub Gałeki CFD Engineer @ QuickerSim
Results
The highlights from the report are:
- CFD Toolbox 2.3 is 20% faster in R2019a compared to R2013a
- CFD Toolbox 2.4 is 25% faster than 2.3 in R2019a
- CFD Toolbox 2.4 does not work on R2016a and older because it uses implicit expansion
Your comment about implicit expansion is very valuable, switching over from repmat was part of the performance improvements, so thank you for making me aware it’s only been a feature since 2016b.
Jakub Gałeki CFD Engineer @ QuickerSim

To provide an accurate view of performance results, the VTS runs the same code multiple times, including warmup runs that do not show up in the performance numbers. The graph above shows the median execution times of these several runs per MATLAB version with minimum and maximum execution times as whiskers. Where applicable, the Update of MATLAB is indicated in the tick-marks through a _U suffix, e.g. R2019a_U2 for R2019a Update 2. When calculating the performance improvement, VersionBay uses the median of several runs. CFD Toolbox 2.4 does not work on R2016a and earlier, so there are no red bars for these older MATLAB versions in the graph.
The impressive 25% increase in performance that QuickerSim achieved on 2.4 over 2.3 speaks to the deep knowledge of MATLAB programming that the team has. During this project, it became clear that QuickerSim invested a significant amount of time to improve performance but also to make the code easier to read and maintain going
See VersionBay’s additional Services and Contact Us if you would like a similar analysis done on your code.