Installation/swak4Foam/Installing On/Ubuntu

From OpenFOAMWiki
< Installation‎ | swak4Foam‎ | Installing On
Revision as of 12:34, 22 March 2014 by Wyldckat (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

1 Introduction

This page is dedicated to explaining how to install swak4Foam in Ubuntu.

If you do not yet feel comfortable using Linux, then perhaps you better first read the page Working with the Shell and train a bit with the shell/terminal environments, so you can have a better perception of the steps shown below.


2 Copy-Paste steps

A few notes before you start copy-pasting:

  1. Lines that start with # don't have to be copy-pasted. They are just comments to let you know what's going on.
  2. One wrong character is enough for breaking this guide, so make sure you can read the characters properly or that the installed language system does not break the copied characters!


2.1 Ubuntu 12.04

Discussion thread where you can ask questions about these steps: None available at the moment.

Note: The following instructions have only been tested in Ubuntu 12.04 x86_64. Steps:

  1. Install the necessary packages:
    sudo apt-get install build-essential bison flex
  2. Go into a good working folder. For example, $HOME/OpenFOAM/$USER-$WM_PROJECT_VERSION:
    mkdir -p $FOAM_RUN
    cd "$HOME/OpenFOAM/$USER-$WM_PROJECT_VERSION"
  3. Now, to download swak4Foam, there are several versions and sources from which you can download... TODO
  4. Now let's build swak4Foam:
    #Go into swak4Foam's main source folder
    cd swak4Foam
     
    # This next command will take a while...
    ./Allwmake > make.log 2>&1
     
    #Run it a second time for getting a summary of the installation
    ./Allwmake > make.log 2>&1
  5. TODO: give link to page that explains how to figure out what means what.
  6. One way to check if the installation of swak4Foam went well, is to check the version by simply entering:
    funkySetFields

    This ends with an error message, but below the usual OpenFOAM-banner you find the version of swak4Foam and the release date. If there is no swak-version then the installation is older than 0.2.0 (the first version to have this banner).

    On the other hand, if it only shows a message stating:

    funkySetFields: command not found

    then that means that it did not build as intended. If this is the case, then check the instructions in the next step.

  7. The other way to check if everything went well, is to look at the contents of the file "make.log". You can edit the file to check if there are any error messages, e.g. by running:
    gedit make.log

    The output can be a bit difficult to understand, but in swak4Foam's case, there are two ,

    #Create a tarball in case you've seen any errors (it's the first error that matters)
    #or if you don't understand the output
    #and attach the file "make.log.tar.gz" to a post in the designated thread
    tar -czf make.log.tar.gz make.log

Discussion thread where you can ask questions about these steps: None available at the moment.