Difference between revisions of "OpenFOAM/C3/Installing-and-Running-PyFoam/English"
Rahuljoshi (Talk | contribs) |
Nancyvarkey (Talk | contribs) |
||
| Line 49: | Line 49: | ||
| − | - '''Ubuntu''' | + | - '''Ubuntu Linux''' Operating system '''14.04''' |
| Line 70: | Line 70: | ||
| − | - If not please | + | - If not, please go through the '''Linux''' tutorial series on this website |
| − | + | ||
| − | + | ||
| − | + | ||
|- | |- | ||
| Line 89: | Line 86: | ||
-It is Designed to make working with '''OpenFOAM''' easier | -It is Designed to make working with '''OpenFOAM''' easier | ||
| − | |||
| − | |||
| − | |||
|- | |- | ||
| Line 103: | Line 97: | ||
| − | + | * '''iteratively''' running '''simulations''' | |
| + | * automate data collection | ||
| − | + | * parametrically modify case files and | |
| + | * many other such useful activities. | ||
| − | |||
| + | Note that '''PyFoam '''works over '''OpenFOAM''' | ||
| − | |||
| − | + | So, we need to always have an installation of '''OpenFOAM''' in our computer. | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
|- | |- | ||
| Line 131: | Line 119: | ||
| − | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| First we check if our installation of OpenFOAM has been done properly | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| First we check if our installation of '''OpenFOAM''' has been done properly. |
| − | Open | + | Open the '''terminal''', and type '''icoFoam -help''' |
| Line 156: | Line 144: | ||
type in terminal | type in terminal | ||
| − | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now we will install the necessary prerequisites for PyFoam such as | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now we will install the necessary prerequisites for '''PyFoam''', such as |
| − | + | *'''Python, Pip, Numpy''' and '''Gnuplot''' | |
| + | using the '''terminal'''. | ||
| − | |||
| + | First we type - | ||
| − | |||
| + | '''sudo apt-get install python-dev '''and press '''Enter'''. | ||
| − | |||
| + | After this, type | ||
| − | + | '''sudo apt-get install python-pip '''and press '''Enter'''. | |
| − | + | ||
| − | '''sudo apt-get install python-pip '''and press | + | |
| Line 182: | Line 169: | ||
Then, type | Then, type | ||
| − | '''sudo apt-get install gnuplot gnuplot-x11 '''and press | + | '''sudo apt-get install gnuplot gnuplot-x11 '''and press '''Enter'''. |
| − | With this we are done with installing the pre-requisites | + | With this we are done with installing the pre-requisites. |
|- | |- | ||
| Line 194: | Line 181: | ||
Open terminal | Open terminal | ||
| − | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now we will installing '''PyFoam''' using pip | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now we will installing '''PyFoam''' using '''pip'''. |
| − | Open the terminal and | + | Open the '''terminal''' and type: '''pip install PyFoam ''' |
|- | |- | ||
| Line 218: | Line 205: | ||
install PyFoam | install PyFoam | ||
| − | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| We can also | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| We can also install '''PyFoam''' from '''source''' |
| − | To do so, | + | To do so, open the browser and in the URL window, type |
| − | [http://www.pypi.com/ www.pypi.com] | + | '''[http://www.pypi.com/ www.pypi.com]''' |
Search for '''PyFoam ''' | Search for '''PyFoam ''' | ||
| + | |||
Download '''PyFoam-0.6.5.tar.xz''' | Download '''PyFoam-0.6.5.tar.xz''' | ||
| − | In the terminal go to | + | In the '''terminal''', go to '''Downloads folder'''. |
| Line 237: | Line 225: | ||
| − | Type cd name of the folder '''PyFoam-0.6.5''' | + | Type '''cd''' followed by the name of the folder '''PyFoam-0.6.5''' |
| − | + | After this, type '''sudo python setup.py' space install''' | |
|- | |- | ||
| Line 259: | Line 247: | ||
check the message | check the message | ||
| − | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now we have | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now we have check if '''PyFoam''' is detecting |
| − | OpenFoam and working | + | '''OpenFoam''' and working properly. |
| − | Switch to terminal again | + | Switch to '''terminal''' again. |
| Line 270: | Line 258: | ||
| − | '''import PyFoam''' | + | Type '''import PyFoam''' |
| − | ''' | + | '''import PyFoam dot FoamInformation ''' |
| − | '''print | + | Then type '''print PyFoam dot FoamInformation dot foamTutorials''' followed by open-close brackets. |
| − | This | + | This should print the directory of '''OpenFOAM Tutorials'''. |
| − | |||
| − | |||
|- | |- | ||
| − | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Summary Slide |
| + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now let us summarise. | ||
| − | |||
| − | |||
| + | In this tutorial, we learnt about '''PyFoam'''. | ||
| + | We also learnt to | ||
| + | *check the installation of '''OpenFoam''' | ||
| + | |||
| + | * install '''PyFoam''' using '''pip''' | ||
| + | |||
| + | * install '''PyFoam''' using '''sources''' | ||
| + | |||
| + | * and check if '''PyFoam''' is working | ||
| + | |||
| + | |- | ||
| + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Show Slide | ||
| + | |||
| + | |||
| + | Forum to answer questions | ||
| + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Please post your timed queries in this forum. | ||
|- | |- | ||
| Line 299: | Line 300: | ||
Forum to answer questions | Forum to answer questions | ||
| − | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Please post your general queries on OpenFOAM in this forum | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Please post your general queries on OpenFOAM in this forum. |
|- | |- | ||
| Line 306: | Line 307: | ||
Textbook Companion | Textbook Companion | ||
| − | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| The '''FOSSEE '''team coordinates the TBC project | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| The '''FOSSEE '''team coordinates the TBC project. |
|- | |- | ||
Latest revision as of 11:29, 9 May 2016
Title of script: Installing and Running PyFoam
Script : Anmol Sahoo, Rahul Joshi
Narration : Rahul Joshi
Keywords: OpenFOAM, PyFoam, CFD, Spoken Tutorial, Python
| |
|
| Show Slide : Title | Hello and welcome to the spoken tutorial on installing and running PyFoam |
| Show Slide : Learning Objectives | In this tutorial, we will learn how to Install and check PyFoam and the required steps for the same.
|
| Show Slide :
System Requirement |
To record this tutorial I am using
|
| Show Slide :
Pre-requisite |
To practice this tutorial, the user should have
|
| Show Slide :
Introduction to PyFoam |
What is PyFoam?
|
| Show Slide :
Introduction to PyFoam
|
PyFoam can be also be used for
|
| Show Slide: Checking OpenFOAM
|
First we check if our installation of OpenFOAM has been done properly.
|
| Show Slide : Installing Pre-Requisites
|
Now we will install the necessary prerequisites for PyFoam, such as
using the terminal.
sudo apt-get install python-pip and press Enter.
pip install Numpy
sudo apt-get install gnuplot gnuplot-x11 and press Enter.
|
| Show Slide :
Install PyFoam
|
Now we will installing PyFoam using pip.
|
| Show Slide :
Installing PyFoam
|
We can also install PyFoam from source
|
| Show Slides: Checking PyFoam
|
Now we have check if PyFoam is detecting
OpenFoam and working properly.
|
| Summary Slide | Now let us summarise.
We also learnt to
|
| Show Slide
|
Please post your timed queries in this forum. |
| Show Slide
|
Please post your general queries on OpenFOAM in this forum. |
| Show Slide
|
The FOSSEE team coordinates the TBC project. |
| Show Slide
Acknowledgement
|
The Spoken Tutorial project is funded by NMEICT, MHRD, Govt. of India
|
| Thank You | The script is prepared by Anmol Sahoo and this is Rahul Joshi from IIT Bombay signing off. Thanks for watching |