OpenFOAM/C3/Simulating-Hagen-Poiseuille-flow/English-timed

From Script | Spoken-Tutorial
Jump to: navigation, search
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