Building and installing OpenFOAM® 2.3.0 on Ubuntu 14.04 from source

Video ready, click here to close ×


beginner friendly tutorial on how to compile and install OpenFOAM 2.3.0 on Ubuntu 14.04 from source

Some useful links:

OpenFOAM
http://www.openfoam.com/

OpenFOAM wiki
http://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-2.3.0/Ubuntu

source

32 comments

  • I want to install OpenFOAM 4 on Ubuntu 14.04, as OpenFOAM itself says it is compatible but I have to install it manually( as your video explains), but can't I just simply change the repository for OpenFOAM in Ubuntu? And then install it by sudo apt-get install OpenFOAM?

  • at the moment I check the installation I get the next a problem in the thirdparty software. Can you help me pelase.

    in your video is at 8:37

    Third party software
    ——————————————————————————-
    Software Version Location
    ——————————————————————————-
    flex
    gcc 6.2.0 /usr/bin/gcc
    gzip 1.6 /bin/gzip
    tar 1.29 /bin/tar
    icoFoam
    WARNING: Conflicting installations:
    OpenFOAM settings : /home/ubuntu/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/bin/icoFoam
    current path :
    CRITICAL ERROR

    ——————————————————————————-

    Summary
    ——————————————————————————-
    Base configuration ok.
    The foam installation contains 1 critical error(s).

    Review the output for warning messages and consult
    the installation guide for troubleshooting.

    Done

  • Please help. I have spent 3 days trying to install this and now it shows: "The foam installation contains 1 critical error(s)" in the last step. Any of the tutorials work and the error that shows when "paraFoam" command is run says: "No proxy that matches: group= and proxy= were found." Any ideas? Please! Thank you so much!

  • After pasting the first command in terminal.. we get that [Y/n] prompt .. There when I hit Y and click enter, its saying abort.
    Can you please guide me to resolve it. Thanks

  • My first installation of OpenFoam and it went quite smoothly than I was told…thanks man. Good job!

  • Thanks a lot my dear friend! After 3 days of work I could finally installed OpenFoam. I really appreciate this video. I am quite new and It was very useful.

  • You saved me countless hours of trying to figure all of this out, thank you.

  • hi, im follow all your steps in Debian Jessie and tried run the motorbike example, but when i execute the line paraFoam it's show this error message:
    FATAL ERROR: Paraview reader module libraries do not exist

    i don't know what to do…

  • Hey, got a small problem.

    After pasting the first command in terminal.. we get that [Y/n] prompt right.. There when I hit Y and click enter, its saying abort.
    Can you tell me what am I doing wrong? Im new to ubuntu and the command line. Please guide me here. Thanks

  • Thank you, it was very useful to me.
    God bless you !!!

  • Hi,
    I trird installing the OPRENFOAM 2.4 on my note bool which runs on Lubuntu and i found one critical error,
    i am pasting the log file output. Can you please help me sorting out this problem.

    Checking basic setup…
    ——————————————————————————-
    Shell:              bash
    Host:               netbook
    OS:                 Linux version 3.4.5
    ——————————————————————————-

    Checking main OpenFOAM env variables…
    ——————————————————————————-
    Environment_variable Set_to_file_or_directory                Valid      Crit
    ——————————————————————————-
    $WM_PROJECT_INST_DIR /home/student/OpenFOAM                   yes       yes
    $WM_PROJECT_USER_DIR /home/student/OpenFOAM/student-2.4.0     yes       no
    $WM_THIRD_PARTY_DIR  /home/student/OpenFOAM/ThirdParty-2.4.0  yes       yes
    ——————————————————————————-

    Checking the OpenFOAM env variables set on the PATH…
    ——————————————————————————-
    Environment_variable Set_to_file_or_directory                Valid Path Crit
    ——————————————————————————-
    $WM_PROJECT_DIR      /home/student/OpenFOAM/OpenFOAM-2.4.0    yes  yes  yes

    $FOAM_APPBIN         ….4.0/platforms/linuxARM7GccDPOpt/bin  no        yes
    $FOAM_SITE_APPBIN    ….4.0/platforms/linuxARM7GccDPOpt/bin  no        no
    $FOAM_USER_APPBIN    ….4.0/platforms/linuxARM7GccDPOpt/bin  no        no
    $WM_DIR              …tudent/OpenFOAM/OpenFOAM-2.4.0/wmake  yes  yes  yes
    ——————————————————————————-

    Checking the OpenFOAM env variables set on the LD_LIBRARY_PATH…
    ——————————————————————————-
    Environment_variable Set_to_file_or_directory                Valid Path Crit
    ——————————————————————————-
    $FOAM_LIBBIN         ….4.0/platforms/linuxARM7GccDPOpt/lib  no        yes
    $FOAM_SITE_LIBBIN    ….4.0/platforms/linuxARM7GccDPOpt/lib  no        no
    $FOAM_USER_LIBBIN    ….4.0/platforms/linuxARM7GccDPOpt/lib  no        no
    $MPI_ARCH_PATH       /usr/lib/openmpi                         yes  yes  yes
    ——————————————————————————-

    Third party software
    ——————————————————————————-
    Software Version   Location
    ——————————————————————————-
    flex     2.5.35    /usr/bin/flex                                            
    gcc      4.8.4     /usr/bin/gcc                                             
    g++      4.8.4     /usr/bin/g++                                             
    gzip     1.6       /bin/gzip                                                
    tar      1.27.1    /bin/tar                                                 
    icoFoam           
    WARNING:  Conflicting installations:
              OpenFOAM settings        : /home/student/OpenFOAM/OpenFOAM-2.4.0/platforms/linuxARM7GccDPOpt/bin/icoFoam
              current path             :
              CRITICAL ERROR

    ——————————————————————————-

    Summary
    ——————————————————————————-
    Base configuration ok.
    The foam installation contains 1 critical error(s).

    Review the output for warning messages and consult
    the installation guide for troubleshooting.

    Done

  • very good video!!!! thank you very much

  • i want to have open foam in windows can you please help me?

  • Thank you so much for this helpful video. it is perfect.
    I would also like to give a comment for Avinash Chaudhary if it is helpful: I think the problem is that if the directory name created is different from the standard name of the directory 'OpenFOAM' the file can't be accessible, so it will be important to write the exact Upper and Lower case letters of the name of the directory- 'OpenFOAM' not 'OpenFoam' or something different. #BestVideo

  • great video sir thanks a lot.

    It is like watching KennyS walking people through the steps…

  • Great job thanks

    Can make you tutorial about installing foam-extend 3.1 on Ubuntu 14.04. I tried to install it, but without success.
     

  • Great tutorial how to install Ubuntu!
    It works perfectly!
    Really nice job! Thanks!

  • Hey! thanks for nice tutorials. I have installed OF2.3.1 on ubuntu 14.04LTS by the help of this tutorials,…..
    I have followed all the steps as you mentioned here and OF works fine.

    But there is problem, when I open a terminal following error shows:

    cc: error: unrecognized command line option ‘–showme:link’

    I have checked here (http://www.openfoam.org/download/ubuntu.php) under INSTALLATION PROBLEM.

    when I ran the command: sudo update-alternatives –list mpi  in the terminal following appeard

    /usr/include/lam
    /usr/include/mpich

    Then according to suggestion of the link given above: when I ran the command
    sudo update-alternatives –set mpi /usr/lib/openmpi/include

    following error appeard

    update-alternatives: error: alternative /usr/lib/openmpi/include for mpi not registered; not setting

  • hey sharial you are doing a very good work, i came accros an error white installing open foam Ubuntu Deb Pack Installation, where it says " bash: sudo:: command not found ". how can i fix this ?

  • I am facing a  problem when i type . .bashrc
    it shows
    bash: /home/avinash/OpenFOAM/OpenFOAM-2.3.1/etc/bashrc: No such file or directory
    Hoping to give me a solution for the same

  • Thank you so much for saving me (& the world!) so much time uploading OF into Ubuntu.

    I was able to follow your instructions precisely, except for the part where the bashrc line from OpenFoam website was added to the bashrc text in ubuntu. I struggled to get that right. But eventually it seemed to work. Until I completed the install and found the following problem. Do I have to start from the beginning again?

    icoFoam
    WARNING: Conflicting installations:
                      OpenFOAM settings   : /home/niall/OpenFOAM/OpenFoam-2.3.0/platforms/linux64GccDPOpt/bin/icoFoam
                     current path
                      CRITICAL ERROR  

    ———————————
    Summary
    ————————————
    Base Configuration OK
    the foam installation contains 1 critical error

    review the output for warning messages and consult the installation guide for troubleshooting.

    done

  • Thanks on the video! Although I have problem and looking for solution.
    When I type . .bashrc, I get information bash: /home/berin/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc: No such file or directory.
    Same thing is when I type  . /home/berin/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc

    So terminal keeps telling me that there is no bashrc on that adress. Still I can find file in those folder, home/OpenFOAM/OpenFOAM-2.3.0/etc

    Looking forward for answer, thanks a lot.
    Best Regards,
    Berin

  • Thanks a lot for sharing such good information. It indeed makes life a lot easier for ubuntu 14.04 users.

  • IS this applicable for Ubuntu 12.04 too?

  • Man, I just wanted to thank you for the great explanation.

  • I have a trouble when I try install paraFoam. Using command: ./makeParaView4 next error appears:

    * Error: Qt version provided < 4.5
    *     Please use the -qmake option to specify the location of a version of Qt >= 4.3
    *     e.g.
    *         -qmake /usr/local/qt-4.6.2/bin/qmake
    *         -qmake /home/usuario/OpenFOAM/ThirdParty-2.3.0/platforms/linux64Gcc/qt-4.6.2/bin/qmake

    QT version is "3.0.1 Based on Qt 5.2.1 (GCC 4.8.2, 64 bit)". I don't know what to do!. Thanks!

  • The paraView from the openFoam website has python disabled by default. to enable paraFoam filters like pythonAnnotation, install the python, python-dev and python-pynum packages, change the lines in makeParaview4 to: withPYTHON=true
    PYTHON_LIBRARY="/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0", before running makeParaview4.

  • please can you tell me how long does the whole installation take? i am in the last stage and the programme has been running for more than 2 hours and i am a bit worried if i put my computer on sleep and run it again will it work? can some one please reply if you are online right now?

  • thank you so much for this tutorial! that is awesome!!! …after 3 attempts I have finally installed OpenFOAM on my pc! 

  • thx alot finally everything works fine!

Leave a Reply

Your email address will not be published. Required fields are marked *