snappyHexMesh tutorial: 2D airfoil
snappyHexMesh tutorial: 2D airfoil
1. Get airfoil profile
1. Get airfoil profile
Airfoil profile can be obtained using NACA 4/5 digit airfoil generator:
- Select generator
- Input airfoil parameter
- Keep number of point at 199
- Choose Cosine spacing for a smoother shape
- Select Close Trailing edge
Copy all data in Dat file in the generator for the next step.
2.Generate airfoil.STL tri-surface
2.Generate airfoil.STL tri-surface
To create tri-surface which is later used by snappyHexMesh:
- Download generator below
- Paste data copied in previous step into the Airfoil 199 points sheet
- Copy all data in Airfoil.STL 199 points sheet to a blank text file
- Replace all
\\n
with\n
- Save text file as airfoil.stl
3. Generate 3D mesh
3. Generate 3D mesh
To create a 2D mesh, we first generate a 3D mesh then extrude front or back boundary to 2D mesh. To do so:
- Download an the case
- Copy the airfoil .stl in previous step to airfoil_snappyHexMesh/constant/triSurface
- Modify blockMeshDict or snappyHexMesh if needed
- Open a Terminal from case folder airfoil_snappyHexMesh and run
./Allrun
4. Convert 3D patch to 2D mesh
4. Convert 3D patch to 2D mesh
...
5. Run the simulation
5. Run the simulation
...