OpenFOAM/C3/Installing-and-running-Gmsh/English-timed

From Script | Spoken-Tutorial
Jump to: navigation, search
Time Narration
00:01 Hello and welcome to the spoken tutorial on Installing and running Gmsh.
00:08 In this tutorial, we will learn how to:

Install and run Gmsh and Create a basic geometry in Gmsh.

00:18 As a prerequisite, the user should have basic knowledge about mesh.
00:24 To record this tutorial, I am using:

Ubuntu Linux Operating system version 12.04 and Gmsh version 2.8.5

00:34 Let me introduce you to Gmsh. Gmsh is an automatic 3-D finite element mesh generator with built-in pre and post-processing facilities.

It's an open-source software.

00:51 It is advantageous creating complex geometries in gmsh than blockmesh utility of OpenFOAM like blades, aerofoil.

OpenFOAM supports importing mesh from third party meshing software like Gmsh.

01:08 Let me show you how to install Gmsh.

Gmsh can be installed using Synaptic Package Manager.

01:15 Let me open Synaptic Package Manager for you. It will ask for your password. Type in your password.
01:25 In the search box, type "gmsh" and click on the checkbox in front of gmsh. And, click on Mark for installation. Click on Apply.
01:40 Again, click Apply. This might take some time. Your Gmsh is now installed.
01:50 Alternately, you can also download Gmsh from the Gmsh website. Let me open the browser for you.
01:59 In the address bar, type: http://geuz.org/gmsh/ and press Enter.
02:09 Scroll down to the Download and select the current stable release according to your operating system. I will select Linux 64-bit. Click on Save file and press OK.
02:26 After finishing your download, go to the Downloads folder.
02:31 Here you can see the tar file. Extract this file. A new folder will be created.
02:41 Open the folder. Go to bin and click on the gmsh icon.
02:49 You can see the Gmsh start screen. Now we will create a cube using Gmsh.
02:57 Here you can see the cube with sides equal to one unit.
03:03 Let me switch back to Gmsh. On the left hand side, you can see the module tree with Geometry, Mesh and Solver.
03:14 Go to Geometry >> Elementary entities. Click on Add. Click on Point. A new window will appear.
03:25 Enter the X, Y and Z coordinates starting with (0 0 0) and press Enter.
03:34 Enter the second coordinate as (1 0 0) and press Enter, third coordinate as (1 1 0) and press Enter, fourth coordinate as (0 1 0) and press Enter.
03:53 Similarly, add the coordinates for the positive z-direction starting with point (0 0 1) and press Enter. Enter the remaining three coordinates and close the window.
04:10 I have entered all the eight coordinates. Use the left mouse click to move the points.
04:18 You can see all the 8 coordinates as points.
04:23 Now, click on Straight line. It will ask for a start point. Select the first point.
04:33 It will ask for an end point. Select the end point.
04:37 A line will be drawn between the two points. Similarly, join all the points.
04:45 Press 'q' to abort.
04:49 Now, we will define the faces of the cube. Click on plane surface. It will ask for the surface boundary.
04:59 Select the edges of the bottom face first. You will notice that the edge we select, turns red in color.
05:08 It will ask for hole boundaries, if any. Since we do not have any hole in the boundary, press 'e' to end the selection.
05:19 You will notice that the face will appear with dashed centre lines. Now define the top face.
05:29 Similarly, define the remaining faces. I have defined all the faces. Press 'q' to abort.
05:39 Now, we will define the volume of the cube. It will ask for the volume boundary.
05:47 Select any of the surface boundary and press 'e' to end selection.
05:55 A yellow dot appears at the centre of the cube which represents the volume. Press q to abort.
06:04 Now, we will define the physical groups which will be used in exporting the geometry to OpenFOAM.
06:13 Go to Physical Groups >> Add and click on Surface.
06:19 Select the front surface first and press e to end the selection. Select the back surface and press e to end the selection.
06:31 Similarly, select the remaining surfaces. I have selected all the surfaces. Press q to abort.
06:41 Now, we'll define the physical volume. Click on Volume. It will ask for volume. Click on the yellow dot at the centre of the cube.
06:53 The yellow dot will turn red in color. Press e to end selection. Press q to abort.
07:02 Our cube is complete. Let us save our work.
07:07 Go to File >> Save as. We will name our file as cube.geo.
07:15 Note that here "geo" stands for geometry. Click Ok. Again click Ok.
07:23 This brings us to the end of this tutorial. As an assignment, create other simple geometry in Gmsh like cylinder, sphere.
07:35 In this tutorial We:Learnt to install and run Gmsh using Synaptic Package Manager and website. Created a cube using Gmsh.
07:48 This video summarizes the Spoken Tutorial project. If you do not have good bandwidth, you can download and watch it.
07:56 We conduct workshops using spoken tutorials and give certificates. Please contact us at this URL:contact@spoken-tutorial.org

Spoken Tutorial is funded by NMEICT, MHRD, Government of India.

08:11 The script was created by Gautam Sharma and this is Rahul Joshi from IIT Bombay, signing off. Thanks for joining.

Contributors and Content Editors

PoojaMoolya, Pratik kamble, Sandhya.np14