{"id":1210,"date":"2011-12-22T19:23:23","date_gmt":"2011-12-22T17:23:23","guid":{"rendered":"http:\/\/142.93.241.207\/?p=1210"},"modified":"2012-03-09T11:53:35","modified_gmt":"2012-03-09T09:53:35","slug":"installing-openfoam-2-1-x-on-opensuse-12-1","status":"publish","type":"post","link":"https:\/\/www.albertopassalacqua.com\/?p=1210","title":{"rendered":"Installing OpenFOAM 2.1.x on openSUSE 12.1"},"content":{"rendered":"<p style=\"text-align: justify;\"><a href=\"http:\/\/www.openfoam.org\/version2.1.0\/\">OpenFOAM<sup>\u00ae<\/sup> 2.1.x has just been released<\/a>, and brings an interesting number of new functions concerning arbitrary mesh interface (AMI), multiphase solvers, turbulence modeling, improved run-time control and new numerical methods.<\/p>\n<p style=\"text-align: justify;\">Assuming that OpenFOAM will be installed in the user&#8217;s home directory, the procedure to install OpenFOAM 2.1.x (git version) on openSUSE 12.1 is then as follows:<\/p>\n<ol style=\"text-align: justify;\">\n<li>Install the C\/C++ development pattern:<\/li>\n<ul>\n<li>\n<pre>zypper\u00a0install\u00a0-t\u00a0pattern\u00a0devel_C_C++<\/pre>\n<\/li>\n<\/ul>\n<li>Install other dependencies (gnuplot is optional, but useful):<\/li>\n<ul>\n<li>\n<pre>zypper\u00a0install\u00a0cmake\u00a0libqt4-devel\u00a0gnuplot openmpi openmpi-devel git-core<\/pre>\n<\/li>\n<\/ul>\n<li>Make sure git is installed<\/li>\n<ul>\n<li>zypper install git-core<\/li>\n<\/ul>\n<li>Check that openmpi 1.4.3 is selected as default with:<\/li>\n<ul>\n<li>\n<pre>mpi-selector --list<\/pre>\n<\/li>\n<li>The output should read: &#8220;openmpi-1.4.3&#8221;. If not, use mpi-selector to configure the default version of openmpi (this can be done for the individual user or system-wide, acquiring administrative rights)<\/li>\n<\/ul>\n<li>Create the OpenFOAM directory in your home directory:<\/li>\n<ul>\n<li>\n<pre>mkdir ~\/OpenFOAM<\/pre>\n<\/li>\n<\/ul>\n<li>Move to the OpenFOAM directory:<\/li>\n<ul>\n<li>\n<pre>cd ~\/OpenFOAM<\/pre>\n<\/li>\n<\/ul>\n<li>Download the source code from the git repository:<\/li>\n<ul>\n<li>\n<pre>git clone http:\/\/github.com\/OpenFOAM\/OpenFOAM-2.1.x.git<\/pre>\n<\/li>\n<\/ul>\n<li style=\"text-align: left;\">Download the ThirdParty package from <a href=\"http:\/\/downloads.sourceforge.net\/foam\/ThirdParty-2.1.0.tgz\">here<\/a> (command on a single line) :<\/li>\n<ul>\n<li style=\"text-align: left;\">wget -c\u00a0http:\/\/downloads.sourceforge.net\/foam\/ThirdParty-2.1.0.tgz?use_mirror=mesh -O ThirdParty-2.1.0.gtgz<\/li>\n<\/ul>\n<li>Extract the ThirdParty package and rename it as follows:<\/li>\n<ul>\n<li>\n<pre>tar xzf ThirdParty-2.1.0.gtgz<\/pre>\n<\/li>\n<li>\n<pre>mv ThirdParty-2.1.0 ThirdParty-2.1.x<\/pre>\n<\/li>\n<\/ul>\n<li>Add <a href=\"http:\/\/dl.dropbox.com\/u\/659842\/Blog\/OF\/OF_2_1_0_oS_12_1\/prefs.sh\">this<\/a>\u00a0 prefs.sh file to the directory:<\/li>\n<ul>\n<li>\n<pre>~\/OpenFOAM\/OpenFOAM-2.1.x\/etc\/<\/pre>\n<\/li>\n<\/ul>\n<li>Add the following line to your ~\/.bashrc file:<\/li>\n<ul>\n<li>[Optional for multi-core compilation, replace 4 with the number of cores you want to use]: export WM_NCOMPPROCS=4<\/li>\n<li>\n<pre>source $HOME\/OpenFOAM\/OpenFOAM-2.1.x\/etc\/bashrc<\/pre>\n<\/li>\n<\/ul>\n<li>Open a new terminal and execute this sequence of commands to compile the whole OpenFOAM suite<\/li>\n<ul>\n<li>\n<pre>source ~\/.bashrc<\/pre>\n<\/li>\n<li>\n<pre>cd ~\/OpenFOAM\/OpenFOAM-2.1.x<\/pre>\n<\/li>\n<li>\n<pre>.\/Allwmake<\/pre>\n<\/li>\n<\/ul>\n<li>To build paraview and its reader:<\/li>\n<ul>\n<li>\n<pre>cd ~\/OpenFOAM\/ThirdParty-2.1.x<\/pre>\n<\/li>\n<li>\n<pre>.\/makeParaView<\/pre>\n<\/li>\n<li>\n<pre>cd $FOAM_UTILITIES\/postProcessing\/graphics\/PV3Readers\/<\/pre>\n<\/li>\n<li>\n<pre>.\/Allwclean<\/pre>\n<\/li>\n<li>\n<pre>.\/Allwmake<\/pre>\n<\/li>\n<\/ul>\n<li>At this point OpenFOAM 2.1.x should be fully functional on your openSUSE 12.1. The installation can be updated, as usual, with:<\/li>\n<ul>\n<li>\n<pre>cd ~\/OpenFOAM\/OpenFOAM-2.1.x<\/pre>\n<\/li>\n<li>\n<pre>git pull<\/pre>\n<\/li>\n<li>\n<pre>wcleanLnIncludeAll<\/pre>\n<\/li>\n<li>\n<pre>.\/Allwmake<\/pre>\n<\/li>\n<\/ul>\n<\/ol>\n<p style=\"text-align: justify;\">Note: If you have an accelerated video card, like <a href=\"http:\/\/en.opensuse.org\/SDB:NVIDIA_drivers\">nVidia<\/a> or <a href=\"http:\/\/en.opensuse.org\/SDB:ATI_drivers\">ATI<\/a>, it is strongly recommended to install the corresponding proprietary driver.<\/p>\n<p style=\"text-align: justify;\">Enjoy \ud83d\ude42<\/p>\n<p style=\"text-align: justify;\"><em>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. Alberto Passalacqua is not associated to OpenCFD Ltd.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>OpenFOAM\u00ae 2.1.x has just been released, and brings an interesting number of new functions concerning arbitrary mesh interface (AMI), multiphase solvers, turbulence modeling, improved run-time control and new numerical methods. Assuming that OpenFOAM will be installed in the user&#8217;s home directory, the procedure to install OpenFOAM 2.1.x (git version) on openSUSE 12.1 is then as follows: Install the C\/C++ development pattern: zypper\u00a0install\u00a0-t\u00a0pattern\u00a0devel_C_C++ Install other dependencies (gnuplot is optional, but useful): zypper\u00a0install\u00a0cmake\u00a0libqt4-devel\u00a0gnuplot openmpi openmpi-devel git-core Make sure git is installed zypper install git-core Check that openmpi 1.4.3 is selected as default with: mpi-selector &#8211;list The output should read: &#8220;openmpi-1.4.3&#8221;. If not, use mpi-selector to configure the default version of openmpi (this can be done for the individual user or system-wide, acquiring administrative rights) Create the OpenFOAM directory in your home directory: mkdir ~\/OpenFOAM Move to the OpenFOAM directory: cd ~\/OpenFOAM Download the source code from the git repository: git clone http:\/\/github.com\/OpenFOAM\/OpenFOAM-2.1.x.git Download the ThirdParty package from here (command on a single line) : wget -c\u00a0http:\/\/downloads.sourceforge.net\/foam\/ThirdParty-2.1.0.tgz?use_mirror=mesh -O ThirdParty-2.1.0.gtgz Extract the ThirdParty package and rename it as follows: tar xzf ThirdParty-2.1.0.gtgz mv ThirdParty-2.1.0 ThirdParty-2.1.x Add this\u00a0 prefs.sh file to the directory: ~\/OpenFOAM\/OpenFOAM-2.1.x\/etc\/ Add the following line to your ~\/.bashrc file: [Optional for multi-core compilation, replace 4 with the number of cores you want to use]: export WM_NCOMPPROCS=4 source $HOME\/OpenFOAM\/OpenFOAM-2.1.x\/etc\/bashrc Open a new terminal and execute this sequence of commands to compile the whole OpenFOAM suite source ~\/.bashrc cd ~\/OpenFOAM\/OpenFOAM-2.1.x .\/Allwmake To build paraview and its reader: cd ~\/OpenFOAM\/ThirdParty-2.1.x .\/makeParaView cd $FOAM_UTILITIES\/postProcessing\/graphics\/PV3Readers\/ .\/Allwclean .\/Allwmake At this point OpenFOAM 2.1.x should be fully functional on your openSUSE 12.1. The installation can be updated, as usual, with: cd ~\/OpenFOAM\/OpenFOAM-2.1.x git pull wcleanLnIncludeAll .\/Allwmake Note: If you have an accelerated video card, like nVidia or ATI, it is strongly recommended to install the corresponding proprietary driver. 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. Alberto Passalacqua is not associated to OpenCFD Ltd.<\/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,109,114,110],"class_list":["post-1210","post","type-post","status-publish","format-standard","hentry","category-cfd","category-openfoam","tag-openfoam","tag-openfoam-2-1-x","tag-opensuse","tag-opensuse-12-1"],"_links":{"self":[{"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=\/wp\/v2\/posts\/1210","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=1210"}],"version-history":[{"count":10,"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=\/wp\/v2\/posts\/1210\/revisions"}],"predecessor-version":[{"id":1214,"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=\/wp\/v2\/posts\/1210\/revisions\/1214"}],"wp:attachment":[{"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}