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

From Script | Spoken-Tutorial
Jump to: navigation, search
 
(7 intermediate revisions by one other user not shown)
Line 14: Line 14:
 
| Slide 1:
 
| Slide 1:
  
| Hello and welcome to the spoken tutorial on simulating '''Hagen-Poiseuille flow''' in '''OpenFOAM'''.
+
| Hello and welcome to the spoken tutorial on simulating '''Hagen-Poiseuille flow''' in '''OpenFOAM'''
  
 
|-
 
|-
Line 23: Line 23:
 
| 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/>  
  
* To '''simulate '''the '''Hagen-Poiseuille flow''' <br/> having''' fixed pressure ratio''' across '''boundaries.'''<br/> and
+
* To '''simulate '''the '''Hagen-Poiseuille flow''' <br/> having''' fixed pressure ratio''' across '''boundaries'''<br/> and
  
* To visualize the '''velocity contour '''in '''ParaView'''.
+
* To visualize the '''velocity contour '''in '''ParaView'''
  
 
|-
 
|-
Line 41: Line 41:
  
 
|-
 
|-
| Slide: System Requirement  
+
| Slide 4: System Requirement  
  
| The tutorials were recorded using the versions specified in previous slide  
+
The tutorials were recorded using the versions specified in previous slide  
  
 
Subsequently the tutorials were edited to latest versions
 
Subsequently the tutorials were edited to latest versions
  
 
To install latest system requirements go to Installation Sheet
 
To install latest system requirements go to Installation Sheet
 
+
|
 
|-
 
|-
| Slide 4: Prerequisites
+
| Slide 5: Prerequisites
  
 
| 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'''
+
  
 
|-
 
|-
| Slide 5:
+
| Slide 6:
  
 
Hagen-Poiseuille Flow Diagram
 
Hagen-Poiseuille Flow Diagram
Line 65: Line 64:
  
 
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.
| 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  the fluid used, that is, water is given.
 
'''Viscosity''' of  the fluid used, that is, water is given.
  
Pressure at the '''inlet''' is 20''' Pascals''' and at the '''outlet''' is 0''' Pascals.'''
+
Pressure at the '''inlet''' is 20''' Pascals''' and at the '''outlet''' it 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.
  
 
|-
 
|-
| Slide 6:
+
| Slide 7:
  
 
Formulas and Analytical Solution
 
Formulas and Analytical Solution
Line 83: Line 82:
 
| '''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 mu 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,
  
 
'''Uaverage '''into '''D '''upon '''nu''', that comes out to be, '''2080'''
 
'''Uaverage '''into '''D '''upon '''nu''', that comes out to be, '''2080'''
 +
  
 
Hence, the flow is '''transient'''.
 
Hence, the flow is '''transient'''.
  
 
|-
 
|-
| Slide 7: Transient Solver
+
| Slide 8: Solver
  
| Type of solver used here is,
+
| Type of '''solver''' used here is '''icoFOAM'''.
  
'''IcoFOAM'''
 
  
 +
It is a '''Transient Solver'''.
  
It is a '''Transient Solver'''
+
It is used for '''incompressible, laminar flow''' of '''Newtonian fluid'''.
 
+
It is used for '''incompressible, laminar flow of Newtonian fluids.'''
+
  
 
|-
 
|-
| Slide 8:
+
| Slide 9:
  
 
Pressure Boundary Conditions
 
Pressure Boundary Conditions
Line 122: Line 121:
 
| '''Pressure Boundary Conditions '''used,
 
| '''Pressure Boundary Conditions '''used,
  
At '''Inlet: fixedPressure'''
+
*At '''Inlet: fixedPressure'''
  
At '''Outlet: fixedPressure'''
+
*At '''Outlet: fixedPressure'''
  
At '''Walls: ZeroGradient'''
+
*At '''Walls: ZeroGradient'''
  
 
|-
 
|-
| Slide 9:
+
| Slide 10:
  
 
Velocity Boundary Conditions
 
Velocity Boundary Conditions
Line 135: Line 134:
 
| '''Velocity Boundary Conditions''' used,
 
| '''Velocity Boundary Conditions''' used,
  
At '''Inlet: pressureInletVelocity'''
+
*At '''Inlet: pressureInletVelocity'''
  
At '''Outlet: zeroGradient'''
+
*At '''Outlet: zeroGradient'''
  
At '''Walls: fixedValue'''
+
*At '''Walls: fixedValue'''
  
 
|-
 
|-
Line 145: Line 144:
  
 
Show the 3dpipe folder
 
Show the 3dpipe folder
| For executing this case,
+
| For executing this case, first let's create the '''case directory''' in the ''''icoFoam'''' folder.
  
First, Let's create the '''case directory''' in the ''''icoFoam'''' folder.
+
And give it some name.
 
+
And Give it some name.
+
  
 
I have named it as''' '3dpipe''''.
 
I have named it as''' '3dpipe''''.
Line 158: Line 155:
  
 
Copy this ''''0' (zero), 'constant'''' and ''''system'''' folders of '''lid driven cavity''' problem in the newly created folder.
 
Copy this ''''0' (zero), 'constant'''' and ''''system'''' folders of '''lid driven cavity''' problem in the newly created folder.
 
 
 
  
 
|-
 
|-
Line 172: Line 166:
 
|-
 
|-
 
| Go into the '0' folder and open P file and show it
 
| Go into the '0' folder and open P file and show it
| 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.
Line 184: Line 176:
 
|-
 
|-
 
| Show the pressure value written
 
| Show the pressure value written
| Hence the''' pressure '''value in '''pascals''' is divided by the '''density''', that is, 1000''' Kg/m3''' '''(Kg per meter cube),''' and written here.  
+
| Hence the''' pressure '''value in '''Pascals''' is divided by the '''density''', that is, 1000''' Kg/m3 (Kg per meter cube),''' and written here.  
  
 
|-
 
|-
Line 191: Line 183:
  
 
|-
 
|-
| Open U file in the same folder and show
+
| Open U file in the same folder and show.
| File containing the '''velocity boundary condition '''is as seen:lets open the file we can see the '''velocity boundary condition ''' for inlet, outlet and fixed walls  
+
| File containing the '''velocity boundary condition '''is as seen.
 +
 
 +
Let's open the file we can see the '''velocity boundary condition ''' for inlet, outlet and fixed walls.
  
 
|-
 
|-
| Close the file and come out of the '0' folder
+
| Close the file and come out of the '0' folder.
 
| Let's 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
+
| Switch back to the slides.
 
| To see the '''blocking strategy''', let me switch back to the slides.
 
| To see the '''blocking strategy''', let me switch back to the slides.
  
 
|-
 
|-
| Slide 10: Blocking Strategy
+
| Slide 11: 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.
| To create a '''3D geometry''' of a pipe I have made a '''2D''' circular '''geometry '''and extruded the length in z direction.
+
| To create a '''3D geometry''' of a pipe I have made a '''2D circular geometry '''and extruded the length in z direction.
  
 
|-
 
|-
 
| Point out the numbering pattern.
 
| Point out the numbering pattern.
| Numbering Pattern is as shown. You can also see the dimension of the mesh.
+
| Numbering pattern is as shown. We can also see the dimension of the '''mesh'''.
  
 
|-
 
|-
 
| Minimize the slides
 
| Minimize the slides
| To see the '''blockMeshDict''' file, let's 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.
 
| Go to folder 'constant' and then 'polyMesh' and open blockMeshDict file and show it.
| Let's go into the folder ''''constant',''' and then ''''polyMesh'.''' lets open the'''blockMeshDict ' file. You can see the vertices, blocks,edges and boundaries  for inlet, outlet and fixed wall.
+
| Let's go into the folder ''''constant',''' and then ''''polyMesh''''.
 +
 
 +
Let's open the'''blockMeshDict ' file.  
 +
 
 +
We can see the vertices, blocks,edges and boundaries  for '''inlet, outlet''' and '''fixed walls'''.
  
 
|-  
 
|-  
Line 226: Line 224:
 
|-
 
|-
 
| Open and show transportProperties file and point at the value viscosity value
 
| Open and show transportProperties file and point at the value viscosity value
| We see the ''''transportProperties' '''file. Lets open the file
+
| We see the ''''transportProperties''''file. Lets open the file.
 +
 
  
Note the '''dynamic viscosity '''value, here, is 1e-06.
+
Note the '''dynamic viscosity '''value, here is 1 into 10 raise to minus 6.
  
 
|-
 
|-
 
| Close the file and come out of the 'constant' folder.
 
| Close the file and come out of the 'constant' folder.
| Let's close the file and come out of the 'folder ''''constant' ''.
+
| Let's close the file and come out of the folder '''constant'''.
  
 
|-
 
|-
Line 238: Line 237:
 
| 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.
  
 
|-
 
|-
 
| Show time step value
 
| Show time step value
| The solution '''converges''' after 18 seconds therefore the final '''time step''' is kept 19.The '''time step''' has been set to 1e-03.
+
| The solution '''converges''' after 18 seconds therefore the final '''time step''' is kept 19.
  
  
 +
The '''time step''' has been set to 1 into 10 raise to minus 3.
  
 
|-
 
|-
| Close the file and the Home folder
+
| Close the file and the Home folder.
 
| Let's close the file.
 
| Let's close the file.
  
Line 253: Line 253:
  
 
|-
 
|-
| Press 'control', 'alt' and 't' keys altogether
+
| 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'''' key, 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'''' key altogether.
  
 
|-
 
|-
| Type run and press Enter in the terminal.
+
| Type run and press '''Enter''' in the '''terminal'''.
| Type '''run''' and press '''Enter'''
+
| Type '''run''' and press '''Enter'''.
  
 
|-
 
|-
| Type cd (space) tutorials and press Enter
+
| Type cd (space) tutorials 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)''' '''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)''' '''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 '''cd (space)''' '''3Dpipe '''and press '''Enter'''
+
| Type '''cd (space) 3dpipe '''and press '''Enter'''.
  
 
|-
 
|-
 
| Type blockMesh and press Enter
 
| Type blockMesh and press Enter
| 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.
Line 284: Line 287:
 
|-
 
|-
 
| After the meshing is done, type icoFoam to start the iterations
 
| After the meshing is done, type icoFoam to start the iterations
| To start the '''iterations''' type '''icoFoam''' and press '''Enter'''.  
+
| To start the '''iterations''' type '''icoFoam''' and press '''Enter''' .
  
 
We  see the '''iterations''' are  running.
 
We  see the '''iterations''' are  running.
Line 290: Line 293:
 
|-
 
|-
 
| 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.
| Iterations has been done.
+
| '''Iterations''' has been done.
  
After the '''iterations''' end type '''paraFoam''' for '''postprocessing''' the results and press '''Enter'''. It will open the" paraview". This is " paraview"
+
After the '''iterations''' end, type '''paraFoam''' for '''postprocessing''' the results and press '''Enter'''.  
 +
 
 +
 
 +
It will open the" ParaView". This is " ParaView".
 
   
 
   
 
|-
 
|-
 
| Click on Apply.
 
| Click on Apply.
| 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'''.
  
 
|-
 
|-
Line 312: Line 318:
 
|-
 
|-
 
| 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 '''Object Inspector menu''', go to '''Display''', click on '''Rescale''' to '''data range.'''
+
| Go to '''Object Inspector menu''', go to '''Display''', click on '''Rescale''' to '''data range'''.
  
 
|-
 
|-
 
| go to the toolbar named common, click on Clips and press Apply
 
| 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''' go to object inspector menu properties and press '''Apply'''.Lets Zoom in
+
| To view the half section, go to the toolbar named '''common''', click on '''Clips'''.
 +
 
 +
Go to '''Object Inspector''' menu properties and press '''Apply'''.  
 +
 
 +
Let's zoom in.
  
 
|-
 
|-
 
| Open the color legend
 
| Open the color legend
| Let's open the '''color legend.'''
+
| Let's open the '''color legend'''.
  
 
|-
 
|-
 
|  
 
|  
| We can see the '''maximum velocity''' is near to the actual '''maximum velocity'''i.e 0.4 metersp/s
+
| We can see the '''maximum velocity''' is near to the actual '''maximum velocity'''that is 0.40 meters per second.
  
 
|-
 
|-
 
| Go to Filters> Data Analysis> Plot Over Lines
 
| Go to Filters> Data Analysis> Plot Over Lines
| To view the graph Go to '''Filters'''at the top '''Data Analysis'''and press '''Plot Over Lines.'''
+
| To view the graph go to '''Filters''' at the top, '''Data Analysis''' and press '''Plot Over Line'''.
  
 
|-
 
|-
| click on Y axis and press Apply
+
| Click on Y axis and press Apply
 
|Press '''Y''' axis and press '''Apply'''.
 
|Press '''Y''' axis and press '''Apply'''.
  
 
|-
 
|-
 
| Point towards the parabolic profile
 
| Point towards the parabolic profile
| We can see the '''parabolic''' '''profile''' for '''Hagen-Poiseuille flow'''.
+
| We can see the '''parabolic profile''' for '''Hagen-Poiseuille flow'''.
  
 
|-
 
|-
Line 344: Line 354:
 
|-
 
|-
 
| Close ParaView
 
| Close ParaView
| lets Close '''ParaView'''.
+
| Let's close '''ParaView'''.
  
 
|-
 
|-
Line 351: Line 361:
  
 
|-
 
|-
| Slide 11: Summary
+
| Slide 12: Summary
| In this tutorial we have learned:
+
| In this tutorial we have learnt:
 
+
*To create and mesh '''3D pipe geometry.
+
*To simulate '''Hagen-Poiseuille flow''' for a '''fixed pressure ratio'''across boundaries and
+
*To visualize the '''velocity''' results in '''Parafoam '''.
+
  
 +
*To create and '''mesh 3D pipe geometry
 +
*To simulate '''Hagen-Poiseuille flow''' for a '''fixed pressure ratio''' across boundaries and
 +
*To visualize the '''velocity''' results in '''Parafoam '''
  
 
|-
 
|-
| Slide 12 : Assignment
+
| Slide 13 : Assignment
  
  
Line 366: Line 375:
 
| 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.''' and
+
Change the corresponding '''pressure ratio''' and
  
Use the fluid of different '''viscosity.'''
+
Use the fluid of different '''viscosity'''
  
 
|-
 
|-
| Slide 13: About Spoken tutorials
+
| Slide 14: About Spoken tutorials
  
 
|  
 
|  
Line 383: Line 392:
  
 
|-
 
|-
| Slide 14: About Spoken tutorials
+
| Slide 15: About Spoken tutorials
  
 
| The Spoken Tutorial Project Team  
 
| The Spoken Tutorial Project Team  
Line 394: Line 403:
  
 
|-
 
|-
| Slide: Forum to answer questions
+
| Slide 16: Forum to answer questions
  
| Do you have questions on THIS Spoken Tutorial?
+
* Do you have questions on THIS Spoken Tutorial?
Choose the minute and second where you have the question
+
* Choose the minute and second where you have the question
Explain your question briefly
+
* Explain your question briefly
Someone from the FOSSEE team will answer them. Please visit
+
* Someone from the FOSSEE team will answer them. Please visit
 
http://forums.spoken-tutorial.org/
 
http://forums.spoken-tutorial.org/
 
+
|
 
|-
 
|-
| Slide: Forum to answer questions
+
| Slide 17: Forum to answer questions
  
| Questions not related to the Spoken Tutorial?
+
* Questions not related to the Spoken Tutorial?
Do you have general/technical questions on the Software?
+
* Do you have general/technical questions on the Software?
Please visit the FOSSEE forum
+
* Please visit the FOSSEE forum
 
http://forums.fossee.in/
 
http://forums.fossee.in/
Choose the Software and post your question
+
* Choose the Software and post your question
 
+
|
 
|-
 
|-
| Slide: Lab Migration project
+
| Slide 18: Lab Migration project
  
| We coordinate migration from commercial CFD software like ANSYS to OpenFOAM
+
* We coordinate migration from commercial CFD software like ANSYS to OpenFOAM
We conduct free Workshops and provide solutions to CFD Problem Statements in OpenFOAM
+
* We conduct free Workshops and provide solutions to CFD Problem Statements in OpenFOAM
 
For more details visit this site:
 
For more details visit this site:
 
http://cfd.fossee.in/
 
http://cfd.fossee.in/
 
+
|
 
|-
 
|-
| Slide: Case Study project
+
| Slide 19: Case Study project
  
| We invite students to solve a feasible CFD problem statement of reasonable complexity using OpenFOAM
+
* We invite students to solve a feasible CFD problem statement of reasonable complexity using OpenFOAM
We give honorarium and certificate to those who do this
+
* We give honorarium and certificate to those who do this
 
For more details visit this site:
 
For more details visit this site:
 
http://cfd.fossee.in/
 
http://cfd.fossee.in/
 
+
|
 
|-
 
|-
| Slide 15: Acknowledgement  
+
| Slide 20: Acknowledgement  
  
 
| Spoken Tutorial Project is a part of the Talk to a Teacher project  
 
| Spoken Tutorial Project is a part of the Talk to a Teacher project  

Latest revision as of 10:31, 22 August 2019

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
    and
  • 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 and
  • ParaView version 3.12.0
Slide 4: System Requirement

The tutorials were recorded using the versions specified in previous slide

Subsequently the tutorials were edited to latest versions

To install latest system requirements go to Installation Sheet

Slide 5: Prerequisites To practice this tutorial learner should have the knowledge of
  • Basic Fluid Dynamics
  • and Hagen-Poiseuille flow
Slide 6:

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 the fluid used, that is, water is given.

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

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

Slide 7:

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 mu 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 8: Solver Type of solver used here is icoFOAM.


It is a Transient Solver.

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

Slide 9:

Pressure Boundary Conditions

Pressure Boundary Conditions used,
  • At Inlet: fixedPressure
  • At Outlet: fixedPressure
  • At Walls: ZeroGradient
Slide 10:

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 the 'icoFoam' folder.

And 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 this '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 the 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 the velocity boundary condition is as seen.

Let's open the file we can see the velocity boundary condition for inlet, outlet and fixed walls.

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 11: 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 z direction.
Point out the numbering pattern. Numbering pattern is as shown. We can also see the dimension of the mesh.
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'.

Let's open theblockMeshDict ' file.

We can see the vertices, blocks,edges and boundaries for inlet, outlet and fixed walls.

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


Note the dynamic viscosity value, here is 1 into 10 raise to minus 6.

Close the file and come out of the 'constant' folder. Let's close the file and come out of the folder constant.
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 solution converges after 18 seconds therefore the final time step is kept 19.


The time step has been set to 1 into 10 raise to minus 3.

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' key 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 see the iterations are 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.


It will open the" ParaView". This is " ParaView".

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

Go to Object Inspector menu properties and press Apply.

Let's zoom in.

Open the color legend Let's open the color legend.
We can see the maximum velocity is near to the actual maximum velocitythat is 0.40 meters per second.
Go to Filters> Data Analysis> Plot Over Lines To view the graph go to Filters at the top, Data Analysis and press Plot Over Line.
Click on Y axis and press Apply Press Y axis and press Apply.
Point towards the parabolic profile We can see the parabolic profile for Hagen-Poiseuille flow.
Close the graph Let's close the graph.
Close ParaView Let's close ParaView.
Switch to the slides And switch to the slides.
Slide 12: Summary In this tutorial we have learnt:
  • To create and mesh 3D pipe geometry
  • To simulate Hagen-Poiseuille flow for a fixed pressure ratio across boundaries and
  • To visualize the velocity results in Parafoam
Slide 13 : Assignment


As an assignment,

Change the geometry parameters such as length and diameter

Change the corresponding pressure ratio and

Use the fluid of different viscosity

Slide 14: 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 15: 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 16: Forum to answer questions
  • Do you have questions on THIS Spoken Tutorial?
  • Choose the minute and second where you have the question
  • Explain your question briefly
  • Someone from the FOSSEE team will answer them. Please visit

http://forums.spoken-tutorial.org/

Slide 17: Forum to answer questions
  • Questions not related to the Spoken Tutorial?
  • Do you have general/technical questions on the Software?
  • Please visit the FOSSEE forum

http://forums.fossee.in/

  • Choose the Software and post your question
Slide 18: Lab Migration project
  • We coordinate migration from commercial CFD software like ANSYS to OpenFOAM
  • We conduct free Workshops and provide solutions to CFD Problem Statements in OpenFOAM

For more details visit this site: http://cfd.fossee.in/

Slide 19: Case Study project
  • We invite students to solve a feasible CFD problem statement of reasonable complexity using OpenFOAM
  • We give honorarium and certificate to those who do this

For more details visit this site: http://cfd.fossee.in/

Slide 20: 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