SlideShare a Scribd company logo
1 of 22
Download to read offline
Source	
  pack	
  installa0on	
  of	
  OpenFOAM	
  
3.0.x	
  into	
  RHL	
Open	
  CAE	
  Local	
  Study	
  Mee0ng	
  
Y.	
  Takagi	
  
Jan.	
  16,	
  2016
Download	
  the	
  packages	
  from	
  the	
  official	
  website
Where	
  should	
  we	
  install?	
•  If	
  you	
  have	
  a	
  machine	
  only	
  for	
  OpenFOAM,	
  you	
  can	
  upgrade	
  
the	
  libraries	
  of	
  the	
  system.	
  
“Dependent	
  packages	
  required	
  for	
  RHEL	
  6.5	
  need	
  upda:ng	
  to	
  newer	
  
versions,	
  e.g.	
  Gcc	
  needs	
  upgrading	
  from	
  v4.4	
  to	
  v4.5+.	
  These	
  upgrades	
  
may	
  be	
  available	
  under	
  a	
  RHEL	
  support	
  subscrip:on.	
  If	
  not,	
  then	
  upgrades	
  
can	
  be	
  obtained	
  from	
  unofficial	
  repositories	
  using	
  the	
  following	
  
instruc:ons:	
  	
  ”	
  
•  If	
  you	
  do	
  not	
  want	
  to	
  upgrade	
  the	
  system	
  casually,	
  the	
  
compa0ble	
  soTwares/libraries	
  such	
  as	
  GCC	
  and	
  MPI	
  are	
  built	
  
in	
  the	
  local	
  ThirdParty	
  directory.	
  
Our	
  machine	
  environment	
•  OS:	
  CentOS	
  6.5	
  (64	
  bit)	
  
•  System	
  libraries:	
  
–  GCC	
  4.4.7	
  
–  cmake	
  2.6-­‐patch	
  4	
  
–  Qt	
  4.6.2	
  
•  Target	
  configura0on	
  of	
  OpenFOAM	
  
–  Version	
  3.0.x	
  
–  Main	
  solvers,	
  parallel	
  processing,	
  paraFoam	
  (ParaView	
  reader)	
  
–  Required	
  later	
  version	
  libraries	
  are	
  built	
  in	
  the	
  project	
  directory	
  
(ThirdParty	
  directory).	
  
Procedure	
  of	
  installa0on	
1.  Install	
  the	
  necessary	
  rpm	
  packages.	
  
2.  Download	
  the	
  source	
  packages	
  and	
  extract	
  them.	
  
3.  Edit	
  the	
  configura0on/sedng	
  files.	
  
4.  Compile	
  the	
  tools/libraries.	
  
5.  Allwmake	
  
6.  Test	
  (foamInstallationTest)	
  
7.  Compile	
  ParaView	
  and	
  its	
  reader.	
  
Install	
  the	
  rpm	
  packages	
  with	
  yum	
•  Necessary	
  packages:	
  
–  git,	
  gcc-­‐c++,	
  bison,	
  flex,	
  m4,	
  glibc-­‐devel,	
  glibc-­‐devel.i686,	
  zlib-­‐devel	
  
•  As	
  a	
  root,	
  type	
  the	
  yum	
  command:	
  
$ 	
  yum	
  install	
  gcc	
  gcc-­‐c++	
  bison	
  flex	
  m4	
  glibc-­‐devel	
  	
  	
  
	
  	
  glibc-­‐devel.i686	
  zlib-­‐devel	
  
Directory	
  configura0on	
•  Under	
  OpenFOAM-­‐3.0.x	
  
•  Under	
  ThirdParty-­‐3.0.x	
Allwmake	
  	
  README.html	
  	
  applica0ons/	
  	
  doc/	
  	
  plalorms/	
  	
  tutorials/	
  
COPYING	
  	
  	
  README.org	
  	
  	
  	
  	
  bin/	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  etc/	
  	
  	
  src/	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  wmake/	
  
Allclean 	
   	
   	
  cmake-­‐3.2.1/ 	
   	
  makeParaView4	
  
Allwmake	
   	
   	
  etc/	
   	
   	
   	
  makeQt	
  
AllwmakeLibccmio 	
   	
  gcc-­‐4.8.4/ 	
   	
  mpc-­‐1.0.1/	
  
CGAL-­‐4.7/ 	
   	
  gmp-­‐5.1.2/ 	
   	
  mpfr-­‐3.1.2/	
  
COPYING	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
   	
  makeCGAL 	
   	
  openmpi-­‐1.10.0/	
  
ParaView-­‐4.4.0/	
  	
  	
  	
   	
  makeCmake 	
  	
  
README.html	
   	
  makeGcc	
   	
   	
  plalorms/	
  
README.org 	
   	
  makeGperTools 	
  qt-­‐everywhere-­‐opensource-­‐src-­‐4.8.6/	
  
boost_1_58_0/ 	
  makeLLVM 	
   	
  scotch_6.0.3/	
  
build/ 	
   	
   	
  makeParaView	
  
Red: make by yourself
Blue: generated later
Download	
  the	
  source	
  packages	
  and	
  extract	
  them	
•  OpenFOAM	
  main	
  source	
  code:	
  
•  OpenFOAM	
  ThirdParty:	
  
•  Compiler	
  (GCC):	
  
$ 	
  git	
  clone	
  git://github.com/OpenFOAM/OpenFOAM-­‐3.0.x.git	
  
$ 	
  wget	
  http://downloads.sourceforge.net/foam/	
  	
  
	
  	
  ThirdParty-­‐3.0.1.tgz	
  
$ 	
  tar	
  zxvf	
  ThirdParty-­‐3.0.1.tgz	
  
$ 	
  ln	
  -­‐s	
  ThirdParty-­‐3.0.1	
  ThirdParty-­‐3.0.x	
  
$ 	
  cd	
  ThirdParty-­‐3.0.x	
  
$ 	
  wget	
  https://ftp.gnu.org/gnu/gcc/gcc-­‐4.8.4/	
  	
  	
  	
  	
  	
  	
  	
  	
  
gcc-­‐4.8.4.tar.gz	
  
$ 	
  tar	
  zxvf	
  gcc-­‐4.8.4.tar.gz	
  
Download	
  the	
  source	
  packages	
  and	
  extract	
  them	
•  Libraries	
  (gmp,	
  mpfr,	
  mpc)	
  	
  
$ 	
  wget	
  http://ftp.gnu.org/gnu/gmp/gmp-­‐5.1.2.tar.bz2	
  
$ 	
  tar	
  jxvf	
  gmp-­‐5.1.2.tar.bz2	
  
$ 	
  wget	
  http://ftp.gnu.org/gnu/mpfr/mpfr-­‐3.1.2.tar.gz	
  
$ 	
  tar	
  zxvf	
  mpfr-­‐3.1.2.tar.gz	
  
$ 	
  wget	
  http://ftp.gnu.org/gnu/mpc/mpc-­‐1.0.1.tar.gz	
  
$ 	
  tar	
  zxvf	
  mpc-­‐1.0.1.tar.gz	
  
Download	
  the	
  source	
  packages	
  and	
  extract	
  them	
•  OpenMPI:	
  
•  Scotch:	
  
•  Boost:	
  
•  Cmake:	
  	
  
$ 	
  wget	
  -­‐-­‐no-­‐check-­‐certificate	
  https://www.open-­‐mpi.org/	
  	
  
software/ompi/v1.10/downloads/openmpi-­‐1.10.0.tar.gz	
  
$ 	
  tar	
  zxvf	
  openmpi-­‐1.10.0.tar.gz	
  
$ 	
  wget	
  https://gforge.inria.fr/frs/download.php/	
  	
  	
  	
  	
  
file/34099/scotch_6.0.3.tar.gz	
  	
  
$ 	
  tar	
  zxvf	
  scotch_6.0.3.tar.gz	
  
$ 	
  wget	
  http://sourceforge.net/projects/boost/files/	
  	
  
boost/1.58.0/boost_1_58_0.tar.gz	
  
$ 	
  tar	
  zxvf	
  boost_1_58_0.tar.gz	
  
$ 	
  wget	
  -­‐-­‐no-­‐check-­‐certificate	
  https://cmake.org/files/	
  	
  	
  
v3.2/cmake-­‐3.2.1.tar.gz	
  
$ 	
  tar	
  zxvf	
  cmake-­‐3.2.1.tar.gz	
  
Download	
  the	
  source	
  packages	
  and	
  extract	
  them	
•  Qt	
  (qmake)	
  
	
  	
  If	
  you	
  do	
  not	
  need	
  ParaView,	
  this	
  package	
  is	
  unnecessary.	
$ 	
  wget	
  -­‐-­‐no-­‐check-­‐certificate	
  https://download.qt.io/	
  	
  
	
  archive/qt/4.8/4.8.6/qt-­‐everywhere-­‐opensource-­‐src-­‐4.8.6.tar.gz	
  
$ 	
  tar	
  zxvf	
  qt-­‐everywhere-­‐opensource-­‐src-­‐4.8.6.tar.gz	
  
Edit	
  the	
  configura0on/sedng	
  files	
•  Edit	
  OpenFOAM-­‐3.0.x	
  environment	
  file	
  
$ 	
  vi	
  ../OpenFOAM-­‐3.0.x/etc/bashrc	
  
#	
  Location	
  of	
  the	
  OpenFOAM	
  installation	
  
#	
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	
  
#	
  foamInstall=$HOME/$WM_PROJECT	
  
#	
  foamInstall=~$WM_PROJECT	
  
foamInstall=/opt/$WM_PROJECT	
  
#	
  foamInstall=/usr/local/$WM_PROJECT	
  
#-­‐	
  Compiler	
  location:	
  
#	
  	
  	
  	
  foamCompiler=	
  system	
  |	
  ThirdParty	
  (OpenFOAM)	
  
foamCompiler=ThirdParty	
  
Edit	
  the	
  configura0on/sedng	
  files	
$ 	
  vi	
  ../OpenFOAM-­‐3.0.x/etc/bashrc	
  
#-­‐	
  Label	
  size:	
  
#	
  	
  	
  	
  WM_LABEL_SIZE	
  =	
  32	
  |	
  64	
  
export	
  WM_LABEL_SIZE=64	
  
#-­‐	
  MPI	
  implementation:	
  
#	
  	
  	
  	
  WM_MPLIB	
  =	
  SYSTEMOPENMPI	
  |	
  OPENMPI	
  |	
  SYSTEMMPI	
  |	
  	
  
MPICH	
  |	
  MPICH-­‐GM	
  |	
  HPMPI	
  
#	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  |	
  MPI	
  |	
  QSMPI	
  |	
  SGIMPI	
  
export	
  WM_MPLIB=OPENMPI	
  
Edit	
  the	
  configura0on/sedng	
  files	
•  Edit	
  OpenFOAM-­‐3.0.x	
  compiler/libraries	
  sedng	
  file	
  
$ 	
  vi	
  ../OpenFOAM-­‐3.0.x/etc/config/settings.sh	
  
case	
  "${foamCompiler}"	
  in	
  
OpenFOAM	
  |	
  ThirdParty)	
  
	
  	
  	
  	
  case	
  "$WM_COMPILER"	
  in	
  
	
  	
  	
  	
  Gcc	
  |	
  Gcc48)	
  
	
  	
  	
  	
  	
  	
  	
  	
  gcc_version=gcc-­‐4.8.4	
  
	
  	
  	
  	
  	
  	
  	
  	
  gmp_version=gmp-­‐5.1.2	
  
	
  	
  	
  	
  	
  	
  	
  	
  mpfr_version=mpfr-­‐3.1.2	
  
	
  	
  	
  	
  	
  	
  	
  	
  mpc_version=mpc-­‐1.0.1	
  
Edit	
  the	
  configura0on/sedng	
  files	
•  Edit	
  ThirdParty-­‐3.0.x/makeCGAL	
  
$ 	
  vi	
  makeCGAL	
  
#	
  	
  	
  	
  	
  Mixing	
  system	
  and	
  ThirdParty	
  for	
  gmp/mpfr	
  is	
  	
  	
  
not	
  supported.	
  
#	
  
#-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐
set	
  -­‐x	
  
cgalPACKAGE=CGAL-­‐4.7	
  
boostPACKAGE=boost_1_58_0	
  
gmpPACKAGE=gmp-­‐5.1.2	
  
mpfrPACKAGE=mpfr-­‐3.1.2	
  
Edit	
  the	
  configura0on/sedng	
  files	
•  Edit	
  CGAL.sh	
  
$ 	
  vi	
  ../OpenFOAM-­‐3.0.x/etc/config/CGAL.sh	
  
#	
  Description	
  
#	
  	
  	
  	
  	
  Setup	
  file	
  for	
  CGAL	
  (&	
  boost)	
  include/libraries.	
  
#	
  	
  	
  	
  	
  Sourced	
  from	
  OpenFOAM-­‐<VERSION>/etc/bashrc	
  
#-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐	
  
boost_version=boost_1_58_0	
  
cgal_version=CGAL-­‐4.7	
  
Compile	
  the	
  tools/libraries	
  
•  Reload	
  the	
  OpenFOAM	
  environment	
  file	
  and	
  compile	
  GCC:	
  
$ 	
  .	
  /opt/OpenFOAM/OpenFOAM-­‐3.0.x/etc/bashrc	
  
Warning	
  in	
  /opt/OpenFOAM/OpenFOAM-­‐3.0.x/etc/config/
settings.sh:	
  
	
  	
  	
  	
  Cannot	
  find	
  /opt/OpenFOAM/ThirdParty-­‐3.0.x/platforms/
linux64/gcc-­‐4.8.4	
  installation.	
  
	
  	
  	
  	
  Please	
  install	
  this	
  compiler	
  version	
  or	
  if	
  you	
  wish	
  to	
  	
  
use	
  the	
  system	
  compiler,	
  
	
  	
  	
  	
  change	
  the	
  'foamCompiler'	
  setting	
  to	
  'system'	
  
$ 	
  ./makeGcc	
  
Compile	
  the	
  tools/libraries	
  
•  Build	
  CMake	
  and	
  execute	
  Allwmake:	
  
•  Build	
  OpenFOAM:	
  
•  ATer	
  the	
  compiling,	
  check	
  it:	
  
$ 	
  ./makeCmake	
  
$ 	
  .	
  /opt/OpenFOAM/OpenFOAM-­‐3.0.x/etc/bashrc	
  
$ 	
  ./Allwmake	
  
$ 	
  .	
  /opt/OpenFOAM/OpenFOAM-­‐3.0.x/etc/bashrc	
  
$ 	
  cd	
  /opt/OpenFOAM/OpenFOAM-­‐3.0.x/	
  
$ 	
  export	
  WM_NCOMPPROCS=4	
  #	
  depending	
  on	
  your	
  machine	
  
$ 	
  ./Allwmake	
  
$ 	
  .	
  /opt/OpenFOAM/OpenFOAM-­‐3.0.x/etc/bashrc	
  
$ 	
  foamInstallationTest	
  
Compile	
  ParaView	
  and	
  its	
  reader	
•  Build	
  Qt	
  
$ 	
  cd	
  /opt/OpenFOAM/ThirdParty-­‐3.0.x	
  
$ 	
  vi	
  makeQt	
  
#	
  Description	
  
#	
  	
  	
  	
  	
  Build	
  script	
  for	
  qt-­‐everywhere-­‐opensource-­‐src	
  
#	
  
#-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐
qtVERSION=4.8.6	
  
qtTYPE=qt-­‐everywhere-­‐opensource-­‐src	
  
$ 	
  ./makeQt	
  
Compile	
  ParaView	
  and	
  its	
  reader	
•  Compile	
  ParaView	
  4.4 	
$ 	
  vi	
  makeParaView4	
  
#	
  Set	
  the	
  path	
  to	
  the	
  Qt-­‐4.5	
  (or	
  later)	
  qmake	
  if	
  the	
  	
  	
  	
  
system	
  Qt	
  is	
  older	
  
QMAKE_PATH="/opt/OpenFOAM/ThirdParty-­‐3.0.x/	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  platforms/linux64Gcc/qt-­‐4.8.6/bin"	
  
#	
  Set	
  the	
  path	
  to	
  cmake	
  
CMAKE_PATH="/opt/OpenFOAM/ThirdParty-­‐3.0.x/	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  platforms/linux64Gcc/cmake-­‐3.2.1/bin"	
  
$ 	
  ./makeParaView4	
  
Compile	
  ParaView	
  and	
  its	
  reader	
•  Compile	
  ParaView	
  reader	
  
•  ATer	
  the	
  compiling,	
  check	
  a	
  tutorial	
  run	
  (cavity):	
  
$ 	
  cd	
  $FOAM_UTILITIES/postProcessing/graphics/PV4Readers	
  
$ 	
  ./Allwclean	
  
$ 	
  ./Allwmake	
  
$ 	
  .	
  /opt/OpenFOAM/OpenFOAM-­‐3.0.x/etc/bashrc	
  
$ 	
  mkdir	
  –p	
  $FOAM_RUN	
  
$ 	
  run	
  
$ 	
  cp	
  –r	
  $FOAM_TUTORIALS/incompressible/icoFoam/cavity	
  ./	
  
$ 	
  blockMesh	
  
$ 	
  icoFoam	
  
$ 	
  paraFoam	
  
Here	
  we	
  go!	
  Enjoy!

More Related Content

Viewers also liked

Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
takuyayamamoto1800
 
OpenFOAM Programming Tips
OpenFOAM Programming TipsOpenFOAM Programming Tips
OpenFOAM Programming Tips
Fumiya Nozaki
 

Viewers also liked (14)

CFD - OpenFOAM
CFD - OpenFOAMCFD - OpenFOAM
CFD - OpenFOAM
 
Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0
Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0
Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0
 
Customization of LES turbulence model in OpenFOAM
Customization of LES turbulence	 model in OpenFOAMCustomization of LES turbulence	 model in OpenFOAM
Customization of LES turbulence model in OpenFOAM
 
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』
 
OpenFOAMのinterfoamによる誤差
OpenFOAMのinterfoamによる誤差OpenFOAMのinterfoamによる誤差
OpenFOAMのinterfoamによる誤差
 
Avinash_PPT
Avinash_PPTAvinash_PPT
Avinash_PPT
 
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
 
OpenFOAM -回転領域を含む流体計算 (Rotating Geometry)-
OpenFOAM -回転領域を含む流体計算 (Rotating Geometry)-OpenFOAM -回転領域を含む流体計算 (Rotating Geometry)-
OpenFOAM -回転領域を含む流体計算 (Rotating Geometry)-
 
OpenFOAM の Function Object 機能について
OpenFOAM の Function Object 機能についてOpenFOAM の Function Object 機能について
OpenFOAM の Function Object 機能について
 
A first order hyperbolic framework for large strain computational computation...
A first order hyperbolic framework for large strain computational computation...A first order hyperbolic framework for large strain computational computation...
A first order hyperbolic framework for large strain computational computation...
 
OpenFOAM Programming Tips
OpenFOAM Programming TipsOpenFOAM Programming Tips
OpenFOAM Programming Tips
 
OpenFOAM LES乱流モデルカスタマイズ
OpenFOAM LES乱流モデルカスタマイズOpenFOAM LES乱流モデルカスタマイズ
OpenFOAM LES乱流モデルカスタマイズ
 
OpenFOAMの壁関数
OpenFOAMの壁関数OpenFOAMの壁関数
OpenFOAMの壁関数
 
Boundary Conditions in OpenFOAM
Boundary Conditions in OpenFOAMBoundary Conditions in OpenFOAM
Boundary Conditions in OpenFOAM
 

More from mmer547

More from mmer547 (12)

Acer MRヘッドセットで計算結果の可視化
Acer MRヘッドセットで計算結果の可視化Acer MRヘッドセットで計算結果の可視化
Acer MRヘッドセットで計算結果の可視化
 
2019年 これからの人向け 超速習!流体解析ツールボックスOpenFOAM
2019年 これからの人向け 超速習!流体解析ツールボックスOpenFOAM2019年 これからの人向け 超速習!流体解析ツールボックスOpenFOAM
2019年 これからの人向け 超速習!流体解析ツールボックスOpenFOAM
 
4月からCAEをはじめる人におすすめする本
4月からCAEをはじめる人におすすめする本4月からCAEをはじめる人におすすめする本
4月からCAEをはじめる人におすすめする本
 
オープンCAEをはじめよう! 環境構築編 ver.2015
オープンCAEをはじめよう! 環境構築編 ver.2015オープンCAEをはじめよう! 環境構築編 ver.2015
オープンCAEをはじめよう! 環境構築編 ver.2015
 
オープンCAEをはじめよう!入門編 ver.2015
オープンCAEをはじめよう!入門編 ver.2015オープンCAEをはじめよう!入門編 ver.2015
オープンCAEをはじめよう!入門編 ver.2015
 
XYZMaker(ベータ版)を使ってみた
XYZMaker(ベータ版)を使ってみたXYZMaker(ベータ版)を使ってみた
XYZMaker(ベータ版)を使ってみた
 
MinecraftでOpenFOAM計算用メッシュを作成する
MinecraftでOpenFOAM計算用メッシュを作成するMinecraftでOpenFOAM計算用メッシュを作成する
MinecraftでOpenFOAM計算用メッシュを作成する
 
オープンCAEをはじめよう!構造解析編
オープンCAEをはじめよう!構造解析編オープンCAEをはじめよう!構造解析編
オープンCAEをはじめよう!構造解析編
 
IPython notebookでOpenFOAMを使う!講習会準備資料
IPython notebookでOpenFOAMを使う!講習会準備資料IPython notebookでOpenFOAMを使う!講習会準備資料
IPython notebookでOpenFOAMを使う!講習会準備資料
 
Code_Saturne流体解析入門講習会 講習会資料
Code_Saturne流体解析入門講習会 講習会資料Code_Saturne流体解析入門講習会 講習会資料
Code_Saturne流体解析入門講習会 講習会資料
 
Install code saturne
Install code saturneInstall code saturne
Install code saturne
 
流体解析入門者向け超初級講習会
流体解析入門者向け超初級講習会流体解析入門者向け超初級講習会
流体解析入門者向け超初級講習会
 

Recently uploaded

notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 

Recently uploaded (20)

School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Learn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksLearn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic Marks
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 

Source pack installation of OpenFOAM 3.0.x into RHL

  • 1. Source  pack  installa0on  of  OpenFOAM   3.0.x  into  RHL Open  CAE  Local  Study  Mee0ng   Y.  Takagi   Jan.  16,  2016
  • 2. Download  the  packages  from  the  official  website
  • 3. Where  should  we  install? •  If  you  have  a  machine  only  for  OpenFOAM,  you  can  upgrade   the  libraries  of  the  system.   “Dependent  packages  required  for  RHEL  6.5  need  upda:ng  to  newer   versions,  e.g.  Gcc  needs  upgrading  from  v4.4  to  v4.5+.  These  upgrades   may  be  available  under  a  RHEL  support  subscrip:on.  If  not,  then  upgrades   can  be  obtained  from  unofficial  repositories  using  the  following   instruc:ons:    ”   •  If  you  do  not  want  to  upgrade  the  system  casually,  the   compa0ble  soTwares/libraries  such  as  GCC  and  MPI  are  built   in  the  local  ThirdParty  directory.  
  • 4. Our  machine  environment •  OS:  CentOS  6.5  (64  bit)   •  System  libraries:   –  GCC  4.4.7   –  cmake  2.6-­‐patch  4   –  Qt  4.6.2   •  Target  configura0on  of  OpenFOAM   –  Version  3.0.x   –  Main  solvers,  parallel  processing,  paraFoam  (ParaView  reader)   –  Required  later  version  libraries  are  built  in  the  project  directory   (ThirdParty  directory).  
  • 5. Procedure  of  installa0on 1.  Install  the  necessary  rpm  packages.   2.  Download  the  source  packages  and  extract  them.   3.  Edit  the  configura0on/sedng  files.   4.  Compile  the  tools/libraries.   5.  Allwmake   6.  Test  (foamInstallationTest)   7.  Compile  ParaView  and  its  reader.  
  • 6. Install  the  rpm  packages  with  yum •  Necessary  packages:   –  git,  gcc-­‐c++,  bison,  flex,  m4,  glibc-­‐devel,  glibc-­‐devel.i686,  zlib-­‐devel   •  As  a  root,  type  the  yum  command:   $   yum  install  gcc  gcc-­‐c++  bison  flex  m4  glibc-­‐devel          glibc-­‐devel.i686  zlib-­‐devel  
  • 7. Directory  configura0on •  Under  OpenFOAM-­‐3.0.x   •  Under  ThirdParty-­‐3.0.x Allwmake    README.html    applica0ons/    doc/    plalorms/    tutorials/   COPYING      README.org          bin/                                    etc/      src/                            wmake/   Allclean      cmake-­‐3.2.1/    makeParaView4   Allwmake      etc/        makeQt   AllwmakeLibccmio    gcc-­‐4.8.4/    mpc-­‐1.0.1/   CGAL-­‐4.7/    gmp-­‐5.1.2/    mpfr-­‐3.1.2/   COPYING                        makeCGAL    openmpi-­‐1.10.0/   ParaView-­‐4.4.0/          makeCmake     README.html    makeGcc      plalorms/   README.org    makeGperTools  qt-­‐everywhere-­‐opensource-­‐src-­‐4.8.6/   boost_1_58_0/  makeLLVM    scotch_6.0.3/   build/      makeParaView   Red: make by yourself Blue: generated later
  • 8. Download  the  source  packages  and  extract  them •  OpenFOAM  main  source  code:   •  OpenFOAM  ThirdParty:   •  Compiler  (GCC):   $   git  clone  git://github.com/OpenFOAM/OpenFOAM-­‐3.0.x.git   $   wget  http://downloads.sourceforge.net/foam/        ThirdParty-­‐3.0.1.tgz   $   tar  zxvf  ThirdParty-­‐3.0.1.tgz   $   ln  -­‐s  ThirdParty-­‐3.0.1  ThirdParty-­‐3.0.x   $   cd  ThirdParty-­‐3.0.x   $   wget  https://ftp.gnu.org/gnu/gcc/gcc-­‐4.8.4/                   gcc-­‐4.8.4.tar.gz   $   tar  zxvf  gcc-­‐4.8.4.tar.gz  
  • 9. Download  the  source  packages  and  extract  them •  Libraries  (gmp,  mpfr,  mpc)     $   wget  http://ftp.gnu.org/gnu/gmp/gmp-­‐5.1.2.tar.bz2   $   tar  jxvf  gmp-­‐5.1.2.tar.bz2   $   wget  http://ftp.gnu.org/gnu/mpfr/mpfr-­‐3.1.2.tar.gz   $   tar  zxvf  mpfr-­‐3.1.2.tar.gz   $   wget  http://ftp.gnu.org/gnu/mpc/mpc-­‐1.0.1.tar.gz   $   tar  zxvf  mpc-­‐1.0.1.tar.gz  
  • 10. Download  the  source  packages  and  extract  them •  OpenMPI:   •  Scotch:   •  Boost:   •  Cmake:     $   wget  -­‐-­‐no-­‐check-­‐certificate  https://www.open-­‐mpi.org/     software/ompi/v1.10/downloads/openmpi-­‐1.10.0.tar.gz   $   tar  zxvf  openmpi-­‐1.10.0.tar.gz   $   wget  https://gforge.inria.fr/frs/download.php/           file/34099/scotch_6.0.3.tar.gz     $   tar  zxvf  scotch_6.0.3.tar.gz   $   wget  http://sourceforge.net/projects/boost/files/     boost/1.58.0/boost_1_58_0.tar.gz   $   tar  zxvf  boost_1_58_0.tar.gz   $   wget  -­‐-­‐no-­‐check-­‐certificate  https://cmake.org/files/       v3.2/cmake-­‐3.2.1.tar.gz   $   tar  zxvf  cmake-­‐3.2.1.tar.gz  
  • 11. Download  the  source  packages  and  extract  them •  Qt  (qmake)      If  you  do  not  need  ParaView,  this  package  is  unnecessary. $   wget  -­‐-­‐no-­‐check-­‐certificate  https://download.qt.io/      archive/qt/4.8/4.8.6/qt-­‐everywhere-­‐opensource-­‐src-­‐4.8.6.tar.gz   $   tar  zxvf  qt-­‐everywhere-­‐opensource-­‐src-­‐4.8.6.tar.gz  
  • 12. Edit  the  configura0on/sedng  files •  Edit  OpenFOAM-­‐3.0.x  environment  file   $   vi  ../OpenFOAM-­‐3.0.x/etc/bashrc   #  Location  of  the  OpenFOAM  installation   #  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   #  foamInstall=$HOME/$WM_PROJECT   #  foamInstall=~$WM_PROJECT   foamInstall=/opt/$WM_PROJECT   #  foamInstall=/usr/local/$WM_PROJECT   #-­‐  Compiler  location:   #        foamCompiler=  system  |  ThirdParty  (OpenFOAM)   foamCompiler=ThirdParty  
  • 13. Edit  the  configura0on/sedng  files $   vi  ../OpenFOAM-­‐3.0.x/etc/bashrc   #-­‐  Label  size:   #        WM_LABEL_SIZE  =  32  |  64   export  WM_LABEL_SIZE=64   #-­‐  MPI  implementation:   #        WM_MPLIB  =  SYSTEMOPENMPI  |  OPENMPI  |  SYSTEMMPI  |     MPICH  |  MPICH-­‐GM  |  HPMPI   #                              |  MPI  |  QSMPI  |  SGIMPI   export  WM_MPLIB=OPENMPI  
  • 14. Edit  the  configura0on/sedng  files •  Edit  OpenFOAM-­‐3.0.x  compiler/libraries  sedng  file   $   vi  ../OpenFOAM-­‐3.0.x/etc/config/settings.sh   case  "${foamCompiler}"  in   OpenFOAM  |  ThirdParty)          case  "$WM_COMPILER"  in          Gcc  |  Gcc48)                  gcc_version=gcc-­‐4.8.4                  gmp_version=gmp-­‐5.1.2                  mpfr_version=mpfr-­‐3.1.2                  mpc_version=mpc-­‐1.0.1  
  • 15. Edit  the  configura0on/sedng  files •  Edit  ThirdParty-­‐3.0.x/makeCGAL   $   vi  makeCGAL   #          Mixing  system  and  ThirdParty  for  gmp/mpfr  is       not  supported.   #   #-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ set  -­‐x   cgalPACKAGE=CGAL-­‐4.7   boostPACKAGE=boost_1_58_0   gmpPACKAGE=gmp-­‐5.1.2   mpfrPACKAGE=mpfr-­‐3.1.2  
  • 16. Edit  the  configura0on/sedng  files •  Edit  CGAL.sh   $   vi  ../OpenFOAM-­‐3.0.x/etc/config/CGAL.sh   #  Description   #          Setup  file  for  CGAL  (&  boost)  include/libraries.   #          Sourced  from  OpenFOAM-­‐<VERSION>/etc/bashrc   #-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐   boost_version=boost_1_58_0   cgal_version=CGAL-­‐4.7  
  • 17. Compile  the  tools/libraries   •  Reload  the  OpenFOAM  environment  file  and  compile  GCC:   $   .  /opt/OpenFOAM/OpenFOAM-­‐3.0.x/etc/bashrc   Warning  in  /opt/OpenFOAM/OpenFOAM-­‐3.0.x/etc/config/ settings.sh:          Cannot  find  /opt/OpenFOAM/ThirdParty-­‐3.0.x/platforms/ linux64/gcc-­‐4.8.4  installation.          Please  install  this  compiler  version  or  if  you  wish  to     use  the  system  compiler,          change  the  'foamCompiler'  setting  to  'system'   $   ./makeGcc  
  • 18. Compile  the  tools/libraries   •  Build  CMake  and  execute  Allwmake:   •  Build  OpenFOAM:   •  ATer  the  compiling,  check  it:   $   ./makeCmake   $   .  /opt/OpenFOAM/OpenFOAM-­‐3.0.x/etc/bashrc   $   ./Allwmake   $   .  /opt/OpenFOAM/OpenFOAM-­‐3.0.x/etc/bashrc   $   cd  /opt/OpenFOAM/OpenFOAM-­‐3.0.x/   $   export  WM_NCOMPPROCS=4  #  depending  on  your  machine   $   ./Allwmake   $   .  /opt/OpenFOAM/OpenFOAM-­‐3.0.x/etc/bashrc   $   foamInstallationTest  
  • 19. Compile  ParaView  and  its  reader •  Build  Qt   $   cd  /opt/OpenFOAM/ThirdParty-­‐3.0.x   $   vi  makeQt   #  Description   #          Build  script  for  qt-­‐everywhere-­‐opensource-­‐src   #   #-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ qtVERSION=4.8.6   qtTYPE=qt-­‐everywhere-­‐opensource-­‐src   $   ./makeQt  
  • 20. Compile  ParaView  and  its  reader •  Compile  ParaView  4.4 $   vi  makeParaView4   #  Set  the  path  to  the  Qt-­‐4.5  (or  later)  qmake  if  the         system  Qt  is  older   QMAKE_PATH="/opt/OpenFOAM/ThirdParty-­‐3.0.x/                            platforms/linux64Gcc/qt-­‐4.8.6/bin"   #  Set  the  path  to  cmake   CMAKE_PATH="/opt/OpenFOAM/ThirdParty-­‐3.0.x/                            platforms/linux64Gcc/cmake-­‐3.2.1/bin"   $   ./makeParaView4  
  • 21. Compile  ParaView  and  its  reader •  Compile  ParaView  reader   •  ATer  the  compiling,  check  a  tutorial  run  (cavity):   $   cd  $FOAM_UTILITIES/postProcessing/graphics/PV4Readers   $   ./Allwclean   $   ./Allwmake   $   .  /opt/OpenFOAM/OpenFOAM-­‐3.0.x/etc/bashrc   $   mkdir  –p  $FOAM_RUN   $   run   $   cp  –r  $FOAM_TUTORIALS/incompressible/icoFoam/cavity  ./   $   blockMesh   $   icoFoam   $   paraFoam  
  • 22. Here  we  go!  Enjoy!