CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums

OpenFOAM-v3.0+ installation in Ubuntu 16.04 LTS

Register Blogs Community New Posts Updated Threads Search

Rate this Entry

OpenFOAM-v3.0+ installation in Ubuntu 16.04 LTS

Posted October 30, 2016 at 18:50 by albertsk
Updated November 6, 2016 at 17:12 by albertsk

This blog is to show how to install OpenFOAM-v3.0+ on Ubuntu 16.04 LTS. There are some issues that should be resolved before the installation. So far, default compilers installed in Ubuntu, gcc and openmpi, are used. Compilation of OpenFOAM-v3.0+ using Intel compilers is on-going.

After you unzip the package OpenFOAM-v3.0+.tgz under ~/OpenFOAM, go to the directory
Code:
cd OpenFOAM-v3.0+
open the following file
Code:
emacs src/postProcessing/functionObjects/Allwmake
, and comment out the last line:
Code:
# ./graphics/Allwmake
Open the following files

Code:
emacs $WM_PROJECT_DIR/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L
emacs  $WM_PROJECT_DIR/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L
emacs $WM_PROJECT_DIR/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L
emacs $WM_PROJECT_DIR/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L
emacs $WM_PROJECT_DIR/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L
In each file above, make changes
from
Code:
#if YY_FLEX_SUBMINOR_VERSION < 34
extern &quot;C&quot; int yywrap()
#else
int yyFlexLexer::yywrap()
#endif
to
Code:
// #if YY_FLEX_SUBMINOR_VERSION < 34
// extern &quot;C&quot; int yywrap()
// #else
int yyFlexLexer::yywrap()
// #endif
Set up the compilation environment
Code:
source ~/OpenFOAM/OpenFOAM-v3.0+/etc/bashrc
echo &quot; alias of30plus='source ~/OpenFOAM/OpenFOAM-v3.0+/etc/bashrc'&quot; >> $HOME/.bahsrc
Open ~/OpenFOAM/OpenFOAM-v3.0+/etc/config/CGAL.sh file, and change lines to
Code:
cgal_version=CGAL-4.8
boost_version=boost_1_61_0
and make it:
Code:
./Allwmake 2>&1 | tee log.Allwmake
Then, all the screen messages will be stored in log.Allwmake.
Posted in Uncategorized
Views 1313 Comments 0 Edit Tags Email Blog Entry
« Prev     Main     Next »
Total Comments 0

Comments

 

All times are GMT -4. The time now is 00:56.