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

From Script | Spoken-Tutorial
Jump to: navigation, search
 
Line 27: Line 27:
 
| 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 71: Line 71:
 
|-
 
|-
 
| 01:40
 
| 01:40
| This file contains the calculated X and Y coordinates for each point that defines the '''aerofoil'''.  
+
| This file contains the calculated X and Y coordinates for each point that defines the '''aerofoil'''. Z coordinate is kept as zero.  
Z coordinate is kept as zero.  
+
  
 
|-
 
|-
Line 172: Line 171:
 
|-
 
|-
 
| 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.'''
+
  
 
|-
 
|-
 
| 05:17
 
| 05:17
 
| Similarly, add the other points.
 
| Similarly, add the other points.
 
 
4 -3 0
 
4 -3 0
 
 
-4 -3 0
 
-4 -3 0
 
 
-4 3 0
 
-4 3 0
  
Line 241: Line 236:
 
| 06:52
 
| 06:52
 
| Inside '''Extrude''', add these lines:
 
| Inside '''Extrude''', add these lines:
 
 
'''Layers{1};''' Press '''Enter'''.
 
'''Layers{1};''' Press '''Enter'''.
 
 
'''Recombine;''' '''Save''' this file.
 
'''Recombine;''' '''Save''' this file.
  
Line 317: Line 310:
 
|08:37
 
|08:37
 
| In this tutorial, we learnt:  
 
| In this tutorial, we learnt:  
* How to create an '''aerofoil''' in '''Gmsh'''.  
+
How to create an '''aerofoil''' in '''Gmsh'''.  
* How to do '''meshing''' in '''Gmsh'''.
+
How to do '''meshing''' in '''Gmsh'''.
  
 
|-
 
|-
Line 339: Line 332:
 
|-
 
|-
 
| 09:03
 
| 09:03
| For more details, please write to us at:
+
| For more details, please write to us at:'''contact@spoken-tutorial.org'''  
'''contact@spoken-tutorial.org'''  
+
  
 
|-
 
|-
Line 352: Line 344:
 
|-
 
|-
 
| 09:15
 
| 09:15
| More information on the same is available at the following URL:
+
| More information on the same is available at the following URL:http://spoken-tutorial.org/NMEICT-Intro  
http://spoken-tutorial.org/NMEICT-Intro  
+
  
 
|-
 
|-

Latest revision as of 18:40, 20 February 2017

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 the coordinates for translation.
06:19 Since we want to extrude the surface in 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 automatically generates the mesh for 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 of 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 at: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: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