Difference between revisions of "OpenFOAM/C3/Creating-a-sphere-in-GMSH/English"
Mehtapavanp (Talk | contribs) |
Nancyvarkey (Talk | contribs) |
||
(One intermediate revision by one other user not shown) | |||
Line 22: | Line 22: | ||
* Create '''ruled surfaces''' | * Create '''ruled surfaces''' | ||
* and basic manipulations using the file with extension '''.geo''' | * and basic manipulations using the file with extension '''.geo''' | ||
− | |||
− | |||
|- | |- | ||
Line 31: | Line 29: | ||
* '''Ubuntu Linux Operating system 14.04''' | * '''Ubuntu Linux Operating system 14.04''' | ||
* '''GMSH version 2.8.5''' | * '''GMSH version 2.8.5''' | ||
− | |||
− | |||
|- | |- | ||
Line 44: | Line 40: | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.0382in;"| Slide 5: Points for sphere | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.0382in;"| Slide 5: Points for sphere | ||
| 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;"| Let us begin. | | 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;"| Let us begin. | ||
− | |||
* The origin of the sphere is at (0,0,0). | * The origin of the sphere is at (0,0,0). | ||
* And the other points of the sphere are as displayed. | * And the other points of the sphere are as displayed. | ||
− | |||
− | |||
|- | |- | ||
Line 62: | Line 55: | ||
− | Now type''' gmsh sphere1.geo''' | + | Now type''' gmsh sphere1.geo''' and press''' Enter ''' |
− | + | ||
− | + | ||
− | and | + | |
Line 150: | Line 140: | ||
|- | |- | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.0382in;"| | + | | 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;"| Information related to the geometrical entities that we just created, are stored here. | | 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;"| Information related to the geometrical entities that we just created, are stored here. | ||
Line 157: | Line 147: | ||
| 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, '''the general syntax is | | 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, '''the general syntax is | ||
− | + | *'''Geometrical entity, identification number''' inside the parenthesis | |
− | '''Geometrical entity, identification number''' inside the parenthesis | + | *which equals to an expression. |
− | + | ||
− | + | ||
− | which equals to an expression. | + | |
|- | |- | ||
Line 170: | Line 157: | ||
| 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;"| Here, for point, the expression is | | 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;"| Here, for point, the expression is | ||
− | + | *'''Point, identification number '''inside parenthesis, which is usually the next integer starting from 1 | |
− | '''Point, identification number '''inside parenthesis, which is usually the next integer starting from 1 | + | *equals to X,Y,Z coordinates and the value of '''mesh element size '''inside braces. |
− | + | ||
− | + | ||
− | equals to X,Y,Z coordinates and the value of '''mesh element size '''inside braces. | + | |
|- | |- | ||
Line 220: | Line 204: | ||
For this, at the end of the file, type | For this, at the end of the file, type | ||
− | '''Surface Loop '''followed by its identity | + | *'''Surface Loop '''followed by its identity |
− | + | *which is the next integer inside parenthesis | |
− | + | *which equals the identities of all the surfaces of the sphere within braces. | |
− | which is the next integer inside parenthesis | + | |
− | + | ||
− | + | ||
− | + | ||
Line 242: | Line 222: | ||
− | In the left-hand-side menu, click on '''Physical Groups''', then '''Add''', and then '''Surface ''' | + | In the left-hand-side menu, click on '''Physical Groups''', then '''Add''', and then '''Surface'''. |
Line 278: | Line 258: | ||
* Create a sphere and | * Create a sphere and | ||
* and basic manipulations using the file with extension '''.geo''' | * and basic manipulations using the file with extension '''.geo''' | ||
− | |||
− | |||
|- | |- |
Latest revision as of 08:42, 10 August 2015
Tutorial: Creating a sphere in 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 Creating a sphere in 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 | As a pre-requisite, user should have basic knowledge of creating points.
|
Slide 5: Points for sphere | Let us begin.
|
Switch to terminal
|
Let us now open GMSH from the terminal.
|
Switch to GMSH's interface | I have already created 7 points for the sphere, as shown here.
|
In GMSH's interface, selecting circle arc option | I'll now demonstrate how to make a circular arc.
|
Select circle arc in LHS menu | To create an arc, select circle arc option in the left-hand-side menu. |
Creating curved lines by selecting 1st , 2nd and then 3rd point | Now, I will select the right-most point as the starting point of the arc.
|
Pause recording and create all the arcs and complete the sphere. | Repeat the process till all arcs are created.
|
Selecting the option ruled surface
|
Now select ruled surface option from the left-hand side menu, to create the curved surface.
|
Press E
|
Press E on the keyboard to execute this selection.
|
Pause recording and create all the surfaces
|
Repeat the process and create all 8 surfaces of the sphere. |
Show the completed sphere | On completion, your sphere should look like this. |
Going to home folder and opening sphere1.geo text file, by double clicking | Now, go to the Home folder.
|
Narration | Information related to the geometrical entities that we just created, are stored here. |
Explaining general syntax of GMSH | In GMSH, the general syntax is
|
Explaining syntax of point
|
Here, for point, the expression is
|
Explaining further on syntax of point | This value is the desired mesh element size.
|
Replacing the numerical value to a variable, s | Let us now replace the numerical value of the points of the sphere, to a variable, s. |
Type s=0.1; at the beginning of the document | At the beginning, type s = 0.1;
|
Explaining the necessity of refinement
|
To capture the boundary layer, we will refine the mesh near the sphere.
Mesh.CharacteristicLengthFromCurvature = 0.05; |
Explaining the syntax Mesh.CharacteristicLenghtFromCurvature | The syntax Mesh.CharacteristicLengthFromCurvature
|
Type Surface Loop | For volume creation, we require all the bounding surfaces.
|
Saving and Closing the text file | Now save and close the sphere1.geo file. |
Switch to GMSH's interface
Select Physical Groups >> Add >> Surface option --> select all the surfaces --> Press E |
Let's switch to the GMSH interface.
|
Double-click to open sphere1.geo file >> go to the last line of the file. | Now, again open sphere1.geo file in the Text Editor.
Right at the bottom, notice that a new line of code has been added. |
Replace this number with sphere in double inverted commas and explaining it's importance | Replace this number with sphere within quotes.
|
Save and close the file. | Now save and close the file. |
Narration | This completes this tutorial. Let us summarize. |
Slide 6: Summary | In this tutorial we learnt to
|
Slide 7: Assignment | As an assignment,
Create a sphere with a larger radius. |
Slide 8: About FOSSEE | OpenFOAM series is created by the FOSSEE Project, IIT Bombay.
|
Slide 9: About the Spoken tutorial project
|
The video at this link summarises the Spoken Tutorial project.
Please download and watch it. |
Slide 10:
Spoken tutorials Workshops
|
The Spoken Tutorial Project Team conducts workshops and gives certificates on passing online tests.
For more details, please write to us. |
Slide 11: 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. |