Difference between revisions of "OpenFOAM/C2/Creating-curved-geometry-in-OpenFOAM/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with ''''Title of script''': Creating curved geometry in OpenFOAM '''Author''': Rahul Ashok Joshi '''Keywords''': Video Tutorial,Computational Fluid Dynamics (CFD),Curved geometry,Fl…')
 
Line 1: Line 1:
'''Title of script''': Creating curved geometry in OpenFOAM
+
Tutorial: Creating curved geometry in OpenFOAM.
  
'''Author''': Rahul Ashok Joshi
 
  
'''Keywords''': Video Tutorial,Computational Fluid Dynamics (CFD),Curved geometry,Flow over cylinder.
+
Script and Narration: Rahul Joshi
 +
 
 +
 
 +
Keywords: Video tutorial, CFD, Flow over cylinder, edges, blocks.
 +
 
 +
 
 +
 
 +
{| 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 '''creating Curved geometry in OpenFOAM'''
Hello and welcome to the spoken tutorial on creating curved geometry in 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 create a curved geometry
 
  
How to view the results in paraview
+
'''Steps''' for creating a create a '''curved geometry in openfoam'''
 +
 
 +
 
 +
Viewing 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  
+
 
 +
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  
 +
 
 +
 
 +
I am using '''Linux Operating system Ubuntu version 10.0'''4.
  
I am using Linux Operating system Ubuntu 10.04
 
  
OpenFOAM version 2.1.0
+
'''OpenFOAM version 2.1.0 '''
  
ParaView version 3.12.0
 
  
 +
'''ParaView version 3.12.0 '''
  
 
|-
 
|-
| Slide 4:
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 4:
|.
+
We will create a geometry for flow over cylinder.
+
  
Note that this is an example case for explanation.
 
  
The cylinder is in a form of a semi circle.
+
Hover over cylinder
  
Meshing is a body fitted grid.
 
  
The entire geometry is divided into blocks.
+
Hover over the geometry
  
We break the semi circle into equal number of parts
 
  
 +
Hover over blocks
 +
 +
 +
break the circle into 4 parts
 +
| 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 create a '''geometry''' for '''flow over cylinder'''.
 +
 +
 +
Note that I am using this case just for '''explanation'''.
 +
 +
 +
The '''cylinder '''is in a form of a '''semi circle.'''
 +
 +
 +
'''Meshing is a body fitted grid'''.
 +
 +
 +
The entire '''geometry''' is divided into blocks.
 +
 +
 +
We break the '''semi circle''' into equal number of '''parts'''.
 +
 +
 +
Now minimise this
  
 
|-
 
|-
|  
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Open the lid driven cavity blockMeshDict file
|
+
 
 +
 
 +
Hover over arcs
 +
| 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 '''blockMeshDict '''file of the previous tutorial
  
Open up a blockMeshDict file of the previous tutorial
 
  
 
I have already opened it
 
I have already opened it
+
 
Scroll down, for simple geometries you can see that edges is kept empty  
+
 
 +
Scroll down, for '''simple geometries''' you can see that  
 +
 
 +
 
 +
'''edges '''is kept empty  
  
 
|-
 
|-
|  
+
| 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 Create a new '''blockMeshDict''' file  
Create a new blockMeshDict file  
+
  
Right click > create document and new file and name it as blockMeshDict.
 
  
Now you can copy the initial few lines from the lid driven cavity upto convertTometers
+
To do this let us '''minimise''' this first
  
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| On the desktop
  
leave space and enter 1 and semicolon, press enter
 
  
 +
Right click > create document >create file
 +
| 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 '''Right click > create document > empty file'''
  
After this you need to enter the value of the points in vertices.
+
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Name this as blockMeshDict
 +
| 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;"| name this as '''blockMeshDict'''.
  
Note that the points should be in an ordered way starting from 0,1,2,3 etc. as shown in the figure
 
  
After vertices press enter and put the open bracket
+
Note that '''M and D here are capital'''
  
Press enter
 
  
Now enter the co-ordinates of points as shown in the diagram.
+
'''Open this'''
  
For explanation I will use the right half of the semi-circle.
+
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Copy the blockMeshDict of Lid driven cavity file from line 0 to line
  
Enter the values for the points in the figure starting from 0
+
convert to meters
enter (0.5 0 0)
+
| 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 you can copy the initial few lines from the '''lid driven cavity upto convertTometers'''
  
point 1 (1 0 0)
+
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Copy these 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;"| Go up '''copy''' this upto '''convertToMeters'''
  
leave two vertical spaces and enter value for the point 4
+
|-
(0.707 0.707 0)
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Paste in the new blockMeshDict file
 +
| 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;"| '''Copy this''' and '''paste it''' in the new '''blockMeshDict file'''
  
enter point 5 (0.353 0.353 0)
+
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Change the geometry to point one to one
 +
| 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;"| Change the '''convert to meters''' from '''point one to one'''
  
again leave 4 vertical spaces and enter point 9 (0 1 0)
+
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Geometry is in meters
 +
| 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 our '''geometry''' is in '''meters''' we will keep this as one
  
point 10 (0 0.5 0)
+
|-
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Press enter
Similarly enter the values for the remaining points.
+
| 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 press enter ,
  
  
 +
press enter again
 +
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Refer to the figure of flow over cylinder in slide 4
 +
 +
 +
 +
| 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;"| After this you need to enter the '''co-ordinates''' of the''' geometry''' in '''vertices'''
 +
 +
 +
Note that the points should be in an ordered way starting from '''0,1,2,3''' etc. as shown in the figure
 +
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type vertices after convertTometers
 +
| 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 '''vertices''' in the '''blockMeshDict''' file 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;"| Insert a '''open bracket '''
  
Close the bracket and put a semi-colon
 
  
 
Press enter
 
Press enter
  
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Enter the co-ordinates as shown in the diagram
 +
| 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 enter the '''co-ordinates''' of points as shown in the '''diagram'''.
  
 
|-
 
|-
|  
+
| 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 switch back to the slides
  
Type blocks
+
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Refer to the next slide for half semi-circle
 +
| 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;"| For '''explanation''' I will use the '''right half of the semi-circle'''
  
In the next line put the open bracket 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;"| current blockMeshDict file
 +
| 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;"| Enter the values for the points in the figure starting '''from 0'''
  
There are more number of blocks in this example
 
Blocks are circled in the figure in previous slide.
 
  
In blocks enter the type of block i.e. Hex and
+
Let me switch back to the '''blockMeshDict''' file
points of the block
+
  
For creating the blocks please refer to the tutorial on creating simple geometry in OpenFOAM.
+
|-
 +
| 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;"| leave some space and enter '''co-ordinates''' of '''point 0'''
  
Close the bracket and put semi-colon 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 0 - Insert (0.5 0 0)
 +
| 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 close bracket and enter '''(0.5 (space) 0 (space) 0)'''
  
in the next line type edges,
+
|-
 +
| 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;"| Again leave some space , '''open close bracket '''
  
Put the open bracket 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 1- Insert (1 0 0)
 +
| 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;"| Enter co-ordinates for point 1 (1 (space) 0 (space) 0)
  
In the next line type arc and leave some space
 
  
Type the points which are the end points of the arc
+
Press enter
  
again leave some space insert open close bracket
+
|-
 +
| 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;"| leave two '''vertical spaces''' ,
  
In brackets enter the co-ordinate value of any intermediate point in between the two arc points.
 
  
Let me switch back to slides.
+
press enter
 +
 
 +
 
 +
again 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;"| leave some space and enter '''co-ordinate '''for the point number 4
In the figure you can see that you have to pick up a point in between the two points.
+
  
In this geometry I have picked up right half of the circle
+
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Point 4 – Insert (0.707 0.707 0)
 +
| 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 close bracket''',''' enter (0.707 (space) 0.707 (space) 0)'''
 +
 
 +
|-
 +
| 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;"| Press enter
 +
 
 +
 
 +
Leave some space
 +
 
 +
 
 +
'''Open close bracket'''
  
Using simple trignometric relation you can find the co-ordinates of the intermediate point shown in the circle.
 
  
Similarly you can repeat the procedure for rest of the semi-circle geometry.
 
  
Close the bracket and put a semi-colon 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 5 -Insert (0.353 0.353 0)
|
+
| 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;"| '''Enter the co-ordinates for point 5'''
Enter the boundary patches after arcs
+
  
Refer to the tutorial on Simple geometry in OpenFOAM for entering the boundary patches
 
  
In the file type mergePatchPairs
+
'''Enter (0.353 (space) 0.353 (space) 0)''', press enter
  
put the parenthesis and put a semi-colon 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;"| '''Now leave 4 vertical spaces''' and  
  
As there no patches to be merged it can be kept empty
+
|-
Similarly enter the co-ordinate points for the points in the front face of unit thickness as shown in the figure.
+
| 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;"| '''Enter co-ordinates for point number 9'''
  
 
|-
 
|-
|
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Vertical spaces
|
+
| 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;"| '''1 2 3 4 ,''' again press enter
Open Command terminal
+
  
In the command terminal type the path for the case file.
 
  
 +
leave some space
  
  
 +
'''Open close bracket '''
  
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Point 9 – Insert (0 1 0)
 +
| 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;"| Enter '''(0 (space) 1 (space) 0)''', press enter
  
I have already set the path for the tutorial case of flow over cylinder.
 
 
|-
 
|-
|
+
| 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;"| Leave some space
In the command terminal type blockMesh and press enter
+
  
blocking is done
 
  
Type paraFoam in the terminal  and press enter to view the geometry.
+
Enter '''co-ordinates''' for '''point number 10'''
  
On the left side of object 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;"| Point 10 -Insert (0 0.5 0)
 +
| 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 close bracket''' (0 (space) 0.5 (space) 0)''' and press enter
  
The geometry created will be the one seen in 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;"| Remaining part of the semi-circle
  
Scroll down the properties panel of Object inspector.
 
  
Check and uncheck the Mesh field box
+
use the same procedure
 +
| 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 '''enter the co-ordinates for remaining points''' in the geometry.
  
You can see different regions of the geometry.
 
  
You can also see the wire frame of the geometry
+
Insert a close bracket and put a''' semi-colon '''
  
On top of active variable control menu in the drop down menu
 
  
Change from Surface to wireframe.
+
Press enter
  
 +
 +
Again press enter
  
 
|-
 
|-
|Slide 6:
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| In blockMeshDict file type blocks
|
+
| 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 blocks''' and press enter
In this tutorial we learnt:
+
Creating a curved geometry.
+
  
How to enter co-ordinates for edges in OpenFOAM
 
  
This brings us to the end of the tutorial
+
Insert a '''open bracket''' 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 switch back to the slides
  
 
|-
 
|-
|Slide :7
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide showing blocks
|
+
| 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;"| '''Block numbers''' are circled as shown in the figure
As an Assignment
+
 
 +
|-
 +
| 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 let me switch back to 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;"| Enter the type of block here
 +
| 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;"| Leave some space
 +
 
 +
 
 +
Enter the type of '''block i.e. Hex'''
  
Create a geometry with inner semi-circle of radius 2 and outer circle of radius 4
 
  
View the results in paraview
+
leave some space
  
 
|-
 
|-
| Slide 8:Summary
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Enter points for blocks
|In this tutorial we learnt:
+
| 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 enter the''' points''' for the '''blocks'''
File structure of Lid Driven cavity
+
 
Solved lid driven cavity.
+
 
Post-processing of solution
+
'''Open close brackets'''
Validation.
+
 
 +
 
 +
Leave some space
  
 
|-
 
|-
|Slide 9:
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| SimpleGrading (1 1 1)
|As as 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;"| ths '''simple grading''' can be kept as '''(1 1 1) '''
Change  some parameters in the lid driven cavity
+
 
the velocity magnitude in the '0' folder and
+
 
transport properties in the 'constant' folder and
+
press enter
plot the result of  u/U and y/L velocity.
+
This brings us to  the end of the tutorial.
+
  
 
|-
 
|-
|Slide10:
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Refer to the previous tutorial on simple geometry in openfoam
|The video available at this URL:
+
| 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;"| For creating the '''blocks''' please refer to the '''tutorial'''
The video available at this URL:
+
 
 +
 
 +
on '''creating simple geometry in OpenFOAM'''
 +
 
 +
 
 +
'''Note that''' there will be more number of '''blocks''' in this example
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Insert close bracket and
 +
 
 +
 
 +
semi-colon
 +
 
 +
 
 +
 
 +
| 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;"| '''Insert a close bracket'''
 +
 
 +
 
 +
'''Insert a semi-colon''' and press enter
 +
 
 +
 
 +
Again 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 edges
 +
| 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 next line type '''edges''' and press enter
 +
 
 +
 
 +
insert a '''open bracket''' 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;"| Here you need to enter the '''points''' which are the '''end points of the arcs'''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Enter the arc points
 +
| 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;"| Leave some space and '''type arc''' and leave some space
 +
 
 +
 
 +
Type the points which are the '''end points of the arc'''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Insert end points of the arc
 +
 
 +
 
 +
From ths slide
 +
 
 +
 
 +
 
 +
| 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 insert the '''end points of the arc'''
 +
 
 +
 
 +
We '''start''' with '''0 5'''
 +
 
 +
 
 +
Let me switch back to the '''blockMeshDict file'''
 +
 
 +
 
 +
Enter''' 0 space 5'''
 +
 
 +
|-
 +
| 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;"| Leave some space
 +
 
 +
 
 +
Insert '''open close bracket'''
 +
 
 +
|-
 +
| 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 brackets enter the co-ordinate of any '''intermediate''' point in between the two '''arc points'''.
 +
 
 +
 
 +
Now Let me switch back again to slides
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide: for arcs
 +
| 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 figure you can see that you have to pick up a point
 +
 
 +
 
 +
in between the two points.
 +
 
 +
|-
 +
| 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 this geometry I have picked up '''right half''' of the circle
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide shwoing trignometric relations
 +
 
 +
Sin(theta) and cos(theta) relations
 +
| 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;"| Using '''simple geometric relations'''
 +
 
 +
 
 +
you can find the co-ordinates of the intermediate point shown in the semi-circle
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Repeat the above procedure for the remaining semi-circle
 +
| 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 '''repeat''' the procedure for rest of the '''semi-circle geometry'''
 +
 
 +
|-
 +
| 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 let me switch back to the '''blockMeshDict file'''
 +
 
 +
 
 +
Now 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;"| '''Note that there are more number of arcs in this example'''
 +
 
 +
|-
 +
| 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;"| I'''nsert a close bracket'''
 +
 
 +
 
 +
'''Insert a semi -colon and press enter'''
 +
 
 +
 
 +
again press enter
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| In the next line after arcs
 +
 
 +
 
 +
refer to the tutorial on creating simple geometry 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;"| '''Enter the boundary patches after arcs'''
 +
 
 +
 
 +
'''Refer to the tutorial on Simple geometry in OpenFOAM '''
 +
 
 +
 
 +
For entering the '''boundary patches'''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Enter 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;"| Enter '''boundary'''
 +
 
 +
 
 +
'''Insert open-close bracket and press enter'''
 +
 
 +
 
 +
Again 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 mergePatchPairs
 +
 
 +
 
 +
P here is capital
 +
| 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 next line type '''mergePatchPairs'''
 +
 
 +
 
 +
Note that '''P here is capital'''
 +
 
 +
|-
 +
| 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;"| Press enter
 +
 
 +
 
 +
Insert a '''open bracket''' 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;"| Since there are '''no patches''' to be '''merged''' this can be kept empty
 +
 
 +
 
 +
Insert a '''close bracket'''
 +
 
 +
 
 +
Insert a '''semi -colon '''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;"| Slide :
 +
 
 +
 
 +
Points for the front face in the 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;"| Let me switch back to the slides
 +
 
 +
 
 +
Similarly enter the '''co-ordinate''' points for the points
 +
 
 +
 
 +
in the '''front face''' of unit thickness of the '''geometry'''
 +
 
 +
 
 +
as shown in the figure
 +
 
 +
 
 +
 
 +
 
 +
|-
 +
| 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
 +
| 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'''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type run and press enter
 +
 
 +
cd tutorials and press enter
 +
 
 +
cd basic and press enter
 +
 
 +
cd potentialFoam and press enter
 +
 
 +
cd cylinder 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''' type the path for your case file
 +
 
 +
|-
 +
| 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;"| I have already set the path for the '''tutorial case of flow over cylinder'''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type blockMesh 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''' type '''blockMesh '''for '''meshing''' the geometry''' and press enter'''
 +
 
 +
 
 +
Meshing is done
 +
 
 +
|-
 +
| 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;"| Now '''Type paraFoam''' in the terminal
 +
 
 +
 
 +
and press enter
 +
 
 +
 
 +
to view the geometry
 +
 
 +
|-
 +
| 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
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| In the object inspector menu click APPLY button
 +
| 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 the '''left''' side of '''object inspector menu''' click '''Apply'''
 +
 
 +
 
 +
The '''geometry''' created will be seen in 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;"| Scroll down the '''Object inspector menu'''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Check and uncheck the mesh field box
 +
| 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;"| '''Check and uncheck the Mesh field box'''
 +
 
 +
|-
 +
| 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:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| You can see '''different regions''' of the geometry.
 +
 
 +
 
 +
You can also see the''' wire frame '''of the geometry
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| For wireframe of the geometry
 +
 
 +
 
 +
Change from surface to wireframe
 +
| 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 '''active variable control menu''' in the '''drop down menu'''
 +
 
 +
 
 +
Change from '''Surface to wireframe'''
 +
 
 +
|-
 +
| 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 '''wireframe model''' of the geometry
 +
 
 +
 
 +
close this
 +
 
 +
 
 +
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;"| Slide
 +
| 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:
 +
 
 +
How to '''create a curved geometry'''.
 +
 
 +
 
 +
How to '''enter points for edges in OpenFOAM'''
 +
 
 +
 
 +
This brings 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:none;padding:0.097cm;"| Slide
 +
| 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
 +
 
 +
 
 +
Create a geometry with '''inner semi-circle of radius 2 meters'''
 +
 
 +
 
 +
'''and outer circle of radius 4 meters'''
 +
 
 +
 
 +
and
 +
 
 +
 
 +
View 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;"| Slide 8:
 +
 
 +
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;"| Watch 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:
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 9:  
|
+
 
The Spoken Tutorial Project Team
+
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
 +
 
 
-Conducts workshops using spoken tutorials
 
-Conducts workshops using spoken tutorials
 +
 
-Gives certificates to those who pass an online test
 
-Gives certificates to those who pass an online test
 +
 
-For more details, please write to
 
-For more details, please write to
contacts@spoken-tutorial.org
+
 
 +
contact@spoken-tutorial.com
 +
 
 
|-
 
|-
|Slide 12:Acknowledgement
+
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Slide 10:
|
+
 
The Spoken Tutorials are part of Talk to a Teacher project,  
+
Acknowledgement
 +
| 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.  
 +
 
More information on the same is available at the following URL link http://spoken-tutorial.org/NMEICT-Intro
 
More information on the same is available at the following URL link http://spoken-tutorial.org/NMEICT-Intro
  
 
|-
 
|-
|About the Author
+
| 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
|This is Rahul Joshi from IIT BOMBAY signing off.
+
| 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 13:14, 6 March 2013

Tutorial: Creating curved geometry in OpenFOAM.


Script and Narration: Rahul Joshi


Keywords: Video tutorial, CFD, Flow over cylinder, edges, blocks.


Visual Cue Narration
Slide 1 Hello and welcome to the spoken tutorial on creating Curved geometry in OpenFOAM
Slide 2 : Learning Objectives In this tutorial I will show you


Steps for creating a create a curved geometry in openfoam


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


Hover over cylinder


Hover over the geometry


Hover over blocks


break the circle into 4 parts

We will create a geometry for flow over cylinder.


Note that I am using this case just for explanation.


The cylinder is in a form of a semi circle.


Meshing is a body fitted grid.


The entire geometry is divided into blocks.


We break the semi circle into equal number of parts.


Now minimise this

Open the lid driven cavity blockMeshDict file


Hover over arcs

Open a blockMeshDict file of the previous tutorial


I have already opened it


Scroll down, for simple geometries you can see that


edges is kept empty

Now Create a new blockMeshDict file


To do this let us minimise this first

On the desktop


Right click > create document >create file

Now Right click > create document > empty file
Name this as blockMeshDict name this as blockMeshDict.


Note that M and D here are capital


Open this

Copy the blockMeshDict of Lid driven cavity file from line 0 to line

convert to meters

Now you can copy the initial few lines from the lid driven cavity upto convertTometers
Copy these lines Go up copy this upto convertToMeters
Paste in the new blockMeshDict file Copy this and paste it in the new blockMeshDict file
Change the geometry to point one to one Change the convert to meters from point one to one
Geometry is in meters As our geometry is in meters we will keep this as one
Press enter Now press enter ,


press enter again

Refer to the figure of flow over cylinder in slide 4


After this you need to enter the co-ordinates of the geometry in vertices


Note that the points should be in an ordered way starting from 0,1,2,3 etc. as shown in the figure

Type vertices after convertTometers Now type vertices in the blockMeshDict file and press enter
Insert a open bracket


Press enter

Enter the co-ordinates as shown in the diagram Now enter the co-ordinates of points as shown in the diagram.
Let me switch back to the slides
Refer to the next slide for half semi-circle For explanation I will use the right half of the semi-circle
current blockMeshDict file Enter the values for the points in the figure starting from 0


Let me switch back to the blockMeshDict file

leave some space and enter co-ordinates of point 0
Point 0 - Insert (0.5 0 0) Open close bracket and enter (0.5 (space) 0 (space) 0)
Again leave some space , open close bracket
Point 1- Insert (1 0 0) Enter co-ordinates for point 1 (1 (space) 0 (space) 0)


Press enter

leave two vertical spaces ,


press enter


again press enter

leave some space and enter co-ordinate for the point number 4
Point 4 – Insert (0.707 0.707 0) Open close bracket, enter (0.707 (space) 0.707 (space) 0)
Press enter


Leave some space


Open close bracket



Point 5 -Insert (0.353 0.353 0) Enter the co-ordinates for point 5


Enter (0.353 (space) 0.353 (space) 0), press enter

Now leave 4 vertical spaces and
Enter co-ordinates for point number 9
Vertical spaces 1 2 3 4 , again press enter


leave some space


Open close bracket

Point 9 – Insert (0 1 0) Enter (0 (space) 1 (space) 0), press enter
Leave some space


Enter co-ordinates for point number 10

Point 10 -Insert (0 0.5 0) Open close bracket (0 (space) 0.5 (space) 0) and press enter
Remaining part of the semi-circle


use the same procedure

Similarly enter the co-ordinates for remaining points in the geometry.


Insert a close bracket and put a semi-colon


Press enter


Again press enter

In blockMeshDict file type blocks Now Type blocks and press enter


Insert a open bracket and press enter

Let me switch back to the slides
Slide showing blocks Block numbers are circled as shown in the figure
Now let me switch back to the blockMeshDict file
Enter the type of block here Leave some space


Enter the type of block i.e. Hex


leave some space

Enter points for blocks Now enter the points for the blocks


Open close brackets


Leave some space

SimpleGrading (1 1 1) ths simple grading can be kept as (1 1 1)


press enter

Refer to the previous tutorial on simple geometry in openfoam For creating the blocks please refer to the tutorial


on creating simple geometry in OpenFOAM


Note that there will be more number of blocks in this example

Insert close bracket and


semi-colon


Insert a close bracket


Insert a semi-colon and press enter


Again press enter

Type edges in the next line type edges and press enter


insert a open bracket and press enter

Here you need to enter the points which are the end points of the arcs
Enter the arc points Leave some space and type arc and leave some space


Type the points which are the end points of the arc

Insert end points of the arc


From ths slide


In this insert the end points of the arc


We start with 0 5


Let me switch back to the blockMeshDict file


Enter 0 space 5

Leave some space


Insert open close bracket

In brackets enter the co-ordinate of any intermediate point in between the two arc points.


Now Let me switch back again to slides

Slide: for arcs In the figure you can see that you have to pick up a point


in between the two points.

In this geometry I have picked up right half of the circle
Slide shwoing trignometric relations

Sin(theta) and cos(theta) relations

Using simple geometric relations


you can find the co-ordinates of the intermediate point shown in the semi-circle

Repeat the above procedure for the remaining semi-circle Similarly you can repeat the procedure for rest of the semi-circle geometry
Now let me switch back to the blockMeshDict file


Now press enter

Note that there are more number of arcs in this example
Insert a close bracket


Insert a semi -colon and press enter


again press enter

In the next line after arcs


refer to the tutorial on creating simple geometry in openfoam

Enter the boundary patches after arcs


Refer to the tutorial on Simple geometry in OpenFOAM


For entering the boundary patches

Enter boundary Enter boundary


Insert open-close bracket and press enter


Again press enter

Type mergePatchPairs


P here is capital

In the next line type mergePatchPairs


Note that P here is capital

Press enter


Insert a open bracket and press enter

Since there are no patches to be merged this can be kept empty


Insert a close bracket


Insert a semi -colon and press enter

Slide :


Points for the front face in the geometry


Let me switch back to the slides


Similarly enter the co-ordinate points for the points


in the front face of unit thickness of the geometry


as shown in the figure



Press Ctrl+Alt+t keys Open a Command terminal
Type run and press enter

cd tutorials and press enter

cd basic and press enter

cd potentialFoam and press enter

cd cylinder and press enter

In the command terminal type the path for your case file
I have already set the path for the tutorial case of flow over cylinder
Type blockMesh and press enter In the terminal type blockMesh for meshing the geometry and press enter


Meshing is done

Type paraFoam and press enter Now Type paraFoam in the terminal


and press enter


to view the geometry

Let me drag this to the capture area
In the object inspector menu click APPLY button Now on the left side of object inspector menu click Apply


The geometry created will be seen in the paraview window

Scroll down the Object inspector menu
Check and uncheck the mesh field box Check and uncheck the Mesh field box
Demo You can see different regions of the geometry.


You can also see the wire frame of the geometry

For wireframe of the geometry


Change from surface to wireframe

On top of active variable control menu in the drop down menu


Change from Surface to wireframe

You can see the wireframe model of the geometry


close this


Let me switch back to the slides

Slide In this tutorial we learnt:

How to create a curved geometry.


How to enter points for edges in OpenFOAM


This brings us to the end of the tutorial

Slide As an Assignment


Create a geometry with inner semi-circle of radius 2 meters


and outer circle of radius 4 meters


and


View the results in paraview

Slide 8:

About Spoken tutorials

Watch 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 9:

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.com

Slide 10:

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 is Rahul Joshi from IIT BOMBAY signing off. Thanks for joining

Contributors and Content Editors

Chandrika, DeepaVedartham, Nancyvarkey, Rahuljoshi