CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] Install OpenFOAM-2.4.0 in Ubuntu 18.04? (https://www.cfd-online.com/Forums/openfoam-installation/217507-install-openfoam-2-4-0-ubuntu-18-04-a.html)

luckyraymond May 15, 2019 04:04

Install OpenFOAM-2.4.0 in Ubuntu 18.04?
 
Hi All,

Did anyone install OpenFOAM-2.4.0 successfully in Ubuntu 18..04?

Instructions for OpenFOAM-2.3.0 are posted in Wiki, but not for OpenFOAM-2.4.0.

In the OpenFOAM-2.4.0 installation Wiki, the latest post is for Ubuntu 16.04, which I tried to follow but did not work for Ubuntu 18.04.

mattiaricci13 May 15, 2019 06:41

Dear luckyraymond,

why do you need that version in place of a more recent one?

alexeym May 15, 2019 10:28

Hi,

Could you elaborate about "I tried to follow but did not work"? At what stage did you fail?

wyldckat May 16, 2019 19:41

Quick answers:
  1. Following the instructions that were meant for OpenFOAM 2.3.1 on Ubuntu 18.04 from openfoamwiki.net would have worked...
  2. So that's what I've done just now, copy-paste-adapted those instructions to OpenFOAM 2.4.0 on Ubuntu 18.04: https://openfoamwiki.net/index.php/I...u#Ubuntu_18.04
@luckyraymond: Please let me know if these instructions work or not.

luckyraymond May 17, 2019 03:53

Quote:

Originally Posted by wyldckat (Post 733882)
Quick answers:
  1. Following the instructions that were meant for OpenFOAM 2.3.1 on Ubuntu 18.04 from openfoamwiki.net would have worked...
  2. So that's what I've done just now, copy-paste-adapted those instructions to OpenFOAM 2.4.0 on Ubuntu 18.04: https://openfoamwiki.net/index.php/I...u#Ubuntu_18.04
@luckyraymond: Please let me know if these instructions work or not.

Hi wyldckat,

Thank you for helping!
I tried your new post. It seems that CGAL version should be fixed to 4.6 instead of 4.3?

== Generating build files ==
Configuring libCGAL
-- Requested component: MPFR
-- Requested component: GMP
libCGAL is configured
-- Sources for CGAL component library 'CGAL_Core/CMakeLists.txt' detected
CMake Error at src/CMakeLists.txt:81 (add_subdirectory):
add_subdirectory given source
"/home/ubuntu/OpenFOAM/ThirdParty-2.4.0/CGAL-4.6/src/CGAL_Core/CMakeLists.txt"
which is not an existing directory.
Call Stack (most recent call first):
src/CMakeLists.txt:140 (configure_component)

wyldckat May 18, 2019 14:04

Quick answer: Yes, you're correct, I didn't remember that the CGAL version being used had changed. I've corrected the wiki page. Here are the commands you need to run in order to fix this:
Code:

of240
foam
sed -i -e 's/\(cgal_version=\)CGAL-4.6/\1cgal-system/' etc/config/CGAL.sh
of240

Then continue from step #10.

edit: The log file will then indicate this:
Code:

Build CGAL
    optional component was not found

which is fine, because the system's CGAL version is being used instead of 4.6.

wangchengan2003 August 7, 2021 04:40

Hello Bruno,
If the instructions in "https://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-2.4.0/Ubuntu#Ubuntu_18.04" is suitable for OpenFOAM-2.4.0 in Ubuntu_20.04?


I meet the problems and failed. I attach the log file below.


https://www.cfd-online.com/Forums/op...tu-20-4-a.html

wangchengan2003 August 7, 2021 05:21

1 Attachment(s)
Quote:

Originally Posted by luckyraymond (Post 733919)
Hi wyldckat,

Thank you for helping!
I tried your new post. It seems that CGAL version should be fixed to 4.6 instead of 4.3?

== Generating build files ==
Configuring libCGAL
-- Requested component: MPFR
-- Requested component: GMP
libCGAL is configured
-- Sources for CGAL component library 'CGAL_Core/CMakeLists.txt' detected
CMake Error at src/CMakeLists.txt:81 (add_subdirectory):
add_subdirectory given source
"/home/ubuntu/OpenFOAM/ThirdParty-2.4.0/CGAL-4.6/src/CGAL_Core/CMakeLists.txt"
which is not an existing directory.
Call Stack (most recent call first):
src/CMakeLists.txt:140 (configure_component)

Quote:

Originally Posted by wyldckat (Post 733882)
Quick answers:
  1. Following the instructions that were meant for OpenFOAM 2.3.1 on Ubuntu 18.04 from openfoamwiki.net would have worked...
  2. So that's what I've done just now, copy-paste-adapted those instructions to OpenFOAM 2.4.0 on Ubuntu 18.04: https://openfoamwiki.net/index.php/I...u#Ubuntu_18.04
@luckyraymond: Please let me know if these instructions work or not.

Quote:

Originally Posted by wyldckat (Post 734063)
Quick answer: Yes, you're correct, I didn't remember that the CGAL version being used had changed. I've corrected the wiki page. Here are the commands you need to run in order to fix this:
Code:

of240
foam
sed -i -e 's/\(cgal_version=\)CGAL-4.6/\1cgal-system/' etc/config/CGAL.sh
of240

Then continue from step #10.

edit: The log file will then indicate this:
Code:

Build CGAL
    optional component was not found

which is fine, because the system's CGAL version is being used instead of 4.6.


Hello Bruno,

This is the log file when I use instructions from :https://openfoamwiki.net/index.php/I...u#Ubuntu_18.04

jaymeen721 April 22, 2023 06:11

OpenFoam 2.4.0 with Ubuntu 22.04
 
Can anyone help me in same thread for installing OF 2.4.0 over ubuntu 22.04?


Thanks

olesen April 24, 2023 12:29

Quote:

Originally Posted by jaymeen721 (Post 848603)
Can anyone help me in same thread for installing OF 2.4.0 over ubuntu 22.04?


Thanks


OpenFOAM-2.4.0 in now almost 8 years old (was released in 2015) and there have been numerous improvements in compilers and tightening of the standard since then, both of which have necessitated corresponding code changes.
Thus there are a large number of things that would need to be adjusted to get it working with the system compilers on Ubuntu 22.04.

hconel April 26, 2023 14:26

Quote:

Originally Posted by jaymeen721 (Post 848603)
Can anyone help me in same thread for installing OF 2.4.0 over ubuntu 22.04?


Thanks

I strongly suggest installing some older Ubuntu version (e.g. 18.04) if you want to use OpenFOAM 2.4.0.


All times are GMT -4. The time now is 04:14.