Install OpenFOAM and Paraview on ARM64

• Bookmarks: 72 • Comments: 1

In this tutorial we will compile OpenFoam from Source on a Mac with M1 Silicon Chip (ARM64) and get a complete CFD environment with OpenFOAM and Paraview in a virtualized Debian 11 ARM Container with Parallels Desktop. (You need to have a fresh Debian 11 with xfce4 Desktop in Parallels Desktop already set up!)

1. Requirements

First we need to install some requirements on a blank Debian 11 System with xfce4 Desktop:

sudo apt-get update
sudo apt-get install build-essential autoconf autotools-dev cmake gawk gnuplot
sudo apt-get install flex libfl-dev libreadline-dev zlib1g-dev openmpi-bin libopenmpi-dev mpi-default-bin mpi-default-dev
sudo apt-get install libgmp-dev libmpfr-dev libmpc-dev

apt-get install libfftw3-dev libscotch-dev libptscotch-dev libboost-system-dev libboost-thread-dev libcgal-dev

If you install the Parkview-Dev Package some more Dependencies will be installed automatically

sudo apt install paraview-dev

2. Compile OpenFOAM from Source

Now we need to download the zip or tgz package for OpenFOAM and the „Third Party“ package:



Now we create a new „openfoam“ (small letters) folder in the users-folder (root in this example) and extract both files inside the new created folder.

If you installed in the folder /root/openfoam/OpenFOAM you need to „Source“ the bash file, so that the Terminal will „understand“ the OpenFOAM commands:

source ~/openfoam/OpenFOAM-v2112/etc/bashrc

Now you can use the following commands to check the installation, jump into the proper directory and start the Compiling Prozess:

./Allwmake -s -l

(This can now take about 3 hours, be patient!)

If you get an error while compiling, increase the RAM of your VM (I had to increase from 4 to 8GB)

3. Test with a Tutorial case

After some hours you can test your installation with a Tutorial case. If you used the same folders that I used before, then you can just copy&paste the following to get the case „pitzDaily“ running:

# Create the user "run" directory:
mkdir -p "$FOAM_RUN"
# Change to the user "run" directory:
# Copy tutorial
cp -r "$FOAM_TUTORIALS"/incompressible/simpleFoam/pitzDaily ./
# Run the tutorial
( cd pitzDaily && blockMesh && simpleFoam )

I would suggest to create some Shortcuts on your Desktop for the most used folders, because the file structure of OpenFOAM can be difficult to remember for beginners:


Every time you start OpenFOAM you need to „source“ the bash file first, to make commands like blockMesh, simpleFoam or paraFoam work!

(Tipp: I created a Textfile where I have my most used commands for later work)

source ~/openfoam/OpenFOAM-v2112/etc/bashrc

Happy FOAMing!

72 recommended
comments icon1 comment
1 notes
bookmark icon

Write a comment...

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.