Difference between revisions of "OpenFOAM/C3/Creating-and-Meshing-aerofoil-in-Gmsh/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with " {| Border=1 | '''Time''' | '''Narration''' |- |00:01 | Hello and welcome to the spoken tutorial on '''Creating and Meshing an aerofoil in Gmsh''' |- | 00:08 | In this tutor...")
 
Line 6: Line 6:
 
|-
 
|-
 
|00:01
 
|00:01
| Hello and welcome to the spoken tutorial on '''Creating and Meshing an aerofoil in Gmsh'''
+
| Hello and welcome to the '''spoken tutorial''' on '''Creating and Meshing aerofoil in Gmsh'''.
  
 
|-
 
|-
 
| 00:08
 
| 00:08
| In this tutorial we will learn how to create an '''aerofoil '''using '''Gmsh'''
+
| In this tutorial, we will learn how to create an '''aerofoil '''using '''Gmsh'''
  
 
|-
 
|-
 
| 00:14
 
| 00:14
| Mesh the created '''aerofoil'''
+
|and '''mesh''' the created '''aerofoil'''.
  
 
|-
 
|-
 
| 00:17
 
| 00:17
| As a pre-requisite, the user should have basic knowledge of '''aerofoil '''and '''Gmsh.'''
+
| As a prerequisite, the user should have knowledge of '''aerofoil '''and '''Gmsh.'''
  
 
|-
 
|-
 
| 00:23
 
| 00:23
| If not, for '''Gmsh''' please see the tutorial on '''Installing and running Gmsh '''on the '''spoken tutorial''' website.  
+
| If not, for '''Gmsh''', please see the tutorial on '''Installing and running Gmsh '''on the '''spoken tutorial''' website.  
  
 
|-
 
|-
 
| 00:31
 
| 00:31
| To record this tutorial, I am using  
+
| To record this tutorial, I am using:
* '''Ubuntu Linux''' Operating system version 14.04 and
+
* '''Ubuntu Linux Operating system''' version 14.04 and
 
* '''Gmsh''' version 2.8.3
 
* '''Gmsh''' version 2.8.3
  
Line 36: Line 36:
 
|-
 
|-
 
| 00:45
 
| 00:45
| '''Aerofoils''' are streamline shaped wings which are used in airplanes and turbo machinery.
+
| '''Aerofoils''' are '''streamline''' shaped wings which are used in airplanes and turbo machinery.
  
 
|-
 
|-
Line 48: Line 48:
 
|-
 
|-
 
| 01:03
 
| 01:03
| The predefined coordinates for '''aerofoil''' are available in simple text file with '''.dat extension'''.  
+
| The predefined coordinates for '''aerofoil''' are available in simple '''text file''' with ".dat" '''extension'''.  
  
 
|-
 
|-
Line 60: Line 60:
 
|-
 
|-
 
| 01:22
 
| 01:22
| Download the '''.dat''' file and the '''Python script '''and go to the '''Downloads''' folder'''
+
| Download the '''.dat''' file and the '''Python script '''and go to the '''Downloads''' folder.
 
|-
 
|-
 
| 01:31
 
| 01:31
| Copy and paste both these files on the '''Desktop''' from the '''Downloads''' folder  
+
| Copy and paste both these files on the Desktop from the '''Downloads''' folder.
  
 
|-
 
|-
Line 76: Line 76:
 
|-
 
|-
 
| 01:51
 
| 01:51
| We need the X, Y and Z coordintes in '''Gmsh''' acceptable format.  
+
| We need the X, Y and Z co-ordintes in '''Gmsh''' acceptable format.  
  
 
|-
 
|-
Line 88: Line 88:
 
|-
 
|-
 
| 02:04
 
| 02:04
| This '''Python script '''  converts the data in the '''.dat '''file  and gives the ouput in a separate file which is understood by '''Gmsh'''.
+
| This '''Python script '''  converts the data in the '''.dat '''file  and gives the output in a separate file which is understood by '''Gmsh'''.
  
 
|-
 
|-
 
|02:14
 
|02:14
| Now open the '''Terminal''' window. Type '''cd space Desktop'''  
+
| Now open the '''Terminal''' window. Type: '''cd space Desktop'''.
  
 
|-
 
|-
 
| 02:21
 
| 02:21
| Now type '''python space dat2gmsh.py space''' the name of the '''dat''' file and press '''Enter'''.
+
| Now type: '''python space dat2gmsh.py space''', the name of the '''dat''' file and press '''Enter'''.
  
 
|-
 
|-
 
| 02:31
 
| 02:31
| Now type '''ls.'''We can see that a new file by the name '''naca5012xyz.dat .geo''' will be generated.
+
| Now type '''ls.''' We can see that a new file by the name '''naca5012xyz.dat .geo''' will be generated.
  
 
|-
 
|-
Line 112: Line 112:
 
|-
 
|-
 
| 02:50
 
| 02:50
| Here '''nac_lc''' is the '''characterstic length''' which is defined in the first line which is '''0.005 '''
+
| Here, '''nac_lc''' is the characteristic length which is defined in the first line as is '''0.005'''.
  
 
|-
 
|-
 
| 02:59
 
| 02:59
| I will change this to '''0.5'''
+
| I will change this to '''0.5'''.
  
 
|-
 
|-
 
| 03:03
 
| 03:03
| This is because we require a coarser mesh.  
+
| This is because we require a coarser mesh.  
  
 
|-
 
|-
 
| 03:07
 
| 03:07
| You can change this value according to your mesh requirement. Now save this file.
+
| You can change this value according to your mesh requirement. Now '''save''' this file.
  
 
|-
 
|-
 
| 03:15
 
| 03:15
| In the '''terminal''' window, type '''gmsh space''' name of the '''geo''' file''' '''and press '''Enter'''.  
+
| In the terminal window, type: '''gmsh space''', name of the '''geo''' file and press '''Enter'''.  
  
 
|-
 
|-
Line 136: Line 136:
 
|-
 
|-
 
| 03:29
 
| 03:29
| Now zoom in, by scrolling at the tail end of the '''aerofoil'''.  
+
| Now, zoom in by scrolling at the tail end of the '''aerofoil'''.  
  
 
|-
 
|-
Line 144: Line 144:
 
|-
 
|-
 
| 03:40
 
| 03:40
| Close '''gmsh'''. Now go back to the .'''geo''' file. Scroll down.  
+
| Close '''gmsh'''. Now go back to the '''geo''' file. Scroll down.  
  
 
|-
 
|-
Line 152: Line 152:
 
|-
 
|-
 
| 03:53
 
| 03:53
| Now above '''spline''', enter  '''Point open close bracket 1046 space = open close curly bracket 1.005comma space -0.0005 comma space 0.00000 comma space nac_lc  close with semicolon '''
+
| Now, above '''spline''', enter  '''Point open close bracket 1046 space = open close curly bracket space 1.005 comma space -0.0005 comma space 0.00000 comma space nac_lc''' close it with a semicolon.
  
 
|-
 
|-
 
|04:26
 
|04:26
| Modify the '''spline''' as '''Spline(1000) = curly braces open 1000 colon 1046 comma 1000 close the curly bracket semicolon'''
+
| Modify the '''spline''' as '''Spline(1000) = curly braces open 1000 colon 1046 comma 1000 close the curly bracket semicolon'''.
  
 
|-
 
|-
 
| 04:44
 
| 04:44
| Save the '''geo''' file.
+
| '''Save''' the '''geo''' file.
  
 
|-
 
|-
 
| 04:47
 
| 04:47
| Now, Open the modified file in '''Gmsh'''. We can see that the edge is joint.
+
| Now, open the modified file in '''Gmsh'''. We can see that the edge is joined.
  
 
|-
 
|-
Line 172: Line 172:
 
|-
 
|-
 
| 05:02
 
| 05:02
| Enter these coordinates 4, 3, 0  and change the prescribed '''mesh element size''' to '''0.5 '''
+
| Enter these coordinates 4, 3, 0  and change the '''prescribed mesh element size''' to '''0.5 '''.
 
+
 
Press '''Enter.'''
 
Press '''Enter.'''
  
Line 188: Line 187:
 
|-
 
|-
 
| 05:29
 
| 05:29
| Now join the points with a straight line.
+
| Now, join the points with a straight line.
  
 
|-
 
|-
 
| 05:44
 
| 05:44
| Now click on '''Plane surface '''and select the '''surface boundary. '''
+
| Now click on '''Plane surface '''and select the surface boundary.  
  
 
|-
 
|-
 
| 05:52
 
| 05:52
| Zoom in and select the '''aerofoil''' as the '''hole boundary'''.  
+
| Zoom-in and select the '''aerofoil''' as the '''hole boundary'''.  
  
 
|-
 
|-
Line 204: Line 203:
 
|-
 
|-
 
| 06:04
 
| 06:04
| Now we will extrude the surface to make it 3D. Go to '''Translate''',  '''Extrude Surface.'''  
+
| Now, we will extrude the surface to make it 3D. Go to '''Translate''',  '''Extrude Surface.'''  
  
 
|-
 
|-

Revision as of 17:56, 5 July 2016

Time Narration
00:01 Hello and welcome to the spoken tutorial on Creating and Meshing aerofoil in Gmsh.
00:08 In this tutorial, we will learn how to create an aerofoil using Gmsh
00:14 and mesh the created aerofoil.
00:17 As a prerequisite, the user should have knowledge of aerofoil and Gmsh.
00:23 If not, for Gmsh, please see the tutorial on Installing and running Gmsh on the spoken tutorial website.
00:31 To record this tutorial, I am using:
  • Ubuntu Linux Operating system version 14.04 and
  • Gmsh version 2.8.3
00:42 Let me introduce you to aerofoil.
00:45 Aerofoils are streamline shaped wings which are used in airplanes and turbo machinery.
00:53 These shapes are such that the drag force is a very small fraction of the lift.
00:59 This is a picture of an aerofoil.
01:03 The predefined coordinates for aerofoil are available in simple text file with ".dat" extension.
01:11 I will download the .dat file and Python script from this url:
01:19 Let me open the website.
01:22 Download the .dat file and the Python script and go to the Downloads folder.
01:31 Copy and paste both these files on the Desktop from the Downloads folder.
01:37 Open the .dat file.
01:40 This file contains the calculated X and Y coordinates for each point that defines the aerofoil.

Z coordinate is kept as zero.

01:51 We need the X, Y and Z co-ordintes in Gmsh acceptable format.
01:56 This can be done manually but this is time consuming.
02:01 Now open the Python script.
02:04 This Python script converts the data in the .dat file and gives the output in a separate file which is understood by Gmsh.
02:14 Now open the Terminal window. Type: cd space Desktop.
02:21 Now type: python space dat2gmsh.py space, the name of the dat file and press Enter.
02:31 Now type ls. We can see that a new file by the name naca5012xyz.dat .geo will be generated.
02:43 Open the geo file.
02:46 This contains the co-ordinates in Gmsh format.
02:50 Here, nac_lc is the characteristic length which is defined in the first line as is 0.005.
02:59 I will change this to 0.5.
03:03 This is because we require a coarser mesh.
03:07 You can change this value according to your mesh requirement. Now save this file.
03:15 In the terminal window, type: gmsh space, name of the geo file and press Enter.
03:25 This opens gmsh with the aerofoil.
03:29 Now, zoom in by scrolling at the tail end of the aerofoil.
03:35 You will note that the aerofoil has an open trailing edge.
03:40 Close gmsh. Now go back to the geo file. Scroll down.
03:48 We will add the last point and join it.
03:53 Now, above spline, enter Point open close bracket 1046 space = open close curly bracket space 1.005 comma space -0.0005 comma space 0.00000 comma space nac_lc close it with a semicolon.
04:26 Modify the spline as Spline(1000) = curly braces open 1000 colon 1046 comma 1000 close the curly bracket semicolon.
04:44 Save the geo file.
04:47 Now, open the modified file in Gmsh. We can see that the edge is joined.
04:56 Now we will make a boundary around the aerofoil using points.
05:02 Enter these coordinates 4, 3, 0 and change the prescribed mesh element size to 0.5 .

Press Enter.

05:17 Similarly, add the other points.

4 -3 0

-4 -3 0

-4 3 0

05:29 Now, join the points with a straight line.
05:44 Now click on Plane surface and select the surface boundary.
05:52 Zoom-in and select the aerofoil as the hole boundary.
05:58 Press e to end selection. You can see we have our surface.
06:04 Now, we will extrude the surface to make it 3D. Go to Translate, Extrude Surface.
06:14 A new window will appear asking for cordinates for translation.
06:19 Since we want to extrude the surface in positive Z direction,
  • enter the coordinates for Z direction as 1
  • and click on the boundary of the surface.
06:30 Press e to end selection.
06:33 Use the left click of the mouse to move the geometry.
06:37 You can see that the geometry has been extruded.
06:42 Close this. Close the gmsh window
06:45 Open the geo file.
06:48 Scroll down and go to Extrude.
06:52 Inside Extrude add these lines :

Layers{1}; Press Enter

Recombine;Save this file.

07:09 This will ensure that the mesh is one element thick.
07:14 Now in the terminal window, open the geo file.
07:19 Now we have our geometry, we will do the meshing.
07:23 Gmsh automaticaly generates the mesh of the defined geometry.
07:28 Go to Mesh.
07:30 Click on 1D mesh, 2D mesh and 3D mesh.
07:36 The mesh has been generated.
07:39 You may notice that the mesh is finer near the aerofoil and gets coarser as we move towards the boundary.
07:48 We can also refine the mesh by clicking on the Refine by Splitting parameter in the mesh menu.
07:56 Now let us save our work.
07:59 Go to File menu and click on Save as.
08:05 A new window will appear. In the drop down, change to the mesh format.
08:11 And type the name the file as aerofoil.msh
08:17 Note that here msh stands for the file type mesh.
08:22 Click Ok Again click Ok
08:26 This brings us to the end of the tutorial.
08:29 As an assignment create another aerofoil by using different dat file for different aerofoil shapes.
08:37 In this tutorial we learnt:
  • How To create an aerofoil in Gmsh.
  • How to do meshing in Gmsh
08:45 Watch the video available at this URL:

It summarizes the Spoken Tutorial project.

08:52 If you do not have good bandwidth, you can download and watch it.
08:56 The Spoken Tutorial Project Team.Conducts workshops using spoken tutorials
09:00 Gives certificates to those who pass an online test
09:03 For more details, please write to us contact@spoken-tutorial.org
09:06 Spoken Tutorials are part of Talk to a Teacher project,
09:09 It is supported by the National Mission on Education through ICT, MHRD, Government of India.
09:15 More information on the same is available at the following URL link http://spoken-tutorial.org/NMEICT-Intro
09:19 The script was written by Gautam Sharma and this is Rahul Joshi from IIT Bombay signing off. Thanks for joining.

Contributors and Content Editors

PoojaMoolya, Pratik kamble, Sandhya.np14