Difference between revisions of "OpenFOAM/C2/Simulating-flow-in-a-Lid-Driven-Cavity/English-timed"
From Script | Spoken-Tutorial
PoojaMoolya (Talk | contribs) |
|||
(One intermediate revision by one other user not shown) | |||
Line 29: | Line 29: | ||
|- | |- | ||
| 00:21 | | 00:21 | ||
− | | To record this tutorial, | + | | To record this tutorial, I am using: '''Linux Operating system Ubuntu''' version 10.04 |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
Line 41: | Line 37: | ||
|- | |- | ||
| 00:32 | | 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 | | '''Lid driven cavity''' is the most widely used 2D test | ||
|- | |- | ||
− | | 00: | + | | 00:41 |
| case for validation of a '''CFD code'''. | | case for validation of a '''CFD code'''. | ||
|- | |- | ||
− | | 00: | + | | 00:44 |
| This is the diagram of '''Lid Driven Cavity''', | | This is the diagram of '''Lid Driven Cavity''', | ||
|- | |- | ||
− | | 00: | + | | 00:46 |
| the '''boundary conditions''' remain the same. | | the '''boundary conditions''' remain the same. | ||
|- | |- | ||
− | | 00: | + | | 00:49 |
| A '''moving wall''' and '''three fixedwalls'''. | | A '''moving wall''' and '''three fixedwalls'''. | ||
|- | |- | ||
− | | 00: | + | | 00:51 |
| We are solving this for '''Reynolds no (Re) = 100'''. | | We are solving this for '''Reynolds no (Re) = 100'''. | ||
|- | |- | ||
− | | 00: | + | | 00:56 |
| The '''moving wall''' has a velocity of 1 meter per second. | | 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: | + | |01:05 |
| Now, open a '''command terminal'''. | | Now, open a '''command terminal'''. | ||
|- | |- | ||
− | | | + | | 01:07 |
− | | | + | | To do this, press '''Ctrl+Alt+t ''' keys simultaneously on your keyboard. |
|- | |- | ||
− | | 01: | + | | 01:13 |
− | | In the command terminal | + | | In the command terminal |
|- | |- | ||
− | | 01: | + | | 01:17 |
|and type "run" and press '''Enter'''. | |and type "run" and press '''Enter'''. | ||
|- | |- | ||
− | |01: | + | |01:20 |
| '''cd (space) tutorials''' and press '''Enter'''. | | '''cd (space) tutorials''' and press '''Enter'''. | ||
|- | |- | ||
− | | 01: | + | | 01:25 |
| '''cd '''(space)''' incompressible''' and press '''Enter'''. | | '''cd '''(space)''' incompressible''' and press '''Enter'''. | ||
|- | |- | ||
− | | 01: | + | | 01:31 |
|'''cd '''(space)''' icoFoam '''(Note that F here is capital) and press '''Enter'''. | |'''cd '''(space)''' icoFoam '''(Note that F here is capital) and press '''Enter'''. | ||
|- | |- | ||
− | | 01: | + | | 01:38 |
| '''cd '''(space) '''cavity''' and press '''Enter'''. | | '''cd '''(space) '''cavity''' and press '''Enter'''. | ||
|- | |- | ||
− | | 01: | + | | 01:43 |
|Now, type "ls" and press '''Enter'''. | |Now, type "ls" and press '''Enter'''. | ||
|- | |- | ||
− | | 01: | + | | 01:46 |
|In the file structure of '''cavity''', you will see 3 folders : '''0 , constant , and system'''. | |In the file structure of '''cavity''', you will see 3 folders : '''0 , constant , and system'''. | ||
|- | |- | ||
− | |01: | + | |01:51 |
| Now, type '''cd''' (space) '''constant''' and press '''Enter'''. | | Now, type '''cd''' (space) '''constant''' and press '''Enter'''. | ||
|- | |- | ||
− | | 01: | + | | 01:57 |
| Now type "ls" and press '''Enter'''. | | 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. | | The '''constant''' folder contains another folder named '''polyMesh''' and a file describing the physical properties of fluid. | ||
|- | |- | ||
− | | 02: | + | | 02:06 |
| Now, type '''cd (space) polymesh''' and Press '''Enter'''. | | Now, type '''cd (space) polymesh''' and Press '''Enter'''. | ||
|- | |- | ||
− | | 02: | + | | 02:13 |
| '''PolyMesh''' contains a file named 'blockMeshDict'. | | '''PolyMesh''' contains a file named 'blockMeshDict'. | ||
|- | |- | ||
− | | 02: | + | | 02:17 |
| Now type "ls" and press '''Enter'''. | | Now type "ls" and press '''Enter'''. | ||
|- | |- | ||
− | | 02: | + | | 02:20 |
| You can see the '''blockMeshDict''' | | You can see the '''blockMeshDict''' | ||
|- | |- | ||
− | | 02: | + | | 02:22 |
| To open up the '''blockMeshDict''' file, type '''gedit space 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: | + | | 02:35 |
| This will Open up the '''blockMeshDict''' file. | | This will Open up the '''blockMeshDict''' file. | ||
|- | |- | ||
− | | 02: | + | | 02:37 |
| Let me drag this to the capture area. | | Let me drag this to the capture area. | ||
|- | |- | ||
− | | 02: | + | | 02:41 |
| This contains: coordinates for the '''lid driven cavity''', | | This contains: coordinates for the '''lid driven cavity''', | ||
|- | |- | ||
− | | 02: | + | | 02:46 |
|'''blocking''' and '''meshing parameters''' | |'''blocking''' and '''meshing parameters''' | ||
|- | |- | ||
− | | 02: | + | | 02:49 |
|and '''boundary patches.''' | |and '''boundary patches.''' | ||
|- | |- | ||
− | | 02: | + | | 02:52 |
| Since there are no '''arcs''' as well as no '''patches''' to be merged, '''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. | ||
|- | |- | ||
− | | | + | | 03:01 |
| Now close this. | | Now close this. | ||
|- | |- | ||
− | | | + | | 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: | + | | 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: | + | | 03:14 |
| Now, type '''cd''' (space) '''system''' and press '''Enter'''. | | Now, type '''cd''' (space) '''system''' and press '''Enter'''. | ||
|- | |- | ||
− | |03: | + | |03:20 |
| Now type "ls", press '''Enter'''. This contains three files- | | Now type "ls", press '''Enter'''. This contains three files- | ||
|- | |- | ||
− | | 03: | + | | 03:27 |
|'''controlDict, fvSchemes''' and '''fvSolutions'''. | |'''controlDict, fvSchemes''' and '''fvSolutions'''. | ||
|- | |- | ||
− | | 03: | + | | 03:31 |
| '''controlDict''' contains '''control parameters''' for start/end time. | | '''controlDict''' contains '''control parameters''' for start/end time. | ||
|- | |- | ||
− | | 03: | + | | 03:35 |
|'''fvSolution''' contains '''discritization schemes''' used in '''run time'''. | |'''fvSolution''' contains '''discritization schemes''' used in '''run time'''. | ||
|- | |- | ||
− | | 03: | + | | 03:40 |
|And, '''fvSchemes''' contains equation for '''solvers''', '''tolerance''' etc. | |And, '''fvSchemes''' contains equation for '''solvers''', '''tolerance''' etc. | ||
|- | |- | ||
− | | 03: | + | | 03:45 |
| Now, again type '''cd (space) (dot dot) .. '''and press '''Enter'''. | | Now, again type '''cd (space) (dot dot) .. '''and press '''Enter'''. | ||
|- | |- | ||
− | | 03: | + | | 03:51 |
| Now type '''cd ( space )''' 0 (zero) and Press '''Enter'''. | | Now type '''cd ( space )''' 0 (zero) and Press '''Enter'''. | ||
|- | |- | ||
− | |03: | + | |03:58 |
| Now type "ls" and press '''Enter'''. | | Now type "ls" and press '''Enter'''. | ||
|- | |- | ||
− | | | + | | 04:02 |
| This contains the initial values for '''boundary conditions''' like '''Pressure, Velocity, Temperature''' etc. | | This contains the initial values for '''boundary conditions''' like '''Pressure, Velocity, Temperature''' etc. | ||
|- | |- | ||
− | | 04: | + | | 04:08 |
| Now type''' cd ( space ) (dot dot) . .''' to return back to the '''cavity''' folder. | | Now type''' cd ( space ) (dot dot) . .''' to return back to the '''cavity''' folder. | ||
|- | |- | ||
− | | 04: | + | | 04:14 |
| Now we need to '''mesh '''the geometry. | | Now we need to '''mesh '''the geometry. | ||
|- | |- | ||
− | | 04: | + | | 04:16 |
|We are using a coarse mesh here. | |We are using a coarse mesh here. | ||
|- | |- | ||
− | | 04: | + | | 04:19 |
| '''Mesh''' the geometry by typing '''blockMesh''' in the '''terminal'''. | | '''Mesh''' the geometry by typing '''blockMesh''' in the '''terminal'''. | ||
|- | |- | ||
− | |04: | + | |04:23 |
| Now type '''blockMesh '''(Note that M here is capital) and press '''Enter'''. | | Now type '''blockMesh '''(Note that M here is capital) and press '''Enter'''. | ||
|- | |- | ||
− | | 04: | + | | 04:30 |
| The '''Meshing''' is done. | | The '''Meshing''' is done. | ||
|- | |- | ||
− | | 04: | + | | 04:32 |
| If there are some '''errors''' in the '''blockMesh''' file, it will be shown in the '''terminal'''. | | If there are some '''errors''' in the '''blockMesh''' file, it will be shown in the '''terminal'''. | ||
|- | |- | ||
− | | 04: | + | | 04:36 |
− | | To view the geometry, | + | | To view the geometry,type '''paraFoam'''. Note that 'F' here is capital and press '''Enter'''. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
− | | 04: | + | | 04:45 |
| This will open the '''paraview window'''. | | This will open the '''paraview window'''. | ||
|- | |- | ||
− | | 04: | + | | 04:49 |
| Now on the left hand side of the '''object inspector''' menu, click on '''Apply.''' | | Now on the left hand side of the '''object inspector''' menu, click on '''Apply.''' | ||
|- | |- | ||
− | | 04: | + | | 04:54 |
| You can see the '''lid driven cavity''' geometry. Now close this. | | You can see the '''lid driven cavity''' geometry. Now close this. | ||
|- | |- | ||
− | | | + | |05:03 |
| Check the mesh by typing "checkMesh" in the terminal. | | Check the mesh by typing "checkMesh" in the terminal. | ||
|- | |- | ||
− | | 05: | + | | 05:09 |
|Note that 'M' here is capital and press '''Enter'''. | |Note that 'M' here is capital and press '''Enter'''. | ||
|- | |- | ||
− | |05: | + | |05:13 |
| you can see the number of cells, '''skewness''' and other parameters which are associated with the '''mesh'''. | | you can see the number of cells, '''skewness''' and other parameters which are associated with the '''mesh'''. | ||
|- | |- | ||
− | |05: | + | |05:20 |
| Let me switch back to the '''slides'''. | | Let me switch back to the '''slides'''. | ||
|- | |- | ||
− | | 05: | + | | 05:22 |
| The solver we are using here is '''icoFoam''': | | The solver we are using here is '''icoFoam''': | ||
|- | |- | ||
− | | 05: | + | | 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: | + | | 05:31 |
| Let me switch back to the terminal. | | Let me switch back to the terminal. | ||
|- | |- | ||
− | | 05: | + | | 05:34 |
| In the terminal, type "icoFoam". | | In the terminal, type "icoFoam". | ||
|- | |- | ||
− | | 05: | + | | 05:38 |
|Note that 'F' here is capital and press '''Enter'''. | |Note that 'F' here is capital and press '''Enter'''. | ||
|- | |- | ||
− | | 05: | + | | 05:42 |
| The '''Iterations '''running will be seen in the terminal window. | | The '''Iterations '''running will be seen in the terminal window. | ||
|- | |- | ||
− | | 05: | + | | 05:45 |
| After the solving is done, type '''paraFoam''' in the terminal to view the geometry and the results. | | After the solving is done, type '''paraFoam''' in the terminal to view the geometry and the results. | ||
|- | |- | ||
− | | 05: | + | | 05:59 |
| On the left hand side of '''object inspector''' menu | | On the left hand side of '''object inspector''' menu | ||
|- | |- | ||
− | | | + | | 06:02 |
− | |click on '''Apply'''. | + | |click on '''Apply'''.Now '''Scroll''' down the properties on '''object inspector''' menu. |
|- | |- | ||
− | + | | 06:07 | |
− | + | ||
− | + | ||
− | + | ||
− | | 06: | + | |
|you can see '''mesh parts, Volume Fields''' etc. | |you can see '''mesh parts, Volume Fields''' etc. | ||
|- | |- | ||
− | | 06: | + | | 06:12 |
| Check or uncheck these '''boxes''' in the '''mesh''' part, 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: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: | + | | 06:36 |
|I will select capital 'U'. Now this will show you the initial condition of velocity. | |I will select capital 'U'. Now this will show you the initial condition of velocity. | ||
|- | |- | ||
− | | 06: | + | | 06:42 |
| On top of the''' paraview''' window, you will see the''' VCR control'''. | | On top of the''' paraview''' window, you will see the''' VCR control'''. | ||
|- | |- | ||
− | | 06: | + | | 06:49 |
|Click on the '''play''' button. | |Click on the '''play''' button. | ||
|- | |- | ||
− | | 06: | + | | 06:52 |
| Now this is the final result of '''velocity''' for the '''lid driven cavity'''. | | Now this is the final result of '''velocity''' for the '''lid driven cavity'''. | ||
|- | |- | ||
− | | 06: | + | | 06:57 |
| Toggle on the '''color legend''' by clicking on the top left of the '''active variable control''' menu. | | Toggle on the '''color legend''' by clicking on the top left of the '''active variable control''' menu. | ||
|- | |- | ||
− | | 07: | + | | 07:08 |
| This is the''' color legend''' for '''U velocity'''. | | This is the''' color legend''' for '''U velocity'''. | ||
|- | |- | ||
− | | 07: | + | | 07:12 |
| We need to validate the results obtained. | | We need to validate the results obtained. | ||
|- | |- | ||
− | | 07: | + | | 07:14 |
|To do this, let us plot the '''U''' and '''V velocity'''. | |To do this, let us plot the '''U''' and '''V velocity'''. | ||
|- | |- | ||
− | | 07: | + | | 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: | + | | 07:26 |
| Click on it. | | Click on it. | ||
|- | |- | ||
− | | 07: | + | | 07:30 |
| You can see X , Y and Z axes. | | You can see X , Y and Z axes. | ||
|- | |- | ||
− | | 07: | + | | 07:33 |
| Select the '''X & Y axis''' turn by turn. | | Select the '''X & Y axis''' turn by turn. | ||
|- | |- | ||
− | | 07: | + | | 07:39 |
|I will select the '''X axis''' and click '''Apply'''. | |I will select the '''X axis''' and click '''Apply'''. | ||
|- | |- | ||
− | | 07: | + | | 07:45 |
| You can see '''Pressure''' and '''velocity''' '''plots''' being plotted. | | You can see '''Pressure''' and '''velocity''' '''plots''' being plotted. | ||
|- | |- | ||
− | | 07: | + | | 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''' | | 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''' | | To do this, in '''Plot Data''' click on the '''Y-axis''' | ||
|- | |- | ||
− | | | + | | 08:06 |
|and click '''APPLY'''. | |and click '''APPLY'''. | ||
|- | |- | ||
− | | 08: | + | | 08:09 |
| You can see the''' plot'''. | | You can see the''' plot'''. | ||
|- | |- | ||
− | | 08: | + | | 08:11 |
|Now in menu bar, go to '''File > Save Data'''. | |Now in menu bar, go to '''File > Save Data'''. | ||
|- | |- | ||
− | | 08: | + | | 08:15 |
| Give appropriate name to your file. | | Give appropriate name to your file. | ||
|- | |- | ||
− | | 08: | + | | 08:19 |
| I will give this as "cavity". | | I will give this as "cavity". | ||
|- | |- | ||
− | | 08: | + | | 08:23 |
|The file will be saved as ".csv" (dot csv) file. | |The file will be saved as ".csv" (dot csv) file. | ||
|- | |- | ||
− | | 08: | + | | 08:27 |
| Now click OK. Again click OK. | | Now click OK. Again click OK. | ||
|- | |- | ||
− | | 08: | + | | 08:31 |
| Now go to the '''cavity''' folder of '''openfoam directory'''. | | Now go to the '''cavity''' folder of '''openfoam directory'''. | ||
|- | |- | ||
− | | 08: | + | | 08:37 |
|Scroll down. you can see the '''cavity.csv''' file. | |Scroll down. you can see the '''cavity.csv''' file. | ||
|- | |- | ||
− | | 08: | + | | 08:42 |
| Open it in '''Open office''' or '''LibreOffice Spreadsheet'''. | | Open it in '''Open office''' or '''LibreOffice Spreadsheet'''. | ||
|- | |- | ||
− | | 08: | + | | 08:47 |
| In the LibreOffice spreadsheet, copy the U0 (u velocity) and to the right points 1(Y-axis) columns in another spreadsheet. | | In the LibreOffice spreadsheet, copy the U0 (u velocity) and to the right points 1(Y-axis) columns in another spreadsheet. | ||
|- | |- | ||
− | | 08: | + | | 08:56 |
| Now, divide both these columns, 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 | ||
|- | |- | ||
− | | | + | | 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: | + | | 09:16 |
| Now let me switch back to the slides. | | Now let me switch back to the slides. | ||
|- | |- | ||
− | | 09: | + | | 09:18 |
| Results obtained will be similar to this figure. | | Results obtained will be similar to this figure. | ||
|- | |- | ||
− | | 09: | + | | 09:24 |
| '''Validate''' the results on a paper published on '''Lid Driven Cavity by : Ghia et al. (1982''') and Results obtained from Fluent. | | '''Validate''' the results on a paper published on '''Lid Driven Cavity by : Ghia et al. (1982''') and Results obtained from Fluent. | ||
|- | |- | ||
− | |09: | + | |09:34 |
| In this tutorial, we learnt: | | In this tutorial, we learnt: | ||
|- | |- | ||
− | | 09: | + | | 09:36 |
| File structure of '''Lid Driven cavity''' | | File structure of '''Lid Driven cavity''' | ||
|- | |- | ||
− | | 09: | + | | 09:38 |
| '''Solved lid driven cavity'''. | | '''Solved lid driven cavity'''. | ||
|- | |- | ||
− | | 09: | + | | 09:40 |
|'''Post-processing of solutions''' | |'''Post-processing of solutions''' | ||
|- | |- | ||
− | | 09: | + | | 09:42 |
|And '''Validation'''. | |And '''Validation'''. | ||
|- | |- | ||
− | | 09: | + | | 09:44 |
− | | | + | | As an assignment, Change some parameters in the '''lid driven cavity'''. |
|- | |- | ||
− | | 09: | + | | 09:48 |
− | | | + | |'''Velocity Magnitude''' in the '''0 folder'''. |
|- | |- | ||
− | | 09: | + | | 09:51 |
− | + | ||
− | + | ||
− | + | ||
| '''Kinematic viscosity''' in '''transport Properties''' in '''constant''' folder. | | '''Kinematic viscosity''' in '''transport Properties''' in '''constant''' folder. | ||
|- | |- | ||
− | | 09: | + | | 09:55 |
|And, plot results of '''u/U and y/L'''. | |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 | | Watch the video available at this URL: http://spoken-tutorial.org/What_is_a_Spoken_Tutorial | ||
|- | |- | ||
− | | | + | | 10:04 |
|It summarizes the '''Spoken Tutorial''' project. | |It summarizes the '''Spoken Tutorial''' project. | ||
|- | |- | ||
− | | | + | | 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: | + | | 10:10 |
| The Spoken Tutorial project team: | | The Spoken Tutorial project team: | ||
|- | |- | ||
− | | 10: | + | | 10:12 |
|Conducts workshops using spoken tutorials | |Conducts workshops using spoken tutorials | ||
|- | |- | ||
− | | 10: | + | | 10:15 |
|Gives certificates to those who pass an online test. | |Gives certificates to those who pass an online test. | ||
|- | |- | ||
− | | 10: | + | | 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: | + | | 10:40 |
| '''Spoken Tutorials''' are part of '''Talk to a Teacher''' project. | | '''Spoken Tutorials''' are part of '''Talk to a Teacher''' project. | ||
|- | |- | ||
− | | 10: | + | | 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: | + | | 10:48 |
|More information on the same is available at the following URL: http://spoken-tutorial.org/NMEICT-Intro | |More information on the same is available at the following URL: http://spoken-tutorial.org/NMEICT-Intro | ||
|- | |- | ||
− | | 10: | + | | 10:52 |
| This is Rahul Joshi from IIT Bombay, signing off. | | This is Rahul Joshi from IIT Bombay, signing off. | ||
|- | |- | ||
− | | 10: | + | | 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