Difference between revisions of "OpenFOAM/C2/Simulating-flow-in-a-Lid-Driven-Cavity/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with ' {| border=1 || ''Time''' || '''Narration''' |- | 00:01 | Hello and welcome to the '''spoken tutorial on Simulating Flow in a Lid Driven Cavity using openfoam''' |- | 00:07 …')
 
 
(9 intermediate revisions by 4 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 Simulating Flow in a Lid Driven Cavity using openfoam'''
+
|  Hello and welcome to the '''spoken tutorial''' on '''Simulating Flow in a Lid Driven Cavity''' using '''openFoam'''.
  
 
|-
 
|-
 
|  00:07
 
|  00:07
|  In this tutorial I will show you  
+
|  In this tutorial, I will show you:
 
+
  
 
|-
 
|-
 
|  00:09
 
|  00:09
|   The''' Lid Driven Cavity''' '''file structure'''
+
| The''' Lid Driven Cavity''' file structure
 
+
  
 
|-
 
|-
 
|  00:12
 
|  00:12
|   '''Meshing '''the Geometry  
+
| '''Meshing '''the Geometry  
 
+
  
 
|-
 
|-
 
|  00:14
 
|  00:14
|   Solving and '''post-processing results''' in '''Paraview'''
+
|Solving and post-processing results in '''Paraview'''
 
+
  
 
|-
 
|-
|  00:18
+
|  00:17
|   Plotting '''& '''validating''' results on a '''spreadsheet'''.  
+
| Plotting & validating results on a spreadsheet.  
  
 
|-
 
|-
 
|  00:21
 
|  00:21
|  To record this tutorial  
+
|  To record this tutorial, I am using: '''Linux Operating system Ubuntu''' version 10.04  
 
+
 
+
|-
+
|  00:22
+
I am using '''Linux Operating system Ubuntu version 10.04''' .
+
 
+
  
 
|-
 
|-
 
|  00:27
 
|  00:27
|  '''OpenFOAM version 2.1.0 ''' '''ParaView version 3.12.0 '''
+
|  '''OpenFOAM''' version 2.1.0 and  '''ParaView''' version 3.12.0.
  
 
|-
 
|-
|  00:33
+
|  00:32
'''Lid driven cavity''' is the most widely used '''2D test'''
+
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:36
+
|  00:37
case for validation of a '''CFD code'''
+
|  '''Lid driven cavity''' is the most widely used 2D test
  
 
|-
 
|-
|  00:39
+
|  00:41
| This is diagram of '''Lid Driven Cavity'''
+
|   case for validation of a '''CFD code'''.
  
 
|-
 
|-
| 00:42
+
| 00:44
| The '''boundary''' '''conditions''' remain the same
+
| This is the diagram of '''Lid Driven Cavity''',
 
+
 
+
  
 
|-
 
|-
| 00:44
+
| 00:46
| A '''moving wall''' and '''three fixedwalls'''
+
| the '''boundary conditions''' remain the same.
  
 
|-
 
|-
| 00:47
+
| 00:49
| We are '''solving''' this for '''Reynolds no (Re) = 100'''
+
| A '''moving wall''' and '''three fixedwalls'''.
 
+
 
+
  
 
|-
 
|-
| 00:50
+
| 00:51
| The '''moving wall''' has a velocity of '''1 meters per second'''
+
| We are solving this for '''Reynolds no (Re) = 100'''.
  
 
|-
 
|-
| 00:54
+
| 00:56
|   The path for the '''Lid Driven Cavity''' is the same as discussed in the '''installation tutorial'''
+
| The '''moving wall''' has a velocity of 1 meter per second.
  
 
|-
 
|-
|01:00
+
| 01:01
| Now Open a '''command terminal'''
+
| The '''path''' for the '''Lid Driven Cavity''' is the same as discussed in the installation tutorial.
  
 
|-
 
|-
| 01:02
+
|01:05
To do this press '''Ctrl+Alt+t '''simultaneously on your '''keyboard'''
+
Now, open a '''command terminal'''
  
 
|-
 
|-
| 01:08
+
| 01:07
| In the '''command terminal''' type the path for '''lid driven cavity'''
+
| To do this, press '''Ctrl+Alt+t ''' keys simultaneously on your keyboard.
  
 
|-
 
|-
| 01:12
+
| 01:13
|Now '''type run and press enter'''
+
In the command terminal
  
 
|-
 
|-
|01:15
+
| 01:17
| '''cd '''(space)''' tutorials and Press enter'''
+
|and type "run" and press '''Enter'''.
  
 
|-
 
|-
| 01:20
+
|01:20
| '''cd '''(space)''' incompressible and Press enter'''
+
| '''cd (space) tutorials''' and press '''Enter'''.
  
 
|-
 
|-
| 01:26
+
| 01:25
|'''cd '''(space)''' icoFoam '''(Note that F here is capital)''' and Press enter'''
+
| '''cd '''(space)''' incompressible''' and press '''Enter'''.
  
 
|-
 
|-
| 01:33
+
| 01:31
| ''' cd '''(space) cavity and '''Press Enter'''
+
|'''cd '''(space)''' icoFoam '''(Note that F here is capital) and press '''Enter'''.
  
 
|-
 
|-
 
| 01:38
 
| 01:38
|Now type '''ls''' and '''press enter'''
+
| '''cd '''(space) '''cavity''' and press '''Enter'''.
  
 
|-
 
|-
| 01:41
+
| 01:43
|In the '''file structure of cavity''' you will see 3 folders : '''0 , constant , and system'''
+
|Now, type "ls" and press '''Enter'''.
  
 
|-
 
|-
|01:46
+
| 01:46
| Now type '''cd''' (space) '''constant''' and''' press enter'''
+
|In the file structure of '''cavity''', you will see 3 folders : '''0 , constant , and system'''.
  
 
|-
 
|-
| 01:52
+
|01:51
| Now type '''ls '''and''' press enter'''
+
| Now, type '''cd''' (space) '''constant''' and press '''Enter'''.
  
 
|-
 
|-
|01:55
+
| 01:57
| The '''constant folder '''contains another '''folder''' named '''polymesh''' '''and a file describing the physical properties of fluid.'''
+
| Now type "ls" and press '''Enter'''.
  
 
|-
 
|-
| 02:02
+
|02:00
| Now type '''cd (space) polymesh''' and '''Press Enter'''
+
| The '''constant''' folder contains another folder named '''polyMesh''' and a file describing the physical properties of fluid.
 
+
  
 +
|-
 +
| 02:06
 +
| Now, type '''cd (space) polymesh''' and Press '''Enter'''.
  
 
|-
 
|-
| 02:08
+
| 02:13
| '''Polymesh contains a file named blockMeshDict '''
+
| '''PolyMesh''' contains a file named 'blockMeshDict'.
  
 
|-
 
|-
| 02:12
+
| 02:17
|  Now type '''ls''' and press enter
+
|  Now type "ls" and press '''Enter'''.
  
 
|-
 
|-
| 02:15
+
| 02:20
 
|  You can see the '''blockMeshDict'''
 
|  You can see the '''blockMeshDict'''
  
 
|-
 
|-
|  02:17
+
|  02:22
| To open up the  '''blockMeshDict'''file  type '''gedit blockMeshDict'''
+
| To open up the  '''blockMeshDict''' file, type '''gedit space blockMeshDict'''.
 
+
(Note that M and D here are capital).Now press '''Enter'''.
 
+
'''(Note '''that''' M and D '''here are''' capital)'''
+
 
+
 
+
Now press enter
+
  
 
|-
 
|-
| 02:30
+
| 02:35
|  This will Open up the '''blockMeshDict file'''
+
|  This will Open up the '''blockMeshDict''' file.
 
+
 
+
  
 
|-
 
|-
| 02:32
+
| 02:37
| '''Let me drag this to the capture area'''
+
| Let me drag this to the capture area.
 
+
|-
+
|  02:36
+
|  This contains : '''cordinates for lid driven cavity'''
+
  
 
|-
 
|-
 
|  02:41
 
|  02:41
|'''blocking and meshing parameters'''
+
| This contains: coordinates for the '''lid driven cavity''',
  
 
|-
 
|-
|  02:44
+
|  02:46
|'''and boundary patches.'''
+
|'''blocking''' and '''meshing parameters'''
  
 
|-
 
|-
|  02:47
+
|  02:49
| | Since there are  no '''arcs''' as well as no '''patches''' to be''' merged'''
+
|and '''boundary patches.'''
 
+
 
+
  
 
|-
 
|-
| 02:51
+
| 02:52
| '''edges and mergePatchPairs can be kept empty'''
+
| Since there are  no '''arcs''' as well as no '''patches''' to be merged, '''edges''' and '''mergePatchPairs''' can be kept empty.
  
 
|-
 
|-
| 02:57
+
| 03:01
| Now close this
+
| Now close this.
  
 
|-
 
|-
02:58
+
03:03
| | In the '''command terminal''' type : '''cd (space) .. (dot) (dot)'''  and press enter.
+
| In the command terminal, type : '''cd (space) .. (dot) (dot)'''  and press '''Enter.'''
  
 
|-
 
|-
| 03:04
+
| 03:09
| Do  this twice. you will come back to the''' cavity folder'''
+
| Do  this twice. You will come back to the''' cavity''' folder.
  
 
|-
 
|-
| 03:09
+
| 03:14
|  Now type '''cd''' (space) '''system''' and press enter,
+
|  Now, type '''cd''' (space) '''system''' and press '''Enter'''.
  
 
|-
 
|-
|03:16
+
|03:20
|  Now type '''ls''' press enter this contains three '''files'''
+
|  Now type "ls", press '''Enter'''. This contains three files-
 
+
  
 
|-
 
|-
|  03:22
+
|  03:27
|'''controlDict, fvSchemes and fvSolutions'''
+
|'''controlDict, fvSchemes''' and '''fvSolutions'''.
  
 
|-
 
|-
|  03:26
+
|  03:31
 
| '''controlDict''' contains '''control parameters''' for start/end time.
 
| '''controlDict''' contains '''control parameters''' for start/end time.
 
  
 
|-
 
|-
|  03:30
+
|  03:35
 
|'''fvSolution''' contains '''discritization schemes''' used in '''run time'''.
 
|'''fvSolution''' contains '''discritization schemes''' used in '''run time'''.
 
  
 
|-
 
|-
|  03:35
+
|  03:40
|And'''fvSchemes''' contains equation for '''solver''',
+
|And, '''fvSchemes''' contains equation for '''solvers''', '''tolerance''' etc.
 
+
  
 
|-
 
|-
| 03:38
+
| 03:45
|'''tolerance''' etc.  
+
| Now, again type '''cd (space) (dot dot) .. '''and press '''Enter'''.
  
 
|-
 
|-
| 03:40
+
| 03:51
| Now again type '''cd (space) (dot dot) . . '''and press enter
+
| Now type '''cd ( space )''' 0 (zero) and Press '''Enter'''.
  
 
|-
 
|-
| 03:47
+
|03:58
| Now type '''cd ( space )''' 0 (zero) and Press enter
+
| Now type "ls" and press '''Enter'''.
  
 
|-
 
|-
|03:53
+
| 04:02
| Now type''' ls''' and press enter
+
| This contains the initial values for '''boundary conditions''' like '''Pressure, Velocity, Temperature''' etc.
  
 
|-
 
|-
| 03:57
+
| 04:08
| This contains the '''initial values''' for '''boundary conditions''' like
+
| Now type''' cd ( space ) (dot dot) . .''' to return back to the '''cavity''' folder.
 
+
  
 
|-
 
|-
| 04:00
+
| 04:14
|'''Pressure ,Velocity,Temperature etc.'''  
+
| Now we need to '''mesh '''the geometry.
  
 
|-
 
|-
|  04:03
+
|  04:16
| Now  Type''' cd ( space ) (dot dot) . .''' to return back to the '''cavity folder'''
+
|We are using a coarse mesh here.
  
 
|-
 
|-
| 04:09
+
| 04:19
Now we need to '''mesh '''the''' geometry'''
+
|  '''Mesh''' the geometry by typing '''blockMesh''' in the '''terminal'''.
 
+
  
 
|-
 
|-
| 04:11
+
|04:23
|'''We are using a course mesh here.'''
+
| Now type '''blockMesh '''(Note that M  here is capital) and press '''Enter'''.
  
 
|-
 
|-
| 04:14
+
| 04:30
|  '''Mesh''' the '''geometry''' by typing '''blockMesh''' in the '''terminal'''.
+
The '''Meshing''' is done.
  
 
|-
 
|-
|04:18
+
| 04:32
| Now type '''blockMesh '''(Note that M  here is capital) and press enter
+
| If there are some '''errors''' in the '''blockMesh''' file, it will be shown in the '''terminal'''.
  
 
|-
 
|-
| 04:25
+
| 04:36
The'''Meshing''' is done.
+
To view the geometry,type '''paraFoam'''. Note that 'F' here is capital and press '''Enter'''.
  
 
|-
 
|-
| 04:27
+
| 04:45
| If there is some '''error''' in the '''blockMesh file ''' it will be shown in the '''terminal'''
+
| This will open the '''paraview window'''.
  
 
|-
 
|-
|  04:31
+
|  04:49
To view the '''geometry'''  
+
Now on the left hand side of the '''object inspector''' menu, click on '''Apply.'''
 
+
  
 
|-
 
|-
| 04:32
+
| 04:54
|Type '''paraFoam''' , Note that '''F''' here is '''capital''' and '''press enter'''
+
| You can see the '''lid driven cavity''' geometry. Now close this.
  
 
|-
 
|-
| 04:40
+
|05:03
This will open the '''paraview window'''
+
Check the mesh by typing "checkMesh" in the terminal.
  
 
|-
 
|-
04:44
+
05:09
| Now on the left hand side of the '''object inspector menu''' click on '''Apply.'''
+
|Note that 'M' here is capital and press '''Enter'''.
  
 
|-
 
|-
| 04:49
+
|05:13
| You can see the '''lid driven cavity''' '''geometry''' now close this
+
| you can see the number of cells, '''skewness''' and other parameters which are associated with the '''mesh'''.
  
 
|-
 
|-
|04:58
+
|05:20
|  Check the mesh by typing '''checkMesh''' in the''' terminal'''
+
 
+
 
+
|-
+
|  05:04
+
|Note that '''M''' here is capital and press enter
+
 
+
|-
+
|05:08
+
| you can see  the '''number of cells''' ,
+
 
+
 
+
|-
+
|  05:10
+
|'''skewness''' and '''other parameters'''
+
 
+
 
+
|-
+
|  05:12
+
|which are associated with the '''mesh'''
+
 
+
|-
+
|05:15
+
 
|  Let me switch back to the '''slides'''.
 
|  Let me switch back to the '''slides'''.
  
 
|-
 
|-
|  05:18
+
|  05:22
|  The solver we are using here is '''icoFoam''' :
+
|  The solver we are using here is '''icoFoam''':
  
 
|-
 
|-
|  05:20
+
|  05:25
| | '''icoFoam is a Transient''' '''solver''' for '''incompressible flow''' of '''newtonian fluids'''
+
|   '''icoFoam''' is a '''Transient solver''' for '''incompressible flow''' of '''newtonian fluids'''.
  
 
|-
 
|-
|  05:26
+
|  05:31
|  Let me switch back to the '''terminal'''
+
|  Let me switch back to the terminal.
  
 
|-
 
|-
|  05:29
+
|  05:34
|  In the '''terminal '''type '''icoFoam'''
+
|  In the terminal, type "icoFoam".
 
+
  
 
|-
 
|-
|  05:33
+
|  05:38
|Note that '''F''' here is '''capital''' and press enter
+
|Note that 'F' here is capital and press '''Enter'''.
  
 
|-
 
|-
|  05:37
+
|  05:42
| The  '''Iterations '''running will be seen in the '''terminal window'''.
+
| The  '''Iterations '''running will be seen in the terminal window.
  
 
|-
 
|-
| 05:40
+
| 05:45
| After the solving is done type '''paraFoam''' in the terminal  
+
| After the solving is done, type '''paraFoam''' in the terminal to view the geometry and the results.
  
 
|-
 
|-
| 05:44
+
| 05:59
|to view the '''geometry''' and the '''results'''
+
|  On the left hand side of '''object inspector''' menu
 
+
|-
+
| 05:54
+
|  On the left hand side of '''object inspector menu'''
+
 
+
 
+
|-
+
|  05:57
+
|'''click on Apply'''
+
 
+
|-
+
|  05:59
+
|  Now '''Scroll''' down the '''properties '''  on '''objector inspector menu '''
+
 
+
  
 
|-
 
|-
 
|  06:02
 
|  06:02
|'''you can see mesh part,volume fields etc'''
+
|click on '''Apply'''.Now '''Scroll''' down the properties on '''object inspector''' menu.
  
 
|-
 
|-
| 06:07
+
| 06:07
|   '''Check or uncheck '''these '''boxes''' in the '''mesh''' part
+
|you can see '''mesh parts, Volume Fields''' etc.
 
+
  
 
|-
 
|-
| 06:11
+
| 06:12
|to view the '''different boundary''' '''regions '''of '''Lid driven cavity'''
+
|   Check or uncheck these '''boxes''' in the '''mesh''' part, to view the different boundary regions of '''Lid driven cavity'''.
  
 
|-
 
|-
|   06:15
+
| 06:20
| Now after this on top of the left-hand side''' on  active variable control '''
+
| Now, after this, on top of the left-hand side on  '''active variable control ''' drop-down menu, change this from '''solid color''' to '''p''' or capital '''U''' which are the '''initial conditions''' such as '''pressure, velocity'''.
 
+
  
 
|-
 
|-
|  06:21
+
|  06:36
|'''dropdown menu change this from solid color to p orcapital  U'''
+
|I will select capital 'U'. Now this will show you the initial condition of velocity.
 
+
  
 
|-
 
|-
|  06:26
+
|  06:42
|which are the '''initial conditions''' such as '''pressure , velocity'''
+
| On top of the''' paraview''' window, you will see the''' VCR control'''.
 
+
  
 
|-
 
|-
|  06:31
+
|  06:49
|'''I will select capital U'''. Now this will show you'' the initial condition of velocity
+
|Click on the '''play''' button.
  
 
|-
 
|-
|  06:37
+
|  06:52
on top of the''' paraview window''' you can see the''' VCR control'''
+
Now this is the final result of '''velocity''' for the '''lid driven cavity'''.
 
+
  
 
|-
 
|-
| 06:44
+
| 06:57
|'''Click on the play button'''
+
| Toggle on the '''color legend''' by clicking on the top left of the '''active variable control''' menu.
  
 
|-
 
|-
06:47
+
07:08
| Now this is the final '''result''' of '''velocity''' for '''lid driven cavity'''
+
| This is the''' color legend''' for '''U velocity'''.
  
 
|-
 
|-
| 06:52
+
| 07:12
|   Toggle on the '''color''' '''legend '''by clicking on  the top left of the '''active variable control menu'''
+
| We need to validate the results obtained.
  
 
|-
 
|-
|  07:03
+
|  07:14
| This is the''' color legend''' for '''U velocity'''
+
|To do this, let us plot the '''U''' and '''V velocity'''.
 
+
|-
+
| 07:07
+
| We need to''' validate''' the '''results obtained'''
+
 
+
 
+
|-
+
|  07:09
+
|To do this let us '''plot''' the '''U and V velocity'''
+
 
+
 
   
 
   
 
|-
 
|-
|  07:12
+
|  07:17
| To do this   Go to '''Filters scroll down > Data Analysis > Plot Over line'''
+
| To do this, go to '''Filters''' scroll down > '''Data Analysis''' > '''Plot Over line'''.
  
 
|-
 
|-
|  07:21
+
|  07:26
| Click on it
+
| Click on it.
  
 
|-
 
|-
| 07:23
+
| 07:30
|  You can see  '''X , Y and Z axis'''
+
|  You can see  X , Y and Z axes.
  
 
|-
 
|-
| 07:25
+
| 07:33
 
|  Select the '''X & Y axis''' turn by turn.
 
|  Select the '''X & Y axis''' turn by turn.
 
  
 
|-
 
|-
|  07:31
+
|  07:39
|I will select the '''X axis''' and click '''Apply'''
+
|I will select the '''X axis''' and click '''Apply'''.
  
 
|-
 
|-
| 07:37
+
| 07:45
|  You can see '''Pressure and velocity''' '''plots''' being plotted
+
|  You can see '''Pressure''' and '''velocity''' '''plots''' being plotted.
  
 
|-
 
|-
| 07:42
+
| 07:50
|  Since it is a '''non dimensional analysis'''
+
|  Since it is a non dimensional analysis, we need to plot the graph for '''u/U v/s y/L''' for '''Reynolds number =100'''
 
+
  
 
|-
 
|-
| 07:44
+
| 08:00
|we need to '''plot the graph''' for '''u/U v/s y/L''' for '''Reynolds number =100'''
+
| To do this, in '''Plot Data''' click on the '''Y-axis'''
  
 
|-
 
|-
| 07:52
+
08:06
| To do this in '''Plot Data''' click on the '''Y-axis'''
+
|and click '''APPLY'''.
 
+
 
+
|-
+
|  07:58
+
|And click '''APPLY'''
+
 
+
|-
+
| 08:01
+
|  You can see the''' plot'''
+
 
+
 
+
|-
+
|  08:03
+
|Now in menu bar go to '''File > Save Data '''
+
  
 
|-
 
|-
 
| 08:09
 
| 08:09
| Give    appropriate name to your file
+
| You can see the''' plot'''.
  
 
|-
 
|-
 
|  08:11
 
|  08:11
| I will give this as '''cavity'''
+
|Now in menu bar, go to '''File > Save Data'''.
 
+
  
 
|-
 
|-
| 08:15
+
| 08:15
|The file will be saved as '''.csv file'''
+
| Give  appropriate name to your file.
  
 
|-
 
|-
 
|  08:19
 
|  08:19
| Now click ok. Again click ok
+
| I will give this as "cavity".
  
 
|-
 
|-
| 08:23
+
| 08:23
| Now go to the '''cavity folder''' of '''openfoam directory'''.
+
|The file will be saved as ".csv" (dot csv) file.
 
+
  
 
|-
 
|-
|  08:29
+
|  08:27
|'''Scroll '''down you can see the '''cavity.csv file'''
+
| Now click OK. Again click OK.
  
 
|-
 
|-
| 08:34
+
| 08:31
| Open it in Open office or LibreOffice Spreadsheet
+
| Now go to the '''cavity''' folder of '''openfoam directory'''.
  
 
|-
 
|-
|   08:39
+
| 08:37
| In the libreoffice spreadsheet copy the U0 (u velocity) and to the right point 1(Y-axis) columns
+
|Scroll down. you can see the '''cavity.csv''' file.
 
+
  
 
|-
 
|-
| 08:46
+
| 08:42
|in another spreadsheet
+
| Open it in '''Open office''' or '''LibreOffice Spreadsheet'''.
  
 
|-
 
|-
| 08:48
+
|   08:47
| Now divide both these coloumns
+
| In the LibreOffice spreadsheet, copy the U0 (u velocity) and to the right points 1(Y-axis) columns in another spreadsheet.
 
+
  
 
|-
 
|-
|  08:52
+
|  08:56
|that is '''u zero''' by '''capital U''' and '''points 1''' by '''capital L'''
+
| Now, divide both these columns, that is, '''u zero''' by capital U and '''points 1''' by capital L
  
 
|-
 
|-
08:59
+
09:07
| And Plot the results in '''libreoffice''' '''charts''' option on top in the menu bar.
+
| and plot the results in '''libreoffice''' charts option on top, in the menu bar.
  
 
|-
 
|-
|  09:08
+
|  09:16
| | Now let me switch back to the slides
+
| Now let me switch back to the slides.
  
 
|-
 
|-
|  09:11
+
|  09:18
| Results obtained will be similar to this figure
+
| Results obtained will be similar to this figure.
  
 
|-
 
|-
| 09:16
+
| 09:24
| '''Validate''' the result on a  paper published on '''Lid Driven Cavity by : Ghia et al. (1982''') and  
+
| '''Validate''' the results on a  paper published on '''Lid Driven Cavity by : Ghia et al. (1982''') and Results obtained from Fluent.
 
+
  
 
|-
 
|-
| 09:22
+
|09:34 
|Results '''obtained from Fluent'''
+
| In this tutorial, we learnt: 
  
 
|-
 
|-
|09:24 
+
| 09:36
| In this tutorial we learnt 
+
| File structure of '''Lid Driven cavity'''
  
 
|-
 
|-
|  09:26
+
|  09:38
|'''File structure of Lid Driven cavity'''
+
| '''Solved lid driven cavity'''.
  
 
|-
 
|-
|  09:28
+
|  09:40
|'''Solved lid driven cavity'''.
+
 
+
|-
+
|  09:30
+
 
|'''Post-processing of solutions'''
 
|'''Post-processing of solutions'''
  
 
|-
 
|-
|  09:32
+
|  09:42
|And'''Validation'''
+
|And '''Validation'''.
  
 
|-
 
|-
| 09:34
+
| 09:44
|   As as Assignment,  
+
| As an assignment, Change some parameters in the '''lid driven cavity'''.
  
 
|-
 
|-
|  09:35
+
|  09:48
|Change some '''parameters''' in the '''lid driven cavity'''
+
|'''Velocity Magnitude''' in the '''0 folder'''.
  
 
|-
 
|-
|  09:38
+
|  09:51
|* '''Velocity Magnitude''' in the '''0 folder'''
+
| '''Kinematic viscosity''' in '''transport Properties''' in '''constant''' folder.
|-
+
|  09:41
+
|* '''Kinematic viscosity in transportPorpoerties in constant folder'''
+
  
 
|-
 
|-
|  09:45
+
|  09:55
|And Plot results of '''u/U and y/L'''
+
|And, plot results of '''u/U and y/L'''.
 
+
+
  
 
|-
 
|-
| 09:50
+
| 10:00
 
| Watch the  video available at this URL: http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  
 
| Watch the  video available at this URL: http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  
  
 
|-
 
|-
09:54
+
10:04
|It summarizes the Spoken Tutorial project.  
+
|It summarizes the '''Spoken Tutorial''' project.  
  
 
|-
 
|-
09:57
+
10:07
 
|If you do not have good bandwidth, you can download and watch it.
 
|If you do not have good bandwidth, you can download and watch it.
  
 
|-
 
|-
|  10:00
+
|  10:10
|  The Spoken Tutorial Project Team
+
|  The Spoken Tutorial project team:
  
 
|-
 
|-
|  10:02
+
|  10:12
 
|Conducts workshops using spoken tutorials
 
|Conducts workshops using spoken tutorials
  
 
|-
 
|-
|  10:05
+
|  10:15
|Gives certificates to those who pass an online test
+
|Gives certificates to those who pass an online test.
  
 
|-
 
|-
|  10:09
+
|  10:19
|For more details, please write to us at contact @spoken-tutorial.org
+
|For more details, please write to us at:contact@spoken-tutorial.org
  
 
|-
 
|-
| 10:15
+
| 10:40
| Spoken Tutorials are part of Talk to a Teacher project,
+
| '''Spoken Tutorials''' are part of '''Talk to a Teacher''' project.
  
 
|-
 
|-
|  10:18
+
|  10:43
 
|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.  
  
 
|-
 
|-
|  10:23
+
|  10:48
|More information on the same is available at the following URL link http://spoken-tutorial.org/NMEICT-Intro
+
|More information on the same is available at the following URLhttp://spoken-tutorial.org/NMEICT-Intro
  
 
|-
 
|-
| 10:27
+
| 10:52
|  This is Rahul Joshi from IIT BOMBAY signing off.
+
|  This is Rahul Joshi from IIT Bombay, signing off.
  
 
|-
 
|-
|  10:30
+
|  10:55
|Thanks for joining
+
|Thanks for joining.
  
 
|}
 
|}

Latest revision as of 13:00, 9 April 2019

Time Narration
00:01 Hello and welcome to the spoken tutorial on Simulating Flow in a Lid Driven Cavity using openFoam.
00:07 In this tutorial, I will show you:
00:09 The Lid Driven Cavity file structure
00:12 Meshing the Geometry
00:14 Solving and post-processing results in Paraview
00:17 Plotting & validating results on a spreadsheet.
00:21 To record this tutorial, I am using: Linux Operating system Ubuntu version 10.04
00:27 OpenFOAM version 2.1.0 and ParaView version 3.12.0.
00:32 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:37 Lid driven cavity is the most widely used 2D test
00:41 case for validation of a CFD code.
00:44 This is the diagram of Lid Driven Cavity,
00:46 the boundary conditions remain the same.
00:49 A moving wall and three fixedwalls.
00:51 We are solving this for Reynolds no (Re) = 100.
00:56 The moving wall has a velocity of 1 meter per second.
01:01 The path for the Lid Driven Cavity is the same as discussed in the installation tutorial.
01:05 Now, open a command terminal.
01:07 To do this, press Ctrl+Alt+t keys simultaneously on your keyboard.
01:13 In the command terminal
01:17 and type "run" and press Enter.
01:20 cd (space) tutorials and press Enter.
01:25 cd (space) incompressible and press Enter.
01:31 cd (space) icoFoam (Note that F here is capital) and press Enter.
01:38 cd (space) cavity and press Enter.
01:43 Now, type "ls" and press Enter.
01:46 In the file structure of cavity, you will see 3 folders : 0 , constant , and system.
01:51 Now, type cd (space) constant and press Enter.
01:57 Now type "ls" and press Enter.
02:00 The constant folder contains another folder named polyMesh and a file describing the physical properties of fluid.
02:06 Now, type cd (space) polymesh and Press Enter.
02:13 PolyMesh contains a file named 'blockMeshDict'.
02:17 Now type "ls" and press Enter.
02:20 You can see the blockMeshDict
02:22 To open up the blockMeshDict file, type gedit space blockMeshDict.

(Note that M and D here are capital).Now press Enter.

02:35 This will Open up the blockMeshDict file.
02:37 Let me drag this to the capture area.
02:41 This contains: coordinates for the lid driven cavity,
02:46 blocking and meshing parameters
02:49 and boundary patches.
02:52 Since there are no arcs as well as no patches to be merged, edges and mergePatchPairs can be kept empty.
03:01 Now close this.
03:03 In the command terminal, type : cd (space) .. (dot) (dot) and press Enter.
03:09 Do this twice. You will come back to the cavity folder.
03:14 Now, type cd (space) system and press Enter.
03:20 Now type "ls", press Enter. This contains three files-
03:27 controlDict, fvSchemes and fvSolutions.
03:31 controlDict contains control parameters for start/end time.
03:35 fvSolution contains discritization schemes used in run time.
03:40 And, fvSchemes contains equation for solvers, tolerance etc.
03:45 Now, again type cd (space) (dot dot) .. and press Enter.
03:51 Now type cd ( space ) 0 (zero) and Press Enter.
03:58 Now type "ls" and press Enter.
04:02 This contains the initial values for boundary conditions like Pressure, Velocity, Temperature etc.
04:08 Now type cd ( space ) (dot dot) . . to return back to the cavity folder.
04:14 Now we need to mesh the geometry.
04:16 We are using a coarse mesh here.
04:19 Mesh the geometry by typing blockMesh in the terminal.
04:23 Now type blockMesh (Note that M here is capital) and press Enter.
04:30 The Meshing is done.
04:32 If there are some errors in the blockMesh file, it will be shown in the terminal.
04:36 To view the geometry,type paraFoam. Note that 'F' here is capital and press Enter.
04:45 This will open the paraview window.
04:49 Now on the left hand side of the object inspector menu, click on Apply.
04:54 You can see the lid driven cavity geometry. Now close this.
05:03 Check the mesh by typing "checkMesh" in the terminal.
05:09 Note that 'M' here is capital and press Enter.
05:13 you can see the number of cells, skewness and other parameters which are associated with the mesh.
05:20 Let me switch back to the slides.
05:22 The solver we are using here is icoFoam:
05:25 icoFoam is a Transient solver for incompressible flow of newtonian fluids.
05:31 Let me switch back to the terminal.
05:34 In the terminal, type "icoFoam".
05:38 Note that 'F' here is capital and press Enter.
05:42 The Iterations running will be seen in the terminal window.
05:45 After the solving is done, type paraFoam in the terminal to view the geometry and the results.
05:59 On the left hand side of object inspector menu
06:02 click on Apply.Now Scroll down the properties on object inspector menu.
06:07 you can see mesh parts, Volume Fields etc.
06:12 Check or uncheck these boxes in the mesh part, to view the different boundary regions of Lid driven cavity.
06:20 Now, after this, on top of the left-hand side on active variable control drop-down menu, change this from solid color to p or capital U which are the initial conditions such as pressure, velocity.
06:36 I will select capital 'U'. Now this will show you the initial condition of velocity.
06:42 On top of the paraview window, you will see the VCR control.
06:49 Click on the play button.
06:52 Now this is the final result of velocity for the lid driven cavity.
06:57 Toggle on the color legend by clicking on the top left of the active variable control menu.
07:08 This is the color legend for U velocity.
07:12 We need to validate the results obtained.
07:14 To do this, let us plot the U and V velocity.
07:17 To do this, go to Filters scroll down > Data Analysis > Plot Over line.
07:26 Click on it.
07:30 You can see X , Y and Z axes.
07:33 Select the X & Y axis turn by turn.
07:39 I will select the X axis and click Apply.
07:45 You can see Pressure and velocity plots being plotted.
07:50 Since it is a non dimensional analysis, we need to plot the graph for u/U v/s y/L for Reynolds number =100
08:00 To do this, in Plot Data click on the Y-axis
08:06 and click APPLY.
08:09 You can see the plot.
08:11 Now in menu bar, go to File > Save Data.
08:15 Give appropriate name to your file.
08:19 I will give this as "cavity".
08:23 The file will be saved as ".csv" (dot csv) file.
08:27 Now click OK. Again click OK.
08:31 Now go to the cavity folder of openfoam directory.
08:37 Scroll down. you can see the cavity.csv file.
08:42 Open it in Open office or LibreOffice Spreadsheet.
08:47 In the LibreOffice spreadsheet, copy the U0 (u velocity) and to the right points 1(Y-axis) columns in another spreadsheet.
08:56 Now, divide both these columns, that is, u zero by capital U and points 1 by capital L
09:07 and plot the results in libreoffice charts option on top, in the menu bar.
09:16 Now let me switch back to the slides.
09:18 Results obtained will be similar to this figure.
09:24 Validate the results on a paper published on Lid Driven Cavity by : Ghia et al. (1982) and Results obtained from Fluent.
09:34 In this tutorial, we learnt:
09:36 File structure of Lid Driven cavity
09:38 Solved lid driven cavity.
09:40 Post-processing of solutions
09:42 And Validation.
09:44 As an assignment, Change some parameters in the lid driven cavity.
09:48 Velocity Magnitude in the 0 folder.
09:51 Kinematic viscosity in transport Properties in constant folder.
09:55 And, plot results of u/U and y/L.
10:00 Watch the video available at this URL: http://spoken-tutorial.org/What_is_a_Spoken_Tutorial
10:04 It summarizes the Spoken Tutorial project.
10:07 If you do not have good bandwidth, you can download and watch it.
10:10 The Spoken Tutorial project team:
10:12 Conducts workshops using spoken tutorials
10:15 Gives certificates to those who pass an online test.
10:19 For more details, please write to us at:contact@spoken-tutorial.org
10:40 Spoken Tutorials are part of Talk to a Teacher project.
10:43 It is supported by the National Mission on Education through ICT, MHRD, Government of India.
10:48 More information on the same is available at the following URL: http://spoken-tutorial.org/NMEICT-Intro
10:52 This is Rahul Joshi from IIT Bombay, signing off.
10:55 Thanks for joining.

Contributors and Content Editors

DeepaVedartham, Gaurav, Nancyvarkey, PoojaMoolya, Sandhya.np14, Sneha