1 00:00:01 --> 00:00:05 Hello and welcome to the spoken tutorial on creating a simple geometry in OpenFOAM 2 00:00:06 --> 00:00:07 In this tutorial I will show you 3 00:00:08 --> 00:00:10 How to create a simple geometry 4 00:00:11 --> 00:00:14 How to view the geometry in paraview 5 00:00:15 --> 00:00:15 To record this tutorial 6 00:00:16 --> 00:00:26 I am using Linux Operating system Ubuntu version10.04 OpenFOAM version 2.1.0 ParaView version 3.12.0 7 00:00:27 --> 00:00:32 In CFD the Pre-processing part consists of creating geometry and meshing it. 8 00:00:33 --> 00:00:37 Let us take the Lid driven cavity case of the previous tutorial as an example. 9 00:00:38 --> 00:00:40 Recall the path for he earlier tutorial, 10 00:00:41 --> 00:00:47 I have already opened the command terminal and entered the path for lid driven cavity 11 00:00:48 --> 00:00:54 There are three folders 0,constant,and system Geometry is inside the polymesh folder of constant 12 00:00:55 --> 00:01:02 In the command terminal type cd constant and press enter 13 00:01:03 --> 00:01:05 NowType ls and press enter 14 00:01:06 --> 00:01:09 In this there is another folder called as polymesh 15 00:01:10 --> 00:01:17 Now type cd polymesh and press enter 16 00:01:18 --> 00:01:21 Now type ls and press enter 17 00:01:22 --> 00:01:25 This contains the geometry file called as blockMeshDict 18 00:01:26 --> 00:01:29 Open the blockMeshDict file with any editor of your choice 19 00:01:30 --> 00:01:44 In the terminal type gedit blockMeshDict( Note that M and D are capital) and press enter 20 00:01:45 --> 00:01:48 Let me drag this to the capture area 21 00:01:49 --> 00:01:52 Now Minimise this 22 00:01:53 --> 00:01:54 Let me switch back to the slides 23 00:01:55 --> 00:02:01 In openfoam the entire geometry is broken into blocks 24 00:02:02 --> 00:02:07 The blocks are numbered starting from 0 as shown in the figure 25 00:02:08 --> 00:02:11 Note that in OpenFOAM for creating a 2D geometry 26 00:02:12 --> 00:02:18 you need to give a a unit cell thickness value in the z-axis. 27 00:02:19 --> 00:02:28 lid driven cavity is of length 1 and height 1 minimise the slide 28 00:02:29 --> 00:02:32 On your desktop create an empty file by 29 00:02:33 --> 00:02:47 right click > create document > Empty file name this as blockMeshDict. (Note that M and D here are capital). 30 00:02:48 --> 00:02:54 Open this. Now Copy the data from the original lid driven cavity blockMeshDict file 31 00:02:55 --> 00:02:58 to the new blockMeshDict file from line 0. 32 00:02:59 --> 00:03:14 Scroll up line 0 upto convertTometers. Copy this and paste it here. 33 00:03:15 --> 00:03:20 Scroll down. Now leave some space after converttometers. 34 00:03:21 --> 00:03:30 Enter 1 as the geometry is in meters. Insert a semicolon and press enter 35 00:03:31 --> 00:03:38 Again press Enter in file type vertices and press enter 36 00:03:39 --> 00:03:42 Insert the open bracket and press enter 37 00:03:43 --> 00:03:51 Press the tab key. Start with point 0, insert open, close brackets enter 38 00:03:52 --> 00:04:01 (0 space 0 space 0) and press enter. Again press tab key open close bracket . 39 00:04:02 --> 00:04:11 Move towards point 1 in positive x-axis and enter (1 space 0 space 0) and press enter 40 00:04:12 --> 00:04:25 Again press tab key open close bracket .move towards point 2 in positive x-y plane and enter (1 space 1 space 0) and press enter 41 00:04:26 --> 00:04:38 Again press tab key open close bracket enter the 3rd point in positive y axis (0 space 1 space 0 ) press enter 42 00:04:39 --> 00:04:50 Again press tab key enter the 4th point on the front face, open close bracket (0 space 0 space 0.1) and press enter 43 00:04:51 --> 00:04:56 Similarly enter the other points with one unit value in the positive z -axis 44 00:04:57 --> 00:05:03 close the bracket and insert a semicolon after it. Press enter,again press enter 45 00:05:04 --> 00:05:16 Below vertices are the blocks. Type blocks and press enter. Insert a Open bracket and press enter 46 00:05:17 --> 00:05:18 let me switch back to the slides 47 00:05:19 --> 00:05:23 Note that Lid driven cavity is taken as a single block 48 00:05:24 --> 00:05:26 Let me switch back to blockmeshdict 49 00:05:27 --> 00:05:30 Enter the points for the blocks in theclockwise sense 50 00:05:31 --> 00:05:33 We are using here hexa hedal blocks for meshing. 51 00:05:34 --> 00:05:38 Now type hex leave some space 52 00:05:39 --> 00:05:53 in brackets enter ( 0 space 1 2 3 4 5 6 7 ) again leave some space 53 00:05:54 --> 00:05:57 Note thatFor multiple blocks the points will be more. 54 00:05:58 --> 00:06:01 After this enter the grid points in the x,y,and z directions 55 00:06:02 --> 00:06:15 In brackets enter (30 space 30 space 1) ,you can modify the grid as an when needed 56 00:06:16 --> 00:06:21 Grid point in z-axis can be taken as one 57 00:06:22 --> 00:06:35 Now Leave some space and type simple grading open close bracket enter (1 space 1 space 1) 58 00:06:36 --> 00:06:42 This is the grid spacing in the x y and z direction. Press enter. 59 00:06:43 --> 00:06:47 Insert Close bracket insert a semicolon and press enter 60 00:06:48 --> 00:06:54 Again press enter.Now type edges, and press enter. 61 00:06:55 --> 00:06:59 As this is a simple geometry edges can be kept empty 62 00:07:00 --> 00:07:06 Insert open bracket press enter close the bracket ,insert a semicolon and press enter 63 00:07:07 --> 00:07:10 Again press enter. Below edges are the boundary conditions. 64 00:07:11 --> 00:07:14 Here you need to enter the boundary name for the faces 65 00:07:15 --> 00:07:18 Type boundary and press enter . 66 00:07:19 --> 00:07:22 insert a open bracket and press enter 67 00:07:23 --> 00:07:25 Now Let me switch back to the slides 68 00:07:26 --> 00:07:30 In the geometry the upper wall is moving and other three walls are fixed. 69 00:07:31 --> 00:07:38 The front and back faces are named as empty as this is a 2D problem 70 00:07:39 --> 00:07:41 Open the New blockMeshDict file again 71 00:07:42 --> 00:07:50 In boundary put the name of the patch as moving wall . Press enter 72 00:07:51 --> 00:07:55 Now Insert a open curly bracket and press enter 73 00:07:56 --> 00:08:05 Now Enter the type for the moving wall , enter type wall 74 00:08:06 --> 00:08:08 insert a semicolon and press enter 75 00:08:09 --> 00:08:19 Now insert open bracket, and press enter. Press the tab key. Open close bracket. 76 00:08:20 --> 00:08:23 In this bracket enter the pointfor faces 77 00:08:24 --> 00:08:26 Let me switch to the slide 78 00:08:27 --> 00:08:33 Note that order of the points should be in such a way that the thumb should be normal to the face 79 00:08:34 --> 00:08:38 And fingers making a curl as shown in the figure . 80 00:08:39 --> 00:08:42 The curl can be clockwise or anti- clockwise 81 00:08:43 --> 00:08:47 Also note that the points should match with the points inserted in vertices 82 00:08:48 --> 00:08:51 Now let me switch back to the new blockmeshdict file . 83 00:08:52 --> 00:09:00 Now in the faces enter (3 space 7 space 6 space 2). 84 00:09:01 --> 00:09:08 Let me switch back to the slide. These are the point for the moving wall 3,7,6,2. 85 00:09:09 --> 00:09:16 Minimise this. Note that you can start from any point on that face. Now press enter 86 00:09:17 --> 00:09:21 Close the bracket again press enter. Close the curly bracket. 87 00:09:22 --> 00:09:34 Another note we need to enter a semi- colon after you insert the points, a faces now after the curly brackets press enter again press enter 88 00:09:35 --> 00:09:39 Now Similarly enter boundary condition and faces for the fixed wall 89 00:09:40 --> 00:09:45 Being a 2D problem the type of boundary for front and back face can be kept as empty. 90 00:09:46 --> 00:09:51 Refer to the figure in the slide. For entering the points. Minimise this 91 00:09:52 --> 00:09:58 Insert the closed brackets put a semicolon and press enter again press enter. 92 00:09:59 --> 00:10:03 Now type mergePatchPairs and press enter. 93 00:10:04 --> 00:10:07 Since their are no patches to merge it can be kept empty 94 00:10:08 --> 00:10:13 Insert open close bracket. Insert a semi-colon and press enter. 95 00:10:14 --> 00:10:18 We are done with creating the blockmeshdict file. Save this 96 00:10:19 --> 00:10:25 The complete blockMeshDict file is as shown here. 97 00:10:26 --> 00:10:28 Close the both the blockMeshDict files 98 00:10:29 --> 00:10:34 Note that the command terminal will not work until blockMeshDict file is closed 99 00:10:35 --> 00:10:45 Come back to the termina.l now type cd (dot) (dot) twice to return back to the cavity folder. Now Mesh the geometry 100 00:10:46 --> 00:10:52 To do this in a terminal type: blockMesh and press enter 101 00:10:53 --> 00:10:59 Now View the geometry by typing in the command terminal paraFoam and press enter 102 00:11:00 --> 00:11:03 This will open the ParaView window 103 00:11:04 --> 00:11:12 Now On the left hand side click Apply on object inspector menuthus you can see the geometry. 104 00:11:13 --> 00:11:15 now let me switch back to theslides 105 00:11:16 --> 00:11:17 In this tutorial we learnt: 106 00:11:18 --> 00:11:21 Creating a simple geometry in OpenFOAM 107 00:11:22 --> 00:11:24 Viewing the geometry in Paraview 108 00:11:25 --> 00:11:28 This brings us to the end of the tutorial 109 00:11:29 --> 00:11:30 As an Assignment 110 00:11:31 --> 00:11:40 Change the direction of lid driven cavity ,Change the grid size to (50 50 1)and View the geometry in paraview 111 00:11:41 --> 00:11:43 Watch the video available at this URL: http://spoken-tutorial.org/What_is_a_Spoken_Tutorial 112 00:11:44 --> 00:11:46 It summarizes the Spoken Tutorial project. 113 00:11:47 --> 00:11:50 If you do not have good bandwidth, you can download and watch it. 114 00:11:51 --> 00:11:52 The Spoken Tutorial Project Team 115 00:11:53 --> 00:11:54 -Conducts workshops using spoken tutorials 116 00:11:55 --> 00:11:58 -Gives certificates to those who pass an online test 117 00:11:59 --> 00:12:04 -For more details, please write to contact@spoken-tutorial.org 118 00:12:05 --> 00:12:08 Spoken Tutorial project is part of Talk to a Teacher project, 119 00:12:09 --> 00:12:14 It is supported by the National Mission on Education through ICT, MHRD, Government of India. 120 00:12:15 --> 00:12:18 More information on the same is available at the following URL link http://spoken-tutorial.org/NMEICT-Intro 121 00:12:19 --> 00:12:24 This is Rahul Joshi from IIT BOMBAY signing off. Thanks for joining.