CFD

In­stall Open­FO­AM and Pa­ra­view on AR­M64

• Bookmarks: 174 • Comments: 4


In this tu­to­ri­al we will com­pi­le Open­Fo­am from Sour­ce on a Mac with M1 Si­li­con Chip (AR­M64) and get a com­ple­te CFD en­vi­ron­ment with Open­FO­AM and Pa­ra­view in a vir­tua­li­zed De­bi­an 11 ARM Con­tai­ner with Par­al­lels Desk­top. (You need to have a fresh De­bi­an 11 with xf­ce4 Desk­top in Par­al­lels Desk­top al­re­a­dy set up!)

1. Re­qui­re­ments

First we need to in­stall some re­qui­re­ments on a blank De­bi­an 11 Sys­tem with xf­ce4 Desk­top:

https://​de­ve­lop.open­fo­am.com/​De­ve­lop­ment/​open­fo­am/blob/de­ve­lop/​doc/​Re­qui­re­ments.md

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 in­stall the Park­view-Dev Pa­cka­ge some more De­pen­den­cies will be in­stal­led au­to­ma­ti­cal­ly

sudo apt install paraview-dev

2. Com­pi­le Open­FO­AM from Sour­ce

Now we need to down­load the zip or tgz pa­cka­ge for Open­FO­AM and the „Third Par­ty“ pa­cka­ge:

https://​de­ve­lop.open­fo­am.com/​De­ve­lop­ment/​open­fo­am/​blob/​de­ve­lop/​doc/​Build.md 

Sour­ce: https://​dl.open­fo­am.com/​sour­ce/​v2112/​Open­FO­AM-v2112.tgz

Third­Par­ty: https://​dl.open­fo­am.com/​sour­ce/​v2112/​Third­Par­ty-v2112.tgz

Now we crea­te a new „open­fo­am“ (small let­ters) fol­der in the users-fol­der (root in this ex­amp­le) and extract both files in­si­de the new crea­ted fol­der.

If you in­stal­led in the fol­der /root/​open­fo­am/​Open­FO­AM you need to „Sour­ce“ the bash file, so that the Ter­mi­nal will „un­der­stand“ the Open­FO­AM com­man­ds:

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

Now you can use the fol­lo­wing com­man­ds to check the in­stal­la­ti­on, jump into the pro­per di­rec­to­ry and start the Com­pi­ling Pro­zess:

foamSystemCheck
foam
./Allwmake -s -l

(This can now take about 3 hours, be pa­ti­ent!)

If you get an er­ror whi­le com­pi­ling, in­crea­se the RAM of your VM (I had to in­crea­se from 4 to 8GB)

3. Test with a Tu­to­ri­al case

Af­ter some hours you can test your in­stal­la­ti­on with a Tu­to­ri­al case. If you used the same fol­ders that I used be­fo­re, then you can just copy&pas­te the fol­lo­wing to get the case „pitz­Dai­ly“ run­ning:

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

I would sug­gest to crea­te some Short­cuts on your Desk­top for the most used fol­ders, be­cau­se the file struc­tu­re of Open­FO­AM can be dif­fi­cult to re­mem­ber for be­gin­ners:

Re­mem­ber:

Every time you start Open­FO­AM you need to „sour­ce“ the bash file first, to make com­man­ds like block­Me­sh, sim­ple­Fo­am or par­a­Fo­am work! 

(Tipp: I crea­ted a Text­file whe­re I have my most used com­man­ds for la­ter work)

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

Hap­py FOA­Ming!

174 recommended
4 comments
4 notes
1471 views

Write a comment...

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