SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Feb 14, 2014, 09:03 AM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,523 Posts
Well, I'm sorry to say the lower precision trick didn't work. The optimizer still was able to produce a design that gave unrealistically low drag at Cl = 0. The only difference is, now when I run the final airfoil in XFoil, printed in the standard lower precision, it also replicates this low drag. Still, changing the Reynolds number or some other parameter by a tiny amount fixes it. So it seems there's no simple way around this, but there is an option in the code now to check for it and prevent it if needed.
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Sign up now
to remove ads between posts
Old Feb 14, 2014, 06:30 PM
Registered User
United States, KS, Andover
Joined Oct 2005
539 Posts
I've tested your coordinates on three different builds of XFoil and can't seem to reproduce it. Are you using any optimization flags when you are compiling? These can cause issues sometimes. Have you tried your cases on your school computers/compilers?

My routines use ppar to set the panel number each run. You might try doing that to see if it shakes things up for your setup.
markschaffin is offline Find More Posts by markschaffin
Reply With Quote
Old Feb 15, 2014, 11:14 AM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,523 Posts
I uploaded a new version of the code to Sourceforge. The main change is that this new version includes new parameterization functions called Hicks-Henne functions. These are also known as "bump" functions because they look like a bump which may be placed anywhere along the chord. Each of these functions has three design variables: bump magnitude, bump location, and bump width. In constrast, the NACA functions only have the magnitude as a design variable, so these have three times as many design variables for the same number of functions. However, in my testing I've found that you only need about 1/3 as many functions. I'm using 4 Hicks-Henne functions on the top and bottom (8 total) compared to 12 (24 total) of the NACA functions.

The other main thing I added is a "consistency check" for XFoil. You can turn this on for any operating point to prevent it from finding these unrealistic designs that have been the topic of discussion for the last page or so of this thread. to use this, set checkpt = .true. for any of the operating points, and these points will be run a second time in XFoil with the Reynolds number perturbed downard by 0.5%. Then the optimizer will accept the result with the worse objective function value. This obviously increases cost, so it's recommended to first try optimizing with checkpt = .false. for all the operating points, and then only turn it on if you see a problem with one or more of the points.

The new version includes a user guide, which explains all of the inputs in detail, and a compiling guide. These are in the doc directory. There are also a couple papers which describe the available shape functions in the references directory. Finally, for those who are using Windows or Linux on x86-64 architecture, I've included compiled executables in the bin/x86-64 directory.

Below is a new video I made of an optimization at Re = 100,000 for an airfoil with a pitching moment constraint, Cm >= 0. The final airfoil has a very thin aft section, which shows I should add some more thickness constraints. That is on my to-do list for the next version of the code. The Hicks-Henne functions are used for this trial.

XoptFoil airfoil optimization with pitching moment constraint (0 min 34 sec)
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old Feb 15, 2014, 11:25 AM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,523 Posts
Quote:
Originally Posted by markschaffin View Post
I've tested your coordinates on three different builds of XFoil and can't seem to reproduce it. Are you using any optimization flags when you are compiling? These can cause issues sometimes. Have you tried your cases on your school computers/compilers?
Hey Mark,

I am using O3 optimization. I tried compiling the code with no optimization and ran my test case overnight, and the optimizer still converged on a design with unrealistic Cd at Cl = 0. I'm thinking there's not a way around it besides enabling the consistency checks when it happens. FWIW, it seems to happen more easily with the Hicks-Henne functions compared to the NACA functions, but that might just mean the Hicks-Henne functions are better at finding legitimately good designs, too. I'm attaching the input file for my case where this almost always seems to happen. If you want, you can try running that and see if it happens on your machine too. If the objective function suddenly jumps down to around 0.009 or below and then doesn't make any more progress, you'll know that it probably has happened.

Quote:
Originally Posted by markschaffin View Post
My routines use ppar to set the panel number each run. You might try doing that to see if it shakes things up for your setup.
Yes, I'm using that too. Each airfoil goes through XFoil's PANGEN subroutine (that is what is used by the ppar menu) before being analyzed.
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old Feb 15, 2014, 11:38 AM
Registered User
United States, KS, Andover
Joined Oct 2005
539 Posts
I'll try to find time to properly test out your stuff. My goal for the weekend is to couple another code to my framework. That, plus work on an actual model, wrestle three kids, etc.

Have you considered adding some curvature constraints to your method? I was getting airfoils with a lot of curvature reversals. My routine counts the number of times the curvature changes sign.
markschaffin is offline Find More Posts by markschaffin
Reply With Quote
Old Mar 24, 2014, 04:23 AM
Registered User
Joined Mar 2014
4 Posts
I have problem with gfortran. I use win 7 64x. Can anyone help me?
Mipt179 is offline Find More Posts by Mipt179
Reply With Quote
Old Mar 26, 2014, 08:08 AM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,523 Posts
Quote:
Originally Posted by Mipt179 View Post
I have problem with gfortran. I use win 7 64x. Can anyone help me?
Hey Mipt,

I'm not totally sure because I don't use Windows much and I haven't seen that, but it looks like it can't find the dynamic link library or some component of it. It looks like you compiled the code yourself, although it's not totally clear from your screen capture because I only see the last compiling step. If so, did you follow the instructions in the user guide for how to add the directory with the compiler and its dependencies to your system path?

Dan
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old Mar 28, 2014, 09:02 PM
Registered User
Cambridge, MA USA
Joined May 2001
1,738 Posts
Quote:
Originally Posted by Mipt179 View Post
I have problem with gfortran. I use win 7 64x. Can anyone help me?
FWIW,
A self-contained Windows executable for Xfoil 6.99 is now available on the Xfoil web page.
markdrela is offline Find More Posts by markdrela
Reply With Quote
Old Apr 08, 2014, 05:46 AM
Registered User
Estonia, Harju, Tallinn
Joined May 2012
159 Posts
I decided to see if I can improve the MH45 airfoil. I ran both min-drag and max-glide with the same settings. The resulting airfoils looked pretty awkward and the performance seems to have got worse instead of improving.
I have included the input and output files and a Re.sqrt(Cl) polar. Maybe someone would care to take a look at results.
Name: polar.png
Views: 50
Size: 20.8 KB
Description:
mh45_optfoil
martig is offline Find More Posts by martig
Last edited by martig; Apr 08, 2014 at 08:48 AM.
Reply With Quote
Old Apr 08, 2014, 08:38 PM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,523 Posts
Quote:
Originally Posted by martig View Post
I decided to see if I can improve the MH45 airfoil. I ran both min-drag and max-glide with the same settings. The resulting airfoils looked pretty awkward and the performance seems to have got worse instead of improving.
I have included the input and output files and a Re.sqrt(Cl) polar. Maybe someone would care to take a look at results.
Attachment 6663705
Attachment 6663542
Hey martig,

The reason why the final result is worse than the seed airfoil because the seed airfoil violated one of your constraints. Try changing min_moment from 0.00 to -0.2 or so. Your input file has the pitching moment constrained to >= 0.00.

Dan
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old Apr 08, 2014, 11:45 PM
Registered User
Estonia, Harju, Tallinn
Joined May 2012
159 Posts
Quote:
Originally Posted by Montag DP View Post
Hey martig,

The reason why the final result is worse than the seed airfoil because the seed airfoil violated one of your constraints. Try changing min_moment from 0.00 to -0.2 or so. Your input file has the pitching moment constrained to >= 0.00.

Dan
Hi Dan,

The cm0 being too low for mh45 had crossed my mind. Thank you for confirming.
Maybe you could also elaborate on the optimization criteria. It is my understanding that
  • min-drag should be chosen if it's a pylon racer type plane flying around Cl=0;
  • max-glide for a glider or powered long range;
  • min-sink for endurance tasks.
Also, would it be better to choose a more generic (NACA symmetric) airfoil for the seed rather than using an already quite good one?

EDIT: After running xoptfoil for 5-6 times it seems the airfoils it creates have very small LE curvature which creates a bigger leading edge suction peak. The flow transitions earlier than on the seed airfoils.
martig is offline Find More Posts by martig
Last edited by martig; Apr 09, 2014 at 08:37 AM.
Reply With Quote
Old Apr 09, 2014, 08:54 AM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,523 Posts
Quote:
Originally Posted by martig View Post
Hi Dan,

The cm0 being too low for mh45 had crossed my mind. Thank you for confirming.
Maybe you could also elaborate on the optimization criteria. It is my understanding that
  • min-drag should be chosen if it's a pylon racer type plane flying around Cl=0;
  • max-glide for a glider or powered long range;
  • min-sink for endurance tasks.
Also, would it be better to choose a more generic (NACA symmetric) airfoil for the seed rather than using an already quite good one?
martig,

Yes, usually unless you want to design a flying wing, you would set the cm constraint to less than zero. Setting it at -0.2 will basically mean it's not active, because usually even airfoils with strong (negative) pitching moments don't go that low. However, the more negative the pitching moment, the more the tail will have to work, and overall drag will increase, so there is a tradeoff there. Try running your MH32 in XFoil at your selected operating points; I bet the pitching moment is somewhere around -0.1. That's why the optimizer identified it as an infeasible design based on the constraint you had set.

Regarding the objective function types. You are basically correct; let me just define them for you.
  • min-drag is simply what it sounds like; it tries to minimize the drag at your selected operating points.
  • max-glide maximizes Cl/Cd
  • min-sink maximizes Cl^1.5/Cd
There is a caveat, however. If your operating points are identified as 'spec-cl', the Cl is specified. In that case, all three objective functions are essentially the same, because the optimizer can only try to decrease Cd; it can't maximize Cl or Cl^1.5 if Cl is specified.

Usually it's best to start with an airfoil that is already good for the task that you want it to perform. The amount that the optimizer is allowed to deviate from the seed airfoil is controlled by the initial_perturb parameter, although if you're using naca shape functions it is allowed to exceed this setting if needed during the optimization (hicks-henne is not because of a technical reason).

Finally, regarding the leading edge curvature. I am still planning to add more geometric constraints to the optimizer in the future, although I haven't been able to work on it in awhile (I also want to parallelize the PSO optimizer). If you feel that the curvature is too extreme, you could try adding a geometric constraint for it yourself in airfoil_evaluation.f90 (if you're okay with math and programming). It would also be possible to add an objective function to maximize the range of laminar flow on the airfoil. The shape that the optimizer comes up with is going to be dependent on the operating points you select for optimization.
Montag DP is offline Find More Posts by Montag DP
Last edited by Montag DP; Apr 09, 2014 at 09:03 AM.
Reply With Quote
Old Apr 12, 2014, 06:28 AM
Registered User
Estonia, Harju, Tallinn
Joined May 2012
159 Posts
Thanks for the explaination, Dan.

I'm beginning to think that MH45 is already very well optimized. I've only managed to generate airfoils that have some lower drag at rather spedific lift coefficients, but have higher drag at all the other Cls.
My initial goal was to try to generate an airfoil that had consistently lower drag in the Cl=0...1.0 region. I guess airfoil optimization is a lot like robbing Peter to pay Paul.
And yes, I'm designing a flying wing.
Name: mh45_optimized.png
Views: 37
Size: 19.5 KB
Description:
martig is offline Find More Posts by martig
Last edited by martig; Apr 12, 2014 at 06:49 AM.
Reply With Quote
Old Apr 12, 2014, 03:43 PM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,523 Posts
My apologies about the MH45 -- I didn't realize it was a flying wing airfoil. Did it violate the pitching moment constraint you had set, though? Perhaps it was just slightly less than 0? Otherwise the optimizer should have accepted it as a valid initial design.

And yes, optimization is typically a tradeoff. Lots of times the airfoils you get won't work so well in conditions you didn't design for.
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old Apr 13, 2014, 12:18 AM
Registered User
Estonia, Harju, Tallinn
Joined May 2012
159 Posts
I set the pitching moment constraint to -0.02, which is a bit more negative than the minimum cm of MH45. I think I solved the LE curvature issue by increasing the minimum thickness - I set it to 9 % instead of 8 %.
I got the funniest polar when I tried a one point optimization - the resultant airfoil had sharp peak at one Cl, but was absolutely crap everywhere else.
martig is offline Find More Posts by martig
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