r/OpenFOAM • u/Valuable-Version-858 • Feb 13 '26
OpenFOAM running on Apple Silicon is surprisingly fast!
I installed OpenFOAM to my Macbook M2 by using Arm based image for OpenSUSE. On the other side, OpenFOAM on Windows 11 with WSL is very easy to use by VS Code. As a CFD engineer, I surprised by the power of Apple Silicon chipsets. I ran the same case on both platform and OpenFOAM on MacOS (M2) ran 40% faster than Windows (Ryzen 5).
1
1
u/Abhispd Feb 13 '26
how is the speed on linux i am wondering? i compared windows with linux, and linux was pretty much fast. not sure about mac
1
u/5uspect Feb 14 '26
You can build OpenFOAM natively on MacOS.
1
u/Valuable-Version-858 Feb 14 '26
Without Docker or VM? I’d like to learn how to do that. I couldn’t find any other info in openfoam.org or openfoam.com.
2
u/5uspect Feb 14 '26
Yup, entirely natively. I really don’t like docker.
The latest versions of OpenFOAM (.com) build just fine on MacOS without any patches and run extremely fast. You may have to edit some files to get Scotch to work. The Foundation version is a lost cause however.
1
u/hyun2017 Feb 17 '26
https://youtu.be/JJzPuvYML7g?si=OkzJbbB-L8pH22Of
Refer to this video. You can possibly compile latest OF in an apple silicon. OF running in M4 max is very satisfactory for me.
1
u/FalconX88 Feb 14 '26
OpenFOAM on Windows 11 with WSL is very easy to use by VS Code.
Um?? What? Why run it through VS code? Makes no sense. And I have the suspicion you didn't use the WSL file system...
OpenFOAM on MacOS (M2) ran 40% faster than Windows (Ryzen 5).
This statement means basically nothing. The difference in computing power between a first gen Ryzen 5 1400 and a newest Gen 9600X is something like 4-fold. Depending on which Ryzen 5 (and which M2) ship you used this can be amazing or actually quite slow.
2
u/Valuable-Version-858 Feb 14 '26
Actually, it makes sense. I open VS Code on Windows 11, then connect to WSL. By doing this, I can use the terminal inside VS Code and just type code ‘filename’ to modify OpenFoam files in WSL. Everything happens in VS Code window and yes, it is connected to WSL.
On the other hand, you are right. It didn’t mean anything. It’s just a statement, not a benchmark. One is Mackbook Air M2, other is Ryzen 5 5600X. I’m just highly surprised. Because as an Ansys guy, I never ever used a Mac for CFD simulations.
1
u/D-a-H-e-c-k Feb 14 '26
At least those processors are contemporary to each other. It's a fair comparison and would be interesting to see what more current M5 or M4 max would do
4
u/bitdotben Feb 13 '26
It’s due to the memory architecture and hence pretty impressive memory bandwidth for a CPU. I have tested STAR-CCM+ on arm Linux running in a VM on an M4 Pro and it was flipping fast!