New Products Flash Sale
Thread Tools
Old Dec 20, 2012, 11:21 AM
Montag DP is offline
Find More Posts by Montag DP
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,648 Posts
Thomas,

The aerodynamic center is defined as the reference point which, when the pitching moment is calculated about this point, it does not vary with angle of attack. For most airfoils this is very close to the quarter-chord point, at least for small angles of attack. You can check this by running XFoil over a range of angles of attack and confirm that the moment coefficient remains roughly constant.

Dan
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Sign up now
to remove ads between posts
Old Jan 13, 2013, 09:40 AM
ybimod is offline
Find More Posts by ybimod
Registered User
Joined Jan 2013
1 Posts
hi,

right now I'm trying to do a reverse parsec using matlab to find the parsec parameters from the known airfoil coordinates. i use the "lsqcurvefit" command to find the parameter.. using that command, I can already generate the parsec parameters. However, for some airfoils, I get parameters which values are complex number.. I don't know how that could happen..
can anybody help me?
ybimod is offline Find More Posts by ybimod
Reply With Quote
Old Jan 24, 2014, 01:59 PM
Montag DP is offline
Find More Posts by Montag DP
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,648 Posts
So, if anyone is still following along, I thought I would post an update.

I've finally finished all my classes (so now all I have to do is finish research ) and have had some time to start thinking about doing a new airplane design. This got me thinking about also doing airfoil optimization again.

Since the time I originally did this in Matlab, I've gained quite a lot of programming experience, so I decided to write my own code. Instead of running XFoil externally, reading in the output files, etc., I've taken the parts of the XFoil source code that I need and have incorporated it into my own code. (The XFoil source code is NOT easy to work with, by the way, though the results are obviously quite good.) So that in itself should make it a lot faster. I plan to use the seed airfoil perturbation approach instead of the spline approach for parameterization. Also, there will be the option to initially use a global search (like particle swarm or a genetic algorithm) to find the vicinity of the global optimum and then a local search to home in on the optimum.

The code is not done yet, but I have pretty much all the guts done except for the objective function and the main program driver. The xfoil portion is done, meaning that I can pass an airfoil to xfoil along with operating conditions, and it will give me the same result as xfoil. The particle swarm optimization routine and local search routine (simplex search) are also ready to go. So I expect v1.0 of the program to be done soon, and I will post it on Sourceforge for all to use. Eventually I will probably add new shape functions for parameterization and new optimization routines, like a genetic algorithm. Also, parallelizing the particle swarm code shouldn't be too hard, so I will probably do that.

Dan
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old Feb 03, 2014, 08:14 PM
Montag DP is offline
Find More Posts by Montag DP
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,648 Posts
In case anyone is still reading this, I started a new thread to talk about the new program. It is here:

http://www.rcgroups.com/forums/showthread.php?t=2095696
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old Aug 15, 2015, 01:30 PM
Holski77 is offline
Find More Posts by Holski77
Registered User
Joined Nov 2013
15 Posts
"In case anyone is still reading this".

I certainly hope people are still reading this, the wealth of information here is staggering. I am interested in using this type of code to make propellers for model planes. Since a propeller is just a wing that travels at different speeds along the span, this code would be perfect for creating different propeller airfoils that fit their specific operating points based on radius.

The simple thing to do would be to run an airfoil a blade element program, and then use this program to create airfoils with the same Cl as the ones used in the blade element programs, and have them optimized to reduce Cd. I don't know if I would be missing better L/D values this way, but if someone has some input here I would love to hear it.

The reason I am not posting this in your Xoptfoil forum is because I need the smoothness the splines provide to be able to loft the airfoils between the propellers. I am sure someone at NASA is working with propellers with 3D bumps in them, but I an not ready for anything like that yet!

Another reason I need the splines is that I need to handle a problem specific to making propellers this small. Injection molding tech can only get down to a minimum thickness of about 0.2mm. With chord lengths as low as 10mm, a 0.2mm airfoil minimum thickness will destroy and remove too much trailing edge geometry. I don't see the point in making such fine adjustments to an airfoil just to have it mutilated late in the process of production. If I am using splines, I can move the endpoints of the trailing edge vertically, so that when I scale them, the trailing edge thickness will match what I can realistically make in real life. I could also make a curved trailing edge that would be a compromise between the two methods. I would do this by adding another spine point above the trailing edge at [1,0]. I don't know how Xfoil will handle each strategy, but with your experience, I was wondering if you could tell me if this is all for not, or if Xfoil will be able to handle the weird geometry.

I know that Xfoil is not designed to analyze airfoils with blunt trailing edges because it is mostly a steady state, non time based program that can't handle things like vorticies being shed off the trialing edge. But Gandalf (excuse me I mean Drela) did include some code to approximate situations like these in Xfoil. After doing so research I am more confident in using Xfoil than openfoam, which will not handle the higher mach numbers as well, even though it can do a better job with CFD. The propellers I need to make easily break M 0.5 at the tips! Anyway, I am much less educated on the subject than you so I would love to hear you input. I have also seen the program you have been working on displayed on you youtube channel, all I can say is WOW. Besides the fact it is exactly what I am looking for it is very impressive.

I was working on a project like this for three days before I found this resource. You are going to laugh at how simple it is compared to XoptFoil, or even your original Matlab code. The top and bottom surfaces are formed using two four point beizer curves/splines. Each splines has one point at the trailing edge and two points near the leading edge (to maintain tangency to other spline). This leaves only one coordinate to be manipulated by the optimizer. Yeah you heard me only one! In the interest of getting an algorithm to be able to run the code repeatedly, and making it simple enough that I could learn to make matlab talk to Xfoil, I started out with simple initial inputs and a low number of variables, but I will expand as time goes on. The hardest part I am having is using the built in algorithms that come with matlab. I have some luck minimizing -Cl/Cd with fmincon, but have had no success with ga or particle swarm, which is what I really need to be able to avoid local minimums.

The first time I was able to run fmincon I raise L/D from 52 to 54 at a given M, Re, and Alpha. It's nothing great but it was so great to know I was actually doing something right. Your strategy of running three different reynolds (+-5%) numbers, and your trailing edge thickness constraints are things I really need to build on and include in my code. I will of coarse be using Xoptfoil for all other applications outside of these propellers shenanagins. Not to mention it has been a treat reading both of these threads, and all your user manuals to the end!

Also one last note. I had great success compiling XoptFoil despite my lack of coding outside of Matlab. You make many simple people like me happy by sharing your great ideas!

PS: you said several times in the Xoptfoil thread that you were planning on building a new plane, but then I don't see anything else further in the thread about it. You have any updates?
Holski77 is offline Find More Posts by Holski77
Last edited by Holski77; Aug 15, 2015 at 01:54 PM.
Reply With Quote
Old Aug 15, 2015, 04:23 PM
Montag DP is offline
Find More Posts by Montag DP
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,648 Posts
Quote:
Originally Posted by Holski77 View Post
"In case anyone is still reading this".

I certainly hope people are still reading this, the wealth of information here is staggering. I am interested in using this type of code to make propellers for model planes. Since a propeller is just a wing that travels at different speeds along the span, this code would be perfect for creating different propeller airfoils that fit their specific operating points based on radius.

The simple thing to do would be to run an airfoil a blade element program, and then use this program to create airfoils with the same Cl as the ones used in the blade element programs, and have them optimized to reduce Cd. I don't know if I would be missing better L/D values this way, but if someone has some input here I would love to hear it.

The reason I am not posting this in your Xoptfoil forum is because I need the smoothness the splines provide to be able to loft the airfoils between the propellers. I am sure someone at NASA is working with propellers with 3D bumps in them, but I an not ready for anything like that yet!
The method Xoptfoil uses also usually produces smooth airfoils, at least as reliably as the spline parameterization. And of course, you can redraw your airfoil with splines once the optimizer is done.

Quote:
Originally Posted by Holski77 View Post
Another reason I need the splines is that I need to handle a problem specific to making propellers this small. Injection molding tech can only get down to a minimum thickness of about 0.2mm. With chord lengths as low as 10mm, a 0.2mm airfoil minimum thickness will destroy and remove too much trailing edge geometry. I don't see the point in making such fine adjustments to an airfoil just to have it mutilated late in the process of production. If I am using splines, I can move the endpoints of the trailing edge vertically, so that when I scale them, the trailing edge thickness will match what I can realistically make in real life. I could also make a curved trailing edge that would be a compromise between the two methods. I would do this by adding another spine point above the trailing edge at [1,0]. I don't know how Xfoil will handle each strategy, but with your experience, I was wondering if you could tell me if this is all for not, or if Xfoil will be able to handle the weird geometry.
You can make blunt trailing edges with the new version too. The way to do that is just to use a seed airfoil with a trailing edge of your desired thickness, and all the airfoils evaluated by the optimizer will then have the same trailing edge thickness. If you don't have any airfoils with your desired thickness to use as a seed, you can run Xfoil's GDES operations to thicken an existing airfoil (I can tell you how to do this if you need help).

As far as Xfoil handling blunt trailing edges, as you said, it is designed to do it, at least to an extent. I don't know exactly what the limits are for accurate results, or if anyone has tested that. Dr. Drela posts here from time to time, so maybe if he's reading he can chime in, or you can email or PM him.

Quote:
Originally Posted by Holski77 View Post
I know that Xfoil is not designed to analyze airfoils with blunt trailing edges because it is mostly a steady state, non time based program that can't handle things like vorticies being shed off the trialing edge. But Gandalf (excuse me I mean Drela) did include some code to approximate situations like these in Xfoil. After doing so research I am more confident in using Xfoil than openfoam, which will not handle the higher mach numbers as well, even though it can do a better job with CFD. The propellers I need to make easily break M 0.5 at the tips! Anyway, I am much less educated on the subject than you so I would love to hear you input. I have also seen the program you have been working on displayed on you youtube channel, all I can say is WOW. Besides the fact it is exactly what I am looking for it is very impressive.
Are you talking about the 2D CFD code? I'm still working on it, kind of slowly. It's more of a hobby for me, and it will take awhile to get it to a state where it is useful for model airplanes, because it will need a turbulence model that can handle transition for that. I haven't used OpenFoam much, but someone I was working with was also having trouble getting good results in reasonable time for compressible cases using OpenFoam. I think it has better support for incompressible flow.

For airfoil optimization, though, I think Xfoil is a much more useful engine because it can analyze an airfoil in seconds (or less than a second) instead of hours. CFD (meaning, a Navier-Stokes based solver like OpenFoam or the one I'm working on) would be a good way to check your answers, except that turbulent transition is still kind of black magic unless you have access to a supercomputer that you can run on for several days. Basically, for now you still have to resort a turbulence model, instead of actually resolving turbulence, whether you're running a potential flow based code like XFoil or an actual CFD solver.

Quote:
Originally Posted by Holski77 View Post
I was working on a project like this for three days before I found this resource. You are going to laugh at how simple it is compared to XoptFoil, or even your original Matlab code. The top and bottom surfaces are formed using two four point beizer curves/splines. Each splines has one point at the trailing edge and two points near the leading edge (to maintain tangency to other spline). This leaves only one coordinate to be manipulated by the optimizer. Yeah you heard me only one! In the interest of getting an algorithm to be able to run the code repeatedly, and making it simple enough that I could learn to make matlab talk to Xfoil, I started out with simple initial inputs and a low number of variables, but I will expand as time goes on. The hardest part I am having is using the built in algorithms that come with matlab. I have some luck minimizing -Cl/Cd with fmincon, but have had no success with ga or particle swarm, which is what I really need to be able to avoid local minimums.

The first time I was able to run fmincon I raise L/D from 52 to 54 at a given M, Re, and Alpha. It's nothing great but it was so great to know I was actually doing something right. Your strategy of running three different reynolds (+-5%) numbers, and your trailing edge thickness constraints are things I really need to build on and include in my code. I will of coarse be using Xoptfoil for all other applications outside of these propellers shenanagins. Not to mention it has been a treat reading both of these threads, and all your user manuals to the end!

Also one last note. I had great success compiling XoptFoil despite my lack of coding outside of Matlab. You make many simple people like me happy by sharing your great ideas!

PS: you said several times in the Xoptfoil thread that you were planning on building a new plane, but then I don't see anything else further in the thread about it. You have any updates?
I think at one point I had the idea to design a flying wing, but I kind of lost interest and got too busy trying to finish up school. I have an aerobatic-style model I'm working on slowly at the moment, but I just don't have as much time for that as I used to (I'm married now and just finished school, moved, etc.). When I have time for hobbies these days I usually go fly the planes I already have or work on my coding project (for me that's fun).

Thanks very much for your compliments about my airfoil optimizer. I'm glad you are finding it useful. If you have any other questions, feel free to ask, either in this thread or the other one. I have my subscriptions set up so that I get an email when there is a new post.
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old Aug 15, 2015, 04:32 PM
markschaffin is offline
Find More Posts by markschaffin
Registered User
United States, KS, Andover
Joined Oct 2005
550 Posts
Dan,

Congratulations on finishing up your school work. Where did you land?

Mark
markschaffin is offline Find More Posts by markschaffin
Reply With Quote
Old Aug 15, 2015, 05:22 PM
DPATE is online now
Find More Posts by DPATE
Grad student in aeronautics
United States, GA, Atlanta
Joined Oct 2010
526 Posts
You may find QPROP helpful:

http://web.mit.edu/drela/Public/web/qprop/

Also, keep in mind that for propeller optimization the planform, number of blades, twist, etc. can sometimes be more important than the airfoil.

Lastly, minimizing drag for a specified Cl may lead to airfoils that are too thin or have high drag at off-design Cl's. If you impose a minimum thickness constraint, your "optimum" design will only be as good as the effort you put into that thickness choice.
DPATE is online now Find More Posts by DPATE
Reply With Quote
Old Aug 15, 2015, 06:03 PM
Holski77 is offline
Find More Posts by Holski77
Registered User
Joined Nov 2013
15 Posts
Quote:
Originally Posted by Montag DP View Post
The method Xoptfoil uses also usually produces smooth airfoils, at least as reliably as the spline parameterization. And of course, you can redraw your airfoil with splines once the optimizer is done.

You can make blunt trailing edges with the new version too. The way to do that is just to use a seed airfoil with a trailing edge of your desired thickness, and all the airfoils evaluated by the optimizer will then have the same trailing edge thickness. If you don't have any airfoils with your desired thickness to use as a seed, you can run Xfoil's GDES operations to thicken an existing airfoil (I can tell you how to do this if you need help).

As far as Xfoil handling blunt trailing edges, as you said, it is designed to do it, at least to an extent. I don't know exactly what the limits are for accurate results, or if anyone has tested that. Dr. Drela posts here from time to time, so maybe if he's reading he can chime in, or you can email or PM him.

Are you talking about the 2D CFD code? I'm still working on it, kind of slowly. It's more of a hobby for me, and it will take awhile to get it to a state where it is useful for model airplanes, because it will need a turbulence model that can handle transition for that. I haven't used OpenFoam much, but someone I was working with was also having trouble getting good results in reasonable time for compressible cases using OpenFoam. I think it has better support for incompressible flow.

For airfoil optimization, though, I think Xfoil is a much more useful engine because it can analyze an airfoil in seconds (or less than a second) instead of hours. CFD (meaning, a Navier-Stokes based solver like OpenFoam or the one I'm working on) would be a good way to check your answers, except that turbulent transition is still kind of black magic unless you have access to a supercomputer that you can run on for several days. Basically, for now you still have to resort a turbulence model, instead of actually resolving turbulence, whether you're running a potential flow based code like XFoil or an actual CFD solver.

I think at one point I had the idea to design a flying wing, but I kind of lost interest and got too busy trying to finish up school. I have an aerobatic-style model I'm working on slowly at the moment, but I just don't have as much time for that as I used to (I'm married now and just finished school, moved, etc.). When I have time for hobbies these days I usually go fly the planes I already have or work on my coding project (for me that's fun).

Thanks very much for your compliments about my airfoil optimizer. I'm glad you are finding it useful. If you have any other questions, feel free to ask, either in this thread or the other one. I have my subscriptions set up so that I get an email when there is a new post.
That's great that your code will keep the trailing edge thickness, I guess I didn't read the user manual well enough. That will save me a lot of time. With the spline code I made I should be able to approximate a mh114 and mh116 easily except with a thicker trailing edge. When I finish those I will have to post them in the XoptFoil thread. Of course I may be pm-ing you for a little help on the way if I get stuck!

One question I have is there any way to display the airfoils XoptFoil is creating while it is running? And if I wanted to compile it in several different folders, could I run many versions of it in parrallel?
Holski77 is offline Find More Posts by Holski77
Reply With Quote
Old Aug 15, 2015, 06:09 PM
Holski77 is offline
Find More Posts by Holski77
Registered User
Joined Nov 2013
15 Posts
Quote:
Originally Posted by DPATE View Post
You may find QPROP helpful:

http://web.mit.edu/drela/Public/web/qprop/

Also, keep in mind that for propeller optimization the planform, number of blades, twist, etc. can sometimes be more important than the airfoil.

Lastly, minimizing drag for a specified Cl may lead to airfoils that are too thin or have high drag at off-design Cl's. If you impose a minimum thickness constraint, your "optimum" design will only be as good as the effort you put into that thickness choice.
First of all thanks for the link.

I will take the thickness advice as well. I have tested many props like gemfan 5x3 that are so thin and flutter at high rpms. What do you mean by effort into thickness choice. Are you recommending that I run an array of thickness and choose the best overall performer?
Holski77 is offline Find More Posts by Holski77
Reply With Quote
Old Aug 15, 2015, 06:49 PM
DPATE is online now
Find More Posts by DPATE
Grad student in aeronautics
United States, GA, Atlanta
Joined Oct 2010
526 Posts
I was hinting at the fact that optimization if often very challenging and requires a great deal of thought put into framing the problem. With the example involving thickness, you would need to include structural analysis to evaluate the structural response of the airfoils you're considering (will it break? how much will it bend?), otherwise you'll be guessing at the optimum thickness. Of course, this "guessing" may provide the most practical path forward.
DPATE is online now Find More Posts by DPATE
Reply With Quote
Old Aug 15, 2015, 09:07 PM
Montag DP is offline
Find More Posts by Montag DP
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,648 Posts
Quote:
Originally Posted by Holski77 View Post
That's great that your code will keep the trailing edge thickness, I guess I didn't read the user manual well enough. That will save me a lot of time. With the spline code I made I should be able to approximate a mh114 and mh116 easily except with a thicker trailing edge. When I finish those I will have to post them in the XoptFoil thread. Of course I may be pm-ing you for a little help on the way if I get stuck!

One question I have is there any way to display the airfoils XoptFoil is creating while it is running? And if I wanted to compile it in several different folders, could I run many versions of it in parrallel?
When it's running, it will write out files called particle_swarm_designs.dat and simplex_designs.dat. These contain the design variables of each successively better design. The design variables don't mean much by themselves, so I made a utility called design_plotter which will interpret the design variables and write out airfoil coordinates and polars at the requested operating points. So, it won't plot it for you, but if you have Matlab or some other environment you are familiar with (i.e., python) you can make a script to read in the coordinates and make a plot or animation while it's running. The files are actually written out in a format for a plotting/data visualization program called Tecplot, but I don't imagine most people would have that. I only had it though school and my license will expire at the end of this year.

You can definitely run multiple cases at once, but you don't need to compile it multiple times. Once it's compiled, it's just like any other program, so you can just copy/paste the executable into a new directory, or put it into a directory in your system path and then run it through the command line from any directory without having to copy it. Or if you use Linux you could also make symbolic link or alias.
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old Aug 20, 2015, 03:41 PM
Holski77 is offline
Find More Posts by Holski77
Registered User
Joined Nov 2013
15 Posts
Any idea why xfoil would give me these results? I am using my own code to aim for mach 0.6, Re 200000 and alfa 5? Black represent mh116 and blue is optimized from no starting geometry.
Holski77 is offline Find More Posts by Holski77
Reply With Quote
Old Aug 20, 2015, 04:50 PM
Montag DP is offline
Find More Posts by Montag DP
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,648 Posts
I don't know, I can't tell what the plots are supposed to be showing.
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old Aug 21, 2015, 10:11 AM
Holski77 is offline
Find More Posts by Holski77
Registered User
Joined Nov 2013
15 Posts
Bottom right is CL vs CD, bottom left is CL vs alfa
Holski77 is offline Find More Posts by Holski77
Reply With Quote


Thread Tools