

United States, KS, Andover
Joined Oct 2005
547 Posts

Dan,
I'd not worry so much about what angle of attack the airfoil is being optimized at, but rather the Cl. Wings fly by CL, not alpha. That said, you might want to consider using alpha as a constraint. Secondly, consider adding a weighting system to your design points. You are likely going to want/need to increase/decrease the influence of certain points as you go along. Mark 




Being able to control more variables would be great for a tapered wing  optimize the airfoils for the different Re and induced Cl's along the span. That might require optimizing the planform at the same time.
Very nice work, I may have to take a look at the particle swarm optimization. Thanks Dan, I'd never heard of it. I guess the present airfoils have sort of been developed by a 100 year long particle swarm process. with a very slow cutandfly computation cycle. Kevin 



Quote:
Kevin, I also think particle swarm optimization is very interesting. I wish I had known about it when I was doing the project for the class  it's so much simpler to program and much more powerful. I think I already gave an overview of how it works, but since I've been playing with it for a little while now I'll probably be able to state it more clearly: 1) The design space is populated with a swarm of particles that are given random positions and velocities. 2) With each iteration, the location of the particle with the best corresponding objective function value is stored. 3) Velocities of each particle are changed based on the best overall location so far and the best location that each particle has seen. However, the particle's current velocity also plays into the update so that there is some "inertial" component like in a real swarm. The amount of acceleration in each direction is random but bounded. 4) Steps 24 represent one iteration, so they are repeated until convergence is reached. There are also some weighting coefficients on each of the three velocity terms that are set in the beginning and might need to be tuned based on the problem. The effect of the whole thing is that you have a lot of designs all over the design space that all move towards good, but not exactly the same, locations. It makes a lot of sense and seems to work very well. 



United States, KS, Andover
Joined Oct 2005
547 Posts

Dan,
Go ahead and keep alpha as an input, I just think for most cases you will be designing to a lift coefficient. Kevin has a good point about Re, too. My goal with my GA is to combine it with a nonlinear lifting line method and do just as he suggests. It's a shame XFLR can't be run batch. Oh well, I'll write my own. I've done it before, but that was 20 something years ago in school. What's your new parameterization method? Mark 



Quote:





I have no idea of this planform optimization technique might be of interest:
http://oddjob.utias.utoronto.ca/dwz/...t_MDO_2008.pdf At DLG Re with a tapered wing, it is quite difficult to get the airfoils along the span to work correctly together over the AoA range with the induced Cl changes along the span. This probably isn't as big of problem with a powered airplane at higher Re. I think I may be too far from my school days to make this work! Kevin 


United States, KS, Andover
Joined Oct 2005
547 Posts

Kevin,
In the paper you linked to, they are using and adjoint method to get the design sensitivities out of the flow solver. This the way things are headed. They work well and don't cost much. One challenge to them, though is to get a well converged adjoint solution. I've used one such method in the past with pretty good results, but for another case which involved a lot of flow separation, it didn't do so well. One thing to note in the paper, though, is that they are using an Euler code, so they can't account for the drag penalty of the winglets they design. Still, a cool demonstration and I see from a paper they presented last summer that they are heading towards using a viscous solver. Mark 



Since the PARSEC method didn't work too well, I'm now going to try to define the shape directly using cubic bsplines. The top and bottom surfaces will each be defined by 8 control points. The vertical locations of all but the first and last control points will be the design variables, so that will be 12 total.
It seems like it will work better than PARSEC because I have more control over the range of shapes by using side constraints on the heights of the control points. Unfortunately, Matlab only has a builtin fit points spline function. Since I wanted control points, I had to program my own function. It was no easy task (search for bsplines if you're interested), but now I have a function that creates 2D or 3D curves from a set of 2D or 3D control points. The airfoils will obviously only be 2D. Hopefully this method will work for optimization. I'll report back once I get it set up and get some results. If it works I will try adding more control points. Dan 



That was just an example I made by hand using the control points. It's not optimized.




The control point curve optimization did work. I did the same optimization as I have been  that is, maximize Cl/Cd at AoA of 1.5, 4, and 7 degrees while maintaining Cm better than 0.1 and 9% thickness.
The result was interesting. The optimization did a pretty good job for the first pass  I got an average of 72.5 which is only about 2 less than the best I got with the previous parameterization. There's a notable bump in the bottom surface, which I'm guessing helps keep the BL attached at one of the design points. Instead of increasing the number of control points, I think I will increase the degrees of freedom for each one. I'll let most of them move around in the xdirection as well as the y direction, but constrain them so they don't overlap each other. This is important because the highest point on the top surface (or lowest point on the bottom surface) tends to be very nearly directly inline with a control point. If the control points are not allowed to move in the xdirection, this means the max point on a surface is forced to be at only a few different positions. 



You might want to look into the mathmatic description of splines. Some are smoother than others: http://www.homebuiltairplanes.com/fo...urbswavy.html




Quote:
One nice thing about bsplines is that you can increase the smoothness easily by changing the degree of the curve. The higher the degree, the more control points are pulling on any given portion of the curve, so you get a smoother curve. Right now I'm using third degree (cubic) bsplines but I may try increasing that if the results are too bumpy. 




I keep getting weird results with the bspline curves. The optimizer keeps exploiting a weird XFoil anomaly. Normally XFoil initializes the boundary layer solution from the previous point calculated (as a first guess kind of thing). I'm looking at the L/D at 1.5, 4, and 6.5 or 7 degrees angle of attack. Well, the optimizer keeps getting solutions that give well over 100 for the average, which is clearly wrong. It turns out that when this happens, if I initialize the BL solution from some other angle, like 0 degrees instead of 1.5, the actual average is somewhere around 60 most of the time instead of 100+ for the "optimal" airfoil. So I'm going to try always initializing from 0 degrees and hope I don't get reach a similar numerical issue. Anyone know a better way to ensure this doesn't happen (or even know what I'm talking about)?



United States, KS, Andover
Joined Oct 2005
547 Posts

I had a similar problem with my method. I pipe my Xfoil output to a file and then read the file. Not the most efficient way, but it works. Anyway, for some reason I kept getting unrealistic cl/cd's like yours. Turned out that my script to read the file was reading values from the first iteration, not the last.
You can always reset the boundary layer using the "init" command. Also, if convergence is a problem, you can set the default number of iterations using the "iter" command. If I don't get a converged solution in 200 iterations I take it as a bad sign and that airfoil gets eliminated from the gene pool. You are checking for cases that don't converge, right? Optimization methods will always seek out any weakness you leave in your problem definition. ALWAYS. If you don't thin you have a weakness, just run it and find out. Forming proper constraints is half the battle. Mark 