OpenFOAM/C2/2D-Laminar-Flow-in-a-channel/English-timed
From Script | Spoken-Tutorial
Time | Narration |
00:01 | Hello and welcome to the spoken tutorial on Simulating 2D Laminar Flow in a Channel using OpenFoam. |
00:09 | In this tutorial, I will show you- 2D geometry of channel Meshing the Geometry Solving and Post Processing results in Paraview and Validation using analytic result. |
00:25 | To record this tutorial, I am using:
Linux Operating system Ubuntu version 12.04. OpenFOAM version 2.1.1 ParaView version 3.12.0
|
00:39 | Note that OpenFOAM version 2.1.1 is supported on ubuntu version 12.04. |
00:45 | Hence forth all the tutorials will be covered using OpenFOAM version 2.1.1 and ubuntu version 12.04. |
00:56 | 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.
|
01:01 | As a prerequisite for this tutorial, you should know how to create geometry using OpenFOAM. |
01:08 | If not, please refer to the relevant tutorials on our website. |
01:14 | We simulate flow in a channel to determine flow development length along the downstream. Channel flow problem description. |
01:24 | The boundary names and the inlet conditions are shown as in this figure. |
01:31 | The flow develpoment length is given by the formula L= 0.05 times Re' that is the Reynolds number and 'D' which is the channel height. |
01:42 | Using the formula, the length of the channel comes out to be 5 meters and height is kept as 1 meter. |
01:50 | The Inlet velocity is 1 meter per second. And, we are solving this for a Reynolds number ( Re ) equal to 100. |
01:58 | This is a steady state problem . Therefore we are using a steady state incompressible solver for this case. |
02:06 | This is the file structure of our case. The folder should be created in the solver type that we choose. I have already created a folder in simpleFoam folder of incompressible flow solvers. |
02:27 | The folder is named as channel. Now, let me switch to the folder. |
02:33 | Copy 0, Constant and System folders of any other case, in the simpleFoam directory. |
02:42 | I have copied the file structure of the case pitzDaily. |
02:46 | Paste it inside the channel folder and make the necessary changes in the geometry, boundary faces and boundary condition. |
02:56 | Now, let me open the command terminal. |
02:59 | To do this, press Ctrl+Alt +t keys simultaneously on your keyboard. |
03:05 | In the terminal, type "run" and press Enter. |
03:09 | Now type cd space tutorials and press Enter. |
03:16 | Now type cd space incompressible and press Enter. |
03:23 | Type cd space simpleFoam and press Enter. |
03:28 | Now type cd space channel and press Enter. |
03:36 | Now, type "ls" and press Enter. |
03:41 | You will see three folders 0, Constant and system. |
03:45 | Now type cd space constant and press Enter. |
03:56 | Now type "ls" and press Enter. |
04:00 | In this, you will see the files containing properties of fluid and a folder named polymesh. |
04:07 | RASProperties contains Reynolds-averaged stress model. |
04:08 | transportProperties contains the transport model and kinematic viscosity that is (nu), in this case is set at 0.01 m²/s. |
04:25 | Now in terminal, type cd space polyMesh and press Enter. Now, type "ls" and press Enter. |
04:38 | You will see the blockMeshDict file here. |
04:42 | To open up the blockMeshDict file, in the terminal, type "gedit space blockMeshDict" and press Enter. Scroll down. |
04:56 | The geometry is in meters. So, the convertTometers is set to 1. Next, we have defined the vertices of the channel. |
05:07 | We have used a 100 X 100 mesh size here and cell spacing is kept as ( 1 1 1 ). |
05:15 | Next, we have setup the boundary conditions and their types which are inlet, outlet, top and bottom. |
05:27 | As this is a 2D Geometry, front and Back are kept as empty. |
05:35 | Also, this being a simple geometry, mergePatchPair and edges are to be kept empty. Close the blockMeshDict file. |
05:46 | In the command terminal, type cd space ..(dot dot) and press Enter. |
05:52 | Again, type cd space .. (dot dot) and press Enter. |
05:57 | Now. in the terminal, type cd space 0 (Zero) and press Enter. Now, type "ls" and press Enter. |
06:06 | This contains the intial boundary conditions and wall functions for the channel case. |
06:12 | It should contain various files such as epsilon, k, nut, nuTilda which are the wall functionsand 'p' , 'R' and capital 'U' which are initial conditions of the flow. |
06:28 | Let me switch back to the slides. |
06:31 | Calculate 'k' which is the turbulent kinetic energy from the formula given in the slide |
06:37 | where Ux, Uy and Uz are the velocity components in the x, y and z directions and U' ( dash ) = 0.05 times u actual. |
06:50 | Calculate epsilon from the formula given where epsilon is the rate of dissipation of turbulent energy, C mu is a constant and its value is 0.09. |
07:04 | And 'l' is the length of the channel. Let me minimize this. |
07:10 | Change only the boundary names in each of the above files. |
07:14 | Note that the values of nut, nuTilda, R are kept to default. |
07:21 | Rest of the files should contain the initial value for each of the boundary faces. |
07:28 | Now, in the terminal, type cd (space) ..(dot dot) and press Enter. |
07:35 | There are no changes to be done in the system folder. |
07:39 | Now we need to mesh the geometry. To do this, in the command terminal, type "blockMesh" and press Enter. |
07:48 | The Meshing is done. Now let me switch back to the slide. |
07:53 | The type of solver we are using here is SimpleFoam. It is a Steady-state solver for in-compressible and turbulent flows. |
08:02 | Let me minimize this. In the command terminal, type "simpleFoam" and press Enter. |
08:12 | Iterations running will be seen in the command terminal. |
08:15 | Iterations running may take some time. |
08:18 | The iterations will stop once the solution is converged or it reaches its end time value. |
08:24 | To view the results in paraView, in the terminal, type "paraFoam" and press Enter. This will open up the paraView window. |
08:36 | On the left hand side of the paraView window, click Apply. The geometry can be seen here. |
08:43 | On top of the active variable control menu, change the drop down menu from solid color to capital U. |
08:50 | You can see the initial state of velocity magnitude at inlet.. On top of the paraView window, click on theplay button of the VCR control. |
09:01 | You can see the final value of the velocity magnitude. |
09:07 | Also toggle on the color legend from the left hand side top of active variable control menu, click APPLY again. |
09:17 | Now go to Display, scroll down. You can see Rescale, click on it. |
09:25 | We can see that once the flow has fully developed, it attains a maximum uniform velocity at the center. Now, let me switch back to the slides. |
09:37 | The results obtained can be validated with the analytical solution for laminar flow in achannel which is u(max)=1.5 Uavg. |
09:47 | Using openFoam, we obtain a result of u(max) = 1.48 meters per second which is a good match. This brings us to the end of the tutorial. |
09:58 | In this tutorial, we learnt the file structure of channel, obtained solution using steady state solver. Viewed the geometry in paraview and validation with analytic results. |
10:09 | As an assignment- solve the problem for Reynold's Number equal to 1500 and validate it with the analytical result. |
10:18 | Watch 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. |
10:29 | 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 |
11:05 | Spoken Tutorials is a part of Talk to a Teacher project. It is supported by the National Mission on Education through ICT, MHRD, Government of India. |
11:15 | More information on this mission is available at the following URL link: http://spoken-tutorial.org/NMEICT-Intro |
11:20 | This is Rahul Joshi from IIT Bombay, signing off. Thanks for joining. |