Difference between revisions of "OpenFOAM/C3/Generating-Mesh-using-snappyHexMesh/English"
(Created page with 'Tutorial: Generating mesh using '''snappyHexMesh in OpenFOAM'''. Script and Narration: Chaitrali Ghodke. Keywords: Import STL file, background hex mesh, snappyHexMeshDict. …') |
Nancyvarkey (Talk | contribs) |
||
Line 114: | Line 114: | ||
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Select '''0''', '''constant '''and '''system '''folders | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Select '''0''', '''constant '''and '''system '''folders | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Copy the | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Copy the three folders '''0, constant and system.''' |
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Go back to '''mesh''' >> '''snappyHexMesh '''>> '''flange_1 '''folder | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Go back to '''mesh''' >> '''snappyHexMesh '''>> '''flange_1 '''folder | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now let us go three levels back. |
|- | |- | ||
Line 158: | Line 158: | ||
In this, create a '''folder''' by name '''triSurface.''' | In this, create a '''folder''' by name '''triSurface.''' | ||
− | |||
− | |||
|- | |- | ||
Line 195: | Line 193: | ||
− | cd OpenFOAM-2.2.2/tutorials/mesh/snappyHexMesh/flange_1 | + | '''cd OpenFOAM-2.2.2/tutorials/mesh/snappyHexMesh/flange_1''' |
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Open '''command terminal''' and enter the path for '''flange_1 '''as shown. | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Open '''command terminal''' and enter the path for '''flange_1 '''as shown. | ||
+ | |||
+ | Type '''cd OpenFOAM-2.2.2/tutorials/mesh/snappyHexMesh/flange_1''' | ||
|- | |- | ||
Line 204: | Line 204: | ||
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type '''cd constant''' | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type '''cd constant''' | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| There are three folders''' 0 | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| There are three folders''' 0, constant '''and '''system'''. |
− | Type '''cd constant''' and press '''Enter.''' | + | Type '''cd space constant''' and press '''Enter.''' |
|- | |- | ||
Line 218: | Line 218: | ||
− | Type '''cd polymesh''' and press '''Enter.''' | + | Type '''cd space polymesh''' and press '''Enter.''' |
|- | |- | ||
Line 229: | Line 229: | ||
− | To view the contents of the file type | + | To view the contents of the file, type '''gedit blockMeshDict''' |
− | + | ||
− | '''gedit blockMeshDict''' | + | |
and press '''Enter.''' | and press '''Enter.''' | ||
Line 240: | Line 238: | ||
− | This file contains '''co-ordinates '''for '''hex mesh '''and boundary patches. | + | This file contains '''co-ordinates '''for '''hex mesh '''and '''boundary patches'''. |
|- | |- | ||
Line 254: | Line 252: | ||
− | Again type cd (space) .. (dot) (dot) and press '''Enter'''. | + | Again type '''cd (space) .. (dot) (dot)''' and press '''Enter'''. |
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type '''cd system''' | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type '''cd system''' | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now type | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now type '''cd space system''' and press '''Enter.''' |
|- | |- | ||
Line 271: | Line 269: | ||
'''gedit''' '''surfaceFeatureExtractDict ''' | '''gedit''' '''surfaceFeatureExtractDict ''' | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| To view the contents of the file type | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| To view the contents of the file, type |
'''gedit''' '''surfaceFeatureExtractDict ''' | '''gedit''' '''surfaceFeatureExtractDict ''' | ||
Line 323: | Line 321: | ||
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Give the file name for explicit feature edge refinement. | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Give the file name for explicit feature edge refinement. | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| For | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| For '''Explicit feature edge refinement''' in '''castellatedMeshControls,''' I have given the file name '''flange.eMesh'''. |
Line 333: | Line 331: | ||
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type '''cd ..''' | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type '''cd ..''' | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now close this and in '''command terminal | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now close this and in '''command terminal, type |
'''cd (space) .. (dot) (dot) '''and press '''Enter.''' | '''cd (space) .. (dot) (dot) '''and press '''Enter.''' | ||
Line 339: | Line 337: | ||
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type '''cd 0''' | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type '''cd 0''' | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Type '''cd 0''' and press '''Enter.''' | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Type '''cd space 0''' and press '''Enter.''' |
|- | |- | ||
Line 350: | Line 348: | ||
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type '''gedit T''' | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type '''gedit T''' | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now type '''gedit T''' and press '''Enter.''' | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now type '''gedit space T''' and press '''Enter.''' |
|- | |- | ||
Line 357: | Line 355: | ||
− | You will see the initial conditions for every patch. | + | You will see the initial conditions for every '''patch'''. |
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now we have to give initial conditions for all patches of '''flange'''. | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now, we have to give initial conditions for all '''patches''' of '''flange'''. |
|- | |- | ||
Line 387: | Line 385: | ||
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| On the terminal >> type blockMesh | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| On the terminal >> type blockMesh | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now, we need to mesh the geometry. | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now, we need to '''mesh''' the '''geometry'''. |
− | For that in '''command terminal''' type '''blockMesh''' and press '''Enter.''' | + | For that in '''command terminal,''' type '''blockMesh''' and press '''Enter.''' |
− | Meshing is done. | + | '''Meshing''' is done. |
|- | |- | ||
Line 405: | Line 403: | ||
− | Surface feature extraction is done. | + | '''Surface feature extraction''' is done. |
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type '''snappyHexMesh -overwrite''' | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type '''snappyHexMesh -overwrite''' | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now type '''snappyHexMesh -overwrite''' and press '''Enter.''' | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now type '''snappyHexMesh -(dash) overwrite''' and press '''Enter.''' |
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| '''-overwrite '''command will prevent copying the files from the last time folders. | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| '''- (dash) overwrite '''command will prevent copying the files from the last time folders. |
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| If not, the resulting meshes will be inside the next time folders, possibly the folders '''1''', '''2''' and '''3'''. | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| If not, the resulting '''meshes''' will be inside the next time folders, possibly the folders '''1''', '''2''' and '''3'''. |
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Meshing will take some time. | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| '''Meshing''' will take some time. |
<nowiki><<PAUSE>></nowiki> | <nowiki><<PAUSE>></nowiki> | ||
− | Now meshing is completed. | + | Now '''meshing''' is completed. |
|- | |- | ||
Line 443: | Line 441: | ||
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type '''paraFoam''' | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Type '''paraFoam''' | ||
− | |||
− | |||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Once solving is completed, type '''paraFoam''' and press '''Enter '''to view the geometry and the results. | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Once solving is completed, type '''paraFoam''' and press '''Enter '''to view the geometry and the results. | ||
− | This will open up the ''' | + | This will open up the '''Paraview''' window. |
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Click on Apply button | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Click on Apply button | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| On the left hand side of ''' | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| On the left hand side of '''Paraview''' window, click on '''Apply.''' |
Line 466: | Line 462: | ||
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| In the drop down menu change from solid color to T | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| In the drop down menu change from solid color to T | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now go to the top of | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now go to the top of '''Active variable control''' drop down menu. |
Line 473: | Line 469: | ||
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Click on the play button | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Click on the play button | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now on the top of the ''' | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Now on the top of the '''Paraview '''window, you can see the '''VCR''' controls. |
Line 483: | Line 479: | ||
|- | |- | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Toggle on the color legend | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| Toggle on the color legend | ||
− | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Toggle on the color legend by clicking on top left of the | + | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Toggle on the color legend by clicking on top left of the '''Active variable control''' menu. |
This is the colour legend for temperature '''T'''. | This is the colour legend for temperature '''T'''. | ||
Line 500: | Line 496: | ||
Change some parameters in the '''snappyHexMeshDict''': | Change some parameters in the '''snappyHexMeshDict''': | ||
− | * Refinement parameters | + | * '''Refinement''' parameters |
− | * locationInMesh co-ordinates | + | * '''locationInMesh co-ordinates''' |
− | * snapControls, etc. | + | * '''snapControls''', etc. |
− | You can also change the temperature in the '''0''' folder and view the results in ''' | + | You can also change the temperature in the '''0''' folder and view the results in '''Paraview'''. |
|- | |- | ||
Line 513: | Line 509: | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| In this tutorial we learnt : | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| In this tutorial we learnt : | ||
− | * To generate mesh by '''snappyHexMesh '''utility in | + | * To generate mesh by '''snappyHexMesh '''utility in '''OpenFoam'''. |
* Simulate temperature distribution of a '''flange'''. | * Simulate temperature distribution of a '''flange'''. | ||
Latest revision as of 11:59, 11 July 2014
Tutorial: Generating mesh using snappyHexMesh in OpenFOAM.
Script and Narration: Chaitrali Ghodke.
Keywords: Import STL file, background hex mesh, snappyHexMeshDict.
|
|
Slide 1 | Hello and welcome to the spoken tutorial on generating mesh using snappyHexMesh in OpenFOAM. |
Slide 2 : Learning Objectives
|
In this tutorial we will learn to
|
Slide 3: Pre-requisite | As a pre-requisite,
|
Slide 4:
System Requirement |
To record this tutorial, I am using
|
Slide 5:
|
We are solving an existing case of flange from
laplacianFoam in basic directory.
|
Click on home >> OpenFoam-2.2.2 | Now let us go to home folder and click on OpenFoam-2.2.2 folder. |
Click on tutorials | You will see tutorials.
|
Click on mesh | Then click on mesh folder. |
Click on snappyHexMesh | You will see the snappyHexMesh folder.
|
Right click >> Create new folder >> flange_1 | In this folder, create a new folder by name flange_1.
Right click >> Create New Folder >> flange_1. |
Go back to tutorials >> basic folder | Now let's go back two levels. |
Double-click on basic folder | Open the basic folder. |
Double-click on laplacianFoam | You will see laplacianFoam folder.
|
Double-click on flange | You will see flange case.
|
Select 0, constant and system folders | Copy the three folders 0, constant and system. |
Go back to mesh >> snappyHexMesh >> flange_1 folder | Now let us go three levels back. |
Paste them there | Paste the copied folders inside the flange_1 folder. |
Go back to snappyHexMesh >> flange folder | Now let us go one level back. |
Double-click flange folder | Click on flange folder. |
Double-click on system | You will see constant and system folders.
|
Select snappyHexMeshDict and surfaceFeatureExtractDict | Copy snappyHexMeshDict and surfaceFeatureExtractDict from this folder. |
Go back to snappyHexMesh >> flange_1 folder | Now let us go two levels back. |
Paste them there | Paste these two files inside the system directory of flange_1 folder. |
Right click >> Create new folder >> triSurface | Now let us go one level back.
Click on constant folder. In this, create a folder by name triSurface. |
Go back to tutorials >> resources >> geometry folder | Now let us go four levels back. |
Double-click on resources | Open the resources folder. |
Double-click on geometry | You will see geometry folder.
|
Double-click flange.stl.gz file | In this, you will see flange.stl.gz file.
|
Go to tutorials >> mesh >> snappyHexMesh >> flange_1 >> constant >> triSurface | Give the path of triSurface folder in constant directory of flange_1 folder. |
Now close this. | |
Ctrl+Alt+t simultaneously
|
Open command terminal and enter the path for flange_1 as shown.
Type cd OpenFOAM-2.2.2/tutorials/mesh/snappyHexMesh/flange_1 |
Type ls | Now type ls and press Enter. |
Type cd constant | There are three folders 0, constant and system.
|
Type ls | Now type ls and press Enter. |
Type cd polymesh | You will see the polymesh and triSurface folders.
|
Type ls | Now type ls and press Enter. |
Type gedit blockMeshDict | You can see the blockMeshDict file.
and press Enter. |
This will open up the blockMeshDict file.
| |
Close blockMeshDict
Type cd .. |
Now close this and in the command terminal type
cd (space) .. (dot) (dot) and press Enter.
|
Type cd system | Now type cd space system and press Enter. |
Type ls | Now type ls and press Enter.
|
Type
gedit surfaceFeatureExtractDict |
To view the contents of the file, type
gedit surfaceFeatureExtractDict and press Enter.
|
Open surfaceFeatureExtractDict | This will open up the surfaceFeatureExtractDict file.
|
Close surfaceFeatureExtractDict | Now close this. |
Type gedit snappyHexMeshDict
|
In command terminal type
gedit snappyHexMeshDict and press Enter. (Note that H, M and D here are capital) |
Open snappyHexMeshDict | This will open up the snappyHexMeshDict file.
|
Give the geometry name | In snappyHexMeshDict I have already made some changes.
|
Give the file name for explicit feature edge refinement. | For Explicit feature edge refinement in castellatedMeshControls, I have given the file name flange.eMesh.
|
Type cd .. | Now close this and in command terminal, type
cd (space) .. (dot) (dot) and press Enter. |
Type cd 0 | Type cd space 0 and press Enter. |
Type ls | Type ls and press Enter.
|
Type gedit T | Now type gedit space T and press Enter. |
This will open up the T file.
| |
Now, we have to give initial conditions for all patches of flange. | |
Copy the conditions | Copy the initial conditions for patch 1 and paste it after patch 4 in the same file T. |
Type flange_ | Now type flange_ before this patch 1. |
Give initial conditions for all patches of flange.
Save file T >> close |
Similarly, we can do this for patch 2, 3 and 4.
Save this T file and close it. |
Type cd .. | And in the command terminal type cd (space) .. (dot) (dot)
and press Enter. |
On the terminal >> type blockMesh | Now, we need to mesh the geometry.
For that in command terminal, type blockMesh and press Enter.
|
Run surfaceFeatureExtract
|
Now type surfaceFeatureExtract and press Enter.
|
Type snappyHexMesh -overwrite | Now type snappyHexMesh -(dash) overwrite and press Enter. |
- (dash) overwrite command will prevent copying the files from the last time folders. | |
If not, the resulting meshes will be inside the next time folders, possibly the folders 1, 2 and 3. | |
Meshing will take some time.
<<PAUSE>> Now meshing is completed. | |
For simulating temperature distribution, we are using laplacianFoam solver. | |
Type laplacianFoam | In the command terminal type laplacianFoam and press Enter.
|
Type paraFoam | Once solving is completed, type paraFoam and press Enter to view the geometry and the results.
|
Click on Apply button | On the left hand side of Paraview window, click on Apply.
|
Check the box for T >> Click on Apply button | Scroll down the properties panel of the object inspector menu.
Check the box for T in the volume fields and click on Apply. |
In the drop down menu change from solid color to T | Now go to the top of Active variable control drop down menu.
|
Click on the play button | Now on the top of the Paraview window, you can see the VCR controls.
|
Toggle on the color legend | Toggle on the color legend by clicking on top left of the Active variable control menu.
This is the colour legend for temperature T.
Now let me get back to the slides. |
Slide 6 : Assignment | This brings us to the end of the tutorial.
As an assignment, Change some parameters in the snappyHexMeshDict:
You can also change the temperature in the 0 folder and view the results in Paraview. |
Slide 7 : Summary
|
In this tutorial we learnt :
|
Slide 8 :
About Spoken tutorials |
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. |
Slide 9:
About Spoken tutorials |
The Spoken Tutorial Project Team
-Conducts workshops using spoken tutorials -Gives certificates to those who pass an online test -For more details, please write to contact@spoken-tutorial.org |
Slide 10: Acknowledgement
|
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 |
About the contributor | This is Chaitrali Ghodke from IIT BOMBAY signing off.
Thanks for joining. |