{"id":1638,"date":"2017-12-28T20:09:03","date_gmt":"2017-12-28T18:09:03","guid":{"rendered":"http:\/\/142.93.241.207\/?p=1638"},"modified":"2017-12-28T20:16:17","modified_gmt":"2017-12-28T18:16:17","slug":"developing-for-openfoam-on-windows-10-part-2","status":"publish","type":"post","link":"https:\/\/www.albertopassalacqua.com\/?p=1638","title":{"rendered":"Developing for OpenFOAM on Windows 10 \u2013 Part 2"},"content":{"rendered":"<h4 style=\"text-align: justify;\">Installing OpenFOAM on WSL &#8211; Ubuntu<\/h4>\n<p style=\"text-align: justify;\">The installation steps for OpenFOAM on Ubuntu are straightforward because the OpenFOAM Foundation provides packages for Ubuntu which can be directly used in WSL. The following steps summarize how to rapidly set OpenFOAM-dev up on WSL.<\/p>\n<ol style=\"text-align: justify;\">\n<li style=\"text-align: justify;\">Open the Ubuntu bash terminal on Windows 10, and add the OpenFOAM repository and the corresponding signatures with the commands:\n<ul>\n<li><code>sudo add-apt-repository \"http:\/\/dl.openfoam.org\/ubuntu dev\"<\/code><\/li>\n<li><code>sudo sh -c \"wget -O - http:\/\/dl.openfoam.org\/gpg.key | apt-key add -\"<\/code><\/li>\n<li style=\"text-align: justify;\"><code>sudo add-apt-repository \"http:\/\/dl.openfoam.org\/ubuntu\"<\/code><a href=\"https:\/\/www.albertopassalacqua.com\/wp-content\/uploads\/2017\/12\/WSL_11.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1615 aligncenter\" src=\"https:\/\/www.albertopassalacqua.com\/wp-content\/uploads\/2017\/12\/WSL_11-300x164.png\" alt=\"\" width=\"759\" height=\"415\" srcset=\"https:\/\/www.albertopassalacqua.com\/wp-content\/uploads\/2017\/12\/WSL_11-300x164.png 300w, https:\/\/www.albertopassalacqua.com\/wp-content\/uploads\/2017\/12\/WSL_11-768x420.png 768w, https:\/\/www.albertopassalacqua.com\/wp-content\/uploads\/2017\/12\/WSL_11-1024x561.png 1024w\" sizes=\"auto, (max-width: 759px) 100vw, 759px\" \/><\/a><\/li>\n<\/ul>\n<\/li>\n<li>Refresh the repository with the command:\u00a0<code>sudo apt-get update<\/code><a href=\"https:\/\/www.albertopassalacqua.com\/wp-content\/uploads\/2017\/12\/WSL_12.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1616\" src=\"https:\/\/www.albertopassalacqua.com\/wp-content\/uploads\/2017\/12\/WSL_12-300x228.png\" alt=\"\" width=\"781\" height=\"594\" srcset=\"https:\/\/www.albertopassalacqua.com\/wp-content\/uploads\/2017\/12\/WSL_12-300x228.png 300w, https:\/\/www.albertopassalacqua.com\/wp-content\/uploads\/2017\/12\/WSL_12-768x584.png 768w, https:\/\/www.albertopassalacqua.com\/wp-content\/uploads\/2017\/12\/WSL_12-1024x778.png 1024w\" sizes=\"auto, (max-width: 781px) 100vw, 781px\" \/><\/a><\/li>\n<li>Install OpenFOAM-dev with: <code>sudo apt-get install openfoam-dev<\/code><a href=\"https:\/\/www.albertopassalacqua.com\/wp-content\/uploads\/2017\/12\/WSL_13.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1617\" src=\"https:\/\/www.albertopassalacqua.com\/wp-content\/uploads\/2017\/12\/WSL_13-300x255.png\" alt=\"\" width=\"781\" height=\"664\" srcset=\"https:\/\/www.albertopassalacqua.com\/wp-content\/uploads\/2017\/12\/WSL_13-300x255.png 300w, https:\/\/www.albertopassalacqua.com\/wp-content\/uploads\/2017\/12\/WSL_13-768x652.png 768w, https:\/\/www.albertopassalacqua.com\/wp-content\/uploads\/2017\/12\/WSL_13-1024x870.png 1024w\" sizes=\"auto, (max-width: 781px) 100vw, 781px\" \/><\/a><\/li>\n<li>Add the configuration file for OpenFOAM to bashrc with the command:\n<ul>\n<li><code>echo \"source \/opt\/openfoam5\/etc\/bashrc\" &gt;&gt; .bashrc<\/code><\/li>\n<\/ul>\n<\/li>\n<li>Source the user&#8217;s bashrc file with:\n<ul>\n<li><code>source ~\/.bashrc<\/code><\/li>\n<\/ul>\n<\/li>\n<li>Verify the functionality of OpenFOAM by invoking the command:\n<ul>\n<li><code>icoFoam -help<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">The OpenFOAM environment is now ready to be used. However additional settings are required to enable the use of graphical post-processing tools such as paraview and gnuplot. These aspects will be the topic of the next part.<\/p>\n<p><i>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.<\/i><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installing OpenFOAM on WSL &#8211; Ubuntu The installation steps for OpenFOAM on Ubuntu are straightforward because the OpenFOAM Foundation provides packages for Ubuntu which can be directly used in WSL. The following steps summarize how to rapidly set OpenFOAM-dev up on WSL. Open the Ubuntu bash terminal on Windows 10, and add the OpenFOAM repository and the corresponding signatures with the commands: sudo add-apt-repository &#8220;http:\/\/dl.openfoam.org\/ubuntu dev&#8221; sudo sh -c &#8220;wget -O &#8211; http:\/\/dl.openfoam.org\/gpg.key | apt-key add -&#8221; sudo add-apt-repository &#8220;http:\/\/dl.openfoam.org\/ubuntu&#8221; Refresh the repository with the command:\u00a0sudo apt-get update Install OpenFOAM-dev with: sudo apt-get install openfoam-dev Add the configuration file for OpenFOAM to bashrc with the command: echo &#8220;source \/opt\/openfoam5\/etc\/bashrc&#8221; &gt;&gt; .bashrc Source the user&#8217;s bashrc file with: source ~\/.bashrc Verify the functionality of OpenFOAM by invoking the command: icoFoam -help The OpenFOAM environment is now ready to be used. However additional settings are required to enable the use of graphical post-processing tools such as paraview and gnuplot. These aspects will be the topic of the next part. 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,4,6,129],"tags":[],"class_list":["post-1638","post","type-post","status-publish","format-standard","hentry","category-cfd","category-linux","category-openfoam","category-windows"],"_links":{"self":[{"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=\/wp\/v2\/posts\/1638","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=1638"}],"version-history":[{"count":7,"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=\/wp\/v2\/posts\/1638\/revisions"}],"predecessor-version":[{"id":1647,"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=\/wp\/v2\/posts\/1638\/revisions\/1647"}],"wp:attachment":[{"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1638"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1638"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.albertopassalacqua.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1638"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}