Difference between revisions of "OpenFOAM/C3/Unstructured-mesh-generation-using-Gmsh/English"
Mehtapavanp (Talk | contribs) (Created page with "Tutorial: Unstructured Mesh generation using GMSH Script and Narration: Pavan Mehta Keywords: Video tutorial, CFD, GMSH, unstructured mesh, curved lines, circular arc, rul...") |
Nancyvarkey (Talk | contribs) |
||
Line 24: | Line 24: | ||
* Create plane''' surfaces''' | * Create plane''' surfaces''' | ||
* Basic manipulations using the file with extension '''.geo''' | * Basic manipulations using the file with extension '''.geo''' | ||
− | |||
− | |||
|- | |- | ||
Line 34: | Line 32: | ||
* '''GMSH version 2.8.5''' | * '''GMSH version 2.8.5''' | ||
* '''OpenFOAM version 2.4.0''' | * '''OpenFOAM version 2.4.0''' | ||
− | |||
− | |||
|- | |- | ||
Line 195: | Line 191: | ||
− | Which is 29 and 56 | + | Which is 29 and 56. |
|- | |- | ||
Line 205: | Line 201: | ||
− | equals the IDs of the volume in braces | + | equals the '''IDs''' of the volume in braces |
− | which is 58 | + | which is 58. |
|- | |- | ||
Line 216: | Line 212: | ||
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.0382in;"| In the terminal >> type '''gmsh sphere1.geo''' | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.0382in;"| In the terminal >> type '''gmsh sphere1.geo''' | ||
− | |||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.0382in;"| Now, using the terminal reopen '''GMSH '''by''' '''typing: | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.0382in;"| Now, using the terminal reopen '''GMSH '''by''' '''typing: | ||
− | |||
'''gmsh sphere1.geo '''and press '''Enter''' | '''gmsh sphere1.geo '''and press '''Enter''' | ||
Line 226: | Line 220: | ||
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.0382in;"| Narration | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.0382in;"| Narration | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.0382in;"| In '''GMSH''', a bottom to top | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.0382in;"| In '''GMSH''', a bottom to top approach is followed |
− | + | ||
* That is, first '''1D mesh''' is created | * That is, first '''1D mesh''' is created | ||
* Using '''1D mesh, 2D mesh '''is created | * Using '''1D mesh, 2D mesh '''is created | ||
* Using '''2D mesh, 3D mesh''' is created | * Using '''2D mesh, 3D mesh''' is created | ||
− | |||
− | |||
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.0382in;"| 1D mesh creation, by pressing F1 key | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.0382in;"| 1D mesh creation, by pressing F1 key | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.0382in;"| For 1D mesh creation, press '''F1''' key. | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.0382in;"| For '''1D mesh''' creation, press '''F1''' key. |
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.0382in;"| 2D mesh creation, by pressing F2 key | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.0382in;"| 2D mesh creation, by pressing F2 key | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.0382in;"| For 2D mesh creation, press '''F2''' key. | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.0382in;"| For '''2D mesh''' creation, press '''F2''' key. |
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.0382in;"| 3D mesh creation, by pressing F3 key | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.0382in;"| 3D mesh creation, by pressing F3 key | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.0382in;"| For 3D mesh creation, press '''F3''' key. | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.0382in;"| For '''3D mesh''' creation, press '''F3''' key. |
|- | |- | ||
Line 273: | Line 264: | ||
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.0382in;"| Saving mesh and closing terminal | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.0382in;"| Saving mesh and closing terminal | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.0382in;"| To save the '''mesh''' go to | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.0382in;"| To save the '''mesh''' go to '''File, Save mesh''' and close the '''terminal.''' |
|- | |- | ||
Line 303: | Line 294: | ||
In this tutorial we have learnt to: | In this tutorial we have learnt to: | ||
− | |||
* Create an '''unstructured mesh '''in '''GMSH''' | * Create an '''unstructured mesh '''in '''GMSH''' | ||
* Create plane''' surfaces''' | * Create plane''' surfaces''' | ||
* Basic manipulations using the file with''' '''extension''' .geo''' | * Basic manipulations using the file with''' '''extension''' .geo''' | ||
− | |||
− | |||
|- | |- |
Latest revision as of 16:14, 18 August 2015
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:
gmsh sphere1.geo and press Enter |
Narration | In GMSH, a bottom to top approach is 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. |