OpenFOAM at Chalmers

Here you find some instructions on how to run OpenFOAM in a StuDat Linux computer lab at Chalmers (same for FoDat), how to run OpenFOAM remotely at Chalmers from some other computer, and some raw notes from the installation process at Chalmers if you ever need to do it yourself (it is mostly for me to remember).

1.     Logged in on a StuDat Linux computer at Chalmers

Open a fresh terminal window and copy-paste into it (do this only once!):

echo ". /chalmers/sw/unsup64/OpenFOAM/addToBashrc" >> $HOME/.bashrc

Close the terminal window and open a new one. Type (where <TAB> is the Tab key):

OF<TAB><TAB><TAB>

Now you can see which versions of OpenFOAM are available. Try finishing your command as:

OF16ext

Time to test by copy-pasting into the terminal window:

mkdir -p $FOAM_RUN
run
cp -r $FOAM_TUTORIALS/incompressible/icoFoam/cavity .
cd cavity
blockMesh
checkMesh
icoFoam

paraFoam

2.     Remote log-in
Run OpenFOAM remotely at Chalmers using ssh. If you can’t or don't want to install Linux on your laptop, you should be able to install openssh (http://www.openssh.com/) or putty (http://www.chiark.greenend.org.uk/~sgtatham/putty/) in combination with Cygwin/X, X-Win32, or Exceed, so that you can do an ssh to a Linux computer. Then you can run OpenFOAM remotely through our wireless network. I haven't set up this in Windows or Macintosh myself, so for that part you are on your own (in Linux it is extremely easy). Make sure that you are able to open a terminal window on the remote computer, and that you can open a graphical window on that computer (test by typing "xlogo" in the remote terminal window for instance). This is called "X11 forwarding", if you are searching for instructions on how to make it work. From a Linux machine you log in remotely to the student computers using either of (<CID> should be replaced by your Chalmers user name)

ssh -XY -l <CID> remote1.student.chalmers.se
ssh -XY -l <CID> remote2.student.chalmers.se
ssh -XY -l <CID> remote3.student.chalmers.se
ssh -XY -l <CID> remote4.student.chalmers.se
ssh -XY -l <CID> remote5.student.chalmers.se

Test that you can open a graphical window:

xlogo

do CTRL-C in the terminal window to kill the process.

When you are doing a remote login at Chalmers, it is the $HOME/.profile file that is sourced, so we also make sure that everything is set up correctly when logging in remotely, by making a soft link:

          ln -s $HOME/.bashrc $HOME/.profile

Now, follow the instructions above, for when you are physically logged in at Chalmers, acknowledging that opening a new terminal window now means doing a new ssh. If you already did the “echo” part above, don’t do it again.