Some more realistic OpenFOAM runs

As a first test, I am trying to reproduce the graphs of coefficient of lift \(C_l\) and coefficient of drag \(C_d\) as functions of angle of attack \(\alpha\) from http://airfoiltools.com/airfoil/details?airfoil=naca2408-il. The airfoil is 1m long, the airspeed is 10m/s, and the kinematic viscosity \(\nu\) is 1E-5 for a Reynolds number of 1E6. \(C_l\) and \(C_d\) are measured for \(\alpha = \{-5,0,5,10,15,20\}\). I am unclear on the reference length and area in \(C_l\) and \(C_d\), but that will be obvious as a constant factor between the graphs.

On the recommendation of a friend (I do not want to get stuck down any rabbit holes) these use the SST k-omega turbulence model. The constants for incoming turbulence intensity are taken from: k-Omega-SST-DES-Report. At high angles of attack the airfoil sheds vortices:

And the plot of \(C_l\) and \(C_d\) vs \(\alpha\):

Error bars are given from the standard deviation of the forces. The vortex shedding causes periodic changes in each coefficient. I am bothered that \(C_l\) doesn’t turn over at \(\alpha\approx 15^{\circ}\) as for the airfoil tools database, and am now trying to figure out what causes the difference.

OpenFOAM Airfoils

I’ve been playing with OpenFOAM recently and ended up writing my own mesher. It’s been educational to work with a code which uses unstructured meshes for once. See https://github.com/garthwhelan/openfoam-mesher-stuff for details. So far all it does is generate hexahedral meshes with Cartesian coordinates, and merge boundary faces/points if two boundary patches share the same coordinate. It’s pretty straightforward to build more complicated meshes by deforming and combining Cartesian ones. For example, C meshes for airfoils can be made by deforming a rectangular Cartesian mesh so that the right edge surrounds an airfoil and then combining the interface behind the airfoil (automatically removing the duplicate faces and faces that are now internal). O meshes would involve doing the same thing, but using the entire right edge around the airfoil and merging what were the top and bottom edges.

Ultimately, I would like to build an RC plane and be able to say some of the design was inspired by CFD simulations, but this is a tall order. I think I will make sure that I can match the information on www.airfoiltools.com for \(C_l\) and \(C_d\) for a named airfoil and then use OpenFOAM to motivate the design of the control structures.

After going through some tutorials, I tried a (very nonphysical) run with an airfoil. The graph below was generated with icoFoam using a 1m airfoil at 1m/s, and with a realistic air viscosity. The boundary conditions are probably something nonphysical. Since then I’ve moved to using the freestream boundary conditions, pisoFoam, and RANS.

Paraview is actually really nice