HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old May 19, 2010, 03:06 PM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,554 Posts
Discussion
Airfoil Optimization with XFOIL

I had to do a group project for an engineering optimization class this semester. We were allowed to choose our own, so I chose airfoil optimization. It was a group project, but I pretty much did the whole thing. But that's beside the point. I thought the results would be of interest to this forum.

We ended up using the NACA 4-digit series parameters (max camber, max thickness, max camber location) and modified them to also include trailing edge slope. So we had four design variables. Upper and lower bounds on the parameters were used as constraints, as well as a constraint on pitching moment for one of the cases.

I programmed a gradient-based optimization scheme in Matlab, which called XFoil for all function evaluations. The optimization scheme adjusts design variables to optimize the objective function. For this project, we chose to maximize the average of CL/CD at three different angles of attack. Using the average of three different points helps to achieve good performance over a range of angles of attack. The angles of attack considered in the objective function were 1.5, 4, and 7 degrees.

The results are posted below, as well as the paper we wrote. There were six trials run, either with no Cm constraint or with it constrained > or equal to zero, each for Re of 80,000, 200,000, and 300,000. Unsurprisingly, the unconstrained case achieved better performance. The constrained pitching moment airfoils, also unsurprisingly, all end up with a reflexed trailing edge.

The next step is to increase the number of design variables. I would like to include leading edge radius and max thickness location as design variables for greater control over the shape. It is also possible to change the objective function and constraints for different design goals. Stay tuned.

EDIT: By the way, each of the six cases took about 1-1.5 hours to reach a solution on my laptop. I don't count the XFoil function evaluations but I'd guess it's around 1000-2000 each time. I also ran into difficulties with XFoil not converging in some cases, so it's no simple task. I imagine adding 2 more design variables will increase the computational time to over 2 hours.
Montag DP is offline Find More Posts by Montag DP
Last edited by Montag DP; May 19, 2010 at 03:30 PM.
Reply With Quote
Sign up now
to remove ads between posts
Old May 21, 2010, 05:51 PM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,554 Posts
As it turns out, it wasn't too hard at all to add leading edge radius and max thickness location as design variables. I spent about 30 minutes modifying my Matlab code to include that, and decided to do a study on an airfoil I might actually use for an aerial photography plane I'm designing. The Reynolds number was 200,000 (it will be a fairly large plane).

For this optimization, I set a constraint on the pitching moment to be greater than or equal to -0.1 for the three angles of attack considered. I also placed side constraints on the parameters, most notably that max camber < 0.04 and max thickness > 0.075.

It took almost two hours to run the optimization (as I expected). Here are the results, compared to the Clark Y and DAE-51. Notice that the lift/drag for the optimized airfoil outperforms the Clark Y and DAE-51 at lower angles of attack, but suffers after 7 degrees. This is acceptable for an AP plane that will be mostly cruising around taking pictures. Also notice that the pitching moment is better than the DAE-51's but worse than the Clark Y's, as set by the constraint.

Please chime in if you have any ideas for practical airfoil optimization.

Dan
Montag DP is offline Find More Posts by Montag DP
Last edited by Montag DP; May 21, 2010 at 07:12 PM.
Reply With Quote
Old May 22, 2010, 12:57 PM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,554 Posts
Final Design

The last airfoil posted ended up around 8% thickness. I decided that I wanted it a little thicker for my application, so I set the lower constraint to 9% and ran the optimizer again, once again with Cm constrained to be greater than or equal to -0.1.

I did add a function evaluation counter to my code, and to reach this airfoil XFoil was run over 2,000 times by the optimizer.

The AP plane I'm working on which will use this airfoil is pictured as well. I can post the final .DAT file for the airfoil if anyone is interested.
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old May 22, 2010, 01:20 PM
Jesper Frickmann
jfrickmann's Avatar
Raleigh, North Carolina, USA
Joined Aug 2005
1,268 Posts
Very cool! I once tinkered a little bit with something similar, but I also had the problem that XFOIL too often failed to converge. How did you handle that situation?

Jesper
jfrickmann is offline Find More Posts by jfrickmann
Reply With Quote
Old May 22, 2010, 02:15 PM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,554 Posts
Quote:
Originally Posted by jfrickmann View Post
Very cool! I once tinkered a little bit with something similar, but I also had the problem that XFOIL too often failed to converge. How did you handle that situation?

Jesper
Well, first, I found that the higher the reynolds number, the more difficult it was to converge, so I kept it at 300,000 and below. I also did a few things to try to handle the cases where it didn't converge.

-For non-converged cases, I have it automatically adjusting the parameters slightly and trying again. I give it three chances to converge like this before just calling L/D 0 at that point.
-If the shape is really off, XFoil might not create the output file with the results in it. This is a problem because Matlab looks for this file to read in the results. To prevent this from happening (most of the time), I had to make the penalty terms on the constraints high enough so that the optimizer stays away from those shapes. Now that I think about it, I could probably put in a check to see if the file exists before trying to read it, but most of the time it would be unnecessary.

There are still times where it crashes, but for the most part it doesn't have a problem.
Montag DP is offline Find More Posts by Montag DP
Last edited by Montag DP; May 22, 2010 at 02:24 PM.
Reply With Quote
Old May 22, 2010, 06:30 PM
Jesper Frickmann
jfrickmann's Avatar
Raleigh, North Carolina, USA
Joined Aug 2005
1,268 Posts
OK, thanks!
jfrickmann is offline Find More Posts by jfrickmann
Reply With Quote
Old May 25, 2010, 01:30 PM
AAaaaaaahhhh!
rocketmagnet's Avatar
London
Joined May 2010
58 Posts
Montag,

Thanks for this, it is very interesting and I'll carefully study your report and learn all I can from it.

In another thread, we were discussing what an airfoil might look like if it was designed to produce maximum Cl at an Re of 35000, and if you really didn't care about Cd at all.

Would it be easy to to run an optimisation and see what it comes out with? The best we've seen so far is a Cl of 1.8 (or course the drag was terrible, but it's not important for this question).

Many thanks

Hugo
rocketmagnet is offline Find More Posts by rocketmagnet
Reply With Quote
Old May 25, 2010, 04:43 PM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,554 Posts
Quote:
Originally Posted by rocketmagnet View Post
Montag,

Thanks for this, it is very interesting and I'll carefully study your report and learn all I can from it.

In another thread, we were discussing what an airfoil might look like if it was designed to produce maximum Cl at an Re of 35000, and if you really didn't care about Cd at all.

Would it be easy to to run an optimisation and see what it comes out with? The best we've seen so far is a Cl of 1.8 (or course the drag was terrible, but it's not important for this question).

Many thanks

Hugo
Yes, that would be possible. It wouldn't be guaranteed to get better results than what you already have because of the limitations of the parameters and the constraints I place on them. I will probably at least relax the constraint on max camber, though.

Another difficulty is that max Cl occurs right before stall, which is not always at the same angle of attack. It should be possible to do it, though, with a little bit of tweaking.

Dan
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old May 25, 2010, 05:45 PM
AAaaaaaahhhh!
rocketmagnet's Avatar
London
Joined May 2010
58 Posts
Quote:
Originally Posted by Montag DP View Post
Yes, that would be possible. It wouldn't be guaranteed to get better results than what you already have because of the limitations of the parameters and the constraints I place on them. I will probably at least relax the constraint on max camber, though.

Another difficulty is that max Cl occurs right before stall, which is not always at the same angle of attack. It should be possible to do it, though, with a little bit of tweaking.

Dan
Well, I guess the way to do it is to test each airfoil at a range of AoA, and select the best for that airfoil.

I would certainly remove the max camber constraint. Remember, the purpose is simply to achieve the maximum lift, at the expense of everything else. Although I think there should be a fixed chord and Re (my personal preference being 20cm and 35000, but could be anything).

Hugo
rocketmagnet is offline Find More Posts by rocketmagnet
Reply With Quote
Old May 25, 2010, 09:20 PM
agnotology
kcaldwel's Avatar
Joined Jan 2007
3,678 Posts
...
kcaldwel is offline Find More Posts by kcaldwel
Last edited by kcaldwel; Jul 01, 2010 at 09:39 PM.
Reply With Quote
Old May 25, 2010, 09:30 PM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,554 Posts
Quote:
Originally Posted by rocketmagnet View Post
Well, I guess the way to do it is to test each airfoil at a range of AoA, and select the best for that airfoil.

I would certainly remove the max camber constraint. Remember, the purpose is simply to achieve the maximum lift, at the expense of everything else. Although I think there should be a fixed chord and Re (my personal preference being 20cm and 35000, but could be anything).

Hugo
I ended up just running it for an angle of attack of 10 degrees. Using this assumption, the optimizer will naturally find airfoils that stall around 10 degrees at that reynolds number.

It was run for awhile, but I had to do stop and restart a lot because XFoil convergence issues at those extreme conditions (and the extreme shapes generated) made the optimization problematic. However, I did get a Cl over 1.8 (precisely, 1.8224) without too much trouble, though the airfoil would be pretty much unusable for an actual model as the performance everywhere else is very poor.

What I found was that the optimum camber was around 7.3%, but the angle at the trailing edge kept increasing to get higher lift. It probably would have increased more if I kept increasing the upper allowable limit. I stopped it at 35 degrees, which means the trailing edge is basically acting like a flap. Anyway, here are the results.

Dan
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old May 25, 2010, 09:34 PM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,554 Posts
Quote:
Originally Posted by kcaldwel View Post
The max lift RM seems to be looking for could well occur way past stall. He doesn't seem to care if the drag is horrendous. I can't imagine what use that would be, but the KF foils seem to be able to produce pretty high Cls well past stall at an AoA of 45 degrees or so. XFOIL will not give any meaningful results past stall of course.

Your airfoil optimization looks pretty cool!

Kevin
Thanks, Kevin.

Yes, XFoil doesn't really do anything past stall. The optimizer is good for finding useful airfoils in "normal" model regimes. Finding the max Cl, neglecting everything else, does not result in a useful airfoil, and the optimization struggles (mostly because of XFoil convergence issues). However, I'm hoping that the airfoil developed for my AP plane does as well as predicted.

Dan
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old May 26, 2010, 01:43 AM
B for Bruce
BMatthews's Avatar
The 'Wack, BC, Canada
Joined Oct 2002
11,602 Posts
Quote:
Originally Posted by rocketmagnet View Post
Well, I guess the way to do it is to test each airfoil at a range of AoA, and select the best for that airfoil.

I would certainly remove the max camber constraint. Remember, the purpose is simply to achieve the maximum lift, at the expense of everything else. Although I think there should be a fixed chord and Re (my personal preference being 20cm and 35000, but could be anything).

Hugo
I finally got around to running the numbers on this.

Do you realize that with a 20cm chord and only 35K for a Reynolds number that you're only talking about 9 kph or 5.6 mph for a flight speed? A far more realistic speed for any sort of real world model airplane with a 20 cm chord would be more like 70,000 to 80,000 at a minimum. To fly at only 35K it would need to be a super light demo test hack of some sort since you're talking about flying at a moderate jogging pace.
BMatthews is offline Find More Posts by BMatthews
Reply With Quote
Old May 26, 2010, 02:01 AM
B for Bruce
BMatthews's Avatar
The 'Wack, BC, Canada
Joined Oct 2002
11,602 Posts
Kevin, mounting the camera in that manner will produce a huge amount of glare off the "canopy" internal surfaces. Not to mention that the seams are in the direct line of vision. If I were to have a go at designing a camera model I long ago figured that I would want to use a camera "ball" that is gimbaled to swivel and aim wherever I want it to. Maybe not actually in flight at first mind you. But either way going with an opaque container other than the optical port would allow me to use a good quality coated UV filter as the cameral port. And as long as it's aimed sort of downward all the time I wouldn't need to deal with much glare. And a 70mm'ish filter would provide as much of a port for the camera lens as I could possibly see a model camera requiring.

And I also long ago figured that any such model I design would be called "Skyball"...
BMatthews is offline Find More Posts by BMatthews
Reply With Quote
Old May 26, 2010, 02:06 AM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,554 Posts
Quote:
Originally Posted by BMatthews View Post
Kevin, mounting the camera in that manner will produce a huge amount of glare off the "canopy" internal surfaces. Not to mention that the seams are in the direct line of vision. If I were to have a go at designing a camera model I long ago figured that I would want to use a camera "ball" that is gimbaled to swivel and aim wherever I want it to. Maybe not actually in flight at first mind you. But either way going with an opaque container other than the optical port would allow me to use a good quality coated UV filter as the cameral port. And as long as it's aimed sort of downward all the time I wouldn't need to deal with much glare. And a 70mm'ish filter would provide as much of a port for the camera lens as I could possibly see a model camera requiring.

And I also long ago figured that any such model I design would be called "Skyball"...
Well, I'm not Kevin, but thanks for the ideas.

I was planning on removing the canopy when using the camera.
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Reply


Thread Tools