OpenFOAM/C3/Turbulent-Flow-in-a-Lid-driven-Cavity/English

From Script | Spoken-Tutorial
Revision as of 16:01, 20 February 2013 by Rahuljoshi (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Tutorial: Turbulence flow in a lid driven cavity


Script : Chaitanya Talnikar, Shekhar Mishra


Narration : Rahul Joshi


Keywords: Video tutorial ,CFD.


Visual Cue
Narration
Slide 1:


Hello and welcome to the spoken tutorial on modelling turbulent flow in a lid driven cavity using OpenFOAM.
Slide 2: Learning Objectives In this tutorial I will show you


Solving turbulent flow case in OpenFOAM


Plotting streamlines in Paraview.

Slide 3:

System Requirement

To record this tutorial i am using Linux operating system Ubuntu 12.04


OpenFoam version 2.1.1


Paraview version 3.12.0



Slide 4

Prerequisites

To practice this tutorial you should have some basic knowledge of


Turbulence modelling


Also watch the spoken-tutorial on “Simulating flow in a Lid Driven Cavity”.



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.


Please make a note this problem is already set up in pisoFoam solver in OpenFoam directory.

Slide 5: Solver We will be using the Transient solver for incompressible, turbulent flow of Newtonian fluids.


It is called pisoFoam



Slide: Steps in setting up the problem Now let me open the terminal window


To do this press Ctrl+Atl+t keys simultaneously on your keyboard.



Demo: Meshing In the terminal window type run and press enter


Now type cd tutorials and press enter


type cd incompressible and press enter


type cd pisoFoam and press enter

Now type ls and press enter

In this you will see two folders les and ras


Our problem is setup inside ras which is called as reynolds averaged stress by the name cavity.


Now type cd ras and press enter


type cd cavity and press enter

Demo: Boundary and Initial Conditions In this you will see three folders 0,constant and system.


The initial conditions are specified within the files in the '0' directory.


Let us take a look at the files in the '0' directory.


Type the following command

cd 0 and press enter


We can see files named as p, U, epsilon, k, nut, nutilda.


These files are to be kept as default until the inlet parameters don't change.


If any changes do occur refer to the tutorial on Simulating flow in a channel using OpenFoam to calculate these values.



Transport Properties Now type cd.. and press enter


Let us open the constant folder.


In this you will see the polyMesh folder containing the geometry of the case inside blockMeshDict


And the fluid properties.


You will see two more files named RASProperties and turbulenceProperties, we will open these two files.


In the terminal type gedit RASProperties and press enter.

RASProperties contain the Reynolds average stress model for the case.


close this and in the terminal now type gedit turbulentproperties and press enter


turbulentProperties contain the turbulent model ,here we use a very common turbulent model named k epsilon.


The transport properties the model is kept newtonain.


In the terminal window type cd ..

and press enter.


We will keep the system folder default.

Demo: Time Step Now we are done with the setup, run the solver


This can be done by typing 'pisoFoam' in the terminal.


And press enter


the iterations running will be seen in the terminal window.


It may take some time till the iterations stop.



Demo: Post processing


Iterations will stop at the end of the time step.


To visualize the results open the paraview window.


To do this in the terminal type paraFoam and press enter.


Now click on Apply in the column on the left of the screen under object inspector menu.


You can see the lid driven cavity geometry.


A common visualisation is surface plots.


Change the display to Surface in the column and from the drop down menu change from solid color to U.


Click the play button of the VCR control menu on top of paraview window.


You can see the motion of the fluid inside the cavity.


Also toggle on the color legend on the left hand side top of paraview active variable control menu.

Demo: Streamlines To visualise the stream lines


On the top menu bar of paraview


Go to Filters > Common > Stream Tracers


On the left hand side in Object inspector menu click on Apply.


You can see the stream lines near the top surface of moving wall.


You can also change the orientation in which the stream lines are viewed.


To do this scroll down and change the seed type from point source to line source.


X, Y and Z axis are visible select any one of these axis in which you would like to view the stream lines.



Slide 11: You can also plot the velocity along the x and y axis using plot over line.

Save the data as. csv file from file option in paraview menu bar.

You can plot this data in libreoffice spreadsheet or any other plotting software of your choice.

The results obtained can be validated by results obtained by Ghia et.al at Re= 10000.

Let me switch back to the slides.

Slide 12:

Summary


In this tutorial we learnt how to setup

OpenFOAM to solve the lid driven cavity problem with turbulence.

Visualised the streamlines in paraview

This brings us to the end of the tutorial

Slide 13:

Assignment

As an assignment modify the grid size and change it to (100 100 1)

Visualise the flow using streamlines in paraview

Slide 14:


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 15:

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

contacts@spoken-tutorial.org

Slide 16:

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.

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.

Contributors and Content Editors

DeepaVedartham, Nancyvarkey, Pravin1389, Rahuljoshi