Installation instructions, FOAM-extend 4.0 and 4.1, in Ubuntu 19 and 20

From OpenFOAMWiki
Fragment of a discussion from User talk:Tschenkel

Hello Hakan,

Yes, the package list may not be the minimum requirements. Some of it is there for other packages. E.g. the swak4foam that comes with 4.0 doesn't compile anymore on 20.04 (worked for 18.04). So I decided to use the upstream version for that, which requires bear and libreadline-dev.

Python: As far as I can see 4.0 will need Python2, 4.1 seems to need Python3 (would need to check). I usually install both, since I only use Python 2 for legacy reasons (as in this case). I have not tried to use python3-as-python, but that would most likely break pyFoam for 4.0.

I tried to set the instructions up in a way that they cover most bases, so there may be some packages that are not needed for one version, but for another. Unless they conflict, I left them in.

Compiler toolchain: I stick to the ones I know work. 4.0 did not compile with anything newer than gcc5, so I'll stick to that. 4.1 did cause problems on gcc8, so I reverted to back to gcc7. AFAIK these are also the ones that were used in the development, so are a safe bet.

I started writing these guides for my students and colleagues who have no experience in compiling, so tried to make them fool-proof. If you are experienced in administering a Linux system and compiling complex software packages, there is no harm in doing it differently.

BTW, you can also install pyFoam via pip, which will always pull in the correct version for your version of Python. I haven't included that in the guides, because I have not tested for conflicts, but do run it on a cluster.

Tschenkel (talk)14:05, 10 August 2020