Difference between revisions of "OpenFOAM/C3/Simulating-Hagen-Poiseuille-flow/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with 'Tutorial: To simulate Hagen-Poiseuille flow in OpenFOAM. Script and Narration : Saurabh S. Sawant Keywords: Video tutorial,CFD. {| style="border-spacing:0;" | style="bord…')
 
Line 1: Line 1:
 
Tutorial: To simulate Hagen-Poiseuille flow in OpenFOAM.
 
Tutorial: To simulate Hagen-Poiseuille flow in OpenFOAM.
 
  
 
Script and Narration : Saurabh S. Sawant
 
Script and Narration : Saurabh S. Sawant
 
  
 
Keywords: Video tutorial,CFD.  
 
Keywords: Video tutorial,CFD.  
Line 9: Line 7:
  
  
{| style="border-spacing:0;"
+
{|Border=1
| style="border-top:0.05pt solid #000000;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| <center>Visual Cue</center>
+
!Visual Cue
| style="border:0.05pt solid #000000;padding:0.097cm;"| <center>Narration</center>
+
!Narration
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 1:
+
| Slide 1:
  
 
+
| Hello and welcome to the spoken tutorial on simulating '''Hagen-Poiseuille flow''' in '''OpenFOAM'''.
 
+
| 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;"| Hello and welcome to the spoken tutorial on simulating '''Hagen-Poiseuille flow''' in '''OpenFOAM'''.
+
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 2 : Learning Objectives
+
| Slide 2 : Learning Objectives
  
  
  
| 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;"| In this tutorial we will see:
+
| In this tutorial we will see:
 
+
  
 
* To create and '''mesh 3D cylindrical pipe.'''<br/>  
 
* To create and '''mesh 3D cylindrical pipe.'''<br/>  
Line 33: Line 28:
  
 
* To visualize the '''velocity contour '''in '''ParaView'''.
 
* To visualize the '''velocity contour '''in '''ParaView'''.
 
 
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 3: System Requirement  
+
| Slide 3: System Requirement  
  
 +
| To record this tutorial, I am using
  
 +
*'''Linux Operating system Ubuntu '''12.04
  
| 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;"| To record this tutorial
+
*'''OpenFOAM version '''2.1.1
  
 
+
*'''ParaView''' '''version '''3.12.0  
I am using '''Linux''' '''Operating system''' '''Ubuntu '''12.04
+
 
+
 
+
'''OpenFOAM version '''2.1.1
+
 
+
 
+
'''ParaView''' '''version '''3.12.0  
+
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 4: Prerequisites
+
| Slide 4: Prerequisites
 
+
 
+
  
| 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;"| To practice this tutorial learner should have the knowledge of  
+
| To practice this tutorial learner should have the knowledge of  
  
 
Basic '''Fluid Dynamics'''
 
Basic '''Fluid Dynamics'''
  
 
and '''Hagen-Poiseuille''' '''flow'''
 
and '''Hagen-Poiseuille''' '''flow'''
 
 
 
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 5:
+
| Slide 5:
  
 
Hagen-Poiseuille Flow Diagram
 
Hagen-Poiseuille Flow Diagram
Line 73: Line 56:
  
 
Read aloud the given points and show the contents in the diagram with the mouse pointer.
 
Read aloud the given points and show the contents in the diagram with the mouse pointer.
| 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;"| Here is, '''Hagen-Poiseuille''' '''Flow''' Diagram.
+
| Here is, '''Hagen-Poiseuille''' '''Flow''' Diagram.
 
+
  
 
We can see the '''dimensions and boundaries''' of the pipe.
 
We can see the '''dimensions and boundaries''' of the pipe.
 
  
 
'''Viscosity''' of fluid used, that is, water is given.
 
'''Viscosity''' of fluid used, that is, water is given.
 
  
 
Pressure at the '''inlet''' is 20''' Pascals''' and '''outlet''' is 0''' Pascals.'''
 
Pressure at the '''inlet''' is 20''' Pascals''' and '''outlet''' is 0''' Pascals.'''
 
  
 
As it is an '''incompressible flow''', only the pressure difference is of importance.
 
As it is an '''incompressible flow''', only the pressure difference is of importance.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 6:
+
| Slide 6:
  
 
Formulas and Analytical Solution
 
Formulas and Analytical Solution
 
  
 
Read aloud the given points
 
Read aloud the given points
| 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;"| '''Formulas and Analytical Solution:'''
+
| '''Formulas and Analytical Solution:'''
 
+
  
 
For '''Hagen-Poiseuille flow,'''
 
For '''Hagen-Poiseuille flow,'''
 
  
 
'''Pressure drop''' along the pipe is:  
 
'''Pressure drop''' along the pipe is:  
 
  
 
('''P1 minus P2''') equals ('''32 mew Uaverage L''') upon ('''D square''')
 
('''P1 minus P2''') equals ('''32 mew Uaverage L''') upon ('''D square''')
 
  
 
By substituting the values from the previous diagram, we get,
 
By substituting the values from the previous diagram, we get,
  
 
'''Uaverage''' equals to 0.208 '''m/s'''
 
'''Uaverage''' equals to 0.208 '''m/s'''
 
  
 
'''Maximum Velocity''' is given as,
 
'''Maximum Velocity''' is given as,
  
 
Two times the '''average velocity''', which would be, 0.416''' m/s'''
 
Two times the '''average velocity''', which would be, 0.416''' m/s'''
 
  
 
'''Reynolds Number''' for the flow is,
 
'''Reynolds Number''' for the flow is,
Line 123: Line 95:
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 7: Transient Solver
+
| Slide 7: Transient Solver
  
 
+
| Type of solver used here is,
 
+
| 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;"| Type of solver used here is,
+
  
 
'''IcoFOAM'''
 
'''IcoFOAM'''
Line 133: Line 103:
  
 
It is a '''Transient Solver'''  
 
It is a '''Transient Solver'''  
 
  
 
It is used for '''incompressible, laminar flow of Newtonian fluids.'''
 
It is used for '''incompressible, laminar flow of Newtonian fluids.'''
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 8:
+
| Slide 8:
  
 
Pressure Boundary Conditions
 
Pressure Boundary Conditions
  
 
+
| '''Pressure Boundary Conditions '''used,
 
+
| 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;"| '''Pressure Boundary Conditions '''used,
+
 
+
  
 
At '''Inlet: fixedPressure'''
 
At '''Inlet: fixedPressure'''
Line 152: Line 118:
  
 
At '''Walls: ZeroGradient'''
 
At '''Walls: ZeroGradient'''
 
 
 
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 9:
+
| Slide 9:
  
 
Velocity Boundary Conditions
 
Velocity Boundary Conditions
  
 
+
| '''Velocity Boundary Conditions''' used,
 
+
| 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;"| '''Velocity Boundary Conditions''' used,
+
 
+
  
 
At '''Inlet: pressureInletVelocity'''
 
At '''Inlet: pressureInletVelocity'''
Line 173: Line 133:
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Show 3dpipe folder.
+
| Show 3dpipe folder.
 
+
  
 
Show the 3dpipe folder
 
Show the 3dpipe folder
| 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;"| For executing this case,
+
| For executing this case,
 
+
  
 
First, Let's create the '''case directory''' in ''''icoFoam'''' folder.
 
First, Let's create the '''case directory''' in ''''icoFoam'''' folder.
  
 
Give it some name.
 
Give it some name.
 
  
 
I have named it as''' '3dpipe''''.
 
I have named it as''' '3dpipe''''.
 
 
 
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Point the mouse pointer from lid driven folder to 3d pipe folder.
+
| Point the mouse pointer from lid driven folder to 3d pipe folder.
| 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;"| To know the location of this folder, go through the tutorial on '''lid driven cavity'''.
+
| To know the location of this folder, go through the tutorial on '''lid driven cavity'''.
 
+
  
 
Copy the ''''0' (zero), 'constant'''' and ''''system'''' folders of '''lid driven cavity''' problem in the newly created folder.
 
Copy the ''''0' (zero), 'constant'''' and ''''system'''' folders of '''lid driven cavity''' problem in the newly created folder.
Line 201: Line 154:
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Go inside the 3dpipe folder.
+
| Go inside the 3dpipe folder.
| 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;"| Let's go inside the ''''3dpipe'''' folder.
+
| Let's go inside the ''''3dpipe'''' folder.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Hover the pointer over the folder inside the 3dpipe folder.
+
| Hover the pointer over the folder inside the 3dpipe folder.
| 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;"| I have already copied the folders into my ''''3dpipe'''' folder and modified the files in it.
+
| I have already copied the folders into my ''''3dpipe'''' folder and modified the files in it.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Go into the '0' folder and open P file and show it
+
| Go into the '0' folder and open P file and show it
| 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's go into the ''''0'''' folder.
+
| Now, let's go into the ''''0'''' folder.
 
+
  
 
And open the ''''P'''' file.
 
And open the ''''P'''' file.
 
  
 
This is the''' pressure boundary condition''' file.
 
This is the''' pressure boundary condition''' file.
 
 
 
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Show the pressure boundary condition file and show the dimensions inside it.
+
| Show the pressure boundary condition file and show the dimensions inside it.
| 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;"| Note that the dimensions are in '''(meter square) per (second square)''' '''(m2/s2)'''.
+
| Note that the dimensions are in '''(meter square) per (second square)''' '''(m2/s2)'''.
 
+
 
+
 
+
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Show the pressure value written
+
| Show the pressure value written
| 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;"| Hence the''' pressure '''value in '''pascals''' is divided by '''density''', that is, 1000''' Kg/m3''' '''(Kg per meter cube),''' and written here.  
+
| Hence the''' pressure '''value in '''pascals''' is divided by '''density''', that is, 1000''' Kg/m3''' '''(Kg per meter cube),''' and written here.  
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Close the file
+
| Close the file
| 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;"| Let's close the file.
+
| Let's close the file.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Open U file in the same folder and show
+
| Open U file in the same folder and show
| 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;"| File containing '''velocity boundary condition '''is as shown:
+
| File containing '''velocity boundary condition '''is as shown:
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Close the file and come out of the '0' folder
+
| Close the file and come out of the '0' folder
| 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;"| Let's close the file and come out of the ''''0'''' folder.
+
| Let's close the file and come out of the ''''0'''' folder.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Switch back to the slides
+
| Switch back to the slides
| 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;"| To see the '''blocking strategy''', let me switch back to the slides.
+
| To see the '''blocking strategy''', let me switch back to the slides.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 10: Blocking Strategy
+
| Slide 10: Blocking Strategy
  
 
Hover the pointer on the geometry and drag it towards the z direction.
 
Hover the pointer on the geometry and drag it towards the z direction.
| 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;"| To create a '''3D geometry''' of a pipe I have made a '''2D''' circular '''geometry '''and extruded the length in the z direction.
+
| To create a '''3D geometry''' of a pipe I have made a '''2D''' circular '''geometry '''and extruded the length in the z direction.
 
+
 
+
 
+
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Point out the numbering pattern.
+
| Point out the numbering pattern.
| 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;"| Numbering Pattern is as shown.
+
| Numbering Pattern is as shown.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Minimize the slides
+
| Minimize the slides
| 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;"| To see the '''blockMeshDict''' file, let's minimize the slides.
+
| To see the '''blockMeshDict''' file, let's minimize the slides.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Go to folder 'constant' and then 'polyMesh' and open blockMeshDict file and show it.
+
| Go to folder 'constant' and then 'polyMesh' and open blockMeshDict file and show it.
| 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;"| Let's go into the folder ''''constant',''' and then ''''polyMesh'.'''
+
| Let's go into the folder ''''constant',''' and then ''''polyMesh'.'''
  
 
Final '''blockMeshDict '''file is as shown:
 
Final '''blockMeshDict '''file is as shown:
 
 
 
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Close the file and come out of the folder 'constant'
+
| Close the file and come out of the folder 'constant'
| 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;"| Let's close the file and come out of the ''''constant'''' folder.
+
| Let's close the file and come out of the ''''constant'''' folder.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Open and show transportProperties file and point at the value viscosity value
+
| Open and show transportProperties file and point at the value viscosity value
| 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 see the ''''transportProperties' '''file.
+
| We see the ''''transportProperties' '''file.
  
 
Note the '''dynamic viscosity '''value, here, is 1e-06.
 
Note the '''dynamic viscosity '''value, here, is 1e-06.
 
 
 
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Close the file and come out of the 'constant' folder.
+
| Close the file and come out of the 'constant' folder.
| 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;"| Let's close the file and come out to the ''''constant' '''folder.
+
| Let's close the file and come out to the ''''constant' '''folder.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Go into the system folder and open the controlDict file. Show it.
+
| Go into the system folder and open the controlDict file. Show it.
| 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;"| Let's go into the ''''system'''' folder.
+
| Let's go into the ''''system'''' folder.
  
 
Now, let's have a look at the ''''controlDict'''' file.  
 
Now, let's have a look at the ''''controlDict'''' file.  
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Show time step value
+
| Show time step value
| 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 '''time step''' has been set to 1e-03.
+
| The '''time step''' has been set to 1e-03.
  
 
The solution '''converges''' after 18 seconds. The final '''time step''' is kept 19.
 
The solution '''converges''' after 18 seconds. The final '''time step''' is kept 19.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Close the file and the Home folder
+
| Close the file and the Home folder
| 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;"| Let's close the file.
+
| Let's close the file.
  
 
Let's close the ''''Home'''' folder.
 
Let's close the ''''Home'''' folder.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Press 'control', 'alt' and 't' keys altogether
+
| Press 'control', 'alt' and 't' keys altogether
| 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 to '''execute''' the case, we will, first, go inside the ''''3dpipe'''' folder through terminal.Let's open the terminal by pressing ''''control', 'alt' '''and''' 't'''' keys, altogether.
+
| Now to '''execute''' the case, we will, first, go inside the ''''3dpipe'''' folder through terminal.Let's open the terminal by pressing ''''control', 'alt' '''and''' 't'''' keys, altogether.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type run and press Enter in the terminal.
+
| Type run and press Enter in the 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;"| Type '''run''' and press '''Enter'''
+
| Type '''run''' and press '''Enter'''
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type cd (space) tutorials and press Enter
+
| Type cd (space) tutorials and press Enter
| 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;"| Type '''cd''' '''(space) tutorials''' and press '''Enter'''
+
| Type '''cd''' '''(space) tutorials''' and press '''Enter'''
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type cd (space) incompressible and press Enter
+
| Type cd (space) incompressible and press Enter
| 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;"| Type '''cd (space)''' '''incompressible''' and press '''Enter'''
+
| Type '''cd (space)''' '''incompressible''' and press '''Enter'''
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type cd (space) icoFoam and press Enter
+
| Type cd (space) icoFoam and press Enter
| 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;"| Type '''cd''' '''(space)''' '''icoFoam '''and press '''Enter'''
+
| Type '''cd''' '''(space)''' '''icoFoam '''and press '''Enter'''
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type cd (space) 3Dpipe and press Enter
+
| Type cd (space) 3Dpipe and press Enter
| 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;"| Type '''cd (space)''' '''3Dpipe '''and press '''Enter'''
+
| Type '''cd (space)''' '''3Dpipe '''and press '''Enter'''
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type blockMesh and press Enter
+
| Type blockMesh and press Enter
| 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 to create the '''mesh''', type '''blockMesh''' and press '''Enter'''.  
+
| Now to create the '''mesh''', type '''blockMesh''' and press '''Enter'''.  
  
 
'''Meshing''' has been done.
 
'''Meshing''' has been done.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| After the meshing is done, type icoFoam to start the iterations
+
| After the meshing is done, type icoFoam to start the iterations
| 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;"| To start the '''iterations''' type '''icoFoam''' and press '''Enter'''.  
+
| To start the '''iterations''' type '''icoFoam''' and press '''Enter'''.  
  
 
We can see the '''iterations''' running.
 
We can see the '''iterations''' running.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| After the iterations are done, type paraFoam for postprocessing the results and press Enter.
+
| After the iterations are done, type paraFoam for postprocessing the results and press Enter.
| 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;"| Iterations has been done.
+
| Iterations has been done.
  
 
After the '''iterations''' end type '''paraFoam''' for '''postprocessing''' the results and press '''Enter'''.  
 
After the '''iterations''' end type '''paraFoam''' for '''postprocessing''' the results and press '''Enter'''.  
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Click on Apply.
+
| Click on Apply.
| 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;"| Let's click on '''Apply''' on the left hand side of the '''Object inspector menu''' to see the''' geometry.'''
+
| Let's click on '''Apply''' on the left hand side of the '''Object inspector menu''' to see the''' geometry.'''
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Rotate the geometry by pressing the button of the mouse and move it in the required direction.
+
| Rotate the geometry by pressing the button of the mouse and move it in the required direction.
| 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;"| Let's rotate the '''geometry''' for a better view.
+
| Let's rotate the '''geometry''' for a better view.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Click on the active variable control menu and select U in the drop-down menu  
+
| Click on the active variable control menu and select U in the drop-down menu  
| 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;"| Click on the '''active variable control menu''' and select '''U''' in the drop-down menu.
+
| Click on the '''active variable control menu''' and select '''U''' in the drop-down menu.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Click on play button
+
| Click on play button
| 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;"| At the top, in '''VCR toolbar''', click on '''Play''' button.
+
| At the top, in '''VCR toolbar''', click on '''Play''' button.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Go to Object Inspector menu, go to Display, click on Rescale data range
+
| Go to Object Inspector menu, go to Display, click on Rescale data range
| 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;"| Go to '''Object Inspector menu''', go to '''Display''', click on '''Rescale''' '''data range.'''
+
| Go to '''Object Inspector menu''', go to '''Display''', click on '''Rescale''' '''data range.'''
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| go to the toolbar named common, click on Clips and press Apply
+
| go to the toolbar named common, click on Clips and press Apply
| 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;"| To view the half section, go to the toolbar named '''common''', click on '''Clips''' and press '''Apply'''.
+
| To view the half section, go to the toolbar named '''common''', click on '''Clips''' and press '''Apply'''.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Open the color legent
+
| Open the color legent
| 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;"| Let's open the '''color legend.'''
+
| Let's open the '''color legend.'''
  
 
|-
 
|-
| 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:0.05pt solid #000000;padding:0.097cm;"| We can see the '''maximum velocity''' is near to the actual '''maximum velocity'''.
+
| We can see the '''maximum velocity''' is near to the actual '''maximum velocity'''.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Go to Filters> Data Analysis> Plot Over Lines
+
| Go to Filters> Data Analysis> Plot Over Lines
| 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;"| To view the graph Go to '''Filters'''> '''Data Analysis'''> '''Plot Over Lines.'''
+
| To view the graph Go to '''Filters'''> '''Data Analysis'''> '''Plot Over Lines.'''
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| click on Y axis and press Apply
+
| click on Y axis and press Apply
| 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;"| Let's click on '''Y''' axis and press '''Apply'''.
+
| Let's click on '''Y''' axis and press '''Apply'''.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Point towards the parabolic profile
+
| Point towards the parabolic profile
| 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 see the '''parabolic''' '''profile''' for '''Hagen-Poiseuille flow'''.
+
| We see the '''parabolic''' '''profile''' for '''Hagen-Poiseuille flow'''.
 
+
 
+
 
+
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Close the graph
+
| Close the graph
| 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;"| Let's close the '''graph'''.
+
| Let's close the '''graph'''.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Close ParaView
+
| Close ParaView
| 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;"| Close '''ParaView'''.
+
| Close '''ParaView'''.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Switch to the slides
+
| Switch to the slides
| 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;"| Let's switch to the''' slides'''.
+
| Let's switch to the''' slides'''.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 11: Summary
+
| Slide 11: Summary
| 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;"| In this tutorial we have learned:
+
| In this tutorial we have learned:
 
+
 
+
To create '''3D pipe geometry.'''To simulate '''Hagen-Poiseuille flow''' for a '''fixed pressure ratio.'''
+
  
To visualize the '''velocity''' results in '''ParaView'''.
+
*To create '''3D pipe geometry.
 +
*To simulate '''Hagen-Poiseuille flow''' for a '''fixed pressure ratio.'''
 +
*To visualize the '''velocity''' results in '''ParaView'''.
  
 
This brings us to the end of the tutorial.
 
This brings us to the end of the tutorial.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 12 : Assignment
+
| Slide 12 : Assignment
  
  
  
| 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;"| As an assignment,
+
| As an assignment,
 
+
  
 
Change the '''geometry parameters '''such as length and diameter.
 
Change the '''geometry parameters '''such as length and diameter.
 
  
 
Change the corresponding '''pressure ratio.'''
 
Change the corresponding '''pressure ratio.'''
 
  
 
Use the fluid of different '''viscosity.'''
 
Use the fluid of different '''viscosity.'''
 
 
 
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 13: About Spoken tutorials
+
| Slide 13: About Spoken tutorials
  
 
+
|
 
+
* Watch the video available at the following link  
| 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;"| * Watch the video available at the following link  
+
  
 
* It summarises the Spoken Tutorial project  
 
* It summarises 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  
 
 
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 14: About Spoken tutorials
+
| Slide 14: About Spoken tutorials
  
 
+
| The Spoken Tutorial Project Team  
 
+
| 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 Spoken Tutorial Project Team  
+
  
 
* Conducts workshops using spoken tutorials  
 
* Conducts workshops using spoken tutorials  
Line 465: Line 386:
  
 
* For more details, please write to contact at spoken hyphen tutorial dot org  
 
* For more details, please write to contact at spoken hyphen tutorial dot org  
 
 
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 15: Acknowledgement  
+
| Slide 15: Acknowledgement  
  
 
+
| Spoken Tutorial Project is a part of the Talk to a Teacher 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;"| Spoken Tutorial Project is a part of the Talk to a Teacher project  
+
  
 
* It is supported by the National Mission on Education through ICT, MHRD, Government of India  
 
* It is supported by the National Mission on Education through ICT, MHRD, Government of India  
Line 480: Line 397:
  
 
* spoken hyphen tutorial dot org slash NMEICT hyphen Intro  
 
* spoken hyphen tutorial dot org slash NMEICT hyphen Intro  
 
 
 
 
|}
 
|}

Revision as of 11:56, 19 April 2013

Tutorial: To simulate Hagen-Poiseuille flow in OpenFOAM.

Script and Narration : Saurabh S. Sawant

Keywords: Video tutorial,CFD.


Visual Cue Narration
Slide 1: Hello and welcome to the spoken tutorial on simulating Hagen-Poiseuille flow in OpenFOAM.
Slide 2 : Learning Objectives


In this tutorial we will see:
  • To create and mesh 3D cylindrical pipe.
  • To simulate the Hagen-Poiseuille flow
    having fixed pressure ratio across boundaries.
  • To visualize the velocity contour in ParaView.
Slide 3: System Requirement To record this tutorial, I am using
  • Linux Operating system Ubuntu 12.04
  • OpenFOAM version 2.1.1
  • ParaView version 3.12.0
Slide 4: Prerequisites To practice this tutorial learner should have the knowledge of

Basic Fluid Dynamics

and Hagen-Poiseuille flow

Slide 5:

Hagen-Poiseuille Flow Diagram


Read aloud the given points and show the contents in the diagram with the mouse pointer.

Here is, Hagen-Poiseuille Flow Diagram.

We can see the dimensions and boundaries of the pipe.

Viscosity of fluid used, that is, water is given.

Pressure at the inlet is 20 Pascals and outlet is 0 Pascals.

As it is an incompressible flow, only the pressure difference is of importance.

Slide 6:

Formulas and Analytical Solution

Read aloud the given points

Formulas and Analytical Solution:

For Hagen-Poiseuille flow,

Pressure drop along the pipe is:

(P1 minus P2) equals (32 mew Uaverage L) upon (D square)

By substituting the values from the previous diagram, we get,

Uaverage equals to 0.208 m/s

Maximum Velocity is given as,

Two times the average velocity, which would be, 0.416 m/s

Reynolds Number for the flow is,

Uaverage into D upon nu, that comes out to be, 2080

Hence, the flow is transient.

Slide 7: Transient Solver Type of solver used here is,

IcoFOAM


It is a Transient Solver

It is used for incompressible, laminar flow of Newtonian fluids.

Slide 8:

Pressure Boundary Conditions

Pressure Boundary Conditions used,

At Inlet: fixedPressure

At Outlet: fixedPressure

At Walls: ZeroGradient

Slide 9:

Velocity Boundary Conditions

Velocity Boundary Conditions used,

At Inlet: pressureInletVelocity

At Outlet: zeroGradient

At Walls: fixedValue

Show 3dpipe folder.

Show the 3dpipe folder

For executing this case,

First, Let's create the case directory in 'icoFoam' folder.

Give it some name.

I have named it as '3dpipe'.

Point the mouse pointer from lid driven folder to 3d pipe folder. To know the location of this folder, go through the tutorial on lid driven cavity.

Copy the '0' (zero), 'constant' and 'system' folders of lid driven cavity problem in the newly created folder.



Go inside the 3dpipe folder. Let's go inside the '3dpipe' folder.
Hover the pointer over the folder inside the 3dpipe folder. I have already copied the folders into my '3dpipe' folder and modified the files in it.
Go into the '0' folder and open P file and show it Now, let's go into the '0' folder.

And open the 'P' file.

This is the pressure boundary condition file.

Show the pressure boundary condition file and show the dimensions inside it. Note that the dimensions are in (meter square) per (second square) (m2/s2).
Show the pressure value written Hence the pressure value in pascals is divided by density, that is, 1000 Kg/m3 (Kg per meter cube), and written here.
Close the file Let's close the file.
Open U file in the same folder and show File containing velocity boundary condition is as shown:
Close the file and come out of the '0' folder Let's close the file and come out of the '0' folder.
Switch back to the slides To see the blocking strategy, let me switch back to the slides.
Slide 10: Blocking Strategy

Hover the pointer on the geometry and drag it towards the z direction.

To create a 3D geometry of a pipe I have made a 2D circular geometry and extruded the length in the z direction.
Point out the numbering pattern. Numbering Pattern is as shown.
Minimize the slides To see the blockMeshDict file, let's minimize the slides.
Go to folder 'constant' and then 'polyMesh' and open blockMeshDict file and show it. Let's go into the folder 'constant', and then 'polyMesh'.

Final blockMeshDict file is as shown:

Close the file and come out of the folder 'constant' Let's close the file and come out of the 'constant' folder.
Open and show transportProperties file and point at the value viscosity value We see the 'transportProperties' file.

Note the dynamic viscosity value, here, is 1e-06.

Close the file and come out of the 'constant' folder. Let's close the file and come out to the 'constant' folder.
Go into the system folder and open the controlDict file. Show it. Let's go into the 'system' folder.

Now, let's have a look at the 'controlDict' file.

Show time step value The time step has been set to 1e-03.

The solution converges after 18 seconds. The final time step is kept 19.

Close the file and the Home folder Let's close the file.

Let's close the 'Home' folder.

Press 'control', 'alt' and 't' keys altogether Now to execute the case, we will, first, go inside the '3dpipe' folder through terminal.Let's open the terminal by pressing 'control', 'alt' and 't' keys, altogether.
Type run and press Enter in the terminal. Type run and press Enter
Type cd (space) tutorials and press Enter Type cd (space) tutorials and press Enter
Type cd (space) incompressible and press Enter Type cd (space) incompressible and press Enter
Type cd (space) icoFoam and press Enter Type cd (space) icoFoam and press Enter
Type cd (space) 3Dpipe and press Enter Type cd (space) 3Dpipe and press Enter
Type blockMesh and press Enter Now to create the mesh, type blockMesh and press Enter.

Meshing has been done.

After the meshing is done, type icoFoam to start the iterations To start the iterations type icoFoam and press Enter.

We can see the iterations running.

After the iterations are done, type paraFoam for postprocessing the results and press Enter. Iterations has been done.

After the iterations end type paraFoam for postprocessing the results and press Enter.

Click on Apply. Let's click on Apply on the left hand side of the Object inspector menu to see the geometry.
Rotate the geometry by pressing the button of the mouse and move it in the required direction. Let's rotate the geometry for a better view.
Click on the active variable control menu and select U in the drop-down menu Click on the active variable control menu and select U in the drop-down menu.
Click on play button At the top, in VCR toolbar, click on Play button.
Go to Object Inspector menu, go to Display, click on Rescale data range Go to Object Inspector menu, go to Display, click on Rescale data range.
go to the toolbar named common, click on Clips and press Apply To view the half section, go to the toolbar named common, click on Clips and press Apply.
Open the color legent Let's open the color legend.
We can see the maximum velocity is near to the actual maximum velocity.
Go to Filters> Data Analysis> Plot Over Lines To view the graph Go to Filters> Data Analysis> Plot Over Lines.
click on Y axis and press Apply Let's click on Y axis and press Apply.
Point towards the parabolic profile We see the parabolic profile for Hagen-Poiseuille flow.
Close the graph Let's close the graph.
Close ParaView Close ParaView.
Switch to the slides Let's switch to the slides.
Slide 11: Summary In this tutorial we have learned:
  • To create 3D pipe geometry.
  • To simulate Hagen-Poiseuille flow for a fixed pressure ratio.
  • To visualize the velocity results in ParaView.

This brings us to the end of the tutorial.

Slide 12 : Assignment


As an assignment,

Change the geometry parameters such as length and diameter.

Change the corresponding pressure ratio.

Use the fluid of different viscosity.

Slide 13: About Spoken tutorials
  • Watch the video available at the following link
  • It summarises the Spoken Tutorial project
  • If you do not have good bandwidth, you can download and watch it
Slide 14: About Spoken tutorials The Spoken Tutorial Project Team
  • Conducts workshops using spoken tutorials
  • Gives certificates for those who pass an online test
  • For more details, please write to contact at spoken hyphen tutorial dot org
Slide 15: Acknowledgement Spoken Tutorial Project is a part of the Talk to a Teacher project
  • It is supported by the National Mission on Education through ICT, MHRD, Government of India
  • More information on this Mission is available at
  • spoken hyphen tutorial dot org slash NMEICT hyphen Intro

Contributors and Content Editors

DeepaVedartham, Nancyvarkey, P12575, Sneha