{"id":532,"date":"2009-11-28T23:03:47","date_gmt":"2009-11-28T21:03:47","guid":{"rendered":"http:\/\/142.93.241.207\/?p=532"},"modified":"2010-06-27T09:13:46","modified_gmt":"2010-06-27T07:13:46","slug":"building-openfoam-1-6-x-on-opensuse-11-2","status":"publish","type":"post","link":"https:\/\/www.albertopassalacqua.com\/?p=532","title":{"rendered":"OpenFOAM 1.6.x on openSUSE 11.2 and VTK reader"},"content":{"rendered":"<p style=\"text-align: justify;\">Installing <a href=\"http:\/\/www.opencfd.co.uk\/openfoam\/\" target=\"_blank\">OpenFOAM<sup><span>\u00ae<\/span><\/sup><\/a><span> on openSUSE 11.2 is very easy, and can be done using, at least in part, the system tools, to take advantage of the new compiler. The steps of the procedure are the following:<\/span><\/p>\n<ul style=\"text-align: justify;\">\n<li><span>Use YaST to install<\/span>\n<ul>\n<li><a href=\"http:\/\/dl.dropbox.com\/u\/659842\/Blog\/OF\/YaSTPatterns.png\" target=\"_blank\"><span>the C\/C++ development pattern in YaST<\/span><\/a><\/li>\n<li><span>cmake<\/span><\/li>\n<li><span>libqt4-devel (required to build paraview)<\/span><\/li>\n<\/ul>\n<\/li>\n<li>Create a directory called OpenFOAM in your home directory\n<ul>\n<li>mkdir ~\/OpenFOAM<\/li>\n<\/ul>\n<\/li>\n<li>Enter the OpenFOAM directory\n<ul>\n<li>cd ~\/OpenFOAM<\/li>\n<\/ul>\n<\/li>\n<li>Download the OpenFOAM sources from the GIT repository\n<ul>\n<li>git clone git:\/\/repo.or.cz\/OpenFOAM-1.6.x.git<\/li>\n<\/ul>\n<\/li>\n<li>Download the third party packages from the OpenCFD website<\/li>\n<li>Extract the third party packages corresponding to your architecture in the ~\/OpenFOAM directory<\/li>\n<li>Rename the ThirdParty-1.6 into ThirdParty-1.6.x<\/li>\n<li>Remove the following directories from the ThirdParty directory containing\n<ul>\n<li>cmake<\/li>\n<li>gcc<\/li>\n<\/ul>\n<\/li>\n<li>Edit ~\/OpenFOAM\/OpenFOAM-1.6.x\/etc\/settings.sh to set\n<ul>\n<li>compilerInstall=System<\/li>\n<\/ul>\n<\/li>\n<li>Open your ~\/.bashrc file in a text editor and add the line:\n<ul>\n<li>. $HOME\/OpenFOAM\/OpenFOAM-1.6.x\/etc\/bashrc<\/li>\n<\/ul>\n<p>and source your ~\/.bashrc file with the command (thanks to friesenjunge \ud83d\ude42 )<\/p>\n<ul>\n<li>source ~\/.bashrc<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul style=\"text-align: justify;\">\n<li>Enter the ThirdParty-1.6.x directory\n<ul>\n<li>cd ~\/OpenFOAM\/ThirdParty-1.6.x<\/li>\n<\/ul>\n<\/li>\n<li>Rebuild Paraview with the following commands (you need qt4 development libraries installed in your system. Check the README file coming with OpenFOAM for a list of working versions)\n<ul>\n<li>rm -rf paraview-3.6.1\/platforms<\/li>\n<li>.\/makeParaView<\/li>\n<\/ul>\n<\/li>\n<li>Enter the ~\/OpenFOAM\/OpenFOAM-1.6.x directory\n<ul>\n<li>cd ~\/OpenFOAM\/OpenFOAM-1.6.x<\/li>\n<\/ul>\n<\/li>\n<li>Rebuild OpenFOAM typing\n<ul>\n<li>.\/Allwmake<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">This will rebuild the whole OpenFOAM and paraview, and provide you a fully working installation. However, the paraFoam reader might have some problem to properly show results in paraview. I could not solve them, however there is an alternative reader available on the OpenFOAM unofficial wiki, that can be compiled as follows. Note that the installation procedure assumes you have OpenFOAM 1.6.x installed and properly configured as explained above, and that paraview has been compiled successfully on your system.<\/p>\n<ul style=\"text-align: justify;\">\n<li>Download the code from <a href=\"http:\/\/openfoamwiki.net\/index.php\/Contrib_Parallelized_Native_OpenFOAM_Reader_for_ParaView\" target=\"_blank\">here<\/a>.<\/li>\n<li>Extract the archive in a directory of your choice. It is not important where, since the reader will be installed in your OpenFOAM tree. I will assume you extracted it in ~\/vtkPOpenFOAMReader-r173-20090920<\/li>\n<li>Create a directory where to build the reader. For convenience I will call it ~\/vtkReader.<\/li>\n<li>Open a terminal and enter that directory\n<ul>\n<li>cd vtkReader.<\/li>\n<\/ul>\n<\/li>\n<li>Type the command:\n<ul>\n<li>ccmake ~\/vtkPOpenFOAMReader-r173-20090920<\/li>\n<\/ul>\n<\/li>\n<li>You will see a screen generated from cmake.\u00a0 Simply press &#8220;c&#8221; to configure.<\/li>\n<li>Another screen will appear with the following variables defined on the basis of your OpenFOAM installation\n<ul>\n<li>CMAKE_BUILD_TYPE<\/li>\n<li>CMAKE_INSTALL_PREFIX<\/li>\n<li>ParaView_DIR<\/li>\n<\/ul>\n<\/li>\n<li>Accept the proposal by pressing &#8220;g&#8221; to generate the configuration file and exit.<\/li>\n<li>In the same terminal execute the commands\n<ul>\n<li>make<\/li>\n<li>make install<\/li>\n<\/ul>\n<\/li>\n<li>Copy the file pvFoam in ~\/vtkPOpenFOAMReader-r173-20090920\/BSD\/ into your ~\/OpenFOAM\/OpenFOAM-1.6.x\/bin directory, to be able to run Paraview with pvFoam, exactly as done with paraFoam.<\/li>\n<li>Refer to ~\/vtkPOpenFOAMReader-r173-20090920\/readerPanel.pdf for details on the reader interface.<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">Enjoy  \ud83d\ude42<\/p>\n<p style=\"text-align: justify;\"><span>This offering is not<\/span> <span>approved<\/span> <span>or endorsed by OpenCFD Limited, the producer of the OpenFOAM<\/span> <span>software  and  owner  of  the  OPENFOAM\u00ae<\/span><span> and<\/span> <span>OpenCFD\u00ae<\/span><span> trade marks.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installing OpenFOAM\u00ae on openSUSE 11.2 is very easy, and can be done using, at least in part, the system tools, to take advantage of the new compiler. The steps of the procedure are the following: Use YaST to install the C\/C++ development pattern in YaST cmake libqt4-devel (required to build paraview) Create a directory called OpenFOAM in your home directory mkdir ~\/OpenFOAM Enter the OpenFOAM directory cd ~\/OpenFOAM Download the OpenFOAM sources from the GIT repository git clone git:\/\/repo.or.cz\/OpenFOAM-1.6.x.git Download the third party packages from the OpenCFD website Extract the third party packages corresponding to your architecture in the ~\/OpenFOAM directory Rename the ThirdParty-1.6 into ThirdParty-1.6.x Remove the following directories from the ThirdParty directory containing cmake gcc Edit ~\/OpenFOAM\/OpenFOAM-1.6.x\/etc\/settings.sh to set compilerInstall=System Open your ~\/.bashrc file in a text editor and add the line: . $HOME\/OpenFOAM\/OpenFOAM-1.6.x\/etc\/bashrc and source your ~\/.bashrc file with the command (thanks to friesenjunge \ud83d\ude42 ) source ~\/.bashrc Enter the ThirdParty-1.6.x directory cd ~\/OpenFOAM\/ThirdParty-1.6.x Rebuild Paraview with the following commands (you need qt4 development libraries installed in your system. Check the README file coming with OpenFOAM for a list of working versions) rm -rf paraview-3.6.1\/platforms .\/makeParaView Enter the ~\/OpenFOAM\/OpenFOAM-1.6.x directory cd ~\/OpenFOAM\/OpenFOAM-1.6.x Rebuild OpenFOAM typing .\/Allwmake This will rebuild the whole OpenFOAM and paraview, and provide you a fully working installation. However, the paraFoam reader might have some problem to properly show results in paraview. I could not solve them, however there is an alternative reader available on the OpenFOAM unofficial wiki, that can be compiled as follows. Note that the installation procedure assumes you have OpenFOAM 1.6.x installed and properly configured as explained above, and that paraview has been compiled successfully on your system. Download the code from here. Extract the archive in a directory of your choice. It is not important where, since the reader will be installed in your OpenFOAM tree. I will assume you extracted it in ~\/vtkPOpenFOAMReader-r173-20090920 Create a directory where to build the reader. For convenience I will call it ~\/vtkReader. Open a terminal and enter that directory cd vtkReader. Type the command: ccmake ~\/vtkPOpenFOAMReader-r173-20090920 You will see a screen generated from cmake.\u00a0 Simply press &#8220;c&#8221; to configure. Another screen will appear with the following variables defined on the basis of your OpenFOAM installation CMAKE_BUILD_TYPE CMAKE_INSTALL_PREFIX ParaView_DIR Accept the proposal by pressing &#8220;g&#8221; to generate the configuration file and exit. In the same terminal execute the commands make make install Copy the file pvFoam in ~\/vtkPOpenFOAMReader-r173-20090920\/BSD\/ into your ~\/OpenFOAM\/OpenFOAM-1.6.x\/bin directory, to be able to run Paraview with pvFoam, exactly as done with paraFoam. Refer to ~\/vtkPOpenFOAMReader-r173-20090920\/readerPanel.pdf for details on the reader interface. Enjoy \ud83d\ude42 This offering is not approved or endorsed by OpenCFD Limited, the producer of the OpenFOAM software and owner of the OPENFOAM\u00ae and OpenCFD\u00ae trade marks.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,6],"tags":[117,93,94,95],"class_list":["post-532","post","type-post","status-publish","format-standard","hentry","category-cfd","category-openfoam","tag-openfoam","tag-opensuse-11-2","tag-pvfoam","tag-vtk-reader"],"_links":{"self":[{"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=\/wp\/v2\/posts\/532","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=532"}],"version-history":[{"count":12,"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=\/wp\/v2\/posts\/532\/revisions"}],"predecessor-version":[{"id":536,"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=\/wp\/v2\/posts\/532\/revisions\/536"}],"wp:attachment":[{"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=532"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}