blockMesh an Airfoil

In this work, blockMesh is adapted to generate 2D mesh for an NACA airfoil (can be 4 or 5 digit). The mesh is divided into 4 blocks as shown in figure below. Different techniques are employed to make the number of blocks as less as possible including mergePatch, Spline and complex edgeGrading.

Complex shape of the airfoil is approximate by Spline. Points 1 and 16 as well as 5 and 17 share the same coordinates. However, as they are defined separate points, block 2 and 4 literally do not share any faces. Therefore, mergePatch is needed to connect these 2 blocks. Boundary layer on the airfoil is ensured by complex edgeGrading so that we dont need to separate boundary layer into a different block.

To make it easy and flexible for those who are new to OpenFoam, a tool is created in Excel/Calc which can help to quickly generate blockMeshDict for different airfoil profiles. What the video for the detail of how to use the tool.

A ready-to-use blockMesh generator

The tool is an .ods worksheet can work on both LibreOffice and Excel.

There are two sheets in this file. Fisrt sheet for input parameters and the second one is a blockMeshDict format

First you need to fill the input sheet as instructing below. Then copy all (Ctrl+A) blockMesh sheet and paste to system/blockMeshDict

1. Generate airfoil geometry

Note:

  • Input airfoil parameter
  • Keep number of point at 101 (must be 101)
  • Choose Cosine spacing for a smoother shape
  • Select Close Trailing edge

Copy all data in Dat file in the generator into the input sheet below the cell named Airfoil Generator . You may need to copy data to another sheet because it is originally a text file. Use convert text to data function to reformat the data before copy it to the assigned area. What the video above if you are not sure.

2. Define domain

3. Meshing airfoil boundary

4. Input parameter for boundary layer

5. Input parameter for mesh at farfield

Run the Simulation in OpenFOAM

  1. Download case 2D Airfoil
  2. Replace all text in system/blockMeshDict by all you get in blockMesh sheet ( copy all & paste)
  3. Open Terminal form case directory and run blockMesh and checkMesh
  4. Run the case by ./Allrun in Terminal

Stream lines

Pressure distribution

Velocity distribution

Download the case and run it yourself. Contact me if you need help and remember to buy me a coffee!

Home

Source & Installation

Mesh & Geometry

Cases & Projects

Programming & Codes

Coupling