Difference between revisions of "OpenFOAM/C2/2D-Laminar-Flow-in-a-channel/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
Line 10: Line 10:
  
 
{| style="border-spacing:0;"
 
{| style="border-spacing:0;"
| style="border-top:1.05pt solid #000000;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| <center>Visual Cue</center>
+
| 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>
| style="border:1.05pt solid #000000;padding:0.097cm;"| <center>Narration</center>
+
| style="border:0.05pt solid #000000;padding:0.097cm;"| <center>Narration</center>
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 1
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 1
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| Hello and welcome to the spoken tutorial on Simulating Laminar Flow in a Channel using 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 Laminar Flow in a Channel using openfoam
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 2 : Learning Objectives
+
| 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
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| In this tutorial I will show you  
+
| 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 I will show you  
  
  
2D geometry of channel and initial boundary conditions
+
2D geometry of channel  
  
  
Line 34: Line 34:
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 3:  
+
| 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  
 
System Requirement  
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| To record this tutorial  
+
| 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  
  
  
I am using GNU / Linux Operating system Ubuntu 10.04 .  
+
I am using Linux Operating system Ubuntu 12.04 .  
  
  
OpenFOAM version 2.1.0
+
OpenFOAM version 2.1.1
  
  
Line 49: Line 49:
  
  
 +
Note that OpenFOAM version 2.1.1 is supported on ubuntu version 12.04
  
 +
 +
Hence forth all the tutorials will be covered using OpenFOAM version 2.1.1 and ubuntu version 12.04.
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 4: Prerequisite
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 4: Prerequisite
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| You should know how to create geometry using 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;"| You should know how to create geometry using OpenFOAM  
  
 
If not, please refer to the relevant tutorials on the Spoken Tutorial website
 
If not, please refer to the relevant tutorials on the Spoken Tutorial website
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 5 : About channel 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 : About channel flow
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| We simulate flow in a pipe so as to determine the flow development length along the downstream
+
| 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 simulate flow in a pipe so as to determine the flow development length along the downstream
  
  
Line 65: Line 68:
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 6 : Diagram
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 6 : Diagram
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| The boundary names and inlet flow is shown in this figure
+
| 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 boundary names and inlet flow is shown in this figure
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 7 :  
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 7 :  
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| The flow develpoment length is given by the formula  
+
| 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 flow develpoment length is given by the formula  
  
 
L= 0.05 * Re * D
 
L= 0.05 * Re * D
Line 86: Line 89:
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Solver: simpleFoam
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Solver: simpleFoam
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| This is a steady state problem  
+
| 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;"| This is a steady state problem  
  
  
Line 93: Line 96:
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Demo:
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Demo:
  
  
 
SimpleFoam in incompressible flows  
 
SimpleFoam in incompressible flows  
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| We need to create a folder for our case.
+
| 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 need to create a folder for our case.
  
  
Line 103: Line 106:
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Demo
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Demo
  
  
Line 113: Line 116:
  
  
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| I have already created a folder in simpleFoam folder of incompressible flow solvers
+
| 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 created a folder in simpleFoam folder of incompressible flow solvers
  
  
Line 131: Line 134:
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Press Ctrl+Alt+t keys simultaneously
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Press Ctrl+Alt+t keys simultaneously
  
  
Line 153: Line 156:
  
 
ls and press enter
 
ls and press enter
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| Open a command terminal by pressing Ctrl+Alt +t keys simultaneously on your keyboard.
+
| 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;"| Open a command terminal by pressing Ctrl+Alt +t keys simultaneously on your keyboard.
  
  
Line 162: Line 165:
  
  
type '''tutorials and press enter'''
+
type cd '''tutorials and press enter'''
  
  
type '''incompressible and press enter'''
+
type cd '''incompressible and press enter'''
  
  
type '''simpleFoam and press enter'''
+
type cd '''simpleFoam and press enter'''
  
  
type '''channel and press enter'''
+
type cd '''channel and press enter'''
  
  
Line 177: Line 180:
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Type in command terminal
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type in command terminal
  
 
cd constant and press enter
 
cd constant and press enter
Line 201: Line 204:
  
 
gedit blockMeshDict and press enter
 
gedit blockMeshDict and press enter
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| In this you will see three folders '''0 , Constant and System'''
+
| 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 you will see three folders '''0 , Constant and System'''
  
  
Line 223: Line 226:
  
 
Now type '''cd polyMesh and press enter'''
 
Now type '''cd polyMesh and press enter'''
 +
 +
 +
Now type ls and press enter
 +
  
 
This contains the file blockMeshDict
 
This contains the file blockMeshDict
Line 230: Line 237:
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Refer to earlier tutorial for creating simple geometry in OpenFOAM
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Refer to earlier tutorial for creating simple geometry in OpenFOAM
  
  
Line 241: Line 248:
  
 
type ls and press enter
 
type ls and press enter
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| To set up the blockMeshDict file refer to the tutorial for creating simple Geometry 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;"| To set up the blockMeshDict file refer to the tutorial for creating simple Geometry in OpenFOAM.
  
  
Line 250: Line 257:
  
  
we have used a 40 X 40 mesh size here and cell spacing of  
+
we have used a 100 X 100 mesh size here and cell spacing of  
  
 
( 1 1 1 )
 
( 1 1 1 )
 +
 +
 +
In the command terminal type cd (space ) .. and press enter
 +
 +
 +
Again type cd (space) .. and press enter
  
  
Line 279: Line 292:
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| In the terminal you can see the files
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| In the terminal you can see the files
  
  
Line 293: Line 306:
  
 
System folder is kept default
 
System folder is kept default
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| This contains the intial boundary conditions and wall functions for the channel case
+
| 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;"| This contains the intial boundary conditions and wall functions for the channel case
  
  
Line 307: Line 320:
  
  
Change only the boundary names in each of the above folder.
+
Where Ux, Uy and Uz are the velocity components in the x, y and z direction
  
  
Note that the values in nu,nuTilde and R are to kept default
+
And U' = 0.05 times '''u''' actual
 +
 
 +
 
 +
Calculate epsilon from the formula given
 +
 
 +
 
 +
Where epsilon is the rate of turbulent kinetic energy
 +
 
 +
 
 +
C mu is a constant and its value is 0.09
 +
 
 +
 
 +
And 'l' is the length of the channel
 +
 
 +
 
 +
Let me minimise this
 +
 
 +
 
 +
Change only the boundary names in each of the above folder.
  
  
Changes are only made in boundary condition names.
+
Note that the values of nu,nuTilde and R are to kept default
  
  
 
Rest of the files should contain initial value for each of the boundary faces.
 
Rest of the files should contain initial value for each of the boundary faces.
  
Now Type '''cd (space) ..(dot dot) and press enter'''
+
Now in the terminal Type '''cd (space) ..(dot dot) and press enter'''
  
  
Line 327: Line 358:
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| In terminal type:blockMesh 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;"| In terminal type:blockMesh and press enter
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| In the command terminal '''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;"| In the command terminal '''type blockMesh and press enter'''
  
 
Meshing is done
 
Meshing is done
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 7 :simpleFoam
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 7 : Solver
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| The type of solver we are using here is simpleFoam
+
| 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 type of solver we are using here is simpleFoam
  
  
Line 340: Line 371:
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Type simpleFoam 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 simpleFoam and press enter
  
  
  
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| In the command terminal '''type simpleFoam 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;"| In the command terminal '''type simpleFoam and Press enter'''
  
  
Line 353: Line 384:
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| In terminal
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| In terminal
  
 
type: paraFoam and press enter  
 
type: paraFoam and press enter  
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| To view the results in paraview 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;"| To view the results in paraview in the terminal  
  
  
Line 365: Line 396:
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Demo
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Demo
  
  
Line 381: Line 412:
  
 
toggle color legend on from left hand side top
 
toggle color legend on from left hand side top
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| On let hand side of the paraview window click 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;"| On let hand side of the paraview window click Apply
  
  
Line 405: Line 436:
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Demo
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Demo
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| We can see that once the flow has fully devloped it attains a maximum uniform velocity at center.
+
| 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 that once the flow has fully devloped it attains a maximum uniform velocity at center.
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 8:Validation
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 8:Validation
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| The results obtained can be validated with the analytical solution for laminar flow in a pipe which is u(max)=1.5 Uavg
+
| 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 results obtained can be validated with the analytical solution for laminar flow in a pipe which is u(max)=1.5 Uavg
  
  
Line 416: Line 447:
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 9 : Summary
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 9 : Summary
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| In this tutorial we learnt
+
| 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 learnt
  
  
Line 432: Line 463:
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 10 :
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 10 :
  
 
Assignment
 
Assignment
Line 438: Line 469:
  
  
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| As an 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:
  
 
Solve the problem for Reynold Number 1500 and validate it with the analytical result
 
Solve the problem for Reynold Number 1500 and validate it with the analytical result
Line 445: Line 476:
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 11 :
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 11 :
  
  
  
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| The video available at this URL:
+
| 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 video available at this URL:
  
 
http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  
 
http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  
Line 458: Line 489:
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 12 :
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 12 :
  
 
About Spoken tutorials
 
About Spoken tutorials
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| 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 470: Line 501:
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 13
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 13
  
 
Acknowledgement
 
Acknowledgement
Line 476: Line 507:
  
  
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| Spoken Tutorials are part of 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 Tutorials are part of 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 485: Line 516:
  
 
|-
 
|-
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 14:
+
| 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 the contributor
 
About the contributor
| style="border-top:none;border-bottom:1.05pt solid #000000;border-left:1.05pt solid #000000;border-right:1.05pt solid #000000;padding:0.097cm;"| This is Rahul Joshi from IIT BOMBAY signing off.
+
| 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;"| This is Rahul Joshi from IIT BOMBAY signing off.
  
 
Thanks for joining.
 
Thanks for joining.
  
 
|}
 
|}

Revision as of 12:00, 27 February 2013

Tutorial: Simulating Laminar flow in a channel.


Script and Narration : Rahul Joshi


Keywords: Video tutorial,CFD,laminar flow,simpleFoam,channel.


Visual Cue
Narration
Slide 1 Hello and welcome to the spoken tutorial on Simulating Laminar Flow in a Channel using openfoam
Slide 2 : Learning Objectives In this tutorial I will show you


2D geometry of channel


Meshing the Geometry


Solving and Post Processing results in Paraview


Validation with analytic result.

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


Note that OpenFOAM version 2.1.1 is supported on ubuntu version 12.04


Hence forth all the tutorials will be covered using OpenFOAM version 2.1.1 and ubuntu version 12.04.

Slide 4: Prerequisite You should know how to create geometry using OpenFOAM

If not, please refer to the relevant tutorials on the Spoken Tutorial website

Slide 5 : About channel flow We simulate flow in a pipe so as to determine the flow development length along the downstream



Slide 6 : Diagram The boundary names and inlet flow is shown in this figure
Slide 7 : The flow develpoment length is given by the formula

L= 0.05 * Re * D

The pipe is of length 5 m and height 1 m.


Inlet velocity is 1 m/s.


Reynolds number ( Re ) is 100.



Solver: simpleFoam This is a steady state problem


Therefore we are using a steady state incompressible solver for this case

Demo:


SimpleFoam in incompressible flows

We need to create a folder for our case.


The folders should be created inside the solver type you choose.

Demo


Create a floder and name it as channel in simpleFoam folder


copy 0,constant and system from pitzDaily to this channel folder


I have already created a folder in simpleFoam folder of incompressible flow solvers


The folder is named as channel


Copy 0,Constant and System folders of any other case file in simpleFoam


Here i have copied the file structure of case of pitzDaily


Paste it in the channel folder created and make the necessary changes in the geometry,boundary faces and boundary condition


We will now see the file structure

Press Ctrl+Alt+t keys simultaneously


Type in command terminal


run and press enter


tutorial and press enter


incompresible and press enter


simpleFoam and press enter


channel and press enter


ls and press enter

Open a command terminal by pressing Ctrl+Alt +t keys simultaneously on your keyboard.


In the command terminal type the path for channel case


Type run and press enter


type cd tutorials and press enter


type cd incompressible and press enter


type cd simpleFoam and press enter


type cd channel and press enter


now type ls and press enter

Type in command terminal

cd constant and press enter


ls and press enter


polymesh folder and 2 other files


gedit RASProperties and press enter

gedit transportProperties and press enter


In terminal type

cd polyMesh and press enter


in terminal type:

gedit blockMeshDict and press enter

In this you will see three folders 0 , Constant and System


type cd constant and press enter


type ls and press enter


in this you will see files containing properties of fluid and a folder named polymesh


RASProperties containes Reynolds-averaged stress model


transportProperties contains transport model and


value of kinematic viscosity (nu) set at 0.001 m²/s.


Now type cd polyMesh and press enter


Now type ls and press enter


This contains the file blockMeshDict


To open the blockMeshDict file in the terminal type gedit blockMeshDict and press enter

Refer to earlier tutorial for creating simple geometry in OpenFOAM


in terminal cd space .. twice and press enter

In terminal type:

cd space 0 and press enter


type ls and press enter

To set up the blockMeshDict file refer to the tutorial for creating simple Geometry in OpenFOAM.


The geomery is in meters so the convertTometers is set to 1


next we have defined the vertices of the pipe


we have used a 100 X 100 mesh size here and cell spacing of

( 1 1 1 )


In the command terminal type cd (space ) .. and press enter


Again type cd (space) .. and press enter


next we have the boundary conditions and their types which are set as inlet ,outlet,top,bottom


Since it is a 2D problem frontAndBack is kept empty.


We have entered here the type of boundary and their faces


Arcs and mergePatch pair is kept empty.


Close the blockMeshDict file


Type cd ..(dot dot and press enter after each) twice to go back to the channel folder


Now type cd 0 (Time directory) and press enter


Type ls and press enter

In the terminal you can see the files


Slide 7 : formula to calculate epsilon and k.


Do not chnge the values of nu,nuTilde and R

Change only the boundary names


in terminal type : cd .. and press enter

System folder is kept default

This contains the intial boundary conditions and wall functions for the channel case


It should contain various files named epsilon ,k, nu ,nuTilda which are the wall functions and


p , R and U are initial conditions of the flow


Calculate epsilon and k from the formula given in the

figure and enter it in the file.


Where Ux, Uy and Uz are the velocity components in the x, y and z direction


And U' = 0.05 times u actual


Calculate epsilon from the formula given


Where epsilon is the rate of turbulent kinetic energy


C mu is a constant and its value is 0.09


And 'l' is the length of the channel


Let me minimise this


Change only the boundary names in each of the above folder.


Note that the values of nu,nuTilde and R are to kept default


Rest of the files should contain initial value for each of the boundary faces.

Now in the terminal Type cd (space) ..(dot dot) and press enter


There is no change in the system folder


We need to mesh the geometry

In terminal type:blockMesh and press enter In the command terminal type blockMesh and press enter

Meshing is done

Slide 7 : Solver The type of solver we are using here is simpleFoam


It is a Steady-state solver for incompressible, turbulent flow

Type simpleFoam and press enter


In the command terminal type simpleFoam and Press enter


Iterations running will be seen in the terminal.


The iterations will stop once the solution is converged or it reaches end time value.

In terminal

type: paraFoam and press enter

To view the results in paraview in the terminal


type paraFoam and press enter


This will open up the paraviw window

Demo


Solid color to U


initial state at inlet boundary


click on the play button


final contour of velocity


toggle color legend on from left hand side top

On let hand side of the paraview window click Apply


The geometry can be seen here.


In top of active variable control menu change the drop down menu from solid color to capital U.


You can see the initial state of velocity magnitude at inlet.


On top of the paraview window click on the play button of VCR control menu


you can see the final value of velocity magnitude.


Also toggle on the color legend from left hand side top of active variable control menu.



Demo We can see that once the flow has fully devloped it attains a maximum uniform velocity at center.
Slide 8:Validation The results obtained can be validated with the analytical solution for laminar flow in a pipe which is u(max)=1.5 Uavg


Using openfoam we obatain a velocity of 1.48 m/s which is a good match.

Slide 9 : Summary In this tutorial we learnt


File structure of channel


Obtained solution using steady state solver


Viewed the geometry in paraview


Validation with analytic results

Slide 10 :

Assignment


As an assignment:

Solve the problem for Reynold Number 1500 and validate it with the analytical result

this brings us to the end of the tutorial

Slide 11 :


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 12 :

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.org

Slide 13

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.

This project is coordinated by http://spoken-tutorial

More information on the same is available at the following URL link http://spoken-tutorial.org/NMEICT-Intro

Slide 14:

About the contributor

This is Rahul Joshi from IIT BOMBAY signing off.

Thanks for joining.

Contributors and Content Editors

DeepaVedartham, Nancyvarkey, Pravin1389, Rahuljoshi