OpenFOAM/C3/Creating-and-Meshing-aerofoil-in-Gmsh/English
Tutorial: Creating and Meshing an aerofoil in Gmsh
Script : Gautam Sharma
Narration : Rahul Joshi
Keywords: Meshing, aerofoil, Gmsh, OpenFOAM.
Visual Cue | Narration |
Slide 1 | Hello and welcome to the spoken tutorial on Creating and Meshing an aerofoil in Gmsh |
Slide 2 : Learning Objectives
|
In this tutorial we will learn to
|
Slide 3: Pre-requisite | To practice this tutorial, the user should have basic knowledge of aerofoil and Gmsh.
|
Slide 4:
System Requirement |
To record this tutorial, I am using
|
Slide 5: About aerofoil
|
Let me introduce you to aerofoil.
|
Show the aerofoil | This is a picture of an aerofoil. |
Slide 5 :
The dat file
|
The predefined coordinates for aerofoil are available in simple text file with .dat extension.
|
Open in browser
http://community.dur.ac.uk/g.l.ingram/download.php Open the Downloads folder |
Let me open the website.
Download the .dat file and the Python script and go to the Downloads folder. |
Copy-paste files | Copy and paste these files from the Downloads folder to Desktop. |
Open naca5012xyz.dat file
|
Open the .dat file.
This file contains the calculated X and Y coordinates for each point that defines the aerofoil.
We need the X, Y and Z coordintes in Gmsh acceptable format.
|
Open Python script | Now open the Python script.
This Python script
|
Open the terminal
|
Now open the Terminal window.
Type cd space Desktop |
Run the python Script
|
Now type python space dat2gmsh.py space the name of the dat file and press Enter.
|
Open naca5012xyz.dat.geo | Open the geo file.
Here nac_lc is the characterstic length which is defined in the first line which is 0.005
Now save this file. |
Open file in gmsh | In the terminal window, type gmsh space name of the geo file and press Enter.
This opens gmsh with the aerofoil. |
Zoom in at the tail
|
Now zoom in, by scrolling at the tail end of the aerofoil.
|
Close gmsh | Close gmsh. |
Open the .geo file with text editor again | Now go back to the .geo file.
|
Add the point | We will add the last point and join it.
Point(1046) = { 1.005, -0.0005, 0.00000, nac_lc}; |
Modify the spline >> save the file
|
Modify the spline as
Spline(1000) = {1000:1046,1000};
|
Open .geo file in gmsh | Open the modified file in Gmsh. We can see that the edge is joint. |
Set up a boundary around the aerofoil | Now we will make a boundary around the aerofoil using points.
Press Enter. |
Enter the points as
(4 3 0) (4 -3 0) (-4 -3 0) (-4 3 0) |
Similarly, add the other points.
(4 3 0) (4 -3 0) (-4 -3 0) (-4 3 0) |
Join the points by Straight lines | Now join the points with a straight line. |
Define the surface | Now click on Plane surface and select the surface boundary. |
Select the aerofoil | Zoom in and select the aerofoil as the hole boundary. |
Press e to end selection | Press e to end selection. You can see we have our surface. |
Extrude the surface
Translate>extrude surface |
Now we will extrude the surface to make it 3D.
Go to Translate >> Extrude Surface. |
A new window will appear asking for cordinates for translation. | |
Enter the coordinates for Z direction
Click on boundary surface |
Since we want to extrude the surface in positive Z direction,
|
Press e to end selection | Press e to end selection. |
Click to move the geometry | Use the left click of the mouse to move the geometry.
|
Close | Close this.
|
Open the geo file | Open the geo file. |
Go to Extrude | Scroll down and go to Extrude. |
Add these lines inside extrude
|
Inside Extrude add these lines :
Recombine;
|
Open the geo file in terminal | Now in the terminal window, open the geo file. |
Generate the mesh | Now we have our geometry, we will do the meshing.
|
Go to Mesh >> click on 1D mesh >> 2D mesh >> 3D mesh | Go to Mesh.
The mesh has been generated. |
You may notice that the mesh is finer near the aerofoil and gets coarser as we move towards the boundary. | |
Refine the mesh | We can also refine the mesh by clicking on the Refine by Splitting parameter in the mesh menu. |
Save your work | Now let us save our work. |
Click on Save as >> Ok >> Ok | Go to File menu and click on Save as.
Note that here msh stands for the file type mesh.
|
Slide : Assignment | This brings us to the end of the tutorial.
As an assignment create another aerofoil by using different dat file for different aerofoil shapes. |
Slide: Summary | In this tutorial we learnt:
|
Slide : 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: 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 contact@spoken-tutorial.org |
Slide: Acknowledgement
|
Spoken Tutorials are part of Talk to a Teacher project,
|
About the contributor | The script was written by Gautam Sharma and this is Rahul Joshi from IIT Bombay signing off. Thanks for joining. |