This is an old revision of the document!
Given a 4- or 5-digit NACA number, a corresponding profile can be generated using a Python script available at https://github.com/dgorissen/naca. The profile can be used to guide mesh generation.
Typical to other external flow cases, the goal is to have a fine mesh size near the solid surface, intermediate mesh size in the wake region, and the mesh become coarser farther from the surface. Possible approaches to generate the mesh are described as follows, but not limited to:
Briefly, a mesh block is generated using the blockMesh
utility. of OpenFOAM, followed by snapping an airfoil profile (prepared as STL file) using the snappyHexMesh
utility. This results in unstructured mesh.
An example is provided in an OpenFOAM tutorial case:
''$FOAM_TUTORIALS/incompressible/pimpleFoam/RAS/wingMotion/''.
An automated meshing script can be written using Python API of Gmsh. This can be combined with NACA profile generator to provide control points to construct the surface, e.g. github.com/dgorissen/naca.
One implementation can be found at https://github.com/EdgarAMO/airfoil2D, where a mesh for any NACA number can be created by a single line of command, e.g., python3 makeBlockMesh.py “0012” 200
.
Similar implementation is also given here by hazmilazis with additional user specifications, including domain size, angle of attack, mesh size progression, boundary layer thickness and other important parameters.
OpenFOAM provides case files that is used for verification and validation of turbulent flow over NACA0012 airfoil (2D).
The case files can be found for a locally installed version at $FOAM_TUTORIALS/incompressible/simpleFoam/airFoil2D
,
or downloaded from
here
for the most recent version.
The details of the setup are described in the
online user guide.