Difference between revisions of "OpenFOAM/C2/Supersonic-flow-over-a-wedge/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with ''''Title of script''': Supersonic flow over a wedge using OpenFOAM. '''Author''': Rahul Ashok Joshi '''Keywords''': Video Tutorial,Computational Fluid Dynamics (CFD) [http:/…')
 
Line 1: Line 1:
'''Title of script''': Supersonic flow over a wedge using OpenFOAM.
+
Tutorial:Supersonic flow over a wedge using OpenFOAM
  
  
'''Author''': Rahul Ashok Joshi
+
Script : Arvind N
  
'''Keywords''': Video Tutorial,Computational Fluid Dynamics (CFD)
 
  
[http://spoken-tutorial.org/wiki/index.php/File:Tutorial1.tar.gz Click here for the slides]
+
Narration: Rahul Joshi
 +
 
 +
 
 +
Keywords: Video tutorial,CFD,Wedge,Mach number,Compressible flows.
 +
 
 +
 
 +
 
 +
{| style="border-spacing:0;"
 +
| 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;"| Visual Cue
 +
| style="border:0.05pt solid #000000;padding:0.097cm;"| Narration
  
{| border=1
 
!Visual Cue
 
!Narration
 
 
|-
 
|-
| 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 '''Supersonic flow over a wedge using OpenFOAM'''
Hello and welcome to the spoken tutorial on Supersonic flow over a wedge using OpenFOAM.
+
  
 
|-
 
|-
| Slide 2: Learning Objective
+
| 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
|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
 +
 
 +
 
 +
how to solve a '''compressible flow''' problem of '''supersonic flow over a wedge '''
 +
 
 +
 
 +
how post process the results in '''paraView'''.
 +
 
  
How to solve a compressible flow problem of supersonic flow over a wedge
 
  
How to Post process the results in paraView.
 
  
 
|-
 
|-
| Slide 3: System Requirement
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 3:
|To record this tutorial
+
  
I am using Linux Operating system Ubuntu 10.04
+
System Requirement
 +
| 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
  
OpenFOAM version 2.1.0
 
  
ParaView version 3.12.0
+
I am using''' Linux Operating system Ubuntu version 10.04'''
 +
 
 +
 
 +
'''OpenFOAM version 2.1.0'''
 +
 
 +
 
 +
'''ParaView version 3.12.0'''
  
 
|-
 
|-
| Slide 4:Prerequisites
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 4
|To practice this tutorial you should have some basic knowledge of
+
 
 +
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 a learner should have some basic knowledge of
 +
 
 +
 
 +
'''Compressible flows''' and
 +
 
  
Compressible flows 
+
'''Gas Dynamics'''
and
+
Gas Dynamics  
+
  
 
|-
 
|-
| Slide 5
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 5 :
|
+
| 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 now solve '''supersonic flow''' over a '''wedge''' using '''OpenFOAM''' and
  
Let us now solve supersonic flow over a wedge using OpenFOAM and see the shock structure formed using paraview.
 
  
The problem consists of a wedge with semi-angle of 15 degrees kept in a uniform supersonic flow
+
see the '''shock structure''' formed using '''paraview'''
  
The Inlet velocity is 5 m/s
+
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 5 :
 +
| 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 problem consists of a wedge
  
The boundary conditions are set as shown in the figure.
+
 
 +
with '''semi-angle of 15 degrees''' kept in a
 +
 
 +
 
 +
'''uniform supersonic flow'''
  
 
|-
 
|-
| Slide 6
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Inlet velocity 5m/s
|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;"| Inlet velocity is '''5 meters per second'''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Boundary conditions as shown in the figure
 +
| 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 condition'''s are set as shown in the figure
  
The type of solver I am using here is rhoCentralFOAM
 
  
It is a Density-based compressible flow solver
 
  
It is based on central- upwind schemes of Kurganov and Tadmor
 
  
 
|-
 
|-
|
+
| 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;"| The type of solver I am using here is '''rhoCentralFoam'''
  
Open a new terminal window
+
|-
 +
| 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:0.05pt solid #000000;padding:0.097cm;"| It is a '''Density'''-based '''compressible flow solver'''
  
To do this press Ctrl+Alt+t keys simultaneously on your keyboard.
 
  
In the command terminal type the path for supersonic flow over the wedge
+
It is based on '''central- upwind''' '''schemes of Kurganov and Tadmor '''
  
In the terminal Type 'run' 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;"| Switch to the Terminal by Ctrl+Alt+T
 +
| 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 '''
  
Now type cd space tutorials and Press Enter
 
                cd space compressible and Press Enter
 
                cd  space rhoCentralFoam and Press Enter
 
                cd space wedge15Ma5 this is the name of the folder of supersonic flow over a wedge in rhoCentralFoam and Press Enter
 
  
Now type ls and Press enter
+
to do this press '''ctrl +alt+ t''' keys '''simultaneously''' on your keyboard
  
You will 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:none;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;"| In the '''terminal''' type path for '''supersonic flow''' over a '''wedge'''
  
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| In command terminal:
 +
 +
Type run and press enter
 +
 +
 +
Problem is already set in 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;"| In the terminal Type ''''run' 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 tutorial 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;"| Now type '''cd tutorial - '''Press Enter
  
Open the blockMeshDict file,
+
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type '''cd compressible - '''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;"| '''cd compressible - '''Press Enter
  
To do this type cd space constant 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 rhoCentralFoam - '''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;"| '''cd rhoCentralFoam - '''Press Enter
  
cd polyMesh -Note that M 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 cd wedge 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;"| '''cd wedge15Ma5 and press enter'''
  
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;"|
 +
| 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 the name of the folder of '''supersonic flow''' over a wedge in '''rhoCentralFoam'''
  
You can see the blockMeshDict file
 
  
To view the blockMeshDict file type gedit space blockMeshDict -Note that M and D here are capital and press enter
+
'''and press enter'''
  
Let me drag this to capture area
+
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| 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;"| now type''' ls''' and press enter
  
Scroll down
+
|-
 +
| 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:0.05pt solid #000000;padding:0.097cm;"| You will see '''three folders''' : '''0,constant and system.'''
  
In this you need to calculate the co -ordinates for the wedge
+
|-
 +
| 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 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;"| Now open the '''blockMeshDict file''',
  
This has been already calculated and set up in the problem
 
  
The rest of the data remain the same.
+
to do this
  
In boundary patches the boundaries are set as shown in the figure
 
  
Close the blockMeshDict file
+
type '''cd '''space '''constant''' and press enter
  
In the command terminal type cd space .. twice to return back to wedge folder
+
|-
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type cd polyMesh and press enter
Now open the 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;"| '''cd '''space '''polyMesh'''
  
To do this type cd space 0 and press enter
 
  
Now type ls and press enter
+
note that '''M''' here is capital
  
This contains the initial condition for pressure, velocity, temperature etc.
 
  
Type cd space .. (dot dot) and press enter
+
and press enter
  
Mesh the geometry using blockMesh utility
+
|-
To do this in the command terminal type blockMesh 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 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;"| Now type '''ls''' and press enter
  
Meshing has been done
 
  
Now to View the geometry in the command terminal type paraFoam and press enter
+
you can see the '''blockMeshDict file'''
  
This will open the paraview window.
 
  
On the left hand side of the object inspector menu click APPLY
 
  
In this you can see the geometry is which is a rectangular section upstream and changes to a wedge downstream
 
  
Close the paraview window
+
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type '''gedit''' '''blockMeshDict''' 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;"| type '''gedit''' space''' blockMeshDic'''t
 +
 
 +
note that '''M and D '''here are capital
  
Now run the solver 'rhoCentralFoam'
 
  
To do this in the command terminal type rhoCentralFoam and Press Enter.
+
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;"|  
|  
+
| 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 drag this to the '''capture area'''
The iterations running can be seen in the terminal window.
+
  
The iteration running will stop after it converges or at the end of the time step.
 
  
Now the solving has been done
+
scroll down
  
To visualise the results let us open the paraview window once again
+
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| enter the data in '''vertices '''but it i already set up in 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;"| In this you need to '''calculate''' the '''co-ordinates''' for the wedge
  
In the command terminal, type “paraFoam” and press Enter
 
  
Again on the left hand side of the object inspector menu click Apply.
+
This is already been '''calculated''' and set up in the problem
  
 
|-
 
|-
|
+
| 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:0.05pt solid #000000;padding:0.097cm;"| The rest of the data remain the same
  
On the left side top in active variable control menu you can see the drop down menu showing solid color.
+
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Boundary names similar to that in slide 5
 +
| 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 '''boundary patches''' the boundaries are set as shown in the figure
  
Now click on it and Change from solid color to capital U.
+
|-
 +
| 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:0.05pt solid #000000;padding:0.097cm;"| Close the '''blockMeshDict file'''
  
Now make the color legend ON by clicking on left hand side top of active variable control menu.
+
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| type : cd .. (twice) and press enter
  
Make the color legend ON
 
  
Click on it
+
wedge 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;"| in the '''command terminal'''
  
On top of the paraview window you can see the VCR control.
 
  
Click on the play.
+
type '''cd ..(dot dot)''' '''twice'''
  
You can see the final results of U velocity
 
  
Now scroll down the properties in the object inspector menu on the left hand side
+
to return back to '''wedge folder'''
  
Now click on display besides Properties
+
|-
 +
| 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:0.05pt solid #000000;padding:0.097cm;"| Now Open the '''0 folder '''
  
Scroll down and click on rescale to size
+
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type cd 0 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;"| To do this type
  
You can see the final result of velocity magnitude.
 
  
Similarly you can select pressure
+
'''cd '''space''' 0 and press enter'''
  
You can see the final value of pressure
+
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| type ls 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;"| '''type ls and press enter'''
  
Now close the paraview window
+
|-
 +
| 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:0.05pt solid #000000;padding:0.097cm;"| this contains initial boundary condition for '''pressure,velocity and Temprature'''
  
You can also calculate the Mach number for the flow
+
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| type cd .. 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;"| type '''cd .. (dot dot)''' and press enter
  
To do this we can use the openfoam utility by typing “Mach” in the command terminal
+
|-
 +
| 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:0.05pt solid #000000;padding:0.097cm;"| Now we need to '''mesh the geometry'''
  
Type Mach- Note that M 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;"| Mesh the geometry
  
You will see that the Mach number is calculated
+
type: blockMesh
for each time step.
+
| 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'''
  
Again open the paraview window by typing in the command terminal paraFoam and press enter
 
  
Click Apply
+
type '''blockMesh''' and Press Enter
  
Scroll down
 
  
In volume fields check the Mach number (Ma) box and again click apply.
+
'''Meshing''' has been done
  
On top of the active variable control menu click on solid color and change it to Ma
+
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Terminal : type paraFoam 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;"| Now to view the geometry in the '''terminal '''
  
Again on the VCR control click play and make to color legend ON
 
  
You can thus see the mach number in the color legend and the corresponding colors.
+
'''type paraFoam''' and press enter
 +
 
 +
 
 +
This will open the '''paraview''' window
  
 
|-
 
|-
|
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Paraview window
|
+
| 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 '''object inspector menu''' click '''APPLY'''
  
We notice here that:
+
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| About wedge geometry
 +
| 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 can see the '''geometry''' is which is a '''rectangular'''
  
When the wedge is kept in a supersonic flow
 
  
produces a shock across which the flow properties
+
'''section upstream''' and changes to a '''wedge downstream'''
  
like temperature, pressure and density drastically changes.
+
 
 +
Close the '''paraview''' window
  
 
|-
 
|-
|Slide 7:
+
| 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:0.05pt solid #000000;padding:0.097cm;"| Now run the solver ''''rhoCentralFoam''''
  
Now let me switch back to the slides
+
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Terminal : rehoCentralFoam 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;"| To do this in the '''command terminal'''
  
The solved tutorial can be validated with exact solution
 
  
available in basic books of aerodynamics by John D Anderson
+
type '''rhoCentralFoam''' and Press Enter
  
 
|-
 
|-
|Slide 8:
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Iterations in terminal window
|
+
| 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 can be seen in the
  
In this tutorial we learnt:
 
  
Solving a compressible flow problem
+
'''terminal window'''
  
Velocity and pressure contour for the wedge
+
|-
 +
| 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:0.05pt solid #000000;padding:0.097cm;"| '''Iterations running''' will stop after it '''converges '''
  
OpenFOAM utility for calculating Mach number
+
 
 +
or
 +
 
 +
 
 +
at the end of the time step
 +
 
 +
 
 +
Now the''' solving''' has been done
  
 
|-
 
|-
|Slide 9:
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| open paraview
|Assignment
+
Assignment:
+
  
Vary the wedge angle between 10 ° to 15 ° to view the shock characteristic for the flow
 
  
This bring us to the end of the tutorial
+
 
 +
| 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''' these results let us open the  
 +
 
 +
 
 +
'''paraview window''' once again
  
 
|-
 
|-
| Slide 10 :About Spoken Tutorial
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| type: paraFoam 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 '''command terminal'''
The video available at this URL:
+
 
 +
 
 +
type “'''paraFoam” '''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;"| Click APPLY in object inspector menu
 +
| 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;"| Again on the left hand side of
 +
 
 +
 
 +
'''object inspector menu '''click '''APPLY'''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Solid geometry in drop down menu
 +
 
 +
 
 +
Select 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 side top in '''active variable control menu'''
 +
 
 +
 
 +
'''you will see a drop down menu showing solid color.'''
 +
 
 +
 
 +
Now click on it
 +
 
 +
 
 +
'''And change from solid color to capital U'''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Make the color legend ON
 +
| 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 make the '''color legend ON'''
 +
 
 +
 
 +
by clicking on left hand side top of '''active variable control menu'''
 +
 
 +
 
 +
and make the '''color legend ON'''
 +
 
 +
 
 +
'''click on it'''
 +
 
 +
|-
 +
| 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:0.05pt solid #000000;padding:0.097cm;"| On top of the '''paraview window''' you can see the '''VCR control'''
 +
 
 +
 
 +
Click on '''PLAY'''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| In the paraview window
 +
| 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 final results of '''U velocity'''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| In object inspector menu
 +
| 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 scroll down the
 +
 
 +
 
 +
'''properties''' in '''object inspector menu''' on left hand side
 +
 
 +
 
 +
Now click on '''display''' besides '''properties'''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Click on rescale to size
 +
| 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;"| Scroll down and click on '''Rescale to Size'''
 +
 
 +
|-
 +
| 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:0.05pt solid #000000;padding:0.097cm;"| You can see the final value of '''Velocity magnitude'''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slect pressure in drop dwon menu (p)
 +
 
 +
 
 +
 
 +
| 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;"| Similarly you can select '''pressure'''
 +
 
 +
 
 +
You can see the final result of '''pressure'''
 +
 
 +
 
 +
Now close the '''paraview window'''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Calculate the Mach number
 +
 
 +
 
 +
in terminal type Mach
 +
| 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 calculate the '''Mach''' number for the flow
 +
 
 +
 
 +
To do this we can use the '''Openfoam '''utility
 +
 
 +
 
 +
by '''typing Mach in the command terminal '''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type mach in terminal
 +
 
 +
 
 +
mach number for each time step
 +
| 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 '''Mach''' in the '''command terminal'''
 +
 
 +
 
 +
Note that '''M''' here is '''capital''' and press enter
 +
 
 +
 
 +
You can see that '''Mach number''' is calculated for each time step
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Open paraview window
 +
 
 +
 
 +
type paraFoam
 +
 
 +
 
 +
click 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;"| Now again open the '''paraview window'''
 +
 
 +
 
 +
By typing in the '''command terminal paraFoam'''
 +
 
 +
 
 +
and press enter
 +
 
 +
 
 +
click '''APPLY'''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| In object inspector menu
 +
 
 +
check the Ma check box
 +
 
 +
 
 +
change from solid color to Ma
 +
| 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;"| scroll down
 +
 
 +
 
 +
In '''volume fields''' '''Check''' the '''Ma '''box and click '''APPLY'''
 +
 
 +
 
 +
On top of''' active variable control menu''' click on '''Solid Color'''
 +
 
 +
 
 +
and change it to '''Ma'''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| In VCR control click on play button
 +
 
 +
 
 +
make the color legend ON
 +
| 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 '''VCR control''' menu click on '''PLAY'''
 +
 
 +
 
 +
and make the '''color legend ON'''
 +
 
 +
 
 +
 
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| In paraview window
 +
| 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 '''Mach number''' in the''' color legend'''
 +
 
 +
 
 +
and '''corresponding colours'''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide : For validation
 +
| 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 switch back to the '''slides'''
 +
 
 +
 
 +
The solved tutorial can be '''validated''' with '''exact '''
 +
 
 +
'''solution'''
 +
 
 +
 
 +
'''available '''in basic books of '''Aerodynamics''' by '''John D Anderson'''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide ; 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;"| In this tutorial we learnt:
 +
 
 +
 
 +
'''Solving a compressible flow problem'''
 +
 
 +
 
 +
'''Velocity''' and '''pressure contour''' for the wedge
 +
 
 +
 
 +
'''OpenFOAM utility''' for calculating the '''Mach number'''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 9 : 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;"| Assignment:
 +
 
 +
 
 +
Vary the '''wedge angle between 10 ° to 15 ° '''
 +
 
 +
 
 +
to view the''' shock characteristic''' for the flow
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 10:
 +
 
 +
About Spoken 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;"| The video available at this URL:
 +
 
 
http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  
 
http://spoken-tutorial.org/What_is_a_Spoken_Tutorial  
It summarizes the Spoken Tutorial project.  
+
 
 +
It summarizes the Spoken Tutorial project.  
 +
 
 
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.  
  
 
|-
 
|-
| Slide 11:Acknowledgement
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 11:  
|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
+
About Spoken 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;"| The Spoken Tutorial Project Team
  
More information on the same is available at this URL http://spoken-tutorial.org/NMEICT-Intro
+
-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
  
 
|-
 
|-
|About the contributor
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 12:
|
+
 
The script is provided by Arvind N
+
Acknowledgement
and
+
| 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,
This is Rahul Joshi from IIT Bombay signing off
+
 
Thnks for joining
+
 
 +
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
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| About the contributor
 +
| 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 script has been contributed by Arvind M
 +
 
 +
and this is Rahul Joshi from IIT BOMBAY signing off.
 +
 
 +
Thanks for joining.
 +
 
 +
|}

Revision as of 12:24, 7 March 2013

Tutorial:Supersonic flow over a wedge using OpenFOAM


Script : Arvind N


Narration: Rahul Joshi


Keywords: Video tutorial,CFD,Wedge,Mach number,Compressible flows.


Visual Cue Narration
Slide 1 Hello and welcome to the spoken tutorial on Supersonic flow over a wedge using OpenFOAM
Slide 2: Learning Objectives In this tutorial I will show you


how to solve a compressible flow problem of supersonic flow over a wedge


how post process the results in paraView.



Slide 3:

System Requirement

To record this tutorial


I am using Linux Operating system Ubuntu version 10.04


OpenFOAM version 2.1.0


ParaView version 3.12.0

Slide 4

Prerequisites

To practice this tutorial a learner should have some basic knowledge of


Compressible flows and


Gas Dynamics

Slide 5 : Let us now solve supersonic flow over a wedge using OpenFOAM and


see the shock structure formed using paraview

Slide 5 : The problem consists of a wedge


with semi-angle of 15 degrees kept in a


uniform supersonic flow

Inlet velocity 5m/s Inlet velocity is 5 meters per second
Boundary conditions as shown in the figure The boundary conditions are set as shown in the figure



Slide 6 : Solver The type of solver I am using here is rhoCentralFoam
It is a Density-based compressible flow solver


It is based on central- upwind schemes of Kurganov and Tadmor

Switch to the Terminal by Ctrl+Alt+T Open a command terminal


to do this press ctrl +alt+ t keys simultaneously on your keyboard

In the terminal type path for supersonic flow over a wedge
In command terminal:

Type run and press enter


Problem is already set in OpenFOAM

In the terminal Type 'run' and press enter
Type cd tutorial and press enter Now type cd tutorial - Press Enter
Type cd compressible - Press Enter cd compressible - Press Enter
Type cd rhoCentralFoam - Press Enter cd rhoCentralFoam - Press Enter
Type cd wedge and press enter cd wedge15Ma5 and press enter
This is the name of the folder of supersonic flow over a wedge in rhoCentralFoam


and press enter

Type ls now type ls and press enter
You will see three folders : 0,constant and system.
Type cd constant and press enter Now open the blockMeshDict file,


to do this


type cd space constant and press enter

Type cd polyMesh and press enter cd space polyMesh


note that M here is capital


and press enter

Type ls and press enter Now type ls and press enter


you can see the blockMeshDict file



Type gedit blockMeshDict and press enter type gedit space blockMeshDict

note that M and D here are capital


and press enter

let me drag this to the capture area


scroll down

enter the data in vertices but it i already set up in the problem In this you need to calculate the co-ordinates for the wedge


This is already been calculated and set up in the problem

The rest of the data remain the same
Boundary names similar to that in slide 5 In boundary patches the boundaries are set as shown in the figure
Close the blockMeshDict file
type : cd .. (twice) and press enter


wedge folder

in the command terminal


type cd ..(dot dot) twice


to return back to wedge folder

Now Open the 0 folder
Type cd 0 and press enter To do this type


cd space 0 and press enter

type ls and press enter type ls and press enter
this contains initial boundary condition for pressure,velocity and Temprature
type cd .. and press enter type cd .. (dot dot) and press enter
Now we need to mesh the geometry
Mesh the geometry

type: blockMesh

To do this in the command terminal


type blockMesh and Press Enter


Meshing has been done

Terminal : type paraFoam and press enter Now to view the geometry in the terminal


type paraFoam and press enter


This will open the paraview window

Paraview window On the left hand side of object inspector menu click APPLY
About wedge geometry In this you can see the geometry is which is a rectangular


section upstream and changes to a wedge downstream


Close the paraview window

Now run the solver 'rhoCentralFoam'
Terminal : rehoCentralFoam and press enter To do this in the command terminal


type rhoCentralFoam and Press Enter

Iterations in terminal window The iterations running can be seen in the


terminal window

Iterations running will stop after it converges


or


at the end of the time step


Now the solving has been done

open paraview


To visualise these results let us open the


paraview window once again

type: paraFoam and press enter In the command terminal


type “paraFoam” and press Enter

Click APPLY in object inspector menu Again on the left hand side of


object inspector menu click APPLY

Solid geometry in drop down menu


Select U

On the left side top in active variable control menu


you will see a drop down menu showing solid color.


Now click on it


And change from solid color to capital U

Make the color legend ON Now make the color legend ON


by clicking on left hand side top of active variable control menu


and make the color legend ON


click on it

On top of the paraview window you can see the VCR control


Click on PLAY

In the paraview window You can see the final results of U velocity
In object inspector menu Now scroll down the


properties in object inspector menu on left hand side


Now click on display besides properties

Click on rescale to size Scroll down and click on Rescale to Size
You can see the final value of Velocity magnitude
Slect pressure in drop dwon menu (p)


Similarly you can select pressure


You can see the final result of pressure


Now close the paraview window

Calculate the Mach number


in terminal type Mach

You can also calculate the Mach number for the flow


To do this we can use the Openfoam utility


by typing Mach in the command terminal

Type mach in terminal


mach number for each time step

Type Mach in the command terminal


Note that M here is capital and press enter


You can see that Mach number is calculated for each time step

Open paraview window


type paraFoam


click APPLY

Now again open the paraview window


By typing in the command terminal paraFoam


and press enter


click APPLY

In object inspector menu

check the Ma check box


change from solid color to Ma

scroll down


In volume fields Check the Ma box and click APPLY


On top of active variable control menu click on Solid Color


and change it to Ma

In VCR control click on play button


make the color legend ON

In the VCR control menu click on PLAY


and make the color legend ON



In paraview window You can see the Mach number in the color legend


and corresponding colours

Slide : For validation Let me switch back to the slides


The solved tutorial can be validated with exact

solution


available in basic books of Aerodynamics by John D Anderson

Slide ; Summary In this tutorial we learnt:


Solving a compressible flow problem


Velocity and pressure contour for the wedge


OpenFOAM utility for calculating the Mach number

Slide 9 : Assignment Assignment:


Vary the wedge angle between 10 ° to 15 °


to view the shock characteristic for the flow

Slide 10:

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

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

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

About the contributor This script has been contributed by Arvind M

and this is Rahul Joshi from IIT BOMBAY signing off.

Thanks for joining.

Contributors and Content Editors

Chandrika, DeepaVedartham, Nancyvarkey, Rahuljoshi