Short note on CST method for airfoil parameterization ( MATLAB Code included)

The Class Shape Transformation (CST) parameterization method was first developed by Brenda Kulfan, an aerodynamic engineer at Boeing. So what’s the point of having another airfoil parameterization method? As it was pointed by Brenda in her paper (Brenda is a woman engineer, cool!),  we want an intuitive, robust, smooth, and flexible parameterization method. Those are some of the reasons of why Brenda developed CST that is very simple to be coded and also it doesn’t take such a long time to understand the concept of CST itself. The greatest thing from CST is that CST can be used not only for an airfoil, but it can also be extended further into the general shape of aerodynamic bodies.  For simplicity purpose, this simple article considers only CST for the two-dimensional shape of an airfoil.

CST build the airfoil by summing the individual contribution of its basis function that is elegantly built by Bernstein Polynomial. Roughly speaking, you also don’t want a bumpy airfoil, well, except if you want to add some shock bump on your airfoil. The good thing about Bernstein polynomial, and CST itself is that later you will see that the smoothness of its curve is beneficial for optimization purpose! Since the number of parameters can be tuned easily by altering the order of Bernstein polynomial, CST is suitable for either conceptual or preliminary design of airfoil.

Alright, let’s kick out the jams and move to the mathematical expression. The upper and lower surface coordinate of CST are easily defined as follows:

Where

Consider that you don’t know what is the meaning of x, z, and c, those creatures are absis, the ordinate location of the airfoil, and chord length or airfoil. Roughly speaking, two main important parts of CST are the so-called class (C) and shape function (S). Trailing edge thickness is another term that completes the CST equation but for a preliminary purpose, it might be not that important. The class function is the part that defines the type of aerodynamic body that you want to build; could be airfoil, nacelle, or even axisymmetric bodies. As you can see that class function takes x coordinate, N1, and N2 as its input. N1 and N2 are two most joyful parameters of CST, you can play with these values and create various shapes with them. The general class function is defined as follows:

Gives N1 = 0.5 and N2 = 0.5, you get a round nose elliptic airfoil. Gives N1 = 0.75, N2 = 0.25, you get a low drag projectile shape. Now we consider N1 = 0.5, N2 = 1.0 and we will get a round nose and pointed aft end airfoil, exactly what we want for an airfoil.

I explained class function, and then you ask what is the shape function. After you define an airfoil with class function surely you don’t want a boring shape of an airfoil, right? You want to create another airfoil by yourself so now the definition of shape function comes in handy. The shape function itself defines the specific shape within the airfoil. Perfect, now you can make your own airfoil! Now I can give the expression of shape function:

N in shape function expression is the order of the Bernstein polynomial (note that N1 and N2 are different things!) and A is the weight/curvature coefficient. To alter the overall shape of airfoil then you’ve got to define the component shape function that is given as the following:

Oh my, another creature named K, God had chosen someone to named it binomial coefficient which is expressed as:

Now we can define the complete equation of CST for an airfoil:

Cool, the equation is now complete. Does it look difficult to you? No problem, you can download the MATLAB code at this article so you can understand and try it by yourself. Now let’s try the code! Let’s try by defining second-order CST, means that there are in total 6 weights/curvature coefficients to be determined. Let’s try the simple cases like Al = [-1 -1 -1] and Au = [1 1 1] . The MATLAB function CST_airfoil(wl,wu,dz,N) takes four inputs, where wl, wu, dz, and N are the vector of lower and upper surface weight, trailing edge thickness, and the number of airfoil coordinates, respectively. It is a very simple implementation of CST where you should give an input of wl like [-1 -1 -1] and with wu of [1 1 1]. You can set dz to zero and N to whatever value you like, I use 400 points for the figure shown below. (notice that I start with lower surface, you can modify it on your own). However, you can do a modification that is suitable for your needs, for example, is that if you want to define something like a different order of Bernstein polynomial for upper and lower surface. Note that the weight values for the lower surface are all negative to demonstrate how to build lower surface using the code, in reality, it is not always the case. For this case, we also assume that the trailing edge thickness dz is zero. Hit your MATLAB with CST_airfoil([-1 -1 -1], [1 1 1],0,400)  and then you will see the following figure:

Alright, you did it! Now you can play around a little bit by altering the weight. Let’s try the following second-order CST curvature coefficients: [-0.1294 -0.0036 -0.0666] for lower surface and [0.206 0.2728 0.2292] for upper surface.

Clark-Y airfoil? Correct! I approximate the original airfoil of Clark-Y by minimizing the Root Mean Square Error (RMSE) between the CST-defined airfoil and real airfoil; you can use non-linear optimization routine to tune the weights of CST itself for approximation purpose. Now you see that even low order CST can approximate the real airfoil but of course not without flaw. In the end, it is only an approximation and overall it has a total maximum error of 0.0014. Increasing the order of Bernstein Polynomial will, of course, lead to a more accurate approximation of the real airfoil using CST.

You can also easily modify CST subroutine to combine it with other subroutines. For example, I combine CST with automatic unstructured mesh  because I am doing something related to airfoil optimization as you can see it in the figure below:

Now feel free to make your own modified CST, combine it with optimization software, or whatever things that you want to do 🙂

That’s all about the CST method, have fun with it! For detail and more scientific information, you can read the references I give at the bottom line of this article 😀

(Update, 24-2-2017): Please see my post about how to find the CST parameters for an existing airfoil here: How to fit your airfoil with CST parameterization?

References:

1Kulfan, Brenda M. “A universal parametric geometry representation method—CST.” AIAA Paper 62 (2007).

2Lane, Kevin A., and David D. Marshall. “A surface parameterization method for airfoil optimization and high Lift 2D geometries utilizing the CST methodology.” (2009): 1.

3Ceze, Marco, Marcelo Hayashi, and Ernani Volpe. “A study of the CST parameterization characteristics.” 27th AIAA Applied Aerodynamics Conference. 2009.