OpenFOAM/C3/Installing-and-Running-PyFoam/English-timed
From Script | Spoken-Tutorial
|
|
00:01 | Hello and welcome to the spoken tutorial on installing and running PyFoam |
00:07 | In this tutorial, we will learn how to Install and check PyFoam and the required steps for the same. |
00:17 | What is PyFoam |
00:19 | Checking installation of OpenFOAM |
00:22 | Installing Python, Numpy and Gnuplot |
00:27 | Install PyFoam using pip |
00:30 | Install PyFoam using sources |
00:33 | And Check if PyFoam is working |
00:38 | To record this tutorial I am using
Ubuntu Linux Operating system 14.04 |
00:45 | OpenFOAM version 2.3.0 |
00:48 | Note that PyFoam will also work with OpenFoam v1.6 and above |
00:55 | To practice this tutorial, the user should have Basic knowledge of Linux terminal commands |
01:02 | Experience with running and analyzing OpenFOAM cases |
01:07 | If not, please go through the Linux tutorial series on this website |
01:13 | What is PyFoam? |
01:15 | PyFoam is a collection of Python libraries and utilities |
01:20 | It can be used to manipulate OpenFOAM simulations |
01:25 | It is Designed to make working with OpenFOAM easier |
01:29 | PyFoam can be also be used for iteratively running simulations |
01:34 | automate data collection |
01:37 | parametrically modify case files and many other such useful activities. |
01:44 | Note that PyFoam works over OpenFOAM |
01:48 | So, we need to always have an installation of OpenFOAM in our computer. |
01:54 | First we check if our installation of OpenFOAM has been done properly. |
02:00 | Open the terminal, and type icoFoam space hyphen help |
02:07 | You should get the details of icoFoam and OpenFOAM version and help text |
02:15 | Now we will install the necessary prerequisites for PyFoam, such as Python, Pip, Numpy and Gnuplot using the terminal. |
02:29 | First we will type - sudo apt-get install python hyphen dev and press Enter. |
02:39 | After this, type sudo apt-get install python-pip and press Enter. |
02:49 | Then, type pip install Numpy |
02:53 | Then, type sudo apt-get install gnuplot space gnuplot hyphen x11 and press Enter. |
03:04 | With this we are done with installing the pre-requisites. |
03:09 | Now we will install PyFoam using pip. |
03:13 | Open the terminal and type: pip install PyFoam |
03:20 | We can also install PyFoam from source |
03:24 | To do so, open the browser and in the URL window, type http://www.pypi.com
Search for PyFoam |
03:38 | Download PyFoam-0.6.5.tar.gz |
03:46 | In the terminal, go to Downloads folder. Type tar -xvf space PyFoam hyphen 0.6.5.tar.gz |
04:00 | Then Type cd followed by the name of the folder PyFoam hyphen 0.6.5 |
04:07 | After this, type sudo python setup dot py' space install |
04:16 | Now we have to check if PyFoam is detecting OpenFoam and working properly. |
04:22 | Switch to terminal again. |
04:25 | Type python . Type import PyFoam
import PyFoam dot FoamInformation |
04:35 | Then type print PyFoam dot FoamInformation dot foamTutorials followed by open-close brackets. |
04:45 | This should print the directory of the OpenFOAM Tutorials. |
04:50 | Now let us summarise. In this tutorial, we learnt about PyFoam. |
04:55 | We also learnt to check the installation of OpenFoam |
05:00 | Install PyFoam using pip |
05:03 | install PyFoam using sources and check if PyFoam is working |
05:09 | Please post your timed queries in this forum. |
05:13 | Please post your general queries on OpenFOAM in this forum. |
05:18 | The FOSSEE team coordinates the TBC project. |
05:22 | The Spoken Tutorial project is funded by NMEICT, MHRD, Govt. of India. For more details , visit this website. |
05:33 | The script is prepared by Anmol Sahoo and this is Rahul Joshi from IIT Bombay signing off. Thanks for watching |