HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Jun 27, 2014, 02:39 PM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,513 Posts
Quote:
Originally Posted by vespa View Post
Well you can still modify the surface locally without introducing a curvature reversal, you'd just be limited to smaller changes and/or larger localities -- which might be a good thing because these violent bumps just seem to trick the optimizer. How does fiddling with each surface separately compare with just bending the camber line and thickness distribution curves?
Actually, that was where I started originally way back when I first started playing with airfoil optimization. You can read about it if you go back to the original thread and read the first post:

http://www.rcgroups.com/forums/showthread.php?t=1246998

That approach is actually quite good if your main goal is to make smooth airfoil shapes. It's also quick because there aren't that many design variables. The downside is that there are only so many different airfoils you can make that way. Using a more advanced approach like the shape function method gives many more possible designs and therefore better optimal airfoils. It does bring some other issues with it, especially the bumpiness, but there are ways to combat that. That's why I added the new curvature reversals constraint which you can use if you need it.

Quote:
Originally Posted by vespa View Post
What I meant by camber is to include xfoil's "flap" function as a degree of freedom. This way it could find a single airfoil shape with a weighted compromise between several design points as well as the camber required for each point. For example I might want 60% weighted minimum drag, 20% max L/D, and 20% max CL. It could then design one foil and 3 flap angles optimized to meet all 3 conditions. I'd need to get the parallel version running of course.
Hm, okay, I see what you mean. That might be an interesting bunny trail to pursue in the future, or for someone else who is interested (the source code is open ). For now, I think I want to focus on just optimizing an airfoil as opposed to optimizing an airfoil + control deflection.
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Sign up now
to remove ads between posts
Old Jun 27, 2014, 06:47 PM
Fit to CFIT
vespa's Avatar
Thousand Oaks, CA
Joined Mar 2004
2,488 Posts
Any shape without holes or undercuts can be defined with two curves: camber and thickness, so there's no limit to the reasonable airfoils that could be modeled this way. Bumpy, square, triangular, etc. all come down to thickness and camber. This is rather different from working within the constraints of a fixed NACA formula. To me it seems more intuitive to manipulate thickness and camber than to directly manipulate the top and bottom skins independently and it seems that bending the camber or thickness curves would converge to an optimum much sooner than placing bumps or divots on the skin. Bumps seem to lure the optimizer toward boundary layer control whereas bending the camber/thickness curves should lure it toward preferable pressure distribution.

My point about airfoil + control deflection was not about controls. Wings that don't change camber for L/D, speed, sink, or max CL are quickly becoming rare so an optimizer intended for modern designs would ideally optimize for the more common camber-controlled wings. But judging by the hour or so my PC requires to get thru a single shape, we might need a few more decades of Moore's law before multi-camber optimization is feasible.

P.S. It seems there isn't a static pthreads package available so to get the parallel version to run I just put this file in the working directory. Loads all 8 cores to a solid 100% each now but still seems to take about an hour per run.
vespa is online now Find More Posts by vespa
Reply With Quote
Old Jun 27, 2014, 11:36 PM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,513 Posts
Quote:
Originally Posted by vespa View Post
Any shape without holes or undercuts can be defined with two curves: camber and thickness, so there's no limit to the reasonable airfoils that could be modeled this way. Bumpy, square, triangular, etc. all come down to thickness and camber.
Well, that is true, but you can also represent any airfoil as a seed airfoil + perturbation, so that's not really the issue. In order to truly be able to create any shape, you would need to let each point be moved independently, and you would have to have a lot of points. That means you'd have lots of design variables and lots of little bumps and wiggles during the optimization. And in that case, it wouldn't matter if you called it camber + thickness or seed + perturbation, because you would be just moving each point independently anyway.

Quote:
Originally Posted by vespa View Post
This is rather different from working within the constraints of a fixed NACA formula. To me it seems more intuitive to manipulate thickness and camber than to directly manipulate the top and bottom skins independently and it seems that bending the camber or thickness curves would converge to an optimum much sooner than placing bumps or divots on the skin. Bumps seem to lure the optimizer toward boundary layer control whereas bending the camber/thickness curves should lure it toward preferable pressure distribution.
I guess I don't see how it would really make a difference. Unless you want to vary each point's coordinates independently, then you are going to have to create functions to represent the camber and thickness distribution. If you use simple functions with few parameters (like the NACA airfoil series), you will get smooth designs but your design space would be very limited, and you would end up with relatively poor optimal airfoils. If you use complicated functions with lots of parameters, then you can model a wider variety of shapes but you will also end up with lots of wavy, bumpy, and downright weird designs during the optimization. Either way it's a compromise, and I don't see a way around that.

That said, if you have an idea for how to set up camber and thickness distributions that are both (1) always very smooth and (2) able to represent a very wide range of airfoil shapes, I would love to hear it. A good parameterization approach is at least half the battle in shape optimization, so any good suggestions are more than welcome. But they would have to be specific; i.e., which functions do you recommend and how will they be translated into parametric design variables?

Quote:
Originally Posted by vespa View Post
My point about airfoil + control deflection was not about controls. Wings that don't change camber for L/D, speed, sink, or max CL are quickly becoming rare so an optimizer intended for modern designs would ideally optimize for the more common camber-controlled wings. But judging by the hour or so my PC requires to get thru a single shape, we might need a few more decades of Moore's law before multi-camber optimization is feasible.
It does sound really interesting, but like you said it would also complicate things (both from the perspective of changing the code and from an aerodynamic design perspective) and make the optimization a lot more expensive. It's not really something I want to get into at this time, but like I said, the source code is openly available in case you want to tinker with it.

Quote:
Originally Posted by vespa View Post
P.S. It seems there isn't a static pthreads package available so to get the parallel version to run I just put this file in the working directory. Loads all 8 cores to a solid 100% each now but still seems to take about an hour per run.
Hm, okay. I'm guessing you'd see better performance if you compile it yourself, but I can't be certain of that. I do know that the parallel version does speed things up a lot on my dual-core laptop, and theoretically using 8 cores should make big difference, because it should be evaluating 8 airfoils at once most of the time. That said, when I compiled the parallel version with Intel instead of GNU compilers, the performance wasn't that much better than the serial version. So apparently some implementations are better than others.
Montag DP is offline Find More Posts by Montag DP
Last edited by Montag DP; Jun 27, 2014 at 11:42 PM.
Reply With Quote
Old Jul 01, 2014, 10:47 PM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,513 Posts
vespa,

Just FYI about the parallel version on Windows. A few weeks ago Windows died on me during an update and I had to do a reinstall. Today I reinstalled the compilers so that I could compile the new version of XoptFoil on Windows. I ran into some trouble getting the parallel version to compile with static linking, and I came across this:

http://sourceforge.net/p/mingw-w64/m...0100@yahoo.de/

In there is this quote:

Quote:
Originally Posted by Brian Ripley (from above link)
As far as I know both pthreads use Windows threads. In any case, the
performance can be really poor compared to say Linux as there are far
more substantial overheads. So our experience is that OpenMP is only
useful on Windows for running quite appreciable computations in
parallel. Which is not what our users use OpenMP for ....
So that might be why you weren't getting significant performance improvements on Windows running in parallel.

Because of the static linking problems, I've decided to only supply a serial executable for Windows. But if you want to compile it the parallel version yourself, just uncomment the OMP_FLAG line in the Makefile. It should work then, as long as you have the required dlls on your computer (which you can get from the MinGW installer). FWIW, I tested the parallel Windows version on my computer and it definitely does seem to be faster than the serial version.

I will be releasing the new version once I have time to put it online. Hopefully tomorrow. I wanted to tonight but then I ran into this compiling issue which took up my time.
Montag DP is offline Find More Posts by Montag DP
Last edited by Montag DP; Jul 01, 2014 at 10:56 PM.
Reply With Quote
Old Jul 02, 2014, 03:41 PM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,513 Posts
Alright, version 1.3 has been uploaded to the sourceforge page. Here are the main improvements over the previous version:
  • Added a curvature reversals constraint to limit wavy designs. Sometimes the optimizer comes up with these because the waviness is not harmful aerodynamically over the operating points selected. The curvature reversals constraint penalizes reversals that exceed a given curvature threshhold. You can read more about how to use this constraint in the user guide.
  • Automatic checking of the seed airfoil is now performed to make sure it meets all constraints. If it does not pass a constraint, the program will either stop with an error or continue with a warning, depending on the seed_violation_handling input parameter. You can read more about this in the user guide.
  • The min_moment constraint can now be explicitly turned off, automatically set based on the seed airfoil, or specified manually. See the user guide entries for the inputs moment_constraint_type and min_moment.
  • Implemented better trailing edge thickness checking to prevent really thin trailing edges. The wedge angle constraint is now applied over the entire back half of the airfoil.
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old Jul 03, 2014, 09:13 AM
Registered User
Estonia, Harju, Tallinn
Joined May 2012
155 Posts
I just ran the new (non-parallel) version under Windows. The use_seed PM constraint is great. Finally I got an airfoil that's a bit better at low cl, but pretty much the same at high cl as the seed. In my mind that means that the optimizer has to use other methods of reducing drag rather than increasing the camber.
About the included design_plotter and the design_polars.dat file it generates - is the last design the final result?
It would be rather nice if xoptfoil would plot the optimized foil against the seed along with the polars, like on the images you have posted.
martig is offline Find More Posts by martig
Last edited by martig; Jul 03, 2014 at 09:41 AM.
Reply With Quote
Old Jul 03, 2014, 09:42 AM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,513 Posts
Quote:
Originally Posted by martig View Post
I just ran the new (non-parallel) version under Windows. The use_seed PM constraint is great. Finally I got an airfoil that's a bit better at low cl, but pretty much the same at high cl as the seed. In my mind that means that the optimizer has to use other methods of reducing drag then increasing the camber.
About the included design_plotter and the design_polars.dat file it generates - is the last design the final result?
It would be rather nice if xoptfoil would plot the optimized foil against the seed along with the polars, like on the images you have posted.
Yes, the design_plotter tool creates files called design_coordinates.dat and design_polars.dat. The last design in each one will be the final optimized design. The ones in between are there to show you the progression. Right now I don't have anything set up to automatically plot them, but you can always pull it into Excel, Matlab, python, or whatever you normally use for plotting. Maybe I will make a python script to do it automatically.
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old Jul 04, 2014, 08:51 AM
Registered User
Estonia, Harju, Tallinn
Joined May 2012
155 Posts
I also tried the 'max_curv_reverse' option. 2 reversals was too little for MH45. It would just find all but the first design infeasible. I had to up the value to 5, but even then (far too) many of the designs were infeasible.
Is it a sign that's something wrong if many/most designs are found infeasible initially?
martig is offline Find More Posts by martig
Reply With Quote
Old Jul 04, 2014, 02:20 PM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,513 Posts
Quote:
Originally Posted by martig View Post
I also tried the 'max_curv_reverse' option. 2 reversals was too little for MH45. It would just find all but the first design infeasible. I had to up the value to 5, but even then (far too) many of the designs were infeasible.
Is it a sign that's something wrong if many/most designs are found infeasible initially?
Well, there are two things to look for. First, make sure the threshold isn't too low. I've been using 0.2 - 0.3, which seems to work pretty well.

The second thing is the pso_feasible_init_attempts / simplex_feasible_init_attempts parameters. I added those specifically because of the issue you're talking about. It seems that the curvature constraint is particularly difficult to satisfy when randomly initializing designs. So if your curvature threshold isn't too low, you can increase the attempts to ~300 instead of the default 100. When I tried that, most of the designs ended up being feasible. I think I had the number of reversals = 3 and the threshold = 0.2. And it doesn't take that much longer to run, because most of the initialization attempts that are infeasible will fail on the geometric constraints and not ever go through XFoil.

(Typing this, I realize I spelled "threshold" wrong in the code. I'll have to fix that. )
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old Jul 13, 2014, 04:32 AM
Registered User
zummi's Avatar
Cape Town, South Africa
Joined May 2009
149 Posts
Hi Dan

This is slightly off topic, but it does sort of relate to XFoil itself. I came across this interesting paper comparing various computational methods for assessing small uav's. The link is http://ntrs.nasa.gov/archive/nasa/ca...0140006172.pdf


Not sure if you have seen this before?

Regards,
Imraan
zummi is offline Find More Posts by zummi
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Airfoil Optimization Using Genetic Algorithms Ghost_ Modeling Science 38 Apr 24, 2014 06:18 AM
Discussion Airfoil Optimization with XFOIL Montag DP Modeling Science 168 Feb 03, 2014 08:14 PM
Discussion Evolutionary airfoil design optimizer available kcaldwel Modeling Science 3 Dec 10, 2012 04:03 PM
Profili - Xfoil and reflexed / autostabilizing airfoils surfimp Modeling Science 29 Mar 30, 2005 06:32 AM