Difference between revisions of "OpenFOAM/C3/Generating-Mesh-using-snappyHexMesh/English-timed"
From Script | Spoken-Tutorial
(Created page with "{| border=1 | '''Time''' | '''Narration''' |- | 00:01 | Hello and welcome to the spoken tutorial on generating mesh using '''snappyHexMesh in OpenFOAM'''. |- | 00:08 | In th...") |
Sandhya.np14 (Talk | contribs) |
||
Line 5: | Line 5: | ||
|- | |- | ||
| 00:01 | | 00:01 | ||
− | | Hello and welcome to the spoken tutorial on generating mesh using ''' | + | | Hello and welcome to the '''spoken tutorial''' on '''generating mesh using snappyHexMesh''' in '''OpenFOAM'''. |
|- | |- | ||
| 00:08 | | 00:08 | ||
− | | In this tutorial we will learn to | + | | In this tutorial, we will learn to: |
− | * Generate mesh using '''snappyHexMesh''' utility | + | * Generate '''mesh''' using '''snappyHexMesh''' utility |
− | * Simulate temperature distribution of a '''flange'''. | + | * '''Simulate''' temperature distribution of a '''flange'''. |
|- | |- | ||
| 00:18 | | 00:18 | ||
− | | As a pre-requisite, | + | | As a pre-requisite, you should know parameters in '''snappyHexMeshDict''' to generate '''mesh'''. |
− | + | For more details, refer the tutorial on '''introduction to snappyHexMesh''' in '''OpenFOAM'''. | |
− | + | ||
|- | |- | ||
| 00:31 | | 00:31 | ||
− | | To record this tutorial, I am using | + | | To record this tutorial, I am using: |
− | * '''Ubuntu | + | * '''Ubuntu Linux Operating system''' version 12.04. |
* '''OpenFOAM''' version 2.2.2 | * '''OpenFOAM''' version 2.2.2 | ||
* '''ParaView''' version 3.12.0 | * '''ParaView''' version 3.12.0 | ||
Line 29: | Line 28: | ||
| 00:46 | | 00:46 | ||
| We are solving an existing case of '''flange '''from'''laplacianFoam''' in '''basic '''directory. | | We are solving an existing case of '''flange '''from'''laplacianFoam''' in '''basic '''directory. | ||
− | '''laplacianFoam''' | + | ''''laplacianFoam' solver''' solves simple '''Laplace''' equations. |
|- | |- | ||
| 00:58 | | 00:58 | ||
− | | Now let us go to '''home''' folder and click on '''OpenFoam-2.2.2''' folder. | + | | Now, let us go to '''home''' folder and click on '''OpenFoam-2.2.2''' folder. |
|- | |- | ||
Line 41: | Line 40: | ||
|- | |- | ||
| 01:09 | | 01:09 | ||
− | | Then click on '''mesh''' folder | + | | Then click on '''mesh''' folder. |
|- | |- | ||
| 01:12 | | 01:12 | ||
− | | You will see the '''snappyHexMesh '''folder. Click on it | + | | You will see the '''snappyHexMesh '''folder. Click on it. |
|- | |- | ||
| 01:17 | | 01:17 | ||
− | | In this folder, create a new | + | | In this folder, create a new folder by name '''flange_1.''' |
|- | |- | ||
| 01:24 | | 01:24 | ||
− | | Now let's go back two levels. | + | | Now, let's go back two levels. |
|- | |- | ||
| 01:27 | | 01:27 | ||
− | | Open the '''basic''' folder. You will see '''laplacianFoam''' folder.Click on it. | + | | Open the '''basic''' folder. You will see '''laplacianFoam''' folder. Click on it. |
|- | |- | ||
| 01:36 | | 01:36 | ||
− | | You will see '''flange''' case.Click on it to open the folder. | + | | You will see '''flange''' case. Click on it to open the folder. |
|- | |- | ||
| 01:42 | | 01:42 | ||
− | | Copy the three folders '''0, constant and system | + | | Copy the three folders '''0, constant''' and '''system'''. |
|- | |- | ||
| 01:46 | | 01:46 | ||
− | | Now let us go three levels back. | + | | Now, let us go three levels back. '''Paste''' the copied folders inside the '''flange_1 '''folder. |
|- | |- | ||
| 01:56 | | 01:56 | ||
− | | Now let us go one level back. Click on '''flange''' folder.You will see '''constant''' and '''system''' folders. | + | | Now, let us go one level back. Click on '''flange''' folder. You will see '''constant''' and '''system''' folders. |
|- | |- | ||
Line 81: | Line 80: | ||
|- | |- | ||
| 02:08 | | 02:08 | ||
− | | Copy '''snappyHexMeshDict''' and '''surfaceFeatureExtractDict '''from this folder. Now let us go two levels back. | + | | Copy '''snappyHexMeshDict''' and '''surfaceFeatureExtractDict '''from this folder. Now, let us go two levels back. |
|- | |- | ||
| 02:18 | | 02:18 | ||
− | | Paste these two files inside the '''system''' directory of '''flange_1 '''folder. | + | | '''Paste''' these two files inside the '''system''' directory of '''flange_1 '''folder. |
|- | |- | ||
| 02:27 | | 02:27 | ||
− | | Now let us go one level back.Click on '''constant''' folder.In this, create a | + | | Now, let us go one level back. Click on '''constant''' folder. In this, create a folder by name '''triSurface.''' |
|- | |- | ||
| 02:40 | | 02:40 | ||
− | | Now let us go four levels back. | + | | Now, let us go four levels back. |
|- | |- | ||
Line 101: | Line 100: | ||
|- | |- | ||
| 02:48 | | 02:48 | ||
− | | You will see '''geometry''' folder.Now, open the '''geometry''' folder. | + | | You will see '''geometry''' folder. Now, open the '''geometry''' folder. |
|- | |- | ||
| 02:53 | | 02:53 | ||
− | | In this, you will see '''flange.stl.gz''' file.Extract this file. | + | | In this, you will see '''flange.stl.gz''' file. Extract this file. |
|- | |- | ||
| 03:04 | | 03:04 | ||
− | | Give the path of '''triSurface''' folder in '''constant''' directory of '''flange_1''' folder.Now close this. | + | | Give the '''path''' of '''triSurface''' folder in '''constant''' directory of '''flange_1''' folder. Now close this. |
|- | |- | ||
| 03:16 | | 03:16 | ||
− | | Open '''command terminal''' and enter the path for '''flange_1 '''as shown.Type '''cd OpenFOAM-2.2.2/tutorials/mesh/snappyHexMesh/flange_1''' and press '''Enter''' | + | | Open '''command terminal''' and enter the '''path''' for '''flange_1 '''as shown. Type: '''cd space OpenFOAM-2.2.2/tutorials/mesh/snappyHexMesh/flange_1''' and press '''Enter'''. |
|- | |- | ||
| 03:42 | | 03:42 | ||
− | | Now type | + | | Now type "ls" and press '''Enter.''' |
|- | |- | ||
| 03:46 | | 03:46 | ||
− | | There are three folders''' 0, constant '''and '''system'''.Type '''cd space constant''' and press '''Enter.''' | + | | There are three folders''' 0, constant '''and '''system'''. Type '''cd space constant''' and press '''Enter.''' |
|- | |- | ||
| 03:55 | | 03:55 | ||
− | | Now type | + | | Now type "ls" and press '''Enter'''. You will see the '''polymesh''' and '''triSurface''' folders. |
− | Type '''cd space polymesh''' and press '''Enter.''' | + | Type: '''cd space polymesh''' and press '''Enter.''' |
|- | |- | ||
| 04:09 | | 04:09 | ||
− | | Now type | + | | Now type: "ls" and press '''Enter'''. You can see the''' blockMeshDict '''file. |
|- | |- | ||
| 04:16 | | 04:16 | ||
− | |To view the contents of the file, type '''gedit blockMeshDict''' and press '''Enter.''' | + | |To view the contents of the file, type: '''gedit space blockMeshDict''' and press '''Enter.''' |
|- | |- | ||
| 04:26 | | 04:26 | ||
− | | This will open up the '''blockMeshDict''' file.This file contains | + | | This will open up the '''blockMeshDict''' file. This file contains co-ordinates for '''hex mesh '''and '''boundary patches'''. |
|- | |- | ||
| 04:36 | | 04:36 | ||
− | | Now close this and in the | + | | Now close this and in the command terminal, type: '''cd (space) .. (dot) (dot) '''and press '''Enter'''. |
− | Again type '''cd (space) .. (dot) (dot)''' and press '''Enter'''. | + | Again type: '''cd (space) .. (dot) (dot)''' and press '''Enter'''. |
|- | |- | ||
| 04:48 | | 04:48 | ||
− | | Now type '''cd space system''' and press '''Enter.''' | + | | Now, type: '''cd space system''' and press '''Enter.''' |
|- | |- | ||
| 04:53 | | 04:53 | ||
− | | Now type | + | | Now type: "ls" and press '''Enter.''' You can see the''' surfaceFeatureExtractDict '''file. |
|- | |- | ||
| 05:01 | | 05:01 | ||
− | | To view the contents of the file, type '''gedit | + | | To view the contents of the file, type: '''gedit space surfaceFeatureExtractDict '''and press '''Enter''' |
− | (Note that F, E and D here are capital) | + | (Note that F, E and D here are capital). |
|- | |- |
Revision as of 11:05, 5 July 2016
Time | Narration |
00:01 | Hello and welcome to the spoken tutorial on generating mesh using snappyHexMesh in OpenFOAM. |
00:08 | In this tutorial, we will learn to:
|
00:18 | As a pre-requisite, you should know parameters in snappyHexMeshDict to generate mesh.
For more details, refer the tutorial on introduction to snappyHexMesh in OpenFOAM. |
00:31 | To record this tutorial, I am using:
|
00:46 | We are solving an existing case of flange fromlaplacianFoam in basic directory.
'laplacianFoam' solver solves simple Laplace equations. |
00:58 | Now, let us go to home folder and click on OpenFoam-2.2.2 folder. |
01:05 | You will see tutorials. Click on it. |
01:09 | Then click on mesh folder. |
01:12 | You will see the snappyHexMesh folder. Click on it. |
01:17 | In this folder, create a new folder by name flange_1. |
01:24 | Now, let's go back two levels. |
01:27 | Open the basic folder. You will see laplacianFoam folder. Click on it. |
01:36 | You will see flange case. Click on it to open the folder. |
01:42 | Copy the three folders 0, constant and system. |
01:46 | Now, let us go three levels back. Paste the copied folders inside the flange_1 folder. |
01:56 | Now, let us go one level back. Click on flange folder. You will see constant and system folders. |
02:05 | Click on system folder. |
02:08 | Copy snappyHexMeshDict and surfaceFeatureExtractDict from this folder. Now, let us go two levels back. |
02:18 | Paste these two files inside the system directory of flange_1 folder. |
02:27 | Now, let us go one level back. Click on constant folder. In this, create a folder by name triSurface. |
02:40 | Now, let us go four levels back. |
02:44 | Open the resources folder. |
02:48 | You will see geometry folder. Now, open the geometry folder. |
02:53 | In this, you will see flange.stl.gz file. Extract this file. |
03:04 | Give the path of triSurface folder in constant directory of flange_1 folder. Now close this. |
03:16 | Open command terminal and enter the path for flange_1 as shown. Type: cd space OpenFOAM-2.2.2/tutorials/mesh/snappyHexMesh/flange_1 and press Enter. |
03:42 | Now type "ls" and press Enter. |
03:46 | There are three folders 0, constant and system. Type cd space constant and press Enter. |
03:55 | Now type "ls" and press Enter. You will see the polymesh and triSurface folders.
Type: cd space polymesh and press Enter. |
04:09 | Now type: "ls" and press Enter. You can see the blockMeshDict file. |
04:16 | To view the contents of the file, type: gedit space blockMeshDict and press Enter. |
04:26 | This will open up the blockMeshDict file. This file contains co-ordinates for hex mesh and boundary patches. |
04:36 | Now close this and in the command terminal, type: cd (space) .. (dot) (dot) and press Enter.
Again type: cd (space) .. (dot) (dot) and press Enter. |
04:48 | Now, type: cd space system and press Enter. |
04:53 | Now type: "ls" and press Enter. You can see the surfaceFeatureExtractDict file. |
05:01 | To view the contents of the file, type: gedit space surfaceFeatureExtractDict and press Enter
(Note that F, E and D here are capital). |
05:15 | This will open up the surfaceFeatureExtractDict file. |
05:19 | This file contains the information about geometry’s feature edges.The included angle is taken as 150. |
05:29 | Now close this.In command terminal type gedit snappyHexMeshDict and press Enter.
(Note that H, M and D here are capital) |
05:45 | This will open up the snappyHexMeshDict file.This file contains all the instructions about snappyHexMesh. |
05:53 | In snappyHexMeshDict I have already made some changes.I have named flange.stl same as that of STL file, which is in the constant/trisurface directory. |
06:11 | For Explicit feature edge refinement in castellatedMeshControls, I have given the file name flange.eMesh.This file is obtained by surfaceFeatureExtract utility. |
06:23 | The remaining details in the snappyHexMesh have changed as per requirements. |
06:30 | Now close this and in command terminal, type cd (space) .. (dot) (dot) and press Enter. |
06:38 | Type cd space 0 and press Enter. |
06:44 | Type ls and press Enter.You can see the T file. |
06:50 | Now type gedit space T and press Enter. |
06:55 | This will open up the T file.You will see the initial conditions for every patch. |
07:04 | Now, we have to give initial conditions for all patches of flange. |
07:11 | Copy the initial conditions for patch 1 and paste it after patch 4 in the same file T.Now type flange_ before this patch 1. |
07:28 | Similarly, we can do this for patch 2, 3 and 4.Save this T file and close it. |
07:37 | And in the command terminal type cd (space) .. (dot) (dot)and press Enter. |
07:43 | Now, we need to mesh' the geometry.For that in command terminal, type blockMesh and press Enter.'Meshing is done. |
07:55 | Now type surfaceFeatureExtract and press Enter. (Note that F and E here are capital.)
Surface feature extraction is done. |
08:09 | Now type snappyHexMesh -(dash) overwrite and press Enter. - (dash) overwrite command will prevent copying the files from the last time folders. |
08:24 | If not, the resulting meshes will be inside the next time folders, possibly the folders 1, 2 and 3. |
08:31 | Meshing will take some time.Now meshing is completed. |
08:36 | For simulating temperature distribution, we are using laplacianFoam solver. |
08:42 | In the command terminal type laplacianFoam and press Enter.(Note that F here is capital.) |
08:51 | Iterations running will be seen in the terminal window. |
08:55 | Once solving is completed, type paraFoam and press Enter to view the geometry and the results.This will open up the Paraview window. |
09:07 | On the left hand side of Paraview window, click on Apply.The geometry can be seen here. |
09:15 | Scroll down the properties panel of the object inspector menu.Check the box for T in the volume fields and click on Apply. |
09:25 | Now go to the top of Active variable control drop down menu. Change from solid color to capital T, which is the initial condition for the flange. |
09:37 | Now on the top of the Paraview window, you can see the VCR controls. Click on the Play button.Now this is the final result for temperature distribution of a flange. |
09:58 | Toggle on the color legend by clicking on top left of the Active variable control menu.
This is the colour legend for temperature T. |
10:09 | Now let me get back to the slides. |
10:12 | This brings us to the end of the tutorial.As an assignment, |
10:16 | Change some parameters in the snappyHexMeshDict:
|
10:26 | You can also change the temperature in the 0 folder and view the results in Paraview. |
10:33 | In this tutorial we learnt :
|
10:44 | Watch the video available at this URL:http://spoken-tutorial.org/What_is_a_Spoken_Tutorial
It summarizes the Spoken Tutorial project. If you do not have good bandwidth, you can download and watch it. |
10:57 | The Spoken Tutorial Project TeamConducts workshops using spoken tutorials.Gives certificates to those who pass an online test For more details, please write to contact@spoken-tutorial.org |
11:14 | Spoken Tutorials are part of Talk to a Teacher project, It is supported by National Mission on Education through ICT, MHRD, Government of India. More information on the same is available at following URL link http://spoken-tutorial.org/NMEICT-Intro |
11:29 | This is Chaitrali Ghodke from IIT BOMBAY signing off.Thanks for joining. |