OpenFOAM/C3/Creating-a-sphere-in-GMSH/English-timed

From Script | Spoken-Tutorial
Jump to: navigation, search
Time Narration
00:01 Hello and welcome to the spoken tutorial on Creating a sphere in GMSH.
00:06 In this tutorial, we will learn to:

Create a circular arc Create ruled surfaces and basic manipulations using the file with extension '.geo'.

00:17 To record this tutorial, I am using:

Ubuntu Linux Operating system 14.04 GMSH version 2.8.5

00:27 As a prerequisite, user should have basic knowledge of creating points. If not, refer to the GMSH spoken tutorials in the OpenFOAM series on this website.
00:38 Let us begin.

The origin of the sphere is at (0,0,0) and the other points of the sphere are as displayed.

00:48 Let us now open GMSH from the terminal. To open the terminal, press Ctrl+Alt+T keys.

Now, type: gmsh space sphere1.geo and press Enter. GMSH is opened.

01:09 I have already created 7 points for the sphere, as shown here. To create the points of the sphere, kindly refer to the tutorial mentioned earlier.
01:19 I'll now demonstrate how to make a circular arc. In GMSH, a circular arc is strictly created less than Pi.
01:27 To create an arc, select Circle arc option in the left-hand-side menu.
01:32 Now, I will select the right-most point as the starting point of the arc. Then, select this point here as the center point. Please note, this is the point with the coordinates (0,0,0).
01:48 And finally, I will select a point on the top-side as the end point of the arc.
01:54 Repeat the process till all arcs are created. Remember to keep the same centre point for all the arcs.
02:02 Now select Ruled surface option from the left-hand side menu, to create the curved surface.Select the bounding edges for the surface, as demonstrated here.
02:20 Notice that the selected edges are now in red colour. Press 'E' on the keyboard to execute this selection.
02:29 You can see that the surface has been created. This is indicated by the dotted line, as shown here.
02:37 Repeat the process and create all 8 surfaces of the sphere. On completion, your sphere should look like this.
02:46 Now, go to the Home folder. Locate and open the file sphere1.geo using gedit Text Editor.
02:54 Information related to the geometrical entities that we just created, are stored here.
03:00 In GMSH, the general syntax is:

Geometrical entity, identification number inside the parenthesis which equals to an expression.

03:11 Here, for point, the expression is

Point, identification number inside the parenthesis, which is usually the next integer starting from 1 equals to X, Y, Z coordinates and the value of the mesh element size inside braces.

03:30 This value is the desired mesh element size. The size of the mesh elements will then be computed by linearly interpolating these values on the initial mesh.
03:41 Let us now replace the numerical value of the points of the sphere, to a variable 's'.
03:49 At the beginning, type "s = 0.1;"

This is for specifying the value of mesh element size of the sphere.

04:01 To capture the boundary layer, we will refine the mesh near the sphere. For this purpose, we shall use the line:

Mesh.CharacteristicLengthFromCurvature = 0.05;

04:15 The syntax: Mesh.CharacteristicLengthFromCurvature will adapt the mesh with respect to the curvature of the geometrical entities.
04:25 For volume creation, we require all the bounding surfaces. For this, at the end of the file, type:

"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.

04:48 Here, the identities are 14, 16, 18, 20, 22, 24, 26 and 28.
05:05 Now, save and close the sphere1.geo file.
05:10 Let's switch to the GMSH interface. In the left-hand-side menu, click on Physical groups. Then Add, and then Surface. Select all the surfaces of the sphere.
05:26 Press 'E' on the keyboard to execute this selection.
05:30 Now, again open sphere1.geo file in the Text Editor. Right at the bottom, notice that a new line of code has been added.
05:42 Replace this number with "sphere", within quotes. This will help us to easily identify the boundaries of the sphere while post processing or otherwise.
05:54 Now save and close the file. This completes this tutorial. Let us summarize.
06:01 In this tutorial, we learnt to:

Create curved lines and surfaces Create a sphere and basic manipulations using the file with extension .geo.

06:13 As an assignment, create a sphere with a larger radius.
06:17 OpenFOAM series is created by the FOSSEE Project, IIT Bombay.
06:21 FOSSEE stands for Free and Open Source Software for Education. This project promotes the use of free and open source software tools. For more details, please visit:

http://fossee.in/

06:33 The video at this link summarizes the Spoken Tutorial project. Please download and watch it.
06:40 The Spoken Tutorial Project team conducts workshops and gives certificates on passing online tests. For more details, please write to us.
06:49 Spoken Tutorial Project is funded by NMEICT, MHRD, Government of India. More information on this mission is available at this link.

This is Pavan Mehta from FOSSEE Project, IIT Bombay, signing off.

07:03 Thanks for joining.

Contributors and Content Editors

PoojaMoolya, Pratik kamble, Sandhya.np14