|
[Sponsors] |
[OpenFOAM.org] Installing OpenFOAM 2.3 on Ubuntu 18.04 |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Youssef Bestavros
Join Date: Jun 2018
Posts: 1
Rep Power: 0 ![]() |
Hi guys,
I am fairly new to OpenFOAM and I just started a research project with my university. I took on a project that uses OpenFOAM to simulate some fluid dynamics. The previous student who worked on this used OpenFOAM 2.3 along with some python wrapper to generate the necessary 0, constant, system files,etc. I am just wondering if there is a way to install OpenFOAM 2.3 on my Ubuntu 18.04 ? All the tutorial that I found work for older versions of Ubuntu like 16.04 and older. I even tried those and as expected, they did not work... Thanks ! |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
James Wright
Join Date: Oct 2015
Posts: 40
Rep Power: 10 ![]() |
I've been able to get the OpenFOAM working on Ubuntu 18.04 via the Docker fine. That's with 1712 (I'm not sure what the conversion from the X.X version system to the XXXX versioning system is), though you can probably find a Docker with the version you're looking for?
I'm as much of a newbie (probably more) as you are, so I might be steering you in the wrong direction, but I figured I'd let you know that I've gotten OF to work on 18.04. |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Jiaui Zhang
Join Date: Aug 2018
Location: Changsha, China
Posts: 17
Rep Power: 8 ![]() |
I am working on it, but it does not work yet. :-(
|
|
![]() |
![]() |
![]() |
![]() |
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 ![]() ![]() ![]() ![]() ![]() ![]() |
Greetings to all!
Sorry for the late reply, but I simply was not able to look into the forum questions until now. Please find the requested installation instructions here: https://openfoamwiki.net/index.php/I...u#Ubuntu_18.04 Best regards, Bruno
__________________
|
|
![]() |
![]() |
![]() |
![]() |
#5 | |
New Member
Jiaui Zhang
Join Date: Aug 2018
Location: Changsha, China
Posts: 17
Rep Power: 8 ![]() |
Thank you for your time.
I have tried this method, but failed to compile the of 2.3.1 on Ubuntu 18.04. The log is attached ( since the file size is too big, only the beginning is uploadded) Quote:
I have tried this method, but failed to compile the of 2.3.1 on Ubuntu 18.04. The log is attached ( since the file size is too big, only the beginning is uploadded) |
||
![]() |
![]() |
![]() |
![]() |
#6 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 ![]() ![]() ![]() ![]() ![]() ![]() |
Quick post:
|
|
![]() |
![]() |
![]() |
![]() |
#7 | |
New Member
Jiaui Zhang
Join Date: Aug 2018
Location: Changsha, China
Posts: 17
Rep Power: 8 ![]() |
Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#8 | |
New Member
Jiaui Zhang
Join Date: Aug 2018
Location: Changsha, China
Posts: 17
Rep Power: 8 ![]() |
Quote:
To modify src/conversion/ensight/part/ensightPart.H After line 63 Code:
// Static data memebers static const List<word> elemTypes_; Code:
// wrapper for isnan, namely C99 or C++11 inline bool isnan(const scalar value) const { #ifndef isnan return std::isnan(value); #else return ::isnan(value); #endif } |
||
![]() |
![]() |
![]() |
![]() |
#9 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 ![]() ![]() ![]() ![]() ![]() ![]() |
Greetings charryzzz,
The fix you proposed for "isnan" would not solve this issue as indicated in the log files: Code:
gcc -m32 -Wall -O3 -fPIC dirToString.c -o /home/charry/OpenFOAM/OpenFOAM-2.3.1/wmake/platforms/linuxGcc/dirToString In file included from dirToString.c:43:0: /usr/include/stdio.h:27:36: fatal error: bits/libc-header-start.h: No such file or directory #include <bits/libc-header-start.h> The problem was that since I had written this: Code:
export WM_CC='gcc-5' export WM_CXX='g++-5' source $HOME/OpenFOAM/OpenFOAM-2.3.1/etc/bashrc WM_NCOMPPROCS=4 WM_MPLIB=SYSTEMOPENMPI Code:
export WM_CC='gcc' export WM_CXX='g++' Code:
source $HOME/OpenFOAM/OpenFOAM-2.3.1/etc/bashrc WM_NCOMPPROCS=4 WM_MPLIB=SYSTEMOPENMPI export WM_CC='gcc-5' export WM_CXX='g++-5' As for the fix you proposed, my guess is that you had started a new terminal and ran of231. This means that the following command was called when you started a new terminal: Code:
source $HOME/OpenFOAM/OpenFOAM-2.3.1/etc/bashrc WM_NCOMPPROCS=4 WM_MPLIB=SYSTEMOPENMPI; export WM_CC=gcc-5; export WM_CXX=g++-5 However, I'm not certain why you needed the fix for "isnan", because the library inside which you made that change, did not require that fix in the test build that I did while writing the instructions. That fix would only have been necessary if g++ 7 (part of GCC) was being used, which in the second build attempt that you did, I believe you were already using g++ 5. For example, in the log file of my build, I got this: Code:
SOURCE=ensight/part/ensightPart.C ; g++-5 -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/ofuser/OpenFOAM/OpenFOAM-2.3.1/src/fileFormats/lnInclude -I/home/ofuser/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude -I/home/ofuser/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude -IlnInclude -I. -I/home/ofuser/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude -I/home/ofuser/OpenFOAM/OpenFOAM-2.3.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/ensightPart.o Code:
SOURCE=ensight/part/ensightPart.C ; g++-5 Only when I replace g++-5 with g++, do I get this error: Code:
ensight/part/ensightPart.C: In member function ‘bool Foam::ensightPart::isFieldDefined(const Foam::List<double>&) const’: ensight/part/ensightPart.C:54:39: error: ‘isnan’ was not declared in this scope if (id >= field.size() || isnan(field[id])) ^~~~~ Best regards, Bruno
__________________
|
|
![]() |
![]() |
![]() |
![]() |
#10 |
New Member
Jiaui Zhang
Join Date: Aug 2018
Location: Changsha, China
Posts: 17
Rep Power: 8 ![]() |
Greetings Bruno
You are right! I have installed openfoam 2.3.1 on ubuntu 18.04 successfully according to your newest instructions. Thank you :-) |
|
![]() |
![]() |
![]() |
![]() |
#11 |
Senior Member
Daniel
Join Date: Mar 2013
Location: Noshahr, Iran
Posts: 348
Rep Power: 21 ![]() |
I have compiled OpenFOAM 2.3.0 including paraview 4.1.0 successfully on the Ubuntu 18.04 based on the instruction provided for the 16.04! just needed to install gcc 5.5 accroding to this guide: (side by side with gcc 7.3 and selecting gcc5 before compiling)
https://gist.github.com/application2...cf9f56315a2d91 also needed to add these two lines in Make/options to get foamyQuadMesh and foamyHexyMesh compiled: Code:
EXE_LIBS = \ $(CGAL_LIBS) \ -lextrude2DMesh \ -lextrudeModel \ -lcv2DMesh \ -lconformalVoronoiMesh \ -lmeshTools \ -lsurfMesh \ -ledgeMesh \ -ltriSurface \ -ldynamicMesh \ -ldecompositionMethods \ -L$(FOAM_LIBBIN)/dummy -lptscotchDecomp \ -lsampling \ -lpthread \ -lboost_thread \ -lfileFormats Last edited by Daniel_Khazaei; August 23, 2018 at 17:37. |
|
![]() |
![]() |
![]() |
![]() |
#12 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 ![]() ![]() ![]() ![]() ![]() ![]() |
Greetings Daniel,
Many thanks for sharing! Although now I am a bit confused... when did you start to try to build OpenFOAM 2.3.0 on Ubuntu 18.04? I ask this because I had added a section for it here https://openfoamwiki.net/index.php/I...u#Ubuntu_18.04 - on the 17th of August 2018... so perhaps you had started your build before that? Which leads me to the following question: Would it be preferable that I copy the complete instructions from the page for 2.3.1 to 2.3.0, instead of providing the wiki link? Best regards, Bruno |
|
![]() |
![]() |
![]() |
![]() |
#13 | ||
Senior Member
Daniel
Join Date: Mar 2013
Location: Noshahr, Iran
Posts: 348
Rep Power: 21 ![]() |
Quote:
I have compiled it a month ago when I decided to upgrade to ubuntu 18.04 from 16.04! The first reasonable thing to do was to follow 16.04 instruction step by step and it didn't failed me... after the step involving the installation of the necessary packages, I did as follow: Code:
sudo apt-get update sudo apt-get install gcc-snapshot -y sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7 sudo apt-get install gcc-5 g++-5 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5 Code:
sudo update-alternatives --config gcc Code:
sudo apt-get install qt4-default Code:
alias selectGCC='sudo update-alternatives --config gcc' alias selectQt4='sudo apt-get install qt4-default' alias selectQt5='sudo apt-get install qt5-default' Quote:
I can only confirm that the instruction for 16.04 in this page: https://openfoamwiki.net/index.php/I...M-2.3.0/Ubuntu is completely applicable to 18.04 with the above mentioned modifications! Furthermore, the instruction for swak4Foam is also working on ubuntu 18.04: https://openfoamwiki.net/index.php/I...2.2.0_to_3.0.x Regards, Last edited by Daniel_Khazaei; August 23, 2018 at 21:23. |
|||
![]() |
![]() |
![]() |
![]() |
#14 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Daniel,
Many thanks for writing down the steps you've used! And I'm very glad that swak4Foam builds without problems with those instructions. I have a few improvement suggestions to the steps that you have:
Bruno |
|
![]() |
![]() |
![]() |
![]() |
#15 |
Member
|
I followed the guide of
https://openfoamwiki.net/index.php/I...u#Ubuntu_18.04 and successfully installed of230 and paraview on ubuntu18.04.5, without any issue, thanks a lot!! |
|
![]() |
![]() |
![]() |
![]() |
#16 |
Member
|
Dear Bruno,
Have you tried to install openfoam 2.3 on ubuntu 20.04? I follow wiki https://openfoamwiki.net/index.php/I...u#Ubuntu_18.04 But it does not work. Could you give me some ideas? Best regards, Chengan |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Looking for instructions/suggestions on installing Ubuntu as 2nd OS for OpenFOAM | Alan Thomason | OpenFOAM Installation | 5 | September 9, 2015 16:52 |
[OpenFOAM.org] Problems installing OpenFOAM 2.3.0 on Ubuntu 12.04 | arieljeds | OpenFOAM Installation | 6 | August 19, 2015 07:39 |
Prolem installing OpenFOAM Ver 2.3.0 source in Ubuntu 13.1.0 on VMware | zandi | OpenFOAM Installation | 5 | March 31, 2014 03:57 |
Trouble installing OpenFoam 2.10 on Ubuntu 11.10 | LucasCG | OpenFOAM Installation | 17 | January 27, 2013 14:58 |
Trouble with installing OpenFOAM on Ubuntu | Milos | OpenFOAM Installation | 16 | November 16, 2009 02:44 |