Difference between revisions of "OpenFOAM/C2/Installing-Running/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with ''''Title of script''': Installing and Running OpenFOAM and Paraview '''Author''': Rahul Ashok Joshi '''Keywords''': Video Tutorial,Computational Fluid Dynamics (CFD) [http://…')
 
Line 1: Line 1:
'''Title of script''':  Installing and Running OpenFOAM and Paraview
+
Tutorial; Installing and Running OpenFOAM
  
'''Author''': Rahul Ashok Joshi
 
  
'''Keywords''': Video Tutorial,Computational Fluid Dynamics (CFD)
+
Script and Narration : Rahul Joshi
  
[http://spoken-tutorial.org/wiki/index.php/File:Tutorial1.tar.gz Click here for the slides]
 
  
{| border=1
+
Keywords: Video tutorial,CFD.
!Visual Cue
+
 
!Narration
+
 
 +
 
 +
{| style="border-spacing:0;"
 +
| style="border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| <center>Visual Cue</center>
 +
| style="border:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| <center>Narration</center>
 +
 
 
|-
 
|-
| Slide 1
+
| style="border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Slide 1:
|
+
 
Hello and welcome to the spoken tutorial on Installing and running OpenFOAM and paraView.
+
 
 +
 
 +
| style="border:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Hello and welcome to the spoken tutorial on Installing and running OpenFOAM and paraView.
 +
 
 +
 
 +
 
  
 
|-
 
|-
| Slide 2: Learning Objective
+
| style="border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Slide 2: Learning Objectives
|In this tutorial I will show you  
+
| style="border:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| In this tutorial I will show you  
 +
 
  
 
how to install and run  
 
how to install and run  
  
OpenFOAM 
 
  
ParaView , and
+
OpenFOAM
  
How to solve the lid driven cavity.
+
 
 +
Paraview and
 +
 
 +
 
 +
How to solve a lid driven cavity.
  
 
|-
 
|-
| Slide 3: System Requirement
+
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Slide 3:
|To record this tutorial  
+
 
 +
System Requirement
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| To record this tutorial  
 +
 
 +
 
 +
I am using Linux Operating system Ubuntu 10.04
  
I am using GNU / Linux Operating system Ubuntu 10.04
 
  
 
OpenFOAM version 2.1.0
 
OpenFOAM version 2.1.0
 +
  
 
ParaView version 3.12.0
 
ParaView version 3.12.0
 +
  
 
Note that OpenFOAM does not run on Windows platform.
 
Note that OpenFOAM does not run on Windows platform.
 +
  
 
Also Note OpenFOAM v 2.1.0 is compatible with linux version 10.04 and above.  
 
Also Note OpenFOAM v 2.1.0 is compatible with linux version 10.04 and above.  
  
 
|-
 
|-
| Slide 4:Prerequisites
+
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Slide 4
|To practice this tutorial you should have some basic knowledge of
+
  
Computational Fluid Dynamics.
+
Prerequisites
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| To practice this tutorial you should have some basic knowledge of
  
Linux Commands.
+
 
 +
Computational Fluid Dynamics.
 +
 
 +
 
 +
And Linux Commands.
  
 
|-
 
|-
| Slide 5
+
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Slide 5
|Let me introduce you to OpenFOAM
+
 
 +
About OpenFOAM
 +
 
 +
 
 +
 
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Let me introduce you to OpenFOAM
 +
 
 +
 
 +
It is an Open Source
 +
 
 +
 
 +
Computational Fluid Dynamics Software.
  
It is a Computational Fluid Dynamics Software.
 
  
 
It contains a wide range of solvers for solving CFD problems of
 
It contains a wide range of solvers for solving CFD problems of
 +
  
 
2dimensional  
 
2dimensional  
 +
  
 
as well as  
 
as well as  
 +
  
 
3dimensionals.
 
3dimensionals.
 +
 +
  
  
 
|-
 
|-
| Slide 6
+
| style="border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Slide 6:
|Now let me introduce you to Paraview:
+
 
 +
About paraView
 +
| style="border:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Now let me introduce you to Paraview:
 +
 
 
It is used for visualizing results obtained in OpenFOAM.
 
It is used for visualizing results obtained in OpenFOAM.
  
|-
+
 
|Slide 7: Install Openfoam and Paraview
+
|
+
OpenFOAM and Paraview can also be installed through Synaptic package manager
+
  
  
 
|-
 
|-
|Demonstration
+
| style="border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Slide 7:
|For Synaptic Package Manager go to System > Administration > Synaptic Package Manager
+
| style="border:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| OpenFOAM and paraView can also be installed through Synaptic package manager
 +
 
 +
|-
 +
| style="border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Demo:
 +
 
 +
Synaptic Package Manager
 +
| style="border:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| For Synaptic Package Manager go to System > Administration > Synaptic Package Manager
 +
 
  
 
Type your password.
 
Type your password.
  
In the Search Box type OpenFOAM .
 
  
You can see both OpenFOAM and Paraview
+
In the Search Box type OpenFOAM
 +
 
 +
 
 +
you can see openfoam as well as paraView.
 +
 
  
 
Mark both of them for installation  
 
Mark both of them for installation  
 +
  
 
Click on mark and then Apply
 
Click on mark and then Apply
  
It make take some time to install.
+
 
 +
Installation may take some time.
 +
 
  
 
OpenFOAM and Paraview are installed.
 
OpenFOAM and Paraview are installed.
  
Let me switch back to the slides
 
 
|-
 
|-
|Slide 7
+
| style="border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Slide 7
|For more details on Synaptic Package Manager  
+
| style="border:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| For more details on Synaptic Package Manager  
 +
 
  
 
please visit our website on this URL : http://www.spoken-tutorials.org
 
please visit our website on this URL : http://www.spoken-tutorials.org
 +
 +
 +
  
 
|-
 
|-
|Demonstration and Slide 8
+
| style="border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Demo and slide 8:
|Alternately you can also install OpenFOAM and paraView from openfoam website on this url: http://www.openfoam.com/download
+
 
 +
 
 +
 
 +
| style="border:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Alternately you can also install OpenFOAM and paraView from openfoam website on this url: http://www.openfoam.com/download
 +
 
 +
 
 +
Let me open up the browser
 +
 
 +
 
 +
In the browser URL type : [http://www.openfoam.com/download http://www.openfoam.com/download]
 +
 
 +
 
 +
Press Enter
 +
 
 +
 
 +
Scroll Down and go to Ubuntu Deb pack
 +
 
 +
 
 +
Let me zom this
 +
 
  
Open browser Firefox
+
Go to Ubuntu deb pack installation
  
In the browser URL type : http://www.openfoam.com/download
 
  
Ubuntu Debian pack > Ubuntu debian pack installation
 
 
Click on it
 
Click on it
  
Scroll down and go to installation
 
  
From the first point of installation copy the first command line and paste it in command terminal.
+
Let me zoom out
 +
 
 +
 
 +
Scroll down
 +
 
 
|-
 
|-
|Demonstration:
+
| style="border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Demo
|From the first point of installation copy the command line and paste it in the terminal window.
+
| style="border:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| From the first point of installation copy the command line and paste it in the terminal window.
 +
 
 +
 
 +
To open up a the terminal window press Ctrl,Alt and t keys simultaneously on your keyboard
  
To open the terminal window press Ctrl,Alt and t keys simultaneously
 
 
or  
 
or  
 +
 
go to Application > Accessories > Terminal  
 
go to Application > Accessories > Terminal  
  
Note in place of 'lsb_release -cs' replace it with the name of  Linux version you are using.
 
  
Above installation you will see the code name for the different Linux versions, as i am using Linux 10.04 i will replace lbs_release -cs by lucid.  
+
Open up a terminal window
 +
 
 +
 
 +
Now copy this command line and paste it in the terminal window
 +
 
 +
 
 +
Note that in place of 'lsb_release -cs' replace it with the name of Linux version you are using.
 +
 
 +
 
 +
Switch back to the browser
 +
 
 +
 
 +
Above installation you can see different ubuntu versions and the code names,  
 +
 
 +
 
 +
as i am using Linux 10.04 i will replace lbs_release -cs by ''lucid''.
 +
 
 +
 
 +
Open up a terminal window
 +
 
 +
 
 +
I will replace this by lucid
 +
 
 +
 
 +
Press enter
 +
 
 +
 
 +
Note that Installation here is incomplete if you follow the steps in the
 +
 
 +
 
 +
sequence 1-2-3-4 you will be done through with the installation.
 +
 
 +
 
 +
I have already installed OpenFOAM through Synaptic Pacakage Manage some while ago.
 +
 
  
Installation here is incomplete if you follow the steps in the sequence 1-2-3-4 you will be done through with the installation.
 
  
I have already installed OpenFOAM through Synaptic Package Manage  some while ago.
 
  
 
|-
 
|-
|Demonstration:Configure Software after Installation from Synaptic Package Manager or website
+
| style="border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Demo:
|After the software has been installed we need to configure it, to do this we need to edit the bash file.
+
  
Open a new terminal window.
+
Configure the software and test its working
 +
| style="border:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Now we need to configure the installed software
  
Open the .bashrc file by typing in terminal by  : 'gedit ~/.bashrc'
 
This opens up the bash file, scroll down to the bottom of the file.
 
  
Under installation you can see User configuration.
+
To do this we need to edit the bash file.
  
Now go to the second line and copy it.,and paste it at the bottom of the bash file :
 
'source/opt/openfoam201/etc/bashrc'
 
  
Close the bash file.
+
Open a new command terminal.
 +
 
 +
 
 +
In the command terminal type : ''''gedit ~/.bashrc''''
 +
 
 +
This opens up the bash file,
 +
 
 +
 
 +
Let me drag this to the capture area
 +
 
 +
 
 +
scroll down to the bottom of the bash file.
 +
 
 +
 
 +
Now switch back to the browser
 +
 
 +
 
 +
Scroll down and go to user configration
 +
 
 +
 
 +
Look at the second point
 +
 
 +
 
 +
Copy this line
 +
 
 +
 
 +
And paste it at the botttom of the bash file
 +
 
 +
 
 +
Save it and Close the bash file.
 +
 
  
 
Now we need to test the installed application.
 
Now we need to test the installed application.
  
To do this open up a new command terminal terminal again.
 
  
In the command terminal type 'icoFoam -help'.
+
To do this open up a new command terminal terminal
 +
 
 +
 
 +
Let me drag this to the capture area
 +
 
 +
 
 +
In the command terminal type ''''icoFoam (Note that F here is capital) space -(dash) help''''.
 +
 
 +
 
 +
Press enter
 +
 
  
 
A usage message will appear.
 
A usage message will appear.
  
You are now ready to start with OpenFoam
+
 
 +
You are now ready to start with openFoam
 +
 
 +
 
 +
 
  
 
|-
 
|-
|Demonstration:Set up working Directory
+
| style="border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Demo:
|Now let me show you how to set up a working directory.
+
 
 +
Set up working Directory
 +
 
 +
 
 +
 
 +
| style="border:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Now let me show you how to set up a working directory.
 +
 
  
 
Create a project or a user directory by the name run.
 
Create a project or a user directory by the name run.
 +
  
 
Open a new command terminal.
 
Open a new command terminal.
  
In the Command Terminal type : 'mkdir -p $FOAM_RUN' (Press Enter)
+
 
 +
Let me drag this to the capture area again
 +
 
 +
 
 +
In the Command Terminal type : ''''mkdir (space) -p (space) $FOAM_RUN''''
 +
 
  
 
(Please note FOAM and RUN are in capital)
 
(Please note FOAM and RUN are in capital)
 +
 +
 +
Press Enter
 +
  
 
Copy the tutorial directory from openfoam distribution to run directory:  
 
Copy the tutorial directory from openfoam distribution to run directory:  
'cp -r $FOAM_TUTORIALS $FOAM_RUN ' (Press Enter)
 
  
(Please note TUTORIAL,FOAM and RUN are capital)
+
By typing in the terminal ''''cp (space) -r (space) $FOAM_TUTORIALS (space) $FOAM_RUN '''' (Press Enter)
 +
 
 +
 
 +
(Please note TUTORIAL and FOAM are in capital)
 +
 
  
 
Both the directories are now created.
 
Both the directories are now created.
  
For viewing both the directories go to Places > Home Folder > OpenFOAM.
 
  
Now let me shift to the slides.
+
For view the directories go to Places > Home Folder > OpenFOAM.
 +
 
 +
 
 +
You can see ttt-210, Click on it
 +
 
 +
 
 +
Run and tutorials
 +
 
 +
 
 +
Close this
 +
 
 +
 
 +
Now let me switch back to the slides.
 +
 
 +
 
 +
 
  
 
|-
 
|-
|Demonstration:
+
| style="border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| From source code
|If some errors occurs during downloading OpenFOAM and Paraview
+
| style="border:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| If some errors occurs during downloading OpenFOAM and Paraview  
form the Ubuntu Deb pack from website or Synaptic Package Manager
+
then you can download and install Openfoam and paraview from the
+
source pack installation:
+
Go to the Download page > Source Pack Installation
+
  
Go to Packs and download the 2 tar files and save them.
 
  
Create a folder in your Home Directory by any name of your choice
+
form Synaptic Package Manager or Ubuntu Deb pack from website
  
Copy the downloaded files in this folder you just created.
 
  
Untar or unzip the files in the same folder.
+
then you can download and install Openfoam and paraview from the source pack installation:
  
In the command terminal go to the same folder in which you have untared
 
the tar files.
 
  
For installation we need to compile OpenFOAM and Paraview.
+
For source pack installation
  
Follow the steps given below for Linux distribution for OpenFOAM and
 
Paraview.
 
  
Installation may take about 4 to 5 hours but this works always.
+
Go to the Download page of openfoam website
 +
 
 +
 
 +
Now let me zoom this
 +
 
 +
 
 +
Scroll down and click on Source Pack Installation  
 +
 
 +
 
 +
Now scroll down and Go to Packs
 +
 
 +
 
 +
Download these 2 tar files and save them.
 +
 
 +
 
 +
I have already downloaded and saved these tar file
 +
 
 +
 
 +
After this go to your home directory
 +
 
 +
 
 +
To do this go to Places > home folder
 +
 
 +
 
 +
Let me drag this to the capture area
 +
 
 +
 
 +
In your home directory create a folder by any name of your choice
 +
 
 +
 
 +
Let me put this as '''abc'''
 +
 
 +
 
 +
Copy the downloaded files in the folder you just created.
 +
 
 +
 
 +
To do this , copy these two tar file
 +
 
 +
 
 +
And paste it into the folder you just created
 +
 
 +
 
 +
Unzip or Untar these two files in the same folder.
 +
 
 +
 
 +
Extract here, this make take a couple of minutes
 +
 
 +
 
 +
After this open a new command terminal
 +
 
 +
 
 +
In this go to your home folder
 +
 
 +
 
 +
type ls and press enter
 +
 
 +
 
 +
Now go to the same folder where you have untared the two tar files
 +
 
 +
 
 +
Now type cd space abc and press enter.
 +
 
 +
 
 +
To view the contents inside abc type ls and press enter
 +
 
 +
 
 +
Now go back to the Download page of OpenFOAM website
 +
 
 +
 
 +
for source pack installation
 +
 
 +
 
 +
Follow the steps given below for ubuntu distribution for 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
+
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Slide 9 :
|
+
 
Let us see how to Solve a problem in OpenFOAM with an example
+
Diagram
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Let us see how to Solve a problem in OpenFOAM with an example
 +
 
  
 
Let me take “Lid Driven Cavity” as an example.
 
Let me take “Lid Driven Cavity” as an example.
 +
  
 
It is a 2D problem where the upper plate moves with a certain velocity a
 
It is a 2D problem where the upper plate moves with a certain velocity a
 +
  
 
and other three sides of the plate are fixed.
 
and other three sides of the plate are fixed.
 
  
 
|-
 
|-
|Slide 10:Solver
+
| style="border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Display Slide 10 :
|The type of Solver I am using here is for incompressible flow-icofoam
+
| style="border:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| The type of Solver I am using here is for incompressible flow
 +
 
 +
 
 +
Called as -icofoam
 +
 
 +
 
 +
 
  
 
|-
 
|-
|Demonstration:Run OpenFOAM
+
| style="border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Demo:
|Open a new terminal window.
+
  
Type 'run' in the command terminal.
+
Running the first example in openfoam
 +
| style="border:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Now Open a new command terminal again
  
This will direct you to the run directory. (Press Enter)
 
  
Type the path for Lid driven cavity problem:
+
Let me drag this to the capture area
  
Now type cd tutorial    (Press Enter)
 
                cd incompressible (Press Enter)
 
                cd icoFoam  (Press Enter)
 
                cd cavity  (Press Enter)
 
  
You can see three files : 0,constant and system.
+
Type the path for the lid driven cavity problem
 +
 
 +
 
 +
Note that this problem has already been set up in OpenFOAM
 +
 
 +
 
 +
in the command terminal Type ''''run''''.
 +
 
 +
 
 +
This will direct you to the run directory of OpenFOAM -Press Enter
 +
 
 +
 
 +
Now type '''cd (space) tutorial '''(Press Enter)
 +
 
 +
'''cd (space) incompressible '''(Press Enter)''' '''
 +
 
 +
'''cd (space) icoFoam (Note that F here is capital) '''(Press Enter)
 +
 
 +
'''cd (space) cavity '''(Press Enter)
 +
 
 +
 
 +
To view the content inside cavity '''type ls''' and press enter
 +
 
 +
 
 +
You can see three files : '''0,constant and system.'''
 +
 
 +
 
 +
Now we need to mesh the geometry
 +
 
 +
 
 +
Meshing can be done '''blockMesh '''utility of OpenFOAM
 +
 
 +
 
 +
In the \ terminal window type blockMesh (Note here that M is capital)
  
Mesh the geometry using blockMesh utility
 
In the command terminal type blockMesh (Note here that M is capital)
 
 
(Press Enter)
 
(Press Enter)
  
Now run the solver 'icoFoam' by typing in the terminal icoFoam
+
 
 +
Meshing has been done
 +
 
 +
 
 +
Now run the solver ''''icoFoam'''' by typing in the terminal ''icoFoam''
 +
 
 
(Note here that F is capital) and Press Enter.
 
(Note here that F is capital) and Press Enter.
  
 
|-
 
|-
|Demonstration: Run Paraview
+
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Demo:
|
+
 
The iterations which are running can be seen in the terminal window.
+
Using paraView
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| The iterations running can be seen in the terminal window.
 +
 
  
 
Here we notice we have completed the solving point.
 
Here we notice we have completed the solving point.
  
To visualize these results let us open the paraview window.
 
  
To open paraView, type “paraFoam” in the terminal.
+
To visualise these results let us open the paraview window.
 +
 
 +
 
 +
To open paraView, type “'''paraFoam” '''in the terminal.
 +
 
 
(Note that 'F' is capital here) and press Enter
 
(Note that 'F' is capital here) and press Enter
  
Let me shift this into the capture area.
+
 
 +
This open the paraview window
 +
 
  
 
On the left hand side,  
 
On the left hand side,  
 +
  
 
In the object inspector menu,  
 
In the object inspector menu,  
  
Click on  Apply to view the geometry.
 
  
To view the moving and the fixed walls, scroll down the object inspector menu and go to Mesh Parts:
+
Click Apply to view the geometry.
  
Uncheck Internel Mesh box. The geometry will disappear.
 
  
Check the moving and fixed wall boxes.
+
You can see the Lid Driven Cavity
You can see the boundary conditions.
+
 
 +
 
 +
To see the boundary conditions, scroll down the object inspector menu
 +
 
 +
 
 +
and go to Mesh Parts:
 +
 
 +
 
 +
Uncheck Internel Mesh and click Apply
 +
 
 +
 
 +
The geometry disappear.
 +
 
 +
 
 +
Now for viewing the moving and fixedwalls
 +
 
 +
 
 +
Check both the boxes and click Apply
 +
 
 +
 
 +
Now uncheck the Moving wall checkbox and click Apply
 +
 
 +
 
 +
You can now see the fixedwalls and the moving wall which just now disappeared.
  
Now uncheck the Moving wall checkbox.You can now see the fixedwalls and the moving wall which just now disappeared.
 
  
 
Thus we are done with running openfoam and paraview.
 
Thus we are done with running openfoam and paraview.
In future we will come across more tutorials on solvers and post- processing the results of OpenFOAM.
+
 
 +
 
 +
In future we will come across more tutorials on solvers and post- procesing the OpenFOAM results
 +
 
 +
 
 +
Let me switch back to the slides
 +
 
 +
 
  
  
 
|-
 
|-
| Slide 11:Summary
+
| style="border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Slide 11:
|In this tutorial we learnt how to install
+
 
 +
Summary
 +
 
 +
 
 +
 
 +
| style="border:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| In this tutorial we learnt how to install
 +
 
 
OpenFOAM and Paraview through Synaptic Package Manager and the website
 
OpenFOAM and Paraview through Synaptic Package Manager and the website
 +
 
solved a lid driven cavity.
 
solved a lid driven cavity.
 +
 +
 +
  
 
|-
 
|-
| Slide 12:Assignment
+
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Slide 12:
|As as Assignment,  
+
 
please  install OpenFOAM and Paraview
+
Assignment
 +
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| As as Assignment,  
 +
 
 +
install OpenFOAM and Paraview
 +
 
 
This brings us to the end of the tutorial
 
This brings us to the end of the tutorial
  
 
|-
 
|-
| Slide 13 & 14:About Spoken Tutorial
+
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Slide 13 & 14 about Spoken tutorials
|
+
| style="border-top:none;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Watch the video available at this URL:
The video available at this URL:
+
 
 
http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  
 
http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  
It summarizes the Spoken Tutorial project.  
+
 
 +
It summarizes the Spoken Tutorial project.  
 +
 
 
If you do not have good bandwidth, you can download and watch it.  
 
If you do not have good bandwidth, you can download and watch it.  
 +
 +
 +
Acknowde...left
  
 
|-
 
|-
| Slide 15:Acknowledgement
+
| style="border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| Slide 15
|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.  
+
  
This project is coordinated by http://spoken-tutorial.org
+
Acknowledgement
 +
 
 +
 
 +
 
 +
| style="border:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| 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
 
More information on the same is available at the following URL link http://spoken-tutorial.org/NMEICT-Intro
  
 
|-
 
|-
|Slide 16:About the contributor
+
| style="border-top:1pt solid #000000;border-bottom:1pt solid #000000;border-left:1pt solid #000000;border-right:none;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| About the contributor
|This is Rahul Joshi from IIT BOMBAY signing off.
+
| style="border:1pt solid #000000;padding-top:0in;padding-bottom:0in;padding-left:0.075in;padding-right:0.075in;"| This is Rahul Joshi from IIT BOMBAY signing off.
 +
 
 
Thanks for joining.
 
Thanks for joining.
 +
 +
|}

Revision as of 02:09, 6 March 2013

Tutorial; Installing and Running OpenFOAM


Script and Narration : Rahul Joshi


Keywords: Video tutorial,CFD.


Visual Cue
Narration
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


how to install and run


OpenFOAM


Paraview and


How to solve a lid driven cavity.

Slide 3:

System Requirement

To record this tutorial


I am using Linux Operating system Ubuntu 10.04


OpenFOAM version 2.1.0


ParaView version 3.12.0


Note that OpenFOAM does not run on Windows platform.


Also Note OpenFOAM v 2.1.0 is compatible with linux version 10.04 and above.

Slide 4

Prerequisites

To practice this tutorial you should have some basic knowledge of


Computational Fluid Dynamics.


And Linux Commands.

Slide 5

About OpenFOAM


Let me introduce you to OpenFOAM


It is an Open Source


Computational Fluid Dynamics Software.


It contains a wide range of solvers for solving CFD problems of


2dimensional


as well as


3dimensionals.



Slide 6:

About paraView

Now let me introduce you to Paraview:

It is used for visualizing results obtained in OpenFOAM.



Slide 7: OpenFOAM and paraView can also be installed through Synaptic package manager
Demo:

Synaptic Package Manager

For Synaptic Package Manager go to System > Administration > Synaptic Package Manager


Type your password.


In the Search Box type OpenFOAM


you can see openfoam as well as 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


please visit our website on this URL : http://www.spoken-tutorials.org



Demo and slide 8:


Alternately you can also install OpenFOAM and paraView from openfoam website on this url: http://www.openfoam.com/download


Let me open up the browser


In the browser URL type : http://www.openfoam.com/download


Press Enter


Scroll Down and go to Ubuntu Deb pack


Let me zom this


Go to Ubuntu deb pack installation


Click on it


Let me zoom out


Scroll down

Demo From the first point of installation copy the command line and paste it in the terminal window.


To open up a the terminal window press Ctrl,Alt and t keys simultaneously on your keyboard

or

go to Application > Accessories > Terminal


Open up a terminal window


Now copy this command line and paste it in the terminal window


Note that in place of 'lsb_release -cs' replace it with the name of Linux version you are using.


Switch back to the browser


Above installation you can see different ubuntu versions and the code names,


as i am using Linux 10.04 i will replace lbs_release -cs by lucid.


Open up a terminal window


I will replace this by lucid


Press enter


Note that Installation here is incomplete if you follow the steps in the


sequence 1-2-3-4 you will be done through with the installation.


I have already installed OpenFOAM through Synaptic Pacakage Manage some while ago.



Demo:

Configure the software and test its working

Now we need to configure the installed software


To do this we need to edit the bash file.


Open a new command terminal.


In the command terminal type : 'gedit ~/.bashrc'

This opens up the bash file,


Let me drag this to the capture area


scroll down to the bottom of the bash file.


Now switch back to the browser


Scroll down and go to user configration


Look at the second point


Copy this line


And paste it at the botttom of the bash file


Save it and Close the bash file.


Now we need to test the installed application.


To do this open up a new command terminal terminal


Let me drag this to the capture area


In the command terminal type 'icoFoam (Note that F here is capital) space -(dash) help'.


Press enter


A usage message will appear.


You are now ready to start with openFoam



Demo:

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.


Open a new command terminal.


Let me drag this to the capture area again


In the Command Terminal type : 'mkdir (space) -p (space) $FOAM_RUN'


(Please note FOAM and RUN are in capital)


Press Enter


Copy the tutorial directory from openfoam distribution to run directory:

By typing in the terminal 'cp (space) -r (space) $FOAM_TUTORIALS (space) $FOAM_RUN ' (Press Enter)


(Please note TUTORIAL and FOAM are in capital)


Both the directories are now created.


For view the directories go to Places > Home Folder > OpenFOAM.


You can see ttt-210, Click on it


Run and tutorials


Close this


Now let me switch back to the slides.



From source code If some errors occurs during downloading OpenFOAM and Paraview


form Synaptic Package Manager or Ubuntu Deb pack from website


then you can download and install Openfoam and paraview from the source pack installation:


For source pack installation


Go to the Download page of openfoam website


Now let me zoom this


Scroll down and click on Source Pack Installation


Now scroll down and Go to Packs


Download these 2 tar files and save them.


I have already downloaded and saved these tar file


After this go to your home directory


To do this go to Places > home folder


Let me drag this to the capture area


In your home directory create a folder by any name of your choice


Let me put this as abc


Copy the downloaded files in the folder you just created.


To do this , copy these two tar file


And paste it into the folder you just created


Unzip or Untar these two files in the same folder.


Extract here, this make take a couple of minutes


After this open a new command terminal


In this go to your home folder


type ls and press enter


Now go to the same folder where you have untared the two tar files


Now type cd space abc and press enter.


To view the contents inside abc type ls and press enter


Now go back to the Download page of OpenFOAM website


for source pack installation


Follow the steps given below for ubuntu distribution for 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.


It is a 2D problem where the upper plate moves with a certain velocity a


and other three sides of the plate are fixed.

Display Slide 10 : The type of Solver I am using here is for incompressible flow


Called as -icofoam



Demo:

Running the first example in openfoam

Now Open a new command terminal again


Let me drag this to the capture area


Type the path for the lid driven cavity problem


Note that this problem has already been set up in OpenFOAM


in the command terminal Type 'run'.


This will direct you to the run directory of OpenFOAM -Press Enter


Now type cd (space) tutorial (Press Enter)

cd (space) incompressible (Press Enter)

cd (space) icoFoam (Note that F here is capital) (Press Enter)

cd (space) cavity (Press Enter)


To view the content inside cavity type ls and press enter


You can see three files : 0,constant and system.


Now we need to mesh the geometry


Meshing can be done blockMesh utility of OpenFOAM


In the \ terminal window type blockMesh (Note here that M is capital)

(Press Enter)


Meshing has been done


Now run the solver 'icoFoam' by typing in the terminal icoFoam

(Note here that F is capital) and Press Enter.

Demo:

Using paraView

The iterations running can be seen in the terminal window.


Here we notice we have completed the solving point.


To visualise these results let us open the paraview window.


To open paraView, type “paraFoam” in the terminal.

(Note that 'F' is capital here) and press Enter


This open the paraview window


On the left hand side,


In the object inspector menu,


Click Apply to view the geometry.


You can see the Lid Driven Cavity


To see the boundary conditions, scroll down the object inspector menu


and go to Mesh Parts:


Uncheck Internel Mesh and click Apply


The geometry disappear.


Now for viewing the moving and fixedwalls


Check both the boxes and click Apply


Now uncheck the Moving wall checkbox and click Apply


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 results


Let me switch back to the slides



Slide 11:

Summary


In this tutorial we learnt how to install

OpenFOAM and Paraview through Synaptic Package Manager and the website

solved a lid driven cavity.



Slide 12:

Assignment

As as Assignment,

install OpenFOAM and Paraview

This brings us to the end of the tutorial

Slide 13 & 14 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.


Acknowde...left

Slide 15

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.

Contributors and Content Editors

Chandrika, Rahuljoshi