Difference between revisions of "OpenFOAM/C2/Simulating-flow-in-a-Lid-Driven-Cavity/English"
Rahuljoshi (Talk | contribs) |
Nancyvarkey (Talk | contribs) |
(No difference)
|
Revision as of 21:14, 17 December 2013
Tutorial: Simulating Flow in a Lid Driven Cavity.
Script and Narration : Rahul Joshi
Keywords: Video tutorial,CFD,Lid Driven Cavity,Ghia et.al.
Visual cue | Narration |
Slide 1 | Hello and welcome to the spoken tutorial on Simulating Flow in a Lid Driven Cavity using openfoam |
Slide 2 : Learning Objectives | In this tutorial I will show you
|
Slide 3:
System Requirement |
To record this tutorial
|
Slide 4:
About Lid Driven Cavity flow |
Lid driven cavity is the most widely used 2D test
|
Slide 5 : Diagram | This is diagram of Lid Driven Cavity |
The boundary conditions remain the same
| |
We are solving this for Reynolds no (Re) = 100
| |
Path for lid driven cavity | The path for the Lid Driven Cavity is the same as
|
Open a command terminal | Now Open a command terminal and |
Press ctrl +Alt+t keys simultaneously on keyboard | To do this press Ctrl+Alt+t simultaneously on your keyboard |
Path for lid driven cavity in terminal | In the command terminal type the path for lid driven cavity |
Type run and press enter | type run and press enter |
Type cd tutorials and press enter | cd (space) tutorials and Press enter |
Type cd incompressible and press enter | cd (space) incompressible and Press enter |
Type cd icoFoam and press enter | cd (space) icoFoam (Note that F here is capital) and Press enter |
Type cd cavity | type cd (space) cavity and Press Enter |
Type ls and press enter | type ls and press enter |
Three folders 0, constant and system | In the file structure of cavity you will see 3 folders :
0 , constant , and system |
Type cd constant | Now type cd (space) constant and press enter |
Type ls and press enter | Now type ls and press enter |
Constant >> polyMesh | The constant folder contains another folder named polymesh
|
Cd polyMesh and press enter | Now type cd (space) polymesh and Press Enter
|
Type ls | Now type ls and press enter |
You can see the blockMeshDict | |
Type gedit blockMeshDict and press enter | To view the file type gedit blockMeshDict
|
This will Open up the blockMeshDict file
| |
In blockMeshDict file | This contains :
-blocking and meshing parameters -and boundary patches. |
No patches and arcs in the geometry | Since there are arcs as well as no patches to be merged
|
Now close this | |
Terminal type cd .. and do this twice | In the command terminal type : cd (space) .. (dot) (dot) |
you will come back to the cavity folder | |
Cd system and press enter | Now type cd (space) system and press enter, |
Type ls and press enter | Now type ls and press enter
|
ControlDict
|
controlDict contains control parameters for start/end time.
|
Type cd .. and press enter | Now again type cd (space) (dot dot) . . and press enter |
Cd 0 and press enter | Now type cd ( space ) 0 (zero) and Press enter |
Now type ls and press enter | |
Initial values for bounary | This contains the initial values for boundary conditions like
|
Type cd .. | Type cd ( space ) (dot dot) . . to return to the cavity folder |
Mesh the geometry | Now we need to mesh the geometry
|
Mesh the geometry by typing blockMesh in the terminal. | |
In terminal type blockMesh and press enter | Now type blockMesh (Note that M and D here is capital)
|
Meshing is done. | |
If there is some error in the blockMesh file
| |
Type paraFoam and press enter | To view the geometry
|
This will open the paraview window | |
Click on apply button | Now on the left hand side of the object inspector menu click on Apply. |
You can see the lid driven cavity geometry
| |
Check the mesh | Check the mesh by typing checkMesh in the terminal
|
After the checkMesh command | you can see the the number of cells ,
|
Let me switch back to the slides. | |
Slide ; icoFoam | The solver we are using here is icoFoam : |
icoFoam is a Transient solver for incompressible flow of newtonian fluids | |
Let me switch back to the terminal | |
In terminal type icoFoam and press enter | In the terminal type icoFoam
|
Iterations running will be seen in the terminal window. | |
Type paraFoam and press enter
|
Once the solving is done
to view the geometry and the results |
Click on APPLY | On the left hand side of object inspector menu
|
Scroll down in object inspector menu | Now Scroll down the properties panel
|
Check or uncheck these boxes | Check or uncheck these boxes in the mesh part
|
Change from solid color to capital U
|
Now after this on top of the active variable control
|
VCR control on top | Now on top of the paraview window you can see the VCR control
|
Final result of velocity in lid driven cavity | Now this is the final result of velocity for lid driven cavity |
Toggle on the color legend | Toggle on the color legend by clicking on
|
This is the color legend for U velocity | |
Validation of result | We need to validate the results obtained
|
We need to validate the result obtained
| |
Menu > filters > data analysis > plot over line | For this Go to Filters Menu > Data Analysis > Plot Over line |
Click on it | |
You can see the X , Y and Z axis | |
Select the X and Y axis
|
Select the X & Y axis turn by turn.
|
You can see the Pressure and velocity plots being plotted | |
For non-dimensional analysis | Since it is a non dimensional analysis
|
PLot data Line click Y axis and apply | To do this in Plot Data click on the Y-axis
|
Plot can be seen
|
You can see the plot
|
Give and appropriate name to your file | |
Give a name to the file
|
I will give this as cavity
|
Now click ok
| |
Go to the cavity folder in icoFoam
|
Now go to the cavity folder of openfoam directory.
|
Open it in Open office or LibreOffice Spreadsheet | |
Copy u0 and points 1 and save it another page of spreadsheet | In the libreoffice spreadsheet copy
|
U/U and y/L | Now divide both these coloumns
|
PLot the results using chart option
of spreadsheet |
Plot the results in libreoffice charts option on top of the menu bar. |
Now let me switch back to the slides | |
Slide 7 : Lid Driven Cavity (OpenFOAM) | Results obtained will be similar to this figure |
Slide 8: Ghia et al.(1982) & Fluent | Validate the result obtained on Lid Driven Cavity by : Ghia et al. (1982) and
|
Slide 9
Summary |
In this tutorial we learnt how to install
File structure of Lid Driven cavity Solved lid driven cavity. Post-processing of results Validation |
Slide 10:
Assignment |
As as Assignment,
Change some parameters in the lid driven cavity
Plot the results of u/U and y/L This brings us to the end of the tutorial |
Slide 11 :
About Spoken tutorials |
The video available at this URL:
http://spoken-tutorial.org/What_is_a_Spoken_Tutorial It summarizes the Spoken Tutorial project. If you do not have good bandwidth, you can download and watch it. |
Slide 12:
About Spoken tutorials |
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 13:
Acknowledgement |
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. More information on the same is available at the following URL link http://spoken-tutorial.org/NMEICT-Intro |
Slide 14:
About the contributor |
This is Rahul Joshi from IIT BOMBAY signing off.
Thanks for joining |