Difference between revisions of "OpenFOAM/C3/Unstructured-mesh-generation-using-Gmsh/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
 
(2 intermediate revisions by one other user not shown)
Line 5: Line 5:
 
|-
 
|-
 
| 00:01
 
| 00:01
| Hello and welcome to the spoken tutorial on '''Unstructured Mesh generation using GMSH.'''
+
| Hello and welcome to the '''spoken tutorial''' on '''Unstructured Mesh generation using GMSH.'''
  
 
|-
 
|-
 
| 00:06
 
| 00:06
| In this tutorial we will learn to
+
| In this tutorial, we will learn 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'.
  
 
|-
 
|-
 
| 00:18
 
| 00:18
| To record this tutorial I am using  
+
| To record this tutorial, I am using:
* '''Ubuntu Linux Operating system 14.04'''  
+
'''Ubuntu Linux Operating system''' 14.04  
* '''GMSH version 2.8.5'''
+
'''GMSH''' version 2.8.5
* '''OpenFOAM version 2.4.0'''
+
'''OpenFOAM''' version 2.4.0  
  
 
|-
 
|-
 
| 00:30
 
| 00:30
| This tutorial is a continuation of :
+
| This tutorial is a continuation of  
Creation of sphere using GMSH
+
'''Creation of sphere using GMSH'''.
  
 
|-
 
|-
Line 36: Line 36:
 
|-
 
|-
 
| 00:48
 
| 00:48
| Here is our problem statement.This picture shows the flow direction and boundary faces.
+
| Here is our problem statement. This picture shows the flow direction and '''boundary faces'''.
 
We will now learn how to create an '''unstructured mesh '''using '''GMSH'''.
 
We will now learn how to create an '''unstructured mesh '''using '''GMSH'''.
  
 
|-
 
|-
 
| 01:01
 
| 01:01
| Note that the size of the domain is 45 X 30 X 30, and the radius of the sphere is 1.However, these dimensions can vary from problem to problem.The points for the domain are as shown here.
+
| Note that the size of the domain is 45 X 30 X 30 and the radius of the sphere is 1. However, these dimensions can vary from problem to problem. The points for the domain are as shown here.
  
 
|-
 
|-
 
| 01:18
 
| 01:18
| Let us switch to '''GMSH '''now.Here is the sphere we created earlier.
+
| Let us switch to '''GMSH '''now. Here is the sphere we created earlier.
  
 
|-
 
|-
 
| 01:24
 
| 01:24
| I have also created all the points and lines of the domain.To create the points of the domain, kindly refer to the tutorial mentioned earlier.
+
| I have also created all the points and lines of the domain. To create the points of the domain, kindly refer to the tutorial mentioned earlier.
  
 
|-
 
|-
Line 57: Line 57:
 
|-
 
|-
 
|01:48  
 
|01:48  
| Press '''E''' on the keyboard to execute the selection.On doing so, we can see the dotted lines.
+
| Press '''E''' on the keyboard to execute the selection. On doing so, we can see the dotted lines.
  
 
|-
 
|-
 
| 01:57
 
| 01:57
| Repeat the process until all surfaces are created.
+
| Repeat the process until all the surfaces are created.
  
 
|-
 
|-
 
|02:02  
 
|02:02  
| Now, select the option '''Physical Groups''', then '''Add''' and then '''surface.'''
+
| Now, select the option '''Physical Groups''', then '''Add''' and then '''Surface.'''
  
 
|-
 
|-
Line 73: Line 73:
 
|-
 
|-
 
| 02:17
 
| 02:17
| Select the front face for '''inlet '''and press '''E. '''
+
| Select the front face for the '''inlet '''and press '''E. '''
  
 
|-
 
|-
Line 85: Line 85:
 
|-
 
|-
 
| 02:29
 
| 02:29
| Now, open the '''sphere1.geo '''file in '''gEdit Text Editor.'''Note that there are additions to this file.
+
| Now, open the '''sphere1.geo '''file in '''gEdit Text Editor.''' Note that there are additions to this file.
 
Also note that the identification numbers for the entities is in continuation of the earlier series.
 
Also note that the identification numbers for the entities is in continuation of the earlier series.
  
 
|-
 
|-
 
| 02:47
 
| 02:47
| As done earlier, replace the numerical values.Use the letter''' d''' for the domain''' mesh''' variable.
+
| As done earlier, replace the numerical values. Use the letter '''d''' for the domain''' mesh''' variable.
  
 
|-
 
|-
 
| 02:56
 
| 02:56
| Then, at the beginning of the file type '''d = 0.5;'''
+
| Then, at the beginning of the file, type: "d = 0.5;"
  
 
|-
 
|-
Line 102: Line 102:
 
|-
 
|-
 
| 03:09
 
| 03:09
| The first physical surface, we made in the interface was '''wall'''.So, here, we will replace it with '''wall.'''
+
| The first physical surface, we made in the '''interface''' was '''wall'''. So, here, we will replace it with "wall".
  
 
|-
 
|-
 
| 03:18
 
| 03:18
| The second physical surface, we made in the interface was '''inlet'''.Hence, here, we will replace it with '''inlet.'''
+
| The second physical surface, we made in the interface, was '''inlet'''. Hence, here, we will replace it with "inlet".
  
 
|-
 
|-
 
| 03:27
 
| 03:27
| The third physical surface, we made in the interface was '''outlet.'''So, here, we will replace it with '''outlet.'''
+
| The third physical surface, we made in the interface was '''outlet.'''So, here, we will replace it with "outlet".
  
 
|-
 
|-
 
| 03:36
 
| 03:36
| Now type''', Surface Loop''',''' ID''' which is the next integer in round brackets equals the IDs of all surfaces of the domain in braces which is 43, 45, 47, 49, 51 and 53
+
| Now, type: "Surface Loop", '''ID'''- which is the next integer in round brackets, equals the IDs of all surfaces of the domain, in braces, which is '''43, 45, 47, 49, 51''' and '''53'''.
  
 
|-
 
|-
 
|03:59  
 
|03:59  
| For definition of volume, use '''Volume, ID''' which is the next integer in round brackets equals the IDs of the two surfaces in braces Which is 29 and 57.
+
| For definition of '''volume''', use "Volume", '''ID'''- which is the next integer in round brackets, equals the IDs of the two surfaces in braces which is '''29''' and '''57'''.
  
 
|-
 
|-
 
| 04:20
 
| 04:20
| For physical volume, use '''Physical Volume''', '''ID''' which is the next integer in round bracketsequals the '''IDs''' of the volume in braces which is 58.
+
| For physical volume, use "Physical Volume", '''ID'''- which is the next integer in round brackets, equals the '''IDs''' of the volume in braces which is '''58'''.
  
 
|-
 
|-
 
| 04:35
 
| 04:35
| Save this file and close it. Now, using the terminal reopen '''GMSH '''by''' '''typing:
+
| '''Save''' this file and close it. Now, using the terminal, reopen '''GMSH '''by typing "gmsh sphere1.geo" and press '''Enter'''.
'''gmsh sphere1.geo '''and press '''Enter'''
+
  
 
|-
 
|-
 
| 04:48
 
| 04:48
| In '''GMSH''', a bottom to top approach is followed
+
| In '''GMSH''', a bottom to top approach is followedThat 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
+
  
 
|-
 
|-
Line 150: Line 148:
 
|-
 
|-
 
| 05:14
 
| 05:14
| This may take a while. Watch the progress in the status bar.This shows '''Done '''now.
+
| This may take a while. Watch the progress in the '''status bar'''. This shows '''Done '''now.
  
 
|-
 
|-
 
| 05:22
 
| 05:22
| Once the '''mesh '''is created, we need to optimize it to remove faulty cells.
+
| Once the '''mesh '''is created, we need to optimize it to remove '''faulty cells'''.
  
 
|-
 
|-
 
| 05:27
 
| 05:27
| For optimization click on Modules , then Mesh and then on '''Optimize 3d Netgen '''option
+
| For optimization, click on '''Modules''', then '''Mesh''' and then on '''Optimize 3d (Netgen) '''option.
  
 
|-
 
|-
 
|05:36
 
|05:36
| This may also take a while.Once again, watch the progress in the status bar.
+
| This may also take a while. Once again, watch the progress in the status bar.
  
 
|-
 
|-
 
| 05:43
 
| 05:43
| To save the '''mesh''' go to '''File, Save mesh''' and close the '''terminal.'''
+
| To save the '''mesh''', go to '''File >> Save mesh''' and close the terminal.
  
 
|-
 
|-
 
| 05:51
 
| 05:51
| Create '''OpenFOAM''' '''case''' directory without the '''constant '''folder.In the '''case''' directory, copy the newly created file '''sphere1.msh'''
+
| Create '''OpenFOAM''' '''case''' directory without the '''constant '''folder. In the '''case''' directory, copy the newly created file '''sphere1.msh'''.
  
 
|-
 
|-
 
| 06:01
 
| 06:01
| Using the '''terminal''' window, go to the '''case''' directory of this problem.
+
| Using the terminal window, go to the '''case''' directory of this problem.
  
 
|-
 
|-
 
| 06:06
 
| 06:06
| Once you are in the '''case''' directory,Type: '''gmshToFoam sphere1.msh '''
+
| Once you are in the '''case''' directory, type: "gmshToFoam sphere1.msh" to convert the '''mesh'''.
To convert the '''mesh'''
+
  
 
|-
 
|-
 
| 06:16
 
| 06:16
| Ensure that the same '''boundary names''' are there in the files of folder 0, before proceeding to the next step.
+
| Ensure that the same '''boundary names''' are there in the files of folder 0 (zero), before proceeding to the next step.
  
 
|-
 
|-
 
| 06:24
 
| 06:24
| Let us summarise.  
+
| Let us summarize.  
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'''
+
  
 
|-
 
|-
 
| 06:38
 
| 06:38
| As an assignment,Make refinement in the''' mesh''' by changing the values of:
+
| As an assignment, make refinement in the''' mesh''' by changing the values of '''s, d '''and '''Mesh.CharacteristicLengthFromCurvature'''.
'''s, d '''and '''Mesh.CharacteristicLengthFromCurvature'''
+
  
 
|-
 
|-
 
| 06:49
 
| 06:49
| '''OpenFOAM''' series is created by the '''FOSSEE Project, IIT Bombay'''. '''FOSSEE''' stands for Free and Open Source Software for Education.  
+
| '''OpenFOAM''' series is created by the '''FOSSEE Project, IIT Bombay'''. '''FOSSEE''' stands for '''Free and Open Source Software for Education'''.  
  
 
|-
 
|-
 
| 06:58
 
| 06:58
| This project promotes the use of free and open source software tools. For more details, please visit: [http://fossee.in/ http://fossee.in/]  
+
| This project promotes the use of free and open source software tools. For more details, please visit:
 +
[http://fossee.in/ http://fossee.in/]  
  
 
|-
 
|-
 
| 07:07
 
| 07:07
| The video at this link summarises the Spoken Tutorial project. Please download and watch it.  
+
| The video at this link summarizes the Spoken Tutorial project. Please download and watch it.  
  
 
|-
 
|-
 
| 07:13
 
| 07:13
| The Spoken Tutorial Project Team conducts workshops and gives certificates on passing online tests. For more details, please write to us.  
+
| The Spoken Tutorial Project team conducts workshops and gives certificates on passing online tests. For more details, please write to us.  
  
 
|-
 
|-
 
| 07:22
 
| 07:22
| 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. Thanks for joining.
+
| 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. Thanks for joining.
  
 
|}
 
|}

Latest revision as of 18:43, 20 February 2017

Time Narration
00:01 Hello and welcome to the spoken tutorial on Unstructured Mesh generation using GMSH.
00:06 In this tutorial, we will learn to:

Create an unstructured mesh in GMSH Create plane surfaces Basic manipulations using the file with extension '.geo'.

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

Ubuntu Linux Operating system 14.04 GMSH version 2.8.5 OpenFOAM version 2.4.0

00:30 This tutorial is a continuation of

Creation of sphere using GMSH.

00:35 We have already learnt to create a sphere using GMSH earlier.
00:40 If you don't know how to do so, refer to the GMSH spoken tutorials in the OpenFOAM series on this website.
00:48 Here is our problem statement. This picture shows the flow direction and boundary faces.

We will now learn how to create an unstructured mesh using GMSH.

01:01 Note that the size of the domain is 45 X 30 X 30 and the radius of the sphere is 1. However, these dimensions can vary from problem to problem. The points for the domain are as shown here.
01:18 Let us switch to GMSH now. Here is the sphere we created earlier.
01:24 I have also created all the points and lines of the domain. To create the points of the domain, kindly refer to the tutorial mentioned earlier.
01:36 Now, select the option plane surface. Then select the respective edges for the surface. The selection will be displayed in red.
01:48 Press E on the keyboard to execute the selection. On doing so, we can see the dotted lines.
01:57 Repeat the process until all the surfaces are created.
02:02 Now, select the option Physical Groups, then Add and then Surface.
02:10 Now, select these four faces for the wall and press E on the keyboard.
02:17 Select the front face for the inlet and press E.
02:21 Select the back face for outlet and press E.
02:26 Now close GMSH.
02:29 Now, open the sphere1.geo file in gEdit Text Editor. Note that there are additions to this file.

Also note that the identification numbers for the entities is in continuation of the earlier series.

02:47 As done earlier, replace the numerical values. Use the letter d for the domain mesh variable.
02:56 Then, at the beginning of the file, type: "d = 0.5;"
03:02 To name the boundaries, change the numerical value with your desired name, as demonstrated.
03:09 The first physical surface, we made in the interface was wall. So, here, we will replace it with "wall".
03:18 The second physical surface, we made in the interface, was inlet. Hence, here, we will replace it with "inlet".
03:27 The third physical surface, we made in the interface was outlet.So, here, we will replace it with "outlet".
03:36 Now, type: "Surface Loop", ID- which is the next integer in round brackets, equals the IDs of all surfaces of the domain, in braces, which is 43, 45, 47, 49, 51 and 53.
03:59 For definition of volume, use "Volume", ID- which is the next integer in round brackets, equals the IDs of the two surfaces in braces which is 29 and 57.
04:20 For physical volume, use "Physical Volume", ID- which is the next integer in round brackets, equals the IDs of the volume in braces which is 58.
04:35 Save this file and close it. Now, using the terminal, reopen GMSH by typing "gmsh sphere1.geo" and press Enter.
04:48 In GMSH, a bottom to top approach is followed. That is, first 1D mesh is created.

Using 1D mesh, 2D mesh is created. Using 2D mesh, 3D mesh is created.

05:02 For 1D mesh creation, press F1 key.
05:06 For 2D mesh creation, press F2 key.
05:10 For 3D mesh creation, press F3 key.
05:14 This may take a while. Watch the progress in the status bar. This shows Done now.
05:22 Once the mesh is created, we need to optimize it to remove faulty cells.
05:27 For optimization, click on Modules, then Mesh and then on Optimize 3d (Netgen) option.
05:36 This may also take a while. Once again, watch the progress in the status bar.
05:43 To save the mesh, go to File >> Save mesh and close the terminal.
05:51 Create OpenFOAM case directory without the constant folder. In the case directory, copy the newly created file sphere1.msh.
06:01 Using the terminal window, go to the case directory of this problem.
06:06 Once you are in the case directory, type: "gmshToFoam sphere1.msh" to convert the mesh.
06:16 Ensure that the same boundary names are there in the files of folder 0 (zero), before proceeding to the next step.
06:24 Let us summarize.

In this tutorial, we have learnt to: Create an unstructured mesh in GMSH Create plane surfaces Basic manipulations using the file with extension .geo.

06:38 As an assignment, make refinement in the mesh by changing the values of s, d and Mesh.CharacteristicLengthFromCurvature.
06:49 OpenFOAM series is created by the FOSSEE Project, IIT Bombay. FOSSEE stands for Free and Open Source Software for Education.
06:58 This project promotes the use of free and open source software tools. For more details, please visit:

http://fossee.in/

07:07 The video at this link summarizes the Spoken Tutorial project. Please download and watch it.
07:13 The Spoken Tutorial Project team conducts workshops and gives certificates on passing online tests. For more details, please write to us.
07:22 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. Thanks for joining.

Contributors and Content Editors

PoojaMoolya, Pratik kamble, Sandhya.np14