

Mar 21, 2012, 11:30 AM  

Alisaa, XFoil can make boundary layer plots (it is in the VPLO menu within the OPER routine). You should have XFoil calculate the solution at your desired angle of attack and Reynolds number, then enter the VPLO menu and plot either the boundary layer thickness or skin friction. When separation occurs, the boundary layer will suddenly grow much thicker and the skin friction should drop significantly (it should actually become negative, but I don't know if XFoil would predict that).

Oct 25, 2012, 04:00 PM  
Joined Oct 2012
3 Posts

Matlab code
Dear Montag DP
I am working on a Matlab optimization code as you do, just mine is not working yet.:( I can run Xfoil out of matlab by now and now I have to add not a smart optimization. May I ask for you code to learn how you did it? Best regards Mat 
Oct 29, 2012, 12:46 PM  

Hey Sepply, what are you planning to use it for? If this is a school project, it sounds like you already have the hard part working and now just have to apply an optimizer to it. The way I did it was just to read in the output files from XFoil and set up an cost function to minimize drag or maximize L/D, etc.

Oct 29, 2012, 01:09 PM  
Joined Oct 2012
3 Posts

Thanks for the reply; I want to use it for my hobby and optimize a plane. (I am a student but unfortunately not from this field)
At the moment I am not sure about how to well parametrize the airfoil (just Bsplines? or include LE radius?) and how to have well functioning cost functions and what optimization scheme to use (GA? you used PSO). If you could advice me what worked best for you would be much appreciated. The other thing I read is that you optimized Xfoil to run faster? ( del. all graphics in the code and compiled it again?) 
Oct 29, 2012, 01:16 PM  
United States, GA, Atlanta
Joined Oct 2010
484 Posts

As a student, do you have access to AIAA papers through your library? (American Institute of Aeronautics and Astronautics).
I did a search for "Airfoil Optimization" there (http://arc.aiaa.org/action/doSearch) and got many hits. Also, google scholar looks like it has some good papers by Vanderplaats on airfoil optimization. 
Oct 29, 2012, 01:19 PM  

Sepply, I have the files at home (at least I think I still do, I'm pretty sure I backed that all up recently). I can email them to you if you PM me your email address. I had the best luck with Bsplines to parametrize the geometry. You have to be careful with optimizers, though, because they tend to optimize a given operating condition at the expense of other operating conditions. I had decent luck with running at a range of operating conditions and optimizing based on the average or weighted average of the results.
Another thing that you have to be careful of is that XFoil many times will not converge, especially if you are feeding it funky shapes from the optimizer. I mostly was able to get around this issue by penalizing unconverged results. If you want a global optimization, you will want to use something like GA or PSO. The main difficulty with these is getting a decent set of starting airfoils. The last time I used this, I was working on approximating NACAlike shapes with the Bspline parametrization as starting guesses. This makes the first iteration take a very long time but I think gets you a better range of "good" starting airfoils than you would get otherwise. Anyway, I will email you the files later and you can play around with it. I think I have a "user guide" that I created at the time, but ask if you have questions on how it works. I can't guarantee I will remember, because it's been awhile since I looked at it last. One more thing, if you are good at programming I would suggest doing this outside of the Matlab environment, because Matlab is slow. Ideally, you would take the XFoil source code and integrate the required parts of it into your own code. This is what I would try to do if I were going to start working on this today. 
Oct 29, 2012, 01:47 PM  
Joined Oct 2012
3 Posts

Thanks for the fast replies. I already had a look at several papers but on the parametrization of an airfoil for optimization I did not find much. But I will do a search again.
Yes I had the same converge issue with Xfoil. I have a test in my code to see if Xfoil came up with a good result but it is not optimal at the moment. I look forward to have a go with your code I am sure it will help me to understand some issues I have at the moment. ( I sent you a PM, thanks again) At the moment I will stick to matlab and as soon as I get a bit out of the fog I will try to move to an other language. Andre rewrote Xfoil already for C withing XFLR5 what will be very useful to me. 
Dec 04, 2012, 10:57 AM  
Joined Dec 2012
1 Posts

hello ,
i want to reshape the airfoil to use in Mises code for analysing pressure loss coefficient and pressure distribution . suppose that i have a NACA airfoil and i want to change it. Can i do using chebyshev polynomials ? how can i do it? coud you please help me , how can i reshape the airfoil? Thanks alot haji 
Dec 04, 2012, 09:08 PM  

Hey Haji,
Unfortunately, I'm not familiar with this Mises code you're talking about or Chebyshev polynomials. In my code I used control point curves to form the airfoil shapes, where the locations of the control points are the design variables. You can get the Matlab code if you click on my username and go to the blog post about airfoil optimization. Dan 
Dec 06, 2012, 10:06 PM  
United States, KS, Andover
Joined Oct 2005
539 Posts

Drela described using Chebyshev polynomials with MSES. I believe he has all of that worked out in his MSES/MSIS(?) code. MSIS (probably have the name wrong here) is essentially an incompressible mode of MSES. The polynomials are essentially added to the existing airfoil to create changes in the surface. You use a series of them to modify the upper and lower surfaces separately to control camber or together to control thickness. I'm not sure where you can get the documentation online, but it should be part of the MSES/MSIS package. I seem to recall it being described in that document. It's been several years since I worked with it, though. Unfortunately, these codes are not free. MSES is a really nice tool.

Dec 07, 2012, 12:04 PM  

Quote:


Dec 20, 2012, 09:58 AM  
Joined Dec 2012
1 Posts

xfoil calculate moment of aerodynamic center
Hi everybody,
I'm going to build a custom foil. but I need to know how you calculate the moment in aerodynamic center. I found that you calculate such things with Xfoil. I'm very new to all this stuff so i find the program rather difficult to use. can somebody help how i calculate the the moment in the aerodynamic center. the foil that i'm using is a NACA 63A912. 