Difference between revisions of "OpenFOAM/C2/Creating-simple-geometry-in-OpenFOAM/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
 
(12 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
  
 
{| border=1
 
{| border=1
|| ''Time'''
+
|| '''Time'''
 
|| '''Narration'''
 
|| '''Narration'''
  
 
|-
 
|-
 
|00:01
 
|00:01
|  Hello and welcome to the spoken tutorial on '''creating a simple geometry in OpenFOAM'''
+
|  Hello and welcome to the '''spoken tutorial''' on '''creating simple geometry in OpenFOAM'''.
  
 
|-
 
|-
 
| 00:06
 
| 00:06
| In this tutorial I will show you  
+
| In this tutorial, I will show you:
  
 
|-
 
|-
 
| 00:08
 
| 00:08
| How to create a '''simple geometry'''
+
| How to create simple geometry  
  
 
|-
 
|-
 
| 00:11
 
| 00:11
| How to view the geometry in '''paraview '''
+
| How to view the geometry in '''paraview'''.
  
 
|-
 
|-
 
| 00:15
 
| 00:15
| To record this tutorial  
+
| To record this tutorial,I am using: '''Linux Operating system Ubuntu''' version 10.04 '''OpenFOAM''' version 2.1.0 '''ParaView''' version 3.12.0
  
 
|-
 
|-
| 00:16
+
| 00:26
| I am using Linux Operating system '''Ubuntu  version10.04 ''' '''OpenFOAM version 2.1.0 ''' '''ParaView version 3.12.0 '''
+
| 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:27
+
| 00:30
| In '''CFD''' the '''Pre-processing''' part consists of '''creating geometry and meshing''' it.  
+
| In '''CFD''' the Pre-processing part consists of creating geometry and meshing it.  
  
 
|-
 
|-
| 00:33
+
| 00:37
 
| Let us take the '''Lid driven cavity''' case of the previous tutorial as an example.  
 
| Let us take the '''Lid driven cavity''' case of the previous tutorial as an example.  
 
|-
 
| 00:38
 
| Recall the path for  he earlier tutorial,
 
  
 
|-
 
|-
 
| 00:41
 
| 00:41
| I have already opened the '''command terminal''' and entered the path for lid driven cavity
+
| Recall the '''path''' for the earlier tutorial.
  
 
|-
 
|-
| 00:48
+
| 00:44
| There are three folders '''0,constant,and system'''  '''Geometry''' is inside the '''polymesh''' folder of '''constant'''
+
| I have already opened the '''command terminal''' and entered the '''path''' for '''lid driven cavity'''
  
 
|-
 
|-
| 00:55
+
| 00:48
| In the command terminal type '''cd constant''' and press enter
+
| To source the OpenFOAM version 5, type:$of5. To go to the run folder, type:$cd $FOAM_RUN. To open the cavity case directory, type:$cd tutorials/incompressible/icoFoam/cavity/cavity. To list the contents of case directory, type:$ls.
  
|-
 
|  01:03
 
| NowType '''ls''' and press enter
 
  
 
|-
 
|-
| 01:06
+
| 00:54
| In this there is another folder called as''' polymesh'''  
+
| There are three folders '0, constant' and 'system'. 'Geometry' is inside the 'polymesh' folder of 'constant'.
  
 
|-
 
|-
| 01:10
+
| 01:11
|Now type '''cd polymesh''' and press enter
+
| In the command terminal, type: '''cd space constant''' and press '''Enter'''.
  
 
|-
 
|-
| 01:18
+
| 01:19
|Now type '''ls''' and press enter
+
| Now, type "ls" and press '''Enter'''.
  
 
|-
 
|-
| 01:22
+
| 01:21
| This contains the '''geometry''' file called as '''blockMeshDict '''
+
| In this, there is another folder called as 'polyMesh'.
  
 
|-
 
|-
 
| 01:26
 
| 01:26
| Open the '''blockMeshDict''' file with any '''editor''' of your choice
+
|Now type: '''cd space polymesh''' and press '''Enter'''.
  
 
|-
 
|-
| 01:30
+
| 01:34
| In the terminal type '''gedit blockMeshDict'''( Note that M and D are capital) and press enter
+
|Now type "ls" and press '''Enter'''.
 +
 
 +
|-
 +
| 01:39
 +
|To list the contents of the cavity directory, type:$ls. 0 constant system. To open the system directory, type:$cd system. To list the contents of the system directory, type:$ls blockMeshDict controlDict fvSchemes fvSolution.
  
 
|-
 
|-
 
| 01:45
 
| 01:45
|Let me drag this to the capture area
+
| This contains the 'geometry' file called as 'blockMeshDict'.
 +
 
 
|-
 
|-
| 01:49
+
| 01:48
|Now '''Minimise''' this
+
| Open the 'blockMeshDict' file with any '''editor''' of your choice.
  
 
|-
 
|-
| 01:53
+
| 01:52
| Let me switch back to the slides
+
| In the terminal, type: '''gedit space blockMeshDict'''( Note that M and D are capital) and press  '''Enter'''.
  
 
|-
 
|-
| 01:55
+
| 02:07
| In '''openfoam''' the entire '''geometry''' is broken into '''blocks '''
+
|Let me drag this to the capture area.
  
 
|-
 
|-
| 02:02
+
| 02:11
| The '''blocks''' are numbered starting from''' 0 '''as shown in the figure
+
|Now minimize this.
  
 
|-
 
|-
| 02:08
+
| 02:15
| Note that in '''OpenFOAM''' for creating a '''2D geometry'''  
+
| Let me switch back to the '''slide'''.
  
 
|-
 
|-
| 02:12
+
| 02:17
| you need to give a a''' unit cell thickness value''' in the '''z-axis'''.
+
| In '''openfoam''', the entire '''geometry''' is broken into '''blocks '''.
  
 
|-
 
|-
| 02:19
+
| 02:21
lid driven cavity is of '''length 1 and height 1'''  minimise the slide
+
The blocks are numbered starting from 0 (zero) as shown in the figure.
  
 
|-
 
|-
| 02:29
+
| 02:30
| On your '''desktop''' create an '''empty file''' by
+
| Note that in OpenFOAM, for creating a 2D geometry you need to give an unit cell thickness value in the z-axis.
  
 
|-
 
|-
| 02:33
+
| 02:41
| '''right click > create document > Empty file '''   name this as '''blockMeshDict.'''
+
| '''lid driven cavity''' is of length 1 and height 1.  Minimize the slide.  
  
(Note that M and D here are capital).
 
 
|-
 
|-
| 02:48
+
| 02:51
| Open this. Now Copy the data from the original '''lid driven cavity''' blockMeshDict file
+
| On your desktop, create an empty file by right click > '''create document > Empty file'''. Name this as 'blockMeshDict'. (Note that M and D here are capital).
  
 
|-
 
|-
| 02:55
+
| 03:10
| to the new '''blockMeshDict''' file from '''line 0'''.
+
| Open this. Now, copy the data from the original '''lid driven cavity''' 'blockMeshDict' file to the new 'blockMeshDict' file from line 0.
  
|-
 
|  02:59
 
| Scroll up '''line 0 upto convertTometers'''. Copy this and paste it here.
 
|-
 
|  03:15
 
| Scroll down. Now leave some space after converttometers.
 
 
|-
 
|-
 
|  03:21
 
|  03:21
| Enter 1 as the geometry is in meters. Insert a semicolon and press enter
+
| Scroll up line 0 upto 'convertTometers'. Copy this and '''paste''' it here.
 +
 
 
|-
 
|-
|  03:31
+
|  03:38
|Again press Enter in file '''type vertices''' and press enter
+
| Scroll down. Now leave some space after 'converttometers'.
  
 
|-
 
|-
|   03:39
+
| 03:44
Insert the '''open bracket''' and press enter
+
Enter 1 as the geometry is in meters. Insert a semicolon and press  '''Enter'''.
  
 
|-
 
|-
|   03:43
+
| 03:52
| Press the tab key. Start with point '''0''', insert open, close brackets enter
+
|Again press  '''Enter'''. In the file, type "vertices" and press  '''Enter'''.
 
+
  
 
|-
 
|-
| 03:52
+
|   04:01
| '''(0 space 0 space 0) '''and press enter. Again press tab key open close bracket .
+
| Insert the open bracket and press  '''Enter'''.
|-
+
| 04:02
+
|  Move towards  point 1 in positive '''x-axis''' and enter''' (1 space 0 space 0)''' and press enter
+
  
 
|-
 
|-
| 04:12
+
|   04:04
|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
+
| Press the '''tab''' key. Start with point 0, insert open, close brackets,  '''Enter'''.
  
 
|-
 
|-
| 04:26
+
| 04:14
|Again press tab key open close bracket enter the '''3rd point in positive y axis'''
+
| '''0 space 0 space 0 '''and press '''Enter'''. Again, press '''tab''' key, open close bracket .
 
+
'''(0 space 1 space 0 ) ''' press enter
+
  
 
|-
 
|-
| 04:39
+
| 04:24
| Again press tab key  '''enter the 4th point on the front face, open close bracket (0 space 0 space 0.1)''' and press enter
+
| Move towards point 1 in positive x-axis and enter ''' 1 space 0 space 0''' and press '''Enter'''.
  
 
|-
 
|-
|  04:51
+
|  04:34
| Similarly '''enter the other points''' with one unit value in the '''positive z -axis'''  
+
|Again press the tab key, open close bracket. Move towards point 2 in the positive x-y plane and enter '''1 space 1 space 0''' and press '''Enter'''.
  
 
|-
 
|-
| 04:57
+
| 04:48
| close the''' bracket''' and insert a '''semicolon''' after it. Press enter,again press enter
+
|Again press '''tab''' key, open close bracket. Enter the 3rd point in positive y-axis '''0 space 1 space 0 ''',  press  '''Enter'''.
  
 
|-
 
|-
| 05:04
+
| 05:01
| Below vertices are the blocks. Type blocks and  press enter. Insert a '''Open bracket''' and press enter
+
| Again press the '''tab''' key. Enter the 4th point on the front face, open close bracket, '''0 space 0 space 0.1''' and press '''Enter'''.
  
 
|-
 
|-
| 05:17 
+
| 05:13
|let me switch back to the slides
+
| Similarly, enter the other points with one unit value in the positive z- axis.
  
 
|-
 
|-
 
| 05:19
 
| 05:19
| Note that Lid driven cavity is taken as a '''single block '''
+
| close the bracket and insert a semicolon after it. Press  '''Enter''', again press '''Enter'''.
  
 
|-
 
|-
| 05:24
+
| 05:26
| Let me switch back to blockmeshdict
+
| Below vertices are the blocks. Type blocks and  press  '''Enter'''. Insert a open bracket and press '''Enter'''.
|-
+
| 05:27
+
|Enter the points for the blocks in the'''clockwise''' sense
+
  
|-
 
| 05:31
 
|We are using here hexa hedal blocks for meshing.
 
|-
 
| 05:34
 
|Now type '''hex''' leave some space
 
 
|-
 
|-
 
| 05:39
 
| 05:39
| in '''brackets''' enter '''( 0  space  1 2 3 4 5 6 7 ) ''' again leave some space
+
|Let me switch back to the slides.
  
 +
|-
 +
| 05:41
 +
| Note that '''Lid driven cavity''' is taken as a single block.
  
 
|-
 
|-
| 05:54
+
| 05:46
| Note thatFor '''multiple blocks''' the points will be more.  
+
| Let me switch back to 'blockmeshdict'.
  
 
|-
 
|-
| 05:58
+
| 05:48
|   After this enter the '''grid points''' in the x,y,and z directions
+
|Enter the points for the block in the clockwise sense.
  
 
|-
 
|-
| 06:02
+
| 05:53
|   In '''brackets''' enter '''(30 space 30 space 1)''' ,you can '''modify''' the '''grid'''  as an when needed
+
|We are using here '''hexa hedral blocks '''for '''meshing.'''
  
 
|-
 
|-
| 06:16
+
| 05:56
| '''Grid point in z-axis''' can be taken as one
+
|Now, type "hex". Leave some space. In brackets, enter ''' 0  space 1 2 3 4 5 6 7  ''', again leave some space.
  
 
|-
 
|-
| 06:22
+
| 06:15
|   Now Leave some space and type '''simple grading'''  open close bracket enter '''(1 space 1 space 1) '''
+
| Note that for multiple blocks, the points will be more.
  
 
|-
 
|-
| 06:36
+
| 06:20
| This is the grid spacing in the x y and z direction. Press enter.
+
|After this, enter the '''grid''' points in the x, y and z directions.  
 +
 
 
|-
 
|-
| 06:43
+
| 06:25
| Insert Close  '''bracket'''  insert a '''semicolon''' and press enter
+
|In brackets, open close brackets, enter '''30 space 30 space 1'''. Leave some space, you can  modify the grid as and when needed.
  
 +
|-
 +
|  06:38
 +
|Grid point in the z-axis can be taken as one.
  
 +
|-
 +
|  06:44
 +
|Now, leave some space and type "simple Grading". Leave some space, open close bracket, enter '''1 space 1 space 1 '''.
  
 +
|-
 +
| 06:58
 +
| This is the grid spacing in the x, y and z directions. Press  '''Enter'''.
  
 
|-
 
|-
| 06:48
+
| 07:05
| Again press enter.Now type '''edges''', and press enter.
+
| Insert close bracket, insert a semicolon and press '''Enter'''.
 +
 
 
|-
 
|-
| 06:55
+
| 07:11
|  As this is a simple geometry edges can be kept empty  
+
| Again press '''Enter'''. Now type "edges" and press  '''Enter'''.
 +
|-
 +
| 07:17
 +
|  As this is a simple geometry, '''edges''' can be kept empty.
  
 
|-
 
|-
| 07:00
+
| 07:21
|  Insert '''open  bracket press enter  close the bracket''' ,insert a semicolon and press enter
+
|  Insert open  bracket, press  '''Enter''', close the  bracket. Insert a semicolon and press '''Enter'''.
  
 
|-
 
|-
|  07:07
+
|  07:28
| Again press enter. Below '''edges''' are the '''boundary conditions'''.  
+
| Again press '''Enter'''. Below '''edges''' are the '''boundary conditions'''.  
  
 
|-
 
|-
|  07:11
+
|  07:33
| Here you need to enter the '''boundary name''' for the '''faces'''
+
| Here you need to enter the '''boundary names''' for the '''faces'''.
  
 
|-
 
|-
|  07:15
+
|  07:37
Type '''boundary''' and  press enter .  
+
|Type "boundary" and press '''Enter''' .  
 
+
  
 
|-
 
|-
| 07:19
+
| 07:41
| insert a''' open bracket''' and press enter
+
|Insert an open bracket and press  '''Enter'''.
  
 +
|-
 +
| 07:45
 +
|Now, let me switch back to the slides.
  
 
|-
 
|-
| 07:23
+
|07:48
|Now  Let me switch back to the slides
+
|In the geometry, the upper wall is moving and other three walls are fixed.
  
 
|-
 
|-
|   07:26
+
| 07:53
|In the geometry the '''upper wall is moving''' and other '''three walls are fixed'''.  
+
| The front and back faces are named as 'empty' as this is a 2D problem.
  
 
|-
 
|-
| 07:31
+
| 08:01
| The '''front and back faces''' are named as '''empty''' as this is a 2D problem
+
| Open the new 'blockMeshDict' file again.
  
 
|-
 
|-
| 07:39
+
|08:04
| Open the '''New blockMeshDict''' file again
+
| In '''boundary''', put the name of the '''patch''' as 'moving wall' . Press  '''Enter'''.
  
 
|-
 
|-
|07:42
+
| 08:16
| In '''boundary''' put the name of the '''patch''' as '''moving wall''' . Press enter
+
| Now, insert a open curly bracket and press  '''Enter'''.
  
 
|-
 
|-
| 07:51
+
| 08:20
| Now Insert a '''open curly bracket''' and press enter
+
| Now, enter the '''type''' for the '''moving wall''' , enter "type" space  "wall". 
  
 
|-
 
|-
| 07:56
+
| 08:28
| Now Enter the '''type''' for the '''moving wall''' , enter '''type'''  '''wall''' 
+
| Insert a semicolon and press  '''Enter'''.
  
 
|-
 
|-
| 08:06
+
| 08:33
| insert a '''semicolon''' and press enter
+
|Now, faces, now press Enter, insert open bracket and press '''Enter'''. Press the '''tab''' key, open close bracket.
|-
+
| 08:09
+
|Now insert open bracket, and press enter. Press the tab key. Open close bracket.
+
|-
+
|  08:20
+
|In this bracket enter the pointfor faces
+
|-
+
|  08:24
+
|Let me switch to the slide
+
  
 
|-
 
|-
| 08:27
+
| 08:47
| Note that order of the points should be in such a way that the '''thumb''' should be '''normal''' to the '''face '''
+
|In this bracket, enter the points for faces.
  
 
|-
 
|-
|  08:34
+
|  08:51
| And '''fingers''' making a '''curl '''  as shown in the figure .
+
|Let me switch back to the slide.
  
 
|-
 
|-
| 08:39
+
| 08:54
|The curl can be clockwise or anti- clockwise
+
| Note that the order of the points should be in such a way that the thumb should be normal to the face
|-
+
|  08:43
+
| Also note that the '''points''' should match with the '''points inserted in vertices'''
+
  
|-
 
|  08:48
 
|Now let me switch back to the new blockmeshdict file .
 
|-
 
|  08:52
 
|Now in the faces enter '''(3 space 7 space 6 space 2)'''.
 
 
|-
 
|-
 
|  09:01
 
|  09:01
Let me switch back to the slide. These are the point for the moving wall 3,7,6,2.
+
| and fingers making a curl  as shown in the figure.
  
 +
|-
 +
|  09:06
 +
|The curl can be clockwise or anti-clockwise.
  
 
|-
 
|-
| 09:09
+
| 09:09
|Minimise this. Note that you can start from any point on that face. Now press enter
+
| Also note that the points should match with the points inserted in vertices.
 +
 
 
|-
 
|-
| 09:17
+
| 09:14
|Close the bracket again press enter. Close the curly bracket.
+
|Now, let me switch back to the new 'blockMeshDict' file.
 +
 
 
|-
 
|-
| 09:22
+
| 09:18
|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
+
|Now in the faces, enter '''3 space 7 space 6 space 2'''.
  
 +
|-
 +
|  09:28
 +
|  Let me switch back to the slide. These are the points for the moving wall 3, 7, 6, 2.
  
 
|-
 
|-
| 09:35
+
| 09:35
|Now Similarly enter '''boundary condition''' and '''faces''' for the '''fixed wall '''
+
|Minimize this. Note that you can start from any point on that face. Now press  '''Enter'''.
  
 
|-
 
|-
| 09:40
+
| 09:44
| Being a 2D problem the '''type of boundary''' for '''front and back face''' can be kept as '''empty'''.
+
|Close the bracket. Again press  '''Enter'''. Close the curly bracket.
 +
 
 
|-
 
|-
| 09:46
+
| 09:55
|Refer to the figure in the slide. For entering the points. Minimise this
+
|Another note: we need to enter a semi colon after you insert the points for faces. Now after the curly brackets, press  '''Enter''', again press  '''Enter'''.
  
 
|-
 
|-
| 09:52
+
| 10:01
| '''Insert  the closed brackets''' put a '''semicolon''' and press enter again press enter.
+
|Now, similarly enter '''boundary condition''' and '''faces''' for the '''fixed walls'''.
 +
 
 
|-
 
|-
| 09:59
+
| 10:06
|Now type mergePatchPairs and press enter.
+
| Being a 2D problem the type of boundary for the front and back faces can be kept as empty.
  
 
|-
 
|-
| 10:04
+
| 10:13
| Since their are no patches to merge it can be kept empty
+
|Refer to the figure in the slide. For entering the points, minimize this.
|-
+
 
| 10:08
+
| Insert  open close bracket. Insert a semi-colon and press enter.
+
|-
+
| 10:14
+
| We are done with creating the  blockmeshdict file. Save this  
+
 
|-
 
|-
 
| 10:19
 
| 10:19
| The complete''' blockMeshDict '''file is as shown here.  
+
| Insert the closed brackets,  put a semicolon and press  '''Enter''',  again press  '''Enter'''.
  
 
|-
 
|-
|10:26
+
| 10:26
| Close the '''both the blockMeshDict''' files
+
|Now type "mergePatchPairs" and press  '''Enter'''.
  
 +
|-
 +
| 10:32
 +
| Since there are no patches to be merged, it can be kept empty.
  
 
|-
 
|-
| 10:29
+
| 10:35
| Note that the '''command terminal''' will not work until '''blockMeshDict file''' is '''closed'''  
+
| Insert open close brackets. Insert a semicolon and press  '''Enter'''.
  
 
|-
 
|-
| 10:35
+
| 10:41
Come back to the termina.l now type '''cd (dot) (dot)''' twice to return back to the '''cavity''' folder. Now '''Mesh the geometry'''
+
| We are done with creating the 'blockMeshDict' file. '''Save''' this.  
  
 
|-
 
|-
|10:46
+
| 10:46
|To do this in  a '''terminal''' type: '''blockMesh''' and press enter
+
| The complete 'blockMeshDict' file is as shown here.
  
 
|-
 
|-
| 10:53
+
|10:54
|Now View the '''geometry''' by typing in the '''command terminal''' '''paraFoam''' and press enter
+
| Close  both the 'blockMeshDict' files.
  
 
|-
 
|-
| 11:00
+
| 10:56
| This will open the ''' ParaView window'''
+
| Note that the '''command terminal''' will not work until the '''blockMeshDict''' file is closed.
 +
 
 
|-
 
|-
| 11:04
+
| 11:01
| Now On the left hand side click '''Apply''' on '''object inspector menu'''thus you can see the geometry.
+
| Switch back to the terminal. Now, type '''cd space (dot) (dot)''' twice to return back to the 'cavity' folder. Now '''Mesh the geometry'''.  
 +
 
 
|-
 
|-
| 11:13
+
|11:12
| now let me switch back to theslides
+
|To do this, on the terminal, type: "blockMesh" and press '''Enter'''.
  
 
|-
 
|-
| 11:16
+
| 11:20
In this tutorial we learnt:
+
|Now, view the '''geometry''' by typing on the '''command terminal''' '''paraFoam''' and press '''Enter'''.
  
 
|-
 
|-
| 11:18
+
| 11:27
| Creating a simple geometry in '''OpenFOAM'''  
+
| This will open the ''' ParaView''' window.
  
 
|-
 
|-
| 11:22
+
| 11:30
| Viewing the '''geometry''' in '''Paraview '''
+
| Now, on the left hand side, click '''Apply''' on '''object inspector''' menu. Thus, you can see the geometry.
  
 
|-
 
|-
| 11:25
+
| 11:39
| This brings us to the end of the tutorial
+
| Now, let me switch back to the slides.
  
 
|-
 
|-
| 11:29
+
| 11:43
| As an Assignment
+
| In this tutorial, we learnt:
  
 
|-
 
|-
| 11:31
+
| 11:45
| Change the direction  of lid driven cavity ,Change  the  '''grid size''' to '''(50 50 1)'''and
+
| Creating a simple geometry in '''OpenFOAM'''  
 
+
View the geometry in '''paraview'''  
+
  
 +
|-
 +
| 11:49
 +
| Viewing the geometry in '''Paraview '''.
  
 +
|-
 +
| 11:52
 +
| This brings us to the end of the tutorial.
  
 +
|-
 +
| 11:56
 +
| As an Assignment-
  
 
|-
 
|-
| 11:41
+
| 11:58
Watch the video available at this URL: [http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http://spoken-][http://spoken-tutorial.org/What_is_a_Spoken_Tutorial tutorial.org/What_is_a_Spoken_Tutorial]
+
| Change the dimensions of the '''lid driven cavity''', change the grid size to '''50 50 1''' and view the geometry in '''paraView'''.  
  
 +
|-
 +
| 12:08
 +
| Watch the video available at this URL: [http://spoken-tutorial.org/What_is_a_Spoken_Tutorial]
  
 
|-
 
|-
| 11:44
+
| 12:11
 
| It summarizes the Spoken Tutorial project.  
 
| It summarizes the Spoken Tutorial project.  
  
 
|-
 
|-
| 11:47
+
| 12:13
| If you do not have good bandwidth, you can download and watch it.  
+
| If you do not have a good bandwidth, you can download and watch it.  
  
 
|-
 
|-
| 11:51
+
| 12:18
| The Spoken Tutorial Project Team
+
| The Spoken Tutorial project team:
  
 
|-
 
|-
| 11:53
+
| 12:20
| -Conducts workshops using spoken tutorials  
+
| Conducts workshops using spoken tutorials  
  
 
|-
 
|-
| 11:55
+
| 12:22
| -Gives certificates to those who pass an online test  
+
| Gives certificates to those who pass an online test.
  
 
|-
 
|-
| 11:59
+
| 12:25
| -For more details, please write to contact@spoken-tutorial.org  
+
| For more details, please write to:
 +
'''contact@spoken-tutorial.org'''
  
 
|-
 
|-
| 12:05
+
| 12:48
|  Spoken Tutorial project is part of Talk to a Teacher project,
+
'''Spoken Tutorial''' project is part of the '''Talk to a Teacher''' project.
  
 
|-
 
|-
| 12:09
+
| 12:51
 
| It is supported by the National Mission on Education through ICT, MHRD, Government of India.  
 
| It is supported by the National Mission on Education through ICT, MHRD, Government of India.  
  
 
|-
 
|-
| 12:15
+
| 12:57
| More information on the same is available at the following URL link [http://spoken-tutorial.org/NMEICT-Intro http://spoken-tutorial.org/NMEICT-Intro]
+
| More information on this mission is available at the following URL:
 +
[http://spoken-tutorial.org/NMEICT-Intro]
  
 
|-
 
|-
| 12:19
+
| 13:02
| | This is Rahul Joshi from IIT BOMBAY signing off.  
+
| | This is Rahul Joshi from '''IIT Bombay''', signing off. Thanks for joining.  
 
+
Thanks for joining.  
+
 
|}
 
|}

Latest revision as of 03:39, 13 March 2019

Time Narration
00:01 Hello and welcome to the spoken tutorial on creating simple geometry in OpenFOAM.
00:06 In this tutorial, I will show you:
00:08 How to create simple geometry
00:11 How to view the geometry in paraview.
00:15 To record this tutorial,I am using: Linux Operating system Ubuntu version 10.04 OpenFOAM version 2.1.0 ParaView version 3.12.0
00:26 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:30 In CFD the Pre-processing part consists of creating geometry and meshing it.
00:37 Let us take the Lid driven cavity case of the previous tutorial as an example.
00:41 Recall the path for the earlier tutorial.
00:44 I have already opened the command terminal and entered the path for lid driven cavity.
00:48 To source the OpenFOAM version 5, type:$of5. To go to the run folder, type:$cd $FOAM_RUN. To open the cavity case directory, type:$cd tutorials/incompressible/icoFoam/cavity/cavity. To list the contents of case directory, type:$ls.


00:54 There are three folders '0, constant' and 'system'. 'Geometry' is inside the 'polymesh' folder of 'constant'.
01:11 In the command terminal, type: cd space constant and press Enter.
01:19 Now, type "ls" and press Enter.
01:21 In this, there is another folder called as 'polyMesh'.
01:26 Now type: cd space polymesh and press Enter.
01:34 Now type "ls" and press Enter.
01:39 To list the contents of the cavity directory, type:$ls. 0 constant system. To open the system directory, type:$cd system. To list the contents of the system directory, type:$ls blockMeshDict controlDict fvSchemes fvSolution.
01:45 This contains the 'geometry' file called as 'blockMeshDict'.
01:48 Open the 'blockMeshDict' file with any editor of your choice.
01:52 In the terminal, type: gedit space blockMeshDict( Note that M and D are capital) and press Enter.
02:07 Let me drag this to the capture area.
02:11 Now minimize this.
02:15 Let me switch back to the slide.
02:17 In openfoam, the entire geometry is broken into blocks .
02:21 The blocks are numbered starting from 0 (zero) as shown in the figure.
02:30 Note that in OpenFOAM, for creating a 2D geometry you need to give an unit cell thickness value in the z-axis.
02:41 lid driven cavity is of length 1 and height 1. Minimize the slide.
02:51 On your desktop, create an empty file by right click > create document > Empty file. Name this as 'blockMeshDict'. (Note that M and D here are capital).
03:10 Open this. Now, copy the data from the original lid driven cavity 'blockMeshDict' file to the new 'blockMeshDict' file from line 0.
03:21 Scroll up line 0 upto 'convertTometers'. Copy this and paste it here.
03:38 Scroll down. Now leave some space after 'converttometers'.
03:44 Enter 1 as the geometry is in meters. Insert a semicolon and press Enter.
03:52 Again press Enter. In the file, type "vertices" and press Enter.
04:01 Insert the open bracket and press Enter.
04:04 Press the tab key. Start with point 0, insert open, close brackets, Enter.
04:14 0 space 0 space 0 and press Enter. Again, press tab key, open close bracket .
04:24 Move towards point 1 in positive x-axis and enter 1 space 0 space 0 and press Enter.
04:34 Again press the tab key, open close bracket. Move towards point 2 in the positive x-y plane and enter 1 space 1 space 0 and press Enter.
04:48 Again press tab key, open close bracket. Enter the 3rd point in positive y-axis 0 space 1 space 0 , press Enter.
05:01 Again press the tab key. Enter the 4th point on the front face, open close bracket, 0 space 0 space 0.1 and press Enter.
05:13 Similarly, enter the other points with one unit value in the positive z- axis.
05:19 close the bracket and insert a semicolon after it. Press Enter, again press Enter.
05:26 Below vertices are the blocks. Type blocks and press Enter. Insert a open bracket and press Enter.
05:39 Let me switch back to the slides.
05:41 Note that Lid driven cavity is taken as a single block.
05:46 Let me switch back to 'blockmeshdict'.
05:48 Enter the points for the block in the clockwise sense.
05:53 We are using here hexa hedral blocks for meshing.
05:56 Now, type "hex". Leave some space. In brackets, enter 0 space 1 2 3 4 5 6 7 , again leave some space.
06:15 Note that for multiple blocks, the points will be more.
06:20 After this, enter the grid points in the x, y and z directions.
06:25 In brackets, open close brackets, enter 30 space 30 space 1. Leave some space, you can modify the grid as and when needed.
06:38 Grid point in the z-axis can be taken as one.
06:44 Now, leave some space and type "simple Grading". Leave some space, open close bracket, enter 1 space 1 space 1 .
06:58 This is the grid spacing in the x, y and z directions. Press Enter.
07:05 Insert close bracket, insert a semicolon and press Enter.
07:11 Again press Enter. Now type "edges" and press Enter.
07:17 As this is a simple geometry, edges can be kept empty.
07:21 Insert open bracket, press Enter, close the bracket. Insert a semicolon and press Enter.
07:28 Again press Enter. Below edges are the boundary conditions.
07:33 Here you need to enter the boundary names for the faces.
07:37 Type "boundary" and press Enter .
07:41 Insert an open bracket and press Enter.
07:45 Now, let me switch back to the slides.
07:48 In the geometry, the upper wall is moving and other three walls are fixed.
07:53 The front and back faces are named as 'empty' as this is a 2D problem.
08:01 Open the new 'blockMeshDict' file again.
08:04 In boundary, put the name of the patch as 'moving wall' . Press Enter.
08:16 Now, insert a open curly bracket and press Enter.
08:20 Now, enter the type for the moving wall , enter "type" space "wall".
08:28 Insert a semicolon and press Enter.
08:33 Now, faces, now press Enter, insert open bracket and press Enter. Press the tab key, open close bracket.
08:47 In this bracket, enter the points for faces.
08:51 Let me switch back to the slide.
08:54 Note that the order of the points should be in such a way that the thumb should be normal to the face
09:01 and fingers making a curl as shown in the figure.
09:06 The curl can be clockwise or anti-clockwise.
09:09 Also note that the points should match with the points inserted in vertices.
09:14 Now, let me switch back to the new 'blockMeshDict' file.
09:18 Now in the faces, enter 3 space 7 space 6 space 2.
09:28 Let me switch back to the slide. These are the points for the moving wall 3, 7, 6, 2.
09:35 Minimize this. Note that you can start from any point on that face. Now press Enter.
09:44 Close the bracket. Again press Enter. Close the curly bracket.
09:55 Another note: we need to enter a semi colon after you insert the points for faces. Now after the curly brackets, press Enter, again press Enter.
10:01 Now, similarly enter boundary condition and faces for the fixed walls.
10:06 Being a 2D problem the type of boundary for the front and back faces can be kept as empty.
10:13 Refer to the figure in the slide. For entering the points, minimize this.
10:19 Insert the closed brackets, put a semicolon and press Enter, again press Enter.
10:26 Now type "mergePatchPairs" and press Enter.
10:32 Since there are no patches to be merged, it can be kept empty.
10:35 Insert open close brackets. Insert a semicolon and press Enter.
10:41 We are done with creating the 'blockMeshDict' file. Save this.
10:46 The complete 'blockMeshDict' file is as shown here.
10:54 Close both the 'blockMeshDict' files.
10:56 Note that the command terminal will not work until the blockMeshDict file is closed.
11:01 Switch back to the terminal. Now, type cd space (dot) (dot) twice to return back to the 'cavity' folder. Now Mesh the geometry.
11:12 To do this, on the terminal, type: "blockMesh" and press Enter.
11:20 Now, view the geometry by typing on the command terminal paraFoam and press Enter.
11:27 This will open the ParaView window.
11:30 Now, on the left hand side, click Apply on object inspector menu. Thus, you can see the geometry.
11:39 Now, let me switch back to the slides.
11:43 In this tutorial, we learnt:
11:45 Creating a simple geometry in OpenFOAM
11:49 Viewing the geometry in Paraview .
11:52 This brings us to the end of the tutorial.
11:56 As an Assignment-
11:58 Change the dimensions of the lid driven cavity, change the grid size to 50 50 1 and view the geometry in paraView.
12:08 Watch the video available at this URL: [1]
12:11 It summarizes the Spoken Tutorial project.
12:13 If you do not have a good bandwidth, you can download and watch it.
12:18 The Spoken Tutorial project team:
12:20 Conducts workshops using spoken tutorials
12:22 Gives certificates to those who pass an online test.
12:25 For more details, please write to:

contact@spoken-tutorial.org

12:48 Spoken Tutorial project is part of the Talk to a Teacher project.
12:51 It is supported by the National Mission on Education through ICT, MHRD, Government of India.
12:57 More information on this mission is available at the following URL:

[2]

13:02 This is Rahul Joshi from IIT Bombay, signing off. Thanks for joining.

Contributors and Content Editors

DeepaVedartham, Gaurav, PoojaMoolya, Pratik kamble, Sandhya.np14, Sneha