OpenFOAM/C3/Introduction-to-SnappyHexMesh/English
Tutorial: Introduction to 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 Introduction to snappyHexMesh in OpenFOAM. |
Slide 2 : Learning Objectives
|
In this tutorial, we will learn about
|
Slide 3: Pre-requisite | As a pre-requisite, the user requires
|
Slide 4:
System Requirement |
To record this tutorial, I am using
|
Slide 5: Methodology for snappyHexMesh
|
Let us learn to create a Mesh with the snappyHexMesh utility.
Step 1 : Create a base mesh by using blockMesh utility Step 2 : Refine base mesh Step 3 : Remove unused cells Step 4 : Snap mesh to surface Step 5 : Add layers |
Ctrl+Alt+t simultaneously
Type cd OpenFOAM-2.2.2/tutorials/mesh/snappyHexMesh/flange |
We will open the terminal and enter the path for flange as shown.
|
Type ls
|
Now type ls and press Enter.
|
Type cd system | Type cd space system and press Enter. |
Type ls | Now type ls and press Enter.
|
Type gedit snappyHexMeshDict | To view the contents of the file type -
gedit snappyHexMeshDict and press Enter.
|
This will open up the snappyHexMeshDict file. | |
Slide 5 : | snappyHexMeshDict file contains all the instructions and the entire process revolves around this file. |
Activation rows
|
With the first rows of snappyHexMeshDict, you can activate or skip sections of the process. |
Geometry | In the geometry section, all active regions that take part in snappy process can be defined. |
castellatedMeshControls section. | The parameters that govern the process of cell splitting are described in castellatedMeshControls section. |
CastellatedMeshControls | The parameters that are listed below are well explained in snappyHexMeshDict file. |
nCellsBetweenLevels | nCellsBetweenLevels defines number of cells for each refinement level.
|
Explicit feature edge refinement | In the Explicit feature edge refinement section, you can set specific refinement level for geometry’s feature edges.
|
Surface based refinement
|
In the surface-based refinement section, you can set the refinement levels of all surfaces defined in geometry file. |
Mesh selection | Mesh selection is a very important parameter.
|
The next step involves moving cell vertex points onto the surface geometry. | |
SnapControls
|
The snapping process is carried out by four parameters:
These parameters control the number of iterations and tolerance between mesh and STL surface. |
nSmoothPatch |
nSmoothPatch option specifies the number of times the exterior (the boundary wall) should be iterated.
|
tolerance |
Tolerance option specifies the distance the program should look, for a point to snap.
|
nSolveIter | nSolveIter option specifies the number of times the snapping part of snappyHexMesh should be run. |
nRelaxIter
|
nRelaxIter option specifies the number of times the mesh should run a relaxing script, that removes bad mesh points. |
addLayerControls
|
The process of mesh layer addition involves shrinking the existing mesh from the boundary and inserting layers of cells.
|
relativeSizes
|
RelativeSizes option (true or false) changes the way to read the parameters given next.
- true: next parameters define the layers' dimensions as parameters. - false: next parameters define directly the layers' dimensions. |
layers | In layers option, you can define the number of layers and the patch on which to attach the layers.
|
expansionRatio
|
ExpansionRatio parameters sets the growth factor of the layers (ratio between two subsequent layers). |
finalLayerThickness
|
finalLayerThickness parameter sets the thickness of the last layer. |
minThickness | minThickness parameter sets the minimum allowable thickness of layer. |
Advanced settings
|
Advanced settings is the second group of parameters.
|
featureAngle
|
FeatureAngle is the angle above which the surface will not be extruded. |
nRelaxIter | nRelaxIter option specifies the number of times the mesh will run a relaxing script. |
maxFaceThicknessRatio | maxFaceThicknessRatio option specifiess the maximum allowable value of aspect ratio. |
meshQualityControls
|
meshQualityControls parameter sets the minimum thresholds to generate mesh in snap and add-layers parts.
|
These are the different parameters in snappyHexMeshDict.
| |
<PAUSE>
| |
Slide 6: Summary
|
In this tutorial we learnt :
Different parameteres in snappyHexMesh to generate mesh in OpenFoam. |
Slide 7: 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 8:
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 9:
Acknowledgement
|
Spoken Tutorials are part of Talk to a Teacher project,
It is supported by the 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. |