Difference between revisions of "OpenFOAM/C3/Turbulent-Flow-in-a-Lid-driven-Cavity/English"
Nancyvarkey (Talk | contribs) |
|||
Line 18: | Line 18: | ||
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 1: | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 1: | ||
− | |||
− | |||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Hello and welcome to the spoken tutorial on modelling '''Turbulent flow in a Lid Driven Cavity using OpenFOAM''' | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Hello and welcome to the spoken tutorial on modelling '''Turbulent flow in a Lid Driven Cavity using OpenFOAM''' | ||
− | |||
− | |||
− | |||
|- | |- | ||
Line 33: | Line 28: | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| In this tutorial I will show you | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| In this tutorial I will show you | ||
− | + | * Solving '''turbulent flow case''' in '''OpenFOAM''' | |
− | * Solving '''turbulent flow''' | + | * Plotting '''streamlines''' in '''ParaView''' |
− | + | ||
− | + | ||
− | * Plotting '''streamlines''' in ''' | + | |
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
Line 49: | Line 38: | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| To record this tutorial I am using | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| To record this tutorial I am using | ||
* '''Linux operating system''' '''Ubuntu 12.04''' | * '''Linux operating system''' '''Ubuntu 12.04''' | ||
− | |||
− | |||
* '''OpenFoam version 2.1.1''' | * '''OpenFoam version 2.1.1''' | ||
− | + | * '''ParaView version 3.12.0''' | |
− | + | ||
− | * ''' | + | |
|- | |- | ||
Line 67: | Line 52: | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| | ||
− | |||
|- | |- | ||
Line 75: | Line 59: | ||
Prerequisites | Prerequisites | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| To practice this tutorial you should have some basic knowledge of | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| To practice this tutorial you should have some basic knowledge of | ||
− | |||
* '''Turbulence modelling''' | * '''Turbulence modelling''' | ||
− | + | * Knowledge of how to solve '''flow''' in a '''Lid driven cavity''' | |
− | + | * If not so please refer to the relevant tutorial on our website. | |
− | * Knowledge of how to solve flow in a '''Lid driven cavity''' | + | |
− | + | ||
− | + | ||
− | * If not so please refer to the | + | |
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
Line 95: | Line 71: | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| This problem is identical in '''geometry and boundary''' | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| This problem is identical in '''geometry and boundary conditions''' to the ''''Lid Driven Cavity'''' problem discussed in the basic level tutorial. |
− | ''' | + | Please make a note - this problem is already set up in '''pisoFoam solver''' in '''OpenFoam''' directory. |
− | + | The '''boundary conditions''' are the '''Lid velocity U =1 m/s''' | |
− | + | And we are solving this for a '''Reynolds number Re =10000''' | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | And we are solving this for a '''Reynolds number | + | |
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 6: Solver | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 6: Solver | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| We will be using the '''Transient | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| We will be using the '''Transient solver''' for '''incompressible turbulent flow of Newtonian fluids''' called as '''pisoFoam''' |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | called as '''pisoFoam''' | + | |
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Steps in setting up the problem | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Steps in setting up the problem | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now let us open the ''' | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now let us open the '''Terminal''' window by pressing '''Ctrl+Atl+T''' keys together. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| In the terminal window | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| In the terminal window | ||
+ | Type cd tutorials | ||
− | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| In the '''terminal''' window type '''run''' and press '''Enter'''. | |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| In the terminal | + | |
− | Now type '''cd tutorials''' and press | + | Now type '''cd space tutorials''' and press '''Enter'''. |
+ | |- | ||
+ | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type cd incompressible | ||
+ | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Type '''cd space incompressible''' and press '''Enter'''. | ||
− | + | |- | |
+ | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type cd pisoFoam | ||
+ | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Type '''cd space pisoFoam''' (Note that '''F''' here is capital ) and press '''Enter'''. | ||
+ | |- | ||
+ | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type ls | ||
− | |||
− | + | Two Folders les and ras | |
− | + | ||
Cavity folder inside RAS | Cavity folder inside RAS | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now type''' ls''' and press | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now type''' ls''' and press '''Enter'''. |
− | In this you will see two folders '''les and ras''' | + | In this you will see two folders '''les''' and '''ras''' |
− | Our problem is setup inside '''ras''' folder which is called as '''reynolds averaged stress''' | + | Our problem is setup inside '''ras''' folder which is called as '''reynolds averaged stress'''. |
+ | |- | ||
+ | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type cd ras | ||
− | + | ls | |
− | + | ||
− | + | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Our folder name is '''cavity'''. | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Our folder name is '''cavity'''. | ||
− | Now type '''cd ras''' and press | + | Now type '''cd space ras''' and press '''Enter'''. |
− | Now type''' ls''' and press | + | Now type''' ls''' and press '''Enter'''. |
+ | |- | ||
+ | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type cd cavity | ||
− | You can see the '''cavity''' folder. Let me clear this off. | + | ls |
+ | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| You can see the '''cavity''' folder. Let me clear this off. | ||
− | + | Type '''cd space cavity''' and press '''Enter'''. | |
− | Now type''' ls''' and press | + | Now type''' ls''' and press '''Enter'''. |
|- | |- | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Boundary and Initial conditions | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Point to the 3 folders |
+ | |||
+ | Boundary and Initial conditions | ||
0 folder | 0 folder | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| You can see three folders''' 0,constant and system'''. | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| You can see three folders ''' 0, constant''' and '''system'''. |
Line 205: | Line 168: | ||
− | ls | + | Type ls |
+ | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| To do this, in the '''command terminal''' type '''cd 0''' and press '''Enter'''. | ||
− | |||
+ | Now type '''ls''' and press '''Enter'''. | ||
+ | |- | ||
+ | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"|Point to the files as per narration | ||
+ | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| You can see files named as '''epsilon, k, nut, nutilda, p, R''' and '''U'''. | ||
− | |||
+ | These files are to be kept as default until the '''inlet parameters''' don't change. | ||
− | + | If any changes are to be done please refer to the tutorial on '''Simulating flow in a channel''' using OpenFoam, to calculate these values. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | If any changes are to be done please refer to the tutorial | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | to calculate these values. | + | |
+ | |- | ||
+ | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type cd.. | ||
+ | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now type '''cd space dot dot''' and press '''Enter'''. | ||
+ | Let me clear this off. | ||
|- | |- | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type cd constant |
− | + | ||
+ | Type ls | ||
+ | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Let us open the '''constant''' folder. | ||
− | |||
+ | To do this type '''cd space constant''' and press '''Enter'''. | ||
− | |||
− | + | Now type '''ls''' and press '''Enter'''. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| PolyMesh folder and fluid property files | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| PolyMesh folder and fluid property files | ||
+ | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| In this you will see the '''polyMesh''' folder containing | ||
+ | *the geometry of the '''case''' inside '''blockMeshDict''' | ||
+ | *and the '''fluid properties'''. | ||
+ | |- | ||
+ | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Point to the two files as per narration | ||
+ | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| In this '''case''' you will see two more files other than '''transportProperties''' named as '''RASProperties''' and''' turbulenceProperties'''. | ||
− | |||
− | + | Let us open these two '''files'''. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | Let us open these two '''files''' | + | |
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| RASProperties | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| RASProperties | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| In the terminal type''' gedit (space) RASProperties''' and press | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| In the '''terminal''' type''' gedit (space) RASProperties''' and press '''Enter'''. |
− | + | ||
− | + | ||
− | + | ||
− | + | Scroll down. | |
− | + | '''RASProperties''' contain the '''Reynolds average stress model''' for this case, which is kept as '''kEpsilon''' | |
− | + | Close this. | |
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| turbulentProperties | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| turbulentProperties | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now in the command terminal, type | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now in the '''command terminal''', type '''gedit space turbulentproperties''' and press '''Enter'''. |
− | + | Scroll down. | |
− | ''' | + | '''Simulation type model''' for this '''case''' is kept as '''RASModel'''. |
− | + | Close this. | |
− | + | ||
− | + | ||
− | Close this | + | |
|- | |- | ||
Line 318: | Line 248: | ||
Change the value of viscosity | Change the value of viscosity | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now let us open the '''transportProperties''' | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now let us open the '''transportProperties model'''. |
− | To do this, | + | To do this, in the '''terminal''' type '''gedit transportProperties '''and press '''Enter'''. |
− | The '''transportModel '''we are using here is '''Newtonian '''and | + | The '''transportModel '''we are using here is '''Newtonian '''and '''Viscosity''' is kept as '''1 e raise to -4''' |
− | + | Close this. | |
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
Line 337: | Line 264: | ||
The system folder is to be kept default | The system folder is to be kept default | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| We are not changing the geometry in this case | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| We are not changing the '''geometry''' in this '''case'''. |
− | So we need not go inside the '''polyMesh '''folder | + | So we need not go inside the '''polyMesh '''folder and look at the '''blockMeshDict''' file. |
− | + | It can be kept as it is. | |
− | + | |- | |
− | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type cd.. | |
− | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| In the '''terminal''' type '''cd space dot dot''' and press '''Enter'''. | |
− | + | ||
− | In the terminal type '''cd | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | We will keep the '''system''' folder default ss there are no changes inside it. | |
|- | |- | ||
Line 365: | Line 287: | ||
Meshing is done | Meshing is done | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now, | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now, we are done with the setup. |
− | Now we can '''mesh''' the geometry | + | Now we can '''mesh''' the '''geometry'''. |
− | To do this in the terminal window '''type blockMesh''' and press Enter | + | To do this in the '''terminal''' window '''type blockMesh''' and press '''Enter'''. |
− | '''Meshing '''has been done | + | '''Meshing '''has been done. |
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Running the solver : pisoFoam | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Running the solver : pisoFoam | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now we can run the '''solver''' | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now we can '''run''' the '''solver'''. |
− | To do this in the terminal type '''pisoFoam''' and press | + | To do this in the '''terminal''' type '''pisoFoam''' and press '''Enter'''. |
− | + | The '''iterations''' running can be seen in the '''terminal''' window. | |
Line 391: | Line 313: | ||
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Post-processing the results in paraview | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Post-processing the results in paraview | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| The ''' | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| The '''iterations''' running will stop at the end of the '''time step'''. |
− | To visualize the results let us open the ''' | + | To visualize the results let us open the '''ParaView''' window. |
− | To do this in the terminal '''type paraFoam''' and press | + | To do this in the '''terminal''' type '''paraFoam''' and press '''Enter'''. |
− | This will open the ''' | + | This will open the '''ParaView''' window. |
|- | |- | ||
Line 410: | Line 332: | ||
Change the drop down menu from solid color to U | Change the drop down menu from solid color to U | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| On the left hand side in the '''Object Inspector menu''' click on '''Apply''' | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| On the left hand side in the '''Object Inspector menu''' click on '''Apply'''. |
− | You can see the '''lid driven cavity''' | + | You can see the '''lid driven cavity geometry'''. |
Line 419: | Line 341: | ||
− | Change the display to '''Surface''' in the column and | + | Change the display to '''Surface''' in the column and from the drop down menu change from '''solid color''' to '''U''' |
− | + | You can see the '''initial condition''' of '''velocity'''. | |
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
Line 432: | Line 351: | ||
Toggle on the color legend | Toggle on the color legend | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now on top of the | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now on top of the '''ParaView''' window you can see the '''VCR control'''. |
− | Click the ''' | + | Click the '''Play''' button. |
Line 441: | Line 360: | ||
− | You can also '''toggle | + | You can also '''toggle''' on the '''color legend''' on the left hand side top of '''ParaView active variable control menu'''. |
− | + | Click on it. You can see the colour '''legend'''. | |
− | + | ||
− | + | ||
− | Click on it | + | |
|- | |- | ||
Line 459: | Line 375: | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| To visualise the '''stream lines''' | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| To visualise the '''stream lines''' | ||
+ | *On the top menu bar of '''ParaView''' | ||
+ | *Go to '''Filters > Common > Stream Tracers''' | ||
+ | *Click on it | ||
− | On the | + | |- |
+ | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Streamlines on top | ||
+ | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| On the left hand side of the '''Object inspector menu''' you can see '''Apply'''. Click on it. | ||
− | + | You can see the '''stream lines''' at the center of the '''lid driven cavity'''. | |
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Streamlines | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Streamlines view |
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| You can also change the '''orientation''' in which the '''stream lines''' are viewed. |
− | + | To do this , scroll down. | |
− | You can | + | You can see the''' seed type.''' |
− | + | |- | |
− | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Shift to right >> change point source to line source. | |
− | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Let me shift this to the right and change from''' point source''' to '''line source'''. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | Let me shift this to the right | + | |
− | + | ||
− | + | ||
− | and change from''' point source to line source''' | + | |
|- | |- | ||
Line 496: | Line 406: | ||
Click on the Y axis | Click on the Y axis | ||
+ | Click on the X axis | ||
+ | Delete this. | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| You can see the '''X | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| You can see the '''X, Y''' and '''Z axes''' which are visible. |
− | + | Select any one of these axis in which you would like to view the '''stream lines'''. | |
− | + | I will select the '''Y axis''' and click '''Apply'''. | |
− | + | ||
− | + | ||
− | I will select the '''Y axis''' and click '''Apply''' | + | |
Line 513: | Line 422: | ||
− | Similarly you can select the '''X axis''' and | + | Similarly you can select the '''X axis''' and plot '''streamlines''' along the '''X axis'''. |
− | + | Now delete this. | |
− | + | ||
− | + | ||
− | Now delete this | + | |
|- | |- | ||
Line 526: | Line 432: | ||
Save as .csv format | Save as .csv format | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| You can also plot the velocity along the | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| You can also plot the '''velocity''' along the '''X''' and '''Y''' axis using '''plot over line'''. |
− | To do this go to '''Filter > Data Analysis > Plot over line''' | + | To do this go to '''Filter > Data Analysis > Plot over line'''. |
− | Save the data as''' .(dot) csv''' file from file menu | + | Save the data as''' .(dot) csv''' file from file menu. |
− | Click on ''' | + | Click on '''Save Data'''. |
|- | |- | ||
Line 541: | Line 447: | ||
For Re= 10000 | For Re= 10000 | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| You can plot this data in '''libre office spreadsheet '''or any other '''plotting''' software of your choice | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| You can plot this data in '''libre office spreadsheet '''or any other '''plotting''' software of your choice. |
− | Now let me switch back to the slides | + | Now let me switch back to the slides. |
The results obtained can be '''validated''' by results obtained by '''Ghia et.al for Reynolds No , Re= 10000''' | The results obtained can be '''validated''' by results obtained by '''Ghia et.al for Reynolds No , Re= 10000''' | ||
Line 551: | Line 457: | ||
Summary | Summary | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| That's all we have in this tutorial. |
− | + | ||
− | + | ||
− | + | Let us summarise. | |
− | + | In this tutorial we learnt | |
+ | *'''Turbulent Flow in a Lid Driven Cavity''' | ||
+ | *and plotting '''stream lines '''in''' ParaView''' | ||
− | This brings us to the end of the tutorial | + | This brings us to the end of the tutorial. |
|- | |- | ||
Line 565: | Line 471: | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| As an assignment | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| As an assignment | ||
− | * Modify the '''grid size''' of the cavity | + | * Modify the '''grid size''' of the '''cavity''' |
* Change it to (100 100 1) | * Change it to (100 100 1) |
Revision as of 09:15, 29 June 2019
Tutorial: Turbulent flow in a lid driven cavity
Script : Chaitanya Talnikar, Shekhar Mishra , Rahul Joshi
Narration : Rahul Joshi
Keywords: Video tutorial ,CFD,Turbulent Flow in Lid driven cavity,OpenFOAM.
|
|
Slide 1: | Hello and welcome to the spoken tutorial on modelling Turbulent flow in a Lid Driven Cavity using OpenFOAM |
Slide 2:
|
In this tutorial I will show you
|
Slide 3:
|
To record this tutorial I am using
|
Slide 4:
System Requirement
|
|
Slide 5 :
|
To practice this tutorial you should have some basic knowledge of
|
Demo:
Set up working Directory
|
This problem is identical in geometry and boundary conditions to the 'Lid Driven Cavity' problem discussed in the basic level tutorial.
|
Slide 6: Solver | We will be using the Transient solver for incompressible turbulent flow of Newtonian fluids called as pisoFoam |
Steps in setting up the problem | Now let us open the Terminal window by pressing Ctrl+Atl+T keys together. |
In the terminal window
Type cd tutorials |
In the terminal window type run and press Enter.
|
Type cd incompressible | Type cd space incompressible and press Enter. |
Type cd pisoFoam | Type cd space pisoFoam (Note that F here is capital ) and press Enter. |
Type ls
|
Now type ls and press Enter.
|
Type cd ras
|
Our folder name is cavity.
|
Type cd cavity
ls |
You can see the cavity folder. Let me clear this off.
|
Point to the 3 folders
Boundary and Initial conditions
|
You can see three folders 0, constant and system.
|
Inside the 0 folder
|
To do this, in the command terminal type cd 0 and press Enter.
|
Point to the files as per narration | You can see files named as epsilon, k, nut, nutilda, p, R and U.
|
Type cd.. | Now type cd space dot dot and press Enter.
|
Type cd constant
Type ls |
Let us open the constant folder.
|
PolyMesh folder and fluid property files | In this you will see the polyMesh folder containing
|
Point to the two files as per narration | In this case you will see two more files other than transportProperties named as RASProperties and turbulenceProperties.
|
RASProperties | In the terminal type gedit (space) RASProperties and press Enter.
|
turbulentProperties | Now in the command terminal, type gedit space turbulentproperties and press Enter.
|
TransportModel
|
Now let us open the transportProperties model.
|
Do not change the blockMeshDict file
|
We are not changing the geometry in this case.
|
Type cd.. | In the terminal type cd space dot dot and press Enter.
|
Meshing the geometry
|
Now, we are done with the setup.
|
Running the solver : pisoFoam | Now we can run the solver.
|
Post-processing the results in paraview | The iterations running will stop at the end of the time step.
|
View the geometry
|
On the left hand side in the Object Inspector menu click on Apply.
|
Click on the Play button on VCR control for animation
|
Now on top of the ParaView window you can see the VCR control.
|
Visualise the streamlines
|
To visualise the stream lines
|
Streamlines on top | On the left hand side of the Object inspector menu you can see Apply. Click on it.
|
Streamlines view | You can also change the orientation in which the stream lines are viewed.
|
Shift to right >> change point source to line source. | Let me shift this to the right and change from point source to line source. |
Plot streamlines about X, Y and Z axis
Click on the X axis Delete this. |
You can see the X, Y and Z axes which are visible.
|
Plot data over line
|
You can also plot the velocity along the X and Y axis using plot over line.
To do this go to Filter > Data Analysis > Plot over line. Save the data as .(dot) csv file from file menu. Click on Save Data. |
Plot the results
For Re= 10000 |
You can plot this data in libre office spreadsheet or any other plotting software of your choice.
Now let me switch back to the slides. The results obtained can be validated by results obtained by Ghia et.al for Reynolds No , Re= 10000 |
Slide 7:
Summary |
That's all we have in this tutorial.
Let us summarise. In this tutorial we learnt
This brings us to the end of the tutorial. |
Slide 8: Assignment | As an assignment
|
http://spoken-tutorial.org/What_is_a_Spoken_Tutorial
| |
The Spoken Tutorial Project Team
-Conducts workshops using spoken tutorials -Gives certificates to those who pass an online test -For more details, please write to us at contact@spoken-tutorial.org | |
Slide 9:
Forum to answer questions
|
|
Slide 10:
Forum to answer questions
|
|
Slide 11:
Lab Migration Project
For more details visit this site: http://cfd.fossee.in/ |
|
Slide 12:
Case Study Project
For more details visit this site: http://cfd.fossee.in/ |
|
Slide 13: Acknowledgements | Spoken Tutorials are part of Talk to a Teacher project,
It is supported by the National Mission on Education through ICT, MHRD, Government of India. This project is coordinated by http://spoken-tutorial.org More information on the same is available at the following URL link http://spoken-tutorial.org/NMEICT-Intro |
About the contributor | The script is contributed by Shekhar Mishra and Chaitanya talnikar
This is Rahul Joshi from IIT BOMBAY signing off. Thanks for joining |