OpenFOAM/C2/Installing-Running/English
Tutorial; Installing and Running OpenFOAM and Paraview
Script and Narration : Rahul Joshi
Keywords: Video tutorial,CFD,Installing OpenFOAM,Paraview.
|
|
Slide 1: | Hello and welcome to the spoken tutorial on Installing and running OpenFOAM and paraView. |
Slide 2: Learning Objectives | In this tutorial I will show you
|
Slide 3:
System Requirement |
To record this tutorial
|
Slide 4
Prerequisites |
To practice this tutorial you should have some basic knowledge of
|
Slide 5
About OpenFOAM |
Let me introduce you to OpenFOAM |
Open source software | It is an Open Source
|
Wide range of solvers
|
It contains a wide range of solvers for solving CFD problems of
|
Slide 6:
About paraView |
Now let me introduce you to Paraview:
|
Slide 7: | OpenFOAM and paraView can also be installed
|
Demo:
Synaptic Package Manager |
For Synaptic Package Manager go to System > Administration > Synaptic Package Manager |
Enter your system password | Type your password. |
Search box – type OpenFOAM | In the Search Box type OpenFOAM |
you can see openfoam as well as paraView. | |
Mark both Openfoam and paraview | Mark both of them for installation |
Click on mark and then Apply | |
Installation may take some time. | |
OpenFOAM and Paraview are installed. | |
Slide 7 : | For more details on Synaptic Package Manager
|
Slide 8 : | Alternately you can also install OpenFOAM and paraView
|
Open browser | Let me open up the browser |
In the browser URL type : http://www.openfoam.com/download
| |
Scroll down and go to ubuntu deb pack installation | Scroll Down and go to Ubuntu Deb pack
|
Go to Ubuntu deb pack installation
| |
Let me zoom out
| |
Copy the first line to insert in command trminal
|
From the first point of installation
|
Open command terminal
|
To open up a the terminal window
|
paste it in command terminal | Open up a terminal window
|
Replace lsb_release -cs by the ubuntu version name | Note that in place of 'lsb_release -cs'
|
Switch back to the browser
| |
Replace it by lucid for ubuntu 10.04 | I will replace this by lucid
|
Installation is incomplete
|
Note that Installation here is incomplete
|
I have already installed OpenFOAM
| |
Configure the software and test its working | Now we need to configure the installed software |
Edit the bash file | To do this we need to edit the bash file |
In command terminal
|
Open a new command terminal.
This opens up the bash file, |
Let me drag this to the capture area
| |
Browser window | Now switch back to the browser
|
Look at the second point
|
Look at the second point
|
Save it and Close the bash file. | |
Now we need to test the installed application | |
Open new terminal window | To do this open up a new command terminal terminal
|
Type in the terminal window | In the command terminal type 'icoFoam (Note that F here is capital) space -(dash) help
|
A mesage in the command terminal | A usage message will appear.
You are now ready to start with OpenFoam |
Set up working directory | Now let me show you how to set up a working directory. |
Create a project or a user directory by the name run | |
New terminal window | Open a new command terminal
|
Terminal window : mkdir -p $FOAM_RUN | In the Command Terminal type : mkdir (space) -p (space) $FOAM_RUN
|
Copy the tutorial directory | Copy the tutorial directory from openfoam distribution to run directory |
In terminal type : cp (space) -r (space) $FOAM_TUTORIALS (space) $FOAM_RUN | By typing in the terminal
cp (space) -r (space) $FOAM_TUTORIALS (space) $FOAM_RUN
|
Both the directories are now created. | |
To view the OpenFOAM directories | For view the directories go to Places > Home Folder > OpenFOAM. |
Ttt-210, click on it | You can see ttt-210, Click on it |
Click on run | Run and tutorials |
Close this
| |
Installation from source code | If some errors occurs during downloading OpenFOAM and Paraview
|
Download page of openfoam site | Go to the Download page of openfoam website
|
Scroll down and click on Source Pack Installation | |
Go to packs | Now scroll down and Go to Packs |
Download the two tar files | Download these 2 tar files and save them |
Go to your home directory | After this go to your home directory |
To do this go to Places > home folder
| |
Create a folder
|
In your home directory create a folder by any name of your choice
|
Copy the downloaded file in this folder | Copy the downloaded files in the folder you just created. |
To do this , copy these two tar file
| |
Unzip or Untar these two files in the same folder.
| |
Open new terminal window
|
After this open a new command terminal
|
type ls and press enter | |
Now go to the same folder where you have untared the two tar files | |
Type abc | Now type cd ( space ) abc and press enter. |
To view the contents inside abc type ls and press enter | |
Go to the downlaod page | Now go back to the Download page of OpenFOAM website
|
Follow the steps given on the website | Follow the steps given below for ubuntu distribution
|
Compile OpenFOAM and Paraview | We need to compile OpenFOAM and Paraview here |
It may take about 4 to 5 hours but this method always works .
| |
Slide 9 :
Diagram |
Let us see how to Solve a problem in OpenFOAM with an example |
Let me take “Lid Driven Cavity” as an example. | |
Upper plate moves with a velocity and other plates are fixed | It is a 2D problem where the upper plate moves with a certain velocity and
|
Slide : Solver icoFoam | The type of Solver I am using here is for incompressible flow
|
Open a command terminal | Now Open a new command terminal again
|
Path for lid driven cavity | Type the path for the lid driven cavity problem |
Already set up in openfoam | Note that this problem has already been set up in OpenFOAM |
In terminal window type run
|
in the command terminal Type 'run'
|
Type cd tutorials | Now type cd (space) tutorial (Press Enter) |
Type cd incompressible | cd (space) incompressible (Press Enter) |
Type cd icoFoam | cd (space) icoFoam (Note that F here is capital) (Press Enter) |
Type cd cavity | cd (space) cavity (Press Enter) |
Type ls | To view the content inside cavity type ls and press enter |
See the three folders | You can see three files : 0,constant and system |
Now we need to mesh the geometry | |
Meshing using blockMesh | Meshing can be done blockMesh utility of OpenFOAM |
In the terminal window type :
blockMesh |
In the terminal window type blockMesh
|
Meshing has been done | |
In terminal window type :
icoFoam |
Now run the solver 'icoFoam' by typing in the terminal
icoFoam
|
Look at the terminal window | The iterations running can be seen in the terminal window |
Solving is done | Here we notice we have completed the solving point. |
To visualise these results let us open the paraview window. | |
In the terminal window type : paraFoam | To open paraView, type “paraFoam” in the terminal.
|
This open the paraview window
| |
Left hand side in object inspector menu
|
On the left hand side,
|
You can see the Lid Driven Cavity | |
Boundary condition
|
To see the boundary conditions, scroll down the object inspector menu
|
Uncheck the internal mesh box | Uncheck Internel Mesh and click Apply |
The geometry disappear. | |
View the moving and fixed walls | Now for viewing the moving and fixedwalls
|
Check and uncheck the boxes | Now uncheck the Moving wall checkbox and click Apply |
Hover over the paraview window | You can now see the fixedwalls and the moving wall which just now disappeared. |
Thus we are done with running openfoam and paraview | |
In future we will come across more tutorials on solvers and post- procesing the OpenFOAM result | |
Let me switch back to the slide | |
Slide : Summary | In this tutorial we learnt how to install:
solved a lid driven cavity. |
Slide : Assignment | As as Assignment,
install OpenFOAM and Paraview This brings us to the end of the tutorial |
Slide 8:
About Spoken tutorials |
Watch the video available at this URL:
http://spoken-tutorial.org/What_is_a_Spoken_Tutorial It summarizes the Spoken Tutorial project. If you do not have good bandwidth, you can download and watch it. |
Slide 9:
About Spoken tutorials |
The Spoken Tutorial Project Team
-Conducts workshops using spoken tutorials -Gives certificates to those who pass an online test -For more details, please write to contact@spoken-tutorial.com |
Slide 10:
Acknowledgement |
Spoken Tutorials are part of Talk to a Teacher project,
It is supported by the National Mission on Education through ICT, MHRD, Government of India. More information on the same is available at the following URL link http://spoken-tutorial.org/NMEICT-Intro |
About the contributor | This is Rahul Joshi from IIT BOMBAY signing off.
Thanks for joining. |