OpenFOAM/C3/Unstructured-mesh-generation-using-Gmsh/English
Tutorial: Unstructured Mesh generation using GMSH
Script and Narration: Pavan Mehta
Keywords: Video tutorial, CFD, GMSH, unstructured mesh, curved lines, circular arc, ruled surface
|
|
Slide 1 | Hello and welcome to the spoken tutorial on Unstructured Mesh generation using GMSH. |
Slide 2: Learning Objective | In this tutorial we will learn to
|
Slide 3: System requirement | To record this tutorial I am using
|
Slide 4: Pre-requisite | This tutorial is a continuation of:
Creation of sphere using GMSH
|
Slide 5: Sphere Geometry and Domain | Here is our problem statement.
|
Slide 6: Points for Domain (slide) | Note that the size of the domain is 45 X 30 X 30, and the radius of the sphere is 1.
|
Narration | Let us switch to GMSH now.
|
Pause recording and create the points and lines of the domain. | I have also created all the points and lines of the domain.
|
Selecting the option plane surface
|
Now, select the option plane surface.
|
Press E | Press E on the keyboard to execute the selection.
|
Pause recording and create all the surfaces. | Repeat the process until all surfaces are created. |
Select Physical Groups >> Add >> surface | Now, select the option Physical Groups, then Add and then surface. |
Select the four faces for wall >> Press E | Now, select these four faces for the wall and press E on the keyboard. |
Select the face for inlet >> Press E | Select the front face for inlet and press E. |
Select the face for outlet >> Press E | Select the back face for outlet and press E. |
Close GMSH | Now close GMSH. |
Open sphere1.geo file >> go to the bottom | Now, open the sphere1.geo file in gEdit Text Editor.
|
Replace the numerical values to a variable d | As done earlier, replace the numerical values.
|
Typing d = 0.5; at the beginning of the document | Then, at the beginning of the file type
d = 0.5; |
Narration | To name the boundaries, change the numerical value with your desired name, as demonstrated. |
Replacing the integer with “wall” | The first physical surface, we made in the interface was wall.
|
Replacing the integer with “inlet” | The second physical surface, we made in the interface was inlet.
|
Replacing the integer with “outlet” | The third physical surface, we made in the interface was outlet.
|
Typing Surface Loop()={};
|
Now type, Surface Loop, ID which is the next integer in round brackets
which is 43, 45, 47, 49, 51 and 53 |
Typing Volume()={};
|
For definition of volume, use Volume, ID which is the next integer in round brackets
|
Typing Physical Volume();
|
For physical volume, use Physical Volume, ID which is the next integer in round brackets
|
Save and close sphere1.geo | Save this file and close it. |
In the terminal >> type gmsh sphere1.geo
|
Now, using the terminal reopen GMSH by typing:
|
Narration | In GMSH, a bottom to top approachis followed
|
1D mesh creation, by pressing F1 key | For 1D mesh creation, press F1 key. |
2D mesh creation, by pressing F2 key | For 2D mesh creation, press F2 key. |
3D mesh creation, by pressing F3 key | For 3D mesh creation, press F3 key. |
Point to the status bar. | This may take a while. Watch the progress in the status bar.
|
Once the mesh is created, we need to optimize it
to remove faulty cells. | |
Optimizing mesh using Optimize 3d Netgen option | For optimization click on Modules , then Mesh and then on Optimize 3d Netgen option |
Point to the status bar. | This may also take a while.
|
Saving mesh and closing terminal | To save the mesh go to file, save mesh and close the terminal. |
Slide 7: Importing mesh in OpenFOAM | Create OpenFOAM case directory without the constant folder
|
Open a new terminal >> type gmshToFoam sphere.msh | Once you are in the case directory,
|
Slide 8: Summary | Let us summarise.
In this tutorial we have learnt to:
|
Slide 9: Assignment | As an assignment,
|
Slide 10: About FOSSEE | OpenFOAM series is created by the FOSSEE Project, IIT Bombay.
|
Slide 11: About Spoken tutorials
|
The video at this link summarises the Spoken Tutorial project.
Please download and watch it. |
Slide 12:
About Spoken tutorials
|
The Spoken Tutorial Project Team conducts workshops and gives certificates on passing online tests.
For more details, please write to us. |
Slide 13: Acknowledgement | Spoken Tutorial Project is funded by NMEICT, MHRD, Government of India.
More information on this Mission is available at this link.
Thanks for joining. |