Difference between revisions of "OpenFOAM/C2/2D-Laminar-Flow-in-a-channel/English"
Pravin1389 (Talk | contribs) |
Rahuljoshi (Talk | contribs) |
||
Line 10: | Line 10: | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
− | | style="border-top: | + | | style="border-top:0.05pt solid #000000;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| <center>Visual Cue</center> |
− | | style="border: | + | | style="border:0.05pt solid #000000;padding:0.097cm;"| <center>Narration</center> |
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | 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: | + | | 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 Simulating Laminar Flow in a Channel using openfoam |
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 2 : Learning Objectives |
− | | style="border-top:none;border-bottom: | + | | 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 |
− | 2D geometry of channel | + | 2D geometry of channel |
Line 34: | Line 34: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 3: |
System Requirement | System Requirement | ||
− | | style="border-top:none;border-bottom: | + | | 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 | + | I am using Linux Operating system Ubuntu 12.04 . |
− | OpenFOAM version 2.1. | + | OpenFOAM version 2.1.1 |
Line 49: | Line 49: | ||
+ | Note that OpenFOAM version 2.1.1 is supported on ubuntu version 12.04 | ||
+ | |||
+ | Hence forth all the tutorials will be covered using OpenFOAM version 2.1.1 and ubuntu version 12.04. | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 4: Prerequisite |
− | | style="border-top:none;border-bottom: | + | | 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 should know how to create geometry using OpenFOAM |
If not, please refer to the relevant tutorials on the Spoken Tutorial website | If not, please refer to the relevant tutorials on the Spoken Tutorial website | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 5 : About channel flow |
− | | style="border-top:none;border-bottom: | + | | 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 simulate flow in a pipe so as to determine the flow development length along the downstream |
Line 65: | Line 68: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 6 : Diagram |
− | | style="border-top:none;border-bottom: | + | | 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 boundary names and inlet flow is shown in this figure |
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 7 : |
− | | style="border-top:none;border-bottom: | + | | 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 flow develpoment length is given by the formula |
L= 0.05 * Re * D | L= 0.05 * Re * D | ||
Line 86: | Line 89: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Solver: simpleFoam |
− | | style="border-top:none;border-bottom: | + | | 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 is a steady state problem |
Line 93: | Line 96: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Demo: |
SimpleFoam in incompressible flows | SimpleFoam in incompressible flows | ||
− | | style="border-top:none;border-bottom: | + | | 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 need to create a folder for our case. |
Line 103: | Line 106: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Demo |
Line 113: | Line 116: | ||
− | | style="border-top:none;border-bottom: | + | | 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;"| I have already created a folder in simpleFoam folder of incompressible flow solvers |
Line 131: | Line 134: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Press Ctrl+Alt+t keys simultaneously |
Line 153: | Line 156: | ||
ls and press enter | ls and press enter | ||
− | | style="border-top:none;border-bottom: | + | | 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;"| Open a command terminal by pressing Ctrl+Alt +t keys simultaneously on your keyboard. |
Line 162: | Line 165: | ||
− | type '''tutorials and press enter''' | + | type cd '''tutorials and press enter''' |
− | type '''incompressible and press enter''' | + | type cd '''incompressible and press enter''' |
− | type '''simpleFoam and press enter''' | + | type cd '''simpleFoam and press enter''' |
− | type '''channel and press enter''' | + | type cd '''channel and press enter''' |
Line 177: | Line 180: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type in command terminal |
cd constant and press enter | cd constant and press enter | ||
Line 201: | Line 204: | ||
gedit blockMeshDict and press enter | gedit blockMeshDict and press enter | ||
− | | style="border-top:none;border-bottom: | + | | 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 three folders '''0 , Constant and System''' |
Line 223: | Line 226: | ||
Now type '''cd polyMesh and press enter''' | Now type '''cd polyMesh and press enter''' | ||
+ | |||
+ | |||
+ | Now type ls and press enter | ||
+ | |||
This contains the file blockMeshDict | This contains the file blockMeshDict | ||
Line 230: | Line 237: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Refer to earlier tutorial for creating simple geometry in OpenFOAM |
Line 241: | Line 248: | ||
type ls and press enter | type ls and press enter | ||
− | | style="border-top:none;border-bottom: | + | | 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 set up the blockMeshDict file refer to the tutorial for creating simple Geometry in OpenFOAM. |
Line 250: | Line 257: | ||
− | we have used a | + | we have used a 100 X 100 mesh size here and cell spacing of |
( 1 1 1 ) | ( 1 1 1 ) | ||
+ | |||
+ | |||
+ | In the command terminal type cd (space ) .. and press enter | ||
+ | |||
+ | |||
+ | Again type cd (space) .. and press enter | ||
Line 279: | Line 292: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | 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 you can see the files |
Line 293: | Line 306: | ||
System folder is kept default | System folder is kept default | ||
− | | style="border-top:none;border-bottom: | + | | 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 contains the intial boundary conditions and wall functions for the channel case |
Line 307: | Line 320: | ||
− | + | Where Ux, Uy and Uz are the velocity components in the x, y and z direction | |
− | + | And U' = 0.05 times '''u''' actual | |
+ | |||
+ | |||
+ | Calculate epsilon from the formula given | ||
+ | |||
+ | |||
+ | Where epsilon is the rate of turbulent kinetic energy | ||
+ | |||
+ | |||
+ | C mu is a constant and its value is 0.09 | ||
+ | |||
+ | |||
+ | And 'l' is the length of the channel | ||
+ | |||
+ | |||
+ | Let me minimise this | ||
+ | |||
+ | |||
+ | Change only the boundary names in each of the above folder. | ||
− | + | Note that the values of nu,nuTilde and R are to kept default | |
Rest of the files should contain initial value for each of the boundary faces. | Rest of the files should contain initial value for each of the boundary faces. | ||
− | Now Type '''cd (space) ..(dot dot) and press enter''' | + | Now in the terminal Type '''cd (space) ..(dot dot) and press enter''' |
Line 327: | Line 358: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| In terminal type:blockMesh and press enter |
− | | style="border-top:none;border-bottom: | + | | 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 command terminal '''type blockMesh and press enter''' |
Meshing is done | Meshing is done | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 7 : Solver |
− | | style="border-top:none;border-bottom: | + | | 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 type of solver we are using here is simpleFoam |
Line 340: | Line 371: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type simpleFoam and press enter |
− | | style="border-top:none;border-bottom: | + | | 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 command terminal '''type simpleFoam and Press enter''' |
Line 353: | Line 384: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| In terminal |
type: paraFoam and press enter | type: paraFoam and press enter | ||
− | | style="border-top:none;border-bottom: | + | | 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 view the results in paraview in the terminal |
Line 365: | Line 396: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Demo |
Line 381: | Line 412: | ||
toggle color legend on from left hand side top | toggle color legend on from left hand side top | ||
− | | style="border-top:none;border-bottom: | + | | 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 let hand side of the paraview window click Apply |
Line 405: | Line 436: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Demo |
− | | style="border-top:none;border-bottom: | + | | 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 can see that once the flow has fully devloped it attains a maximum uniform velocity at center. |
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 8:Validation |
− | | style="border-top:none;border-bottom: | + | | 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 results obtained can be validated with the analytical solution for laminar flow in a pipe which is u(max)=1.5 Uavg |
Line 416: | Line 447: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 9 : Summary |
− | | style="border-top:none;border-bottom: | + | | 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 we learnt |
Line 432: | Line 463: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 10 : |
Assignment | Assignment | ||
Line 438: | Line 469: | ||
− | | style="border-top:none;border-bottom: | + | | 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: |
Solve the problem for Reynold Number 1500 and validate it with the analytical result | Solve the problem for Reynold Number 1500 and validate it with the analytical result | ||
Line 445: | Line 476: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 11 : |
− | | style="border-top:none;border-bottom: | + | | 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 video available at this URL: |
http://spoken-tutorial.org/What_is_a_Spoken_Tutorial | http://spoken-tutorial.org/What_is_a_Spoken_Tutorial | ||
Line 458: | Line 489: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 12 : |
About Spoken tutorials | About Spoken tutorials | ||
− | | style="border-top:none;border-bottom: | + | | 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 Spoken Tutorial Project Team |
-Conducts workshops using spoken tutorials | -Conducts workshops using spoken tutorials | ||
Line 470: | Line 501: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 13 |
Acknowledgement | Acknowledgement | ||
Line 476: | Line 507: | ||
− | | style="border-top:none;border-bottom: | + | | 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;"| 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. | It is supported by the National Mission on Education through ICT, MHRD, Government of India. | ||
Line 485: | Line 516: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom: | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 14: |
About the contributor | About the contributor | ||
− | | style="border-top:none;border-bottom: | + | | 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 is Rahul Joshi from IIT BOMBAY signing off. |
Thanks for joining. | Thanks for joining. | ||
|} | |} |
Revision as of 12:00, 27 February 2013
Tutorial: Simulating Laminar flow in a channel.
Script and Narration : Rahul Joshi
Keywords: Video tutorial,CFD,laminar flow,simpleFoam,channel.
|
|
Slide 1 | Hello and welcome to the spoken tutorial on Simulating Laminar Flow in a Channel using openfoam |
Slide 2 : Learning Objectives | In this tutorial I will show you
|
Slide 3:
System Requirement |
To record this tutorial
|
Slide 4: Prerequisite | You should know how to create geometry using OpenFOAM
If not, please refer to the relevant tutorials on the Spoken Tutorial website |
Slide 5 : About channel flow | We simulate flow in a pipe so as to determine the flow development length along the downstream
|
Slide 6 : Diagram | The boundary names and inlet flow is shown in this figure |
Slide 7 : | The flow develpoment length is given by the formula
L= 0.05 * Re * D The pipe is of length 5 m and height 1 m.
|
Solver: simpleFoam | This is a steady state problem
|
Demo:
|
We need to create a folder for our case.
|
Demo
|
I have already created a folder in simpleFoam folder of incompressible flow solvers
|
Press Ctrl+Alt+t keys simultaneously
|
Open a command terminal by pressing Ctrl+Alt +t keys simultaneously on your keyboard.
|
Type in command terminal
cd constant and press enter
gedit transportProperties and press enter
cd polyMesh and press enter
gedit blockMeshDict and press enter |
In this you will see three folders 0 , Constant and System
|
Refer to earlier tutorial for creating simple geometry in OpenFOAM
In terminal type: cd space 0 and press enter
|
To set up the blockMeshDict file refer to the tutorial for creating simple Geometry in OpenFOAM.
( 1 1 1 )
|
In the terminal you can see the files
Change only the boundary names
System folder is kept default |
This contains the intial boundary conditions and wall functions for the channel case
figure and enter it in the file.
Now in the terminal Type cd (space) ..(dot dot) and press enter
|
In terminal type:blockMesh and press enter | In the command terminal type blockMesh and press enter
Meshing is done |
Slide 7 : Solver | The type of solver we are using here is simpleFoam
|
Type simpleFoam and press enter
|
In the command terminal type simpleFoam and Press enter
|
In terminal
type: paraFoam and press enter |
To view the results in paraview in the terminal
|
Demo
|
On let hand side of the paraview window click Apply
|
Demo | We can see that once the flow has fully devloped it attains a maximum uniform velocity at center. |
Slide 8:Validation | The results obtained can be validated with the analytical solution for laminar flow in a pipe which is u(max)=1.5 Uavg
|
Slide 9 : Summary | In this tutorial we learnt
|
Slide 10 :
Assignment
|
As an assignment:
Solve the problem for Reynold Number 1500 and validate it with the analytical result this brings us to the end of the tutorial |
Slide 11 :
|
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 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. This project is coordinated by http://spoken-tutorial 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. |