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

From Script | Spoken-Tutorial
Jump to: navigation, search
 
Line 22: Line 22:
  
 
|-
 
|-
| 00:25
+
| 00:38
 
| 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.
 
| 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.
  
 
|-
 
|-
| 00:38
+
| 00:43
 
| To practice this tutorial, learner should have the knowledge of basic '''Fluid Dynamics''' and '''Hagen-Poiseuille flow'''
 
| To practice this tutorial, learner should have the knowledge of basic '''Fluid Dynamics''' and '''Hagen-Poiseuille flow'''
  
 
|-
 
|-
| 00:46
+
| 00:51
 
| Here is, '''Hagen-Poiseuille Flow''' diagram. We can see the dimensions and boundaries of the pipe.
 
| Here is, '''Hagen-Poiseuille Flow''' diagram. We can see the dimensions and boundaries of the pipe.
  
 
|-
 
|-
| 00:52
+
| 00:57
 
|'''Viscosity''' of  the fluid used, that is, water is given. Pressure at the '''inlet''' is 20''' Pascals''' and at the '''outlet''' is 0''' Pascals.'''
 
|'''Viscosity''' of  the fluid used, that is, water is given. Pressure at the '''inlet''' is 20''' Pascals''' and at the '''outlet''' is 0''' Pascals.'''
  
 
|-
 
|-
| 01:04
+
| 01:09
 
|As it is an '''in compressible flow''', only the pressure difference is of importance.
 
|As it is an '''in compressible flow''', only the pressure difference is of importance.
  
 
|-
 
|-
| 01:10
+
| 01:15
 
| Formulas and Analytical Solution:
 
| Formulas and Analytical Solution:
 
For '''Hagen-Poiseuille flow,''' '''Pressure drop''' along the pipe is: '''P1 minus P2 equals 32 mew U average L upon D square'''.
 
For '''Hagen-Poiseuille flow,''' '''Pressure drop''' along the pipe is: '''P1 minus P2 equals 32 mew U average L upon D square'''.
  
 
|-
 
|-
| 01:25
+
| 01:30
 
|By substituting the values from the previous diagram, we get '''U average equals to 0.208 meters per second'''. '''Maximum Velocity''' is given as: two times the '''average velocity''' which would be 0.416 meters per second'''.
 
|By substituting the values from the previous diagram, we get '''U average equals to 0.208 meters per second'''. '''Maximum Velocity''' is given as: two times the '''average velocity''' which would be 0.416 meters per second'''.
  
 
|-
 
|-
| 01:44
+
| 01:49
 
|'''Reynolds Number''' for the flow is: '''U average into D upon nu''', that comes out to be 2080. Hence, the flow is '''transient'''.
 
|'''Reynolds Number''' for the flow is: '''U average into D upon nu''', that comes out to be 2080. Hence, the flow is '''transient'''.
  
 
|-
 
|-
| 01:56
+
| 01:61
 
| Type of '''solver''' used here is '''IcoFOAM'''.
 
| Type of '''solver''' used here is '''IcoFOAM'''.
  
 
|-
 
|-
| 02:01
+
| 02:06
 
|It is a '''Transient Solver'''. It is used for '''in-compressible, laminar flow''' of Newtonian fluids.
 
|It is a '''Transient Solver'''. It is used for '''in-compressible, laminar flow''' of Newtonian fluids.
  
 
|-
 
|-
| 02:08
+
| 02:13
 
| '''Pressure Boundary Conditions '''used-
 
| '''Pressure Boundary Conditions '''used-
 
at '''Inlet: fixed Pressure'''
 
at '''Inlet: fixed Pressure'''
Line 70: Line 70:
  
 
|-
 
|-
|02:19
+
|02:24
 
| '''Velocity Boundary Conditions''' used -
 
| '''Velocity Boundary Conditions''' used -
 
at '''Inlet: pressure Inlet Velocity'''  
 
at '''Inlet: pressure Inlet Velocity'''  
Line 77: Line 77:
  
 
|-
 
|-
| 02:28
+
| 02:33
 
| 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'.
 
| 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'.
  
 
|-
 
|-
| 02:41
+
| 02:46
 
| 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.
 
| 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.
  
 
|-
 
|-
| 02:54
+
| 02:59
 
| Let's go inside the '3dpipe' folder.
 
| Let's go inside the '3dpipe' folder.
  
 
|-
 
|-
| 02:58
+
| 02:63
 
| 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.
  
 
|-
 
|-
| 03:05
+
| 03:10
 
| Now, let's go into the '0' folder and open the 'P' file. This is the''' pressure boundary condition''' file.
 
| Now, let's go into the '0' folder and open the 'P' file. This is the''' pressure boundary condition''' file.
  
 
|-
 
|-
| 03:14
+
| 03:19
 
| 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)'''.
  
 
|-
 
|-
| 03:20
+
| 03:25
 
| 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.  
  
 
|-
 
|-
| 03:29
+
| 03:34
 
| Let's close the file.
 
| Let's close the file.
  
 
|-
 
|-
| 03:32
+
| 03:37
 
| File containing the '''velocity boundary conditions '''is as seen. Let's open the file. We can see the '''velocity boundary conditions''' for '''inlet, outlet''' and '''fixed walls'''.  
 
| File containing the '''velocity boundary conditions '''is as seen. Let's open the file. We can see the '''velocity boundary conditions''' for '''inlet, outlet''' and '''fixed walls'''.  
  
 
|-
 
|-
| 03:43
+
| 03:48
 
| Let's close the file and come out of the '0' folder.
 
| Let's close the file and come out of the '0' folder.
  
 
|-
 
|-
| 03:48
+
| 03:53
 
| To see the '''blocking''' strategy, let me switch back to the '''slide'''s.
 
| To see the '''blocking''' strategy, let me switch back to the '''slide'''s.
  
 
|-
 
|-
| 03:54
+
| 03:59
 
| 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.
  
 
|-
 
|-
| 04:03
+
| 04:08
 
| Numbering pattern is as shown. You can also see the dimensions of the mesh.
 
| Numbering pattern is as shown. You can also see the dimensions of the mesh.
  
 
|-
 
|-
| 04:11
+
| 04:16
 
| To see the '''blockMeshDict''' file, let's minimize the slides.  
 
| To see the '''blockMeshDict''' file, let's minimize the slides.  
  
 
|-
 
|-
| 04:16
+
| 04:21
 
| Let's go into the folder 'constant', and then 'polyMesh'. Let's open the 'blockMeshDict' file. You can see the '''vertices, logs, 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. You can see the '''vertices, logs, edges''' and '''boundaries''' for inlet, outlet and '''fixed wall'''.
  
 
|-  
 
|-  
| 04:37
+
| 04:42
 
| Let's close the file and let's come out of the '''polyMesh''' folder.
 
| Let's close the file and let's come out of the '''polyMesh''' folder.
  
 
|-
 
|-
| 04:42
+
| 04:47
 
| We see the 'transportProperties' file. Let's open the file. Note the '''dynamic viscosity '''value, here, is 1 e-06.
 
| We see the 'transportProperties' file. Let's open the file. Note the '''dynamic viscosity '''value, here, is 1 e-06.
  
 
|-
 
|-
| 04:53
+
| 04:58
 
| Let's close the file and come out of the 'folder 'constant'.
 
| Let's close the file and come out of the 'folder 'constant'.
  
 
|-
 
|-
| 04:59
+
| 04:64
 
| Let's go into the 'system' folder. Now, let's have a look at the 'controlDict' file.  
 
| Let's go into the 'system' folder. Now, let's have a look at the 'controlDict' file.  
  
 
|-
 
|-
| 05:07
+
| 05:12
 
| 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 1e-03.
  
 
|-
 
|-
| 05:20
+
| 05:25
 
| Let's close the file. Let's close the 'Home' folder.
 
| Let's close the file. Let's close the 'Home' folder.
  
 
|-
 
|-
| 05:26
+
| 05:31
 
| 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.
  
 
|-
 
|-
| 05:40
+
| 05:45
 
| Type "run" and press '''Enter'''.
 
| Type "run" and press '''Enter'''.
  
 
|-
 
|-
| 05:44
+
| 05:49
 
| Type '''cd (space) tutorials''' and press '''Enter'''.
 
| Type '''cd (space) tutorials''' and press '''Enter'''.
  
 
|-
 
|-
| 05:50
+
| 05:55
 
| Type '''cd (space) incompressible''' and press '''Enter'''.
 
| Type '''cd (space) incompressible''' and press '''Enter'''.
  
 
|-
 
|-
| 05:55
+
| 05:60
 
| Type '''cd (space) icoFoam '''and press '''Enter'''.
 
| Type '''cd (space) icoFoam '''and press '''Enter'''.
  
 
|-
 
|-
| 05:59
+
| 05:64
 
| Type '''cd (space) 3Dpipe '''and press '''Enter'''.
 
| Type '''cd (space) 3Dpipe '''and press '''Enter'''.
  
 
|-
 
|-
| 06:05
+
| 06:10
 
| Now to create the '''mesh''', type "blockMesh" and press '''Enter'''. '''Meshing''' has been done.
 
| Now to create the '''mesh''', type "blockMesh" and press '''Enter'''. '''Meshing''' has been done.
  
 
|-
 
|-
| 06:16
+
| 06:21
 
| To start the '''iterations''', type "icoFoam" and press '''Enter'''. We  see the '''iterations''' are  running.
 
| To start the '''iterations''', type "icoFoam" and press '''Enter'''. We  see the '''iterations''' are  running.
  
 
|-
 
|-
| 06:27
+
| 06:32
 
| Iterations have been done. After the iterations end, type "paraFoam" for '''postprocessing''' the results and press '''Enter'''. It will open the" paraview". This is " paraview".
 
| Iterations have been done. After the iterations end, type "paraFoam" for '''postprocessing''' the results and press '''Enter'''. It will open the" paraview". This is " paraview".
 
   
 
   
 
|-
 
|-
| 06:41
+
| 06:46
 
| 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.'''
  
 
|-
 
|-
| 06:49
+
| 06:54
 
| Let's rotate the geometry for a better view.
 
| Let's rotate the geometry for a better view.
  
 
|-
 
|-
| 06:52
+
| 06:57
 
| 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.
  
 
|-
 
|-
| 07:01
+
| 07:06
 
| At the top, in '''VCR toolbar''', click on '''Play''' button.
 
| At the top, in '''VCR toolbar''', click on '''Play''' button.
  
 
|-
 
|-
| 07:06
+
| 07:11
 
| 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.'''
  
 
|-
 
|-
| 07:16
+
| 07:21
 
| 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.
 
| 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.
  
 
|-
 
|-
| 07:35
+
| 07:40
 
| Let's open the '''color legend.'''
 
| Let's open the '''color legend.'''
  
 
|-
 
|-
| 07:38
+
| 07:43
 
| We can see the maximum velocity is near to the actual maximum velocity i.e 0.4 meters per second.
 
| We can see the maximum velocity is near to the actual maximum velocity i.e 0.4 meters per second.
  
 
|-
 
|-
| 07:46
+
| 07:51
 
| To view the graph, go to '''Filters'''at the top > '''Data Analysis''' and press '''Plot Over Line.'''
 
| To view the graph, go to '''Filters'''at the top > '''Data Analysis''' and press '''Plot Over Line.'''
  
 
|-
 
|-
| 07:56
+
| 08:01
 
|Press '''Y Axis''' and press '''Apply'''.
 
|Press '''Y Axis''' and press '''Apply'''.
  
 
|-
 
|-
| 08:00
+
| 08:05
 
| We can see the parabolic profile for '''Hagen-Poiseuille flow'''.
 
| We can see the parabolic profile for '''Hagen-Poiseuille flow'''.
  
 
|-
 
|-
| 08:05
+
| 08:10
 
| Let's close the graph. Let's close '''ParaView''' and switch to the''' slides'''.
 
| Let's close the graph. Let's close '''ParaView''' and switch to the''' slides'''.
  
 
|-
 
|-
| 08:12
+
| 08:17
 
| In this tutorial, we have learned:
 
| In this tutorial, we have learned:
 
To create and '''mesh''' a '''3D pipe geometry'''.
 
To create and '''mesh''' a '''3D pipe geometry'''.
Line 252: Line 252:
  
 
|-
 
|-
| 08:30
+
| 08:35
 
| As an assignment-
 
| As an assignment-
 
Change the '''geometry parameters '''such as length and diameter.
 
Change the '''geometry parameters '''such as length and diameter.
Line 258: Line 258:
  
 
|-
 
|-
| 08:43
+
| 08:52
 
| Watch the video available at the following link.  It summarizes the Spoken Tutorial project. If you do not have good bandwidth, you can download and watch it.  
 
| Watch the video available at the following link.  It summarizes the Spoken Tutorial project. If you do not have good bandwidth, you can download and watch it.  
  
 
|-
 
|-
| 08:54
+
| 08:59
 
| The Spoken Tutorial Project team:  * Conducts workshops using spoken tutorials.   
 
| The Spoken Tutorial Project team:  * Conducts workshops using spoken tutorials.   
 
Gives certificates for those who pass an online test.   
 
Gives certificates for those who pass an online test.   
Line 268: Line 268:
  
 
|-
 
|-
| 09:11
+
| 09:35
 
| '''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 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'''  
 
'''spoken hyphen tutorial dot org slash NMEICT hyphen Intro'''  
 
|}
 
|}

Latest revision as of 16:59, 8 April 2019

Time Narration
00:02 Hello and welcome to the spoken tutorial on Simulating Hagen-Poiseuille flow in OpenFOAM.
00:09 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.

00:25 To record this tutorial, I am using:

Linux Operating system Ubuntu 12.04 OpenFOAM version 2.1.1 and ParaView version 3.12.0

00:38 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.
00:43 To practice this tutorial, learner should have the knowledge of basic Fluid Dynamics and Hagen-Poiseuille flow
00:51 Here is, Hagen-Poiseuille Flow diagram. We can see the dimensions and boundaries of the pipe.
00:57 Viscosity of the fluid used, that is, water is given. Pressure at the inlet is 20 Pascals and at the outlet is 0 Pascals.
01:09 As it is an in compressible flow, only the pressure difference is of importance.
01:15 Formulas and Analytical Solution:

For Hagen-Poiseuille flow, Pressure drop along the pipe is: P1 minus P2 equals 32 mew U average L upon D square.

01:30 By substituting the values from the previous diagram, we get U average equals to 0.208 meters per second. Maximum Velocity is given as: two times the average velocity which would be 0.416 meters per second.
01:49 Reynolds Number for the flow is: U average into D upon nu, that comes out to be 2080. Hence, the flow is transient.
01:61 Type of solver used here is IcoFOAM.
02:06 It is a Transient Solver. It is used for in-compressible, laminar flow of Newtonian fluids.
02:13 Pressure Boundary Conditions used-

at Inlet: fixed Pressure at Outlet: fixed Pressure at Walls: Zero Gradient.

02:24 Velocity Boundary Conditions used -

at Inlet: pressure Inlet Velocity at Outlet: zero Gradient at Walls: fixed Value.

02:33 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'.
02:46 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.
02:59 Let's go inside the '3dpipe' folder.
02:63 I have already copied the folders into my 3dpipe folder and modified the files in it.
03:10 Now, let's go into the '0' folder and open the 'P' file. This is the pressure boundary condition file.
03:19 Note that the dimensions are in meter square per second square (m2/s2).
03:25 Hence the pressure value in pascals is divided by the density, that is, 1000 Kg/m3 (Kg per meter cube) and written here.
03:34 Let's close the file.
03:37 File containing the velocity boundary conditions is as seen. Let's open the file. We can see the velocity boundary conditions for inlet, outlet and fixed walls.
03:48 Let's close the file and come out of the '0' folder.
03:53 To see the blocking strategy, let me switch back to the slides.
03:59 To create a 3D geometry of a pipe, I have made a 2D circular geometry and extruded the length in z-direction.
04:08 Numbering pattern is as shown. You can also see the dimensions of the mesh.
04:16 To see the blockMeshDict file, let's minimize the slides.
04:21 Let's go into the folder 'constant', and then 'polyMesh'. Let's open the 'blockMeshDict' file. You can see the vertices, logs, edges and boundaries for inlet, outlet and fixed wall.
04:42 Let's close the file and let's come out of the polyMesh folder.
04:47 We see the 'transportProperties' file. Let's open the file. Note the dynamic viscosity value, here, is 1 e-06.
04:58 Let's close the file and come out of the 'folder 'constant'.
04:64 Let's go into the 'system' folder. Now, let's have a look at the 'controlDict' file.
05:12 The solution converges after 18 seconds. Therefore, the final time step is kept 19. The time step has been set to 1e-03.
05:25 Let's close the file. Let's close the 'Home' folder.
05:31 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.
05:45 Type "run" and press Enter.
05:49 Type cd (space) tutorials and press Enter.
05:55 Type cd (space) incompressible and press Enter.
05:60 Type cd (space) icoFoam and press Enter.
05:64 Type cd (space) 3Dpipe and press Enter.
06:10 Now to create the mesh, type "blockMesh" and press Enter. Meshing has been done.
06:21 To start the iterations, type "icoFoam" and press Enter. We see the iterations are running.
06:32 Iterations have been done. After the iterations end, type "paraFoam" for postprocessing the results and press Enter. It will open the" paraview". This is " paraview".
06:46 Let's click on Apply on the left hand side of the Object inspector menu to see the geometry.
06:54 Let's rotate the geometry for a better view.
06:57 Click on the active variable control menu and select U in the drop-down menu.
07:06 At the top, in VCR toolbar, click on Play button.
07:11 Go to Object Inspector menu, go to Display, click on Rescale to data range.
07:21 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.
07:40 Let's open the color legend.
07:43 We can see the maximum velocity is near to the actual maximum velocity i.e 0.4 meters per second.
07:51 To view the graph, go to Filtersat the top > Data Analysis and press Plot Over Line.
08:01 Press Y Axis and press Apply.
08:05 We can see the parabolic profile for Hagen-Poiseuille flow.
08:10 Let's close the graph. Let's close ParaView and switch to the slides.
08:17 In this tutorial, we have learned:

To create and mesh a 3D pipe geometry. To simulate Hagen-Poiseuille flow for a fixed pressure ratio across boundaries and To visualize the velocity results in Parafoam

08:35 As an assignment-

Change the geometry parameters such as length and diameter. Change the corresponding pressure ratio and use the fluid of different viscosity.

08:52 Watch the video available at the following link. It summarizes the Spoken Tutorial project. If you do not have good bandwidth, you can download and watch it.
08:59 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

09:35 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, PoojaMoolya, Pratik kamble, Sandhya.np14