HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Feb 18, 2011, 12:27 AM
Registered User
Joined Feb 2011
12 Posts
Well, there are about 20 quad-core machines at work sitting idle night-times and weekends... I may be able to 'leverage' that

The idea is to skin a NURBS surface of the overall shape (very doable), and add the 'internal structures' as a boolean union to constrain the minimum size (not a huge task)...

The parametrization I was thinking of simply takes about 5 vertical slices (planes with normals in the direction of motion) through the body based on a circular cross section, and varies slice width, top height, bottom height, width and a couple of weights - in fact, if one were to look at a cross section through the horizontal plane, the control points would look very similar to your airfoil section in the video above. I was thinking about whether I could improve the parametrization by using a more 'high level' scheme like NACA series airfoils... and how I might go about that - or whether I should have a relatively large number of parameters controlling NURBS control points more-or-less directly...

One of the reasons I want to use automated optimization is due to the very, very wide variety of body shapes that have been used on successful HPVs - on the one hand this may indicate that it doesn't matter all that much what the exact shape of the body is, on the other hand it may indicate that the current designs are all roughly equally sub-optimal.

A small sampling of the wide range of shapes...
http://home.comcast.net/~jeff_wills/vector/vector.htm
http://www.trisled.com.au/aquila.asp
http://www.trisled.com.au/avatar.asp
https://picasaweb.google.com/dean.blueshift/2010Design#
http://www.varnahandcycles.com/hpv.htm
http://www.adventuresofgreg.com/HPVMain.html
http://webcache.googleusercontent.co....google.com.au

Most of the designs seem to start with an optimised 2D airfoil section and then attempt to apply it to 3D by rotation and a non-linear transform, or by having a narrow body and treating the car as a stubby vertical wing (...or by just drawing something that looks cool...) then doing a moderate amount of 'traditional' work on the resulting shape. The sheer amount of variation seems to indicate that no-one has found anything like an optimal design for drag reduction, or if they have they're not saying so...
madact is offline Find More Posts by madact
Reply With Quote
Sign up now
to remove ads between posts
Old Feb 18, 2011, 06:13 AM
Registered User
United States, KS, Andover
Joined Oct 2005
539 Posts
Dan,

That works the way I imagined it would. Maybe this weekend I'll find the time to play with my method again.
markschaffin is offline Find More Posts by markschaffin
Reply With Quote
Old Feb 18, 2011, 06:17 AM
Registered User
United States, KS, Andover
Joined Oct 2005
539 Posts
Madact,

If you have access to more compute power, a GA or swarm method might work for you. At least it would point you in the right direction. It really all comes down to how quickly you can generate/modify your grid and get your solution. Choosing the best objective function and constraints is the other half. It doesn't hurt to understand the physics, either. Optimizers will easily exploit any weakness they can find, even if they are nonphysical. They are sort of like squirrels... or 2-year olds.

I'd be interested in your results.

Mark
markschaffin is offline Find More Posts by markschaffin
Reply With Quote
Old Feb 18, 2011, 09:16 AM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,515 Posts
Quote:
Originally Posted by markschaffin View Post
Madact,

If you have access to more compute power, a GA or swarm method might work for you. At least it would point you in the right direction. It really all comes down to how quickly you can generate/modify your grid and get your solution. Choosing the best objective function and constraints is the other half. It doesn't hurt to understand the physics, either. Optimizers will easily exploit any weakness they can find, even if they are nonphysical. They are sort of like squirrels... or 2-year olds.

I'd be interested in your results.

Mark
This is definitely the case. Usually for my test cases I set a minimum airfoil thickness in the last 2/3 of the chord so that it doesn't get too thin. Well, my thickness calculation was a little bit oversimplified and sure enough, the optimizer exploited that. I've since fixed it. I also had to program redundant XFoil calculations because running it from only one initialization point for each profile could give nonphysical results in some cases, which the optimizer also exploited.

Madact, that sounds like you at least have a good start. If you need help with 2D profiles, I have experience with NACA parameterization (see my earliest posts in this thread) and also NURBS curves, so I could probably help you out some. I'd also be interested to see your results.

Dan
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old Feb 18, 2011, 09:27 AM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,515 Posts
I added another constraint: trailing edge wedge angle. Even with my minimum thickness constraint for the last 2/3 of the chord, the profiles could still get thin enough that they would be very hard to build unless you were using composite materials (because the min thickness is the trailing edge gap, they could stay about that thin near the trailing edge and still satisfy the constraint). This one had a min trailing edge wedge angle of 10, which seems to have worked better. I think this could actually be built from balsa, although you'd have to be careful with it.

My next step is to try adding one more control point to the top and bottom and see if the results are significantly better or whether it gets too bumpy.
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old Feb 22, 2011, 06:12 AM
Registered User
Joined Feb 2011
12 Posts
Well, I now have a basic parameterisation going on ~40 parameters using octave + octave-forge nurbs (http://octave.sourceforge.net/nurbs/index.html) giving nurbs surfaces I like the look of, and I have nurbs++ (http://libnurbs.sourceforge.net/index.shtml), which provides quality meshing, compiling nicely under gcc 4... will soon have em connected up and be able to generate .stl triangle meshes to throw at OpenFOAM. Just need to read the surface definition in, the meshing and STL file output is working fine - I'm thinking by Thursday... things are pretty crazy round here at the moment :-S.

Let me know if you want to grab a compilable copy of nurbs++...
madact is offline Find More Posts by madact
Last edited by madact; Feb 22, 2011 at 08:32 AM.
Reply With Quote
Old Feb 22, 2011, 08:28 AM
Registered User
Joined Feb 2011
12 Posts
Quote:
Originally Posted by Montag DP View Post
This is definitely the case. Usually for my test cases I set a minimum airfoil thickness in the last 2/3 of the chord so that it doesn't get too thin. Well, my thickness calculation was a little bit oversimplified and sure enough, the optimizer exploited that. I've since fixed it. I also had to program redundant XFoil calculations because running it from only one initialization point for each profile could give nonphysical results in some cases, which the optimizer also exploited.

Madact, that sounds like you at least have a good start. If you need help with 2D profiles, I have experience with NACA parameterization (see my earliest posts in this thread) and also NURBS curves, so I could probably help you out some. I'd also be interested to see your results.

Dan
Shouldn't have a problem with zero-thickness TE as my TE is symmetrical and the NURBS control grid has width limited at 0 (convex hull should keep things good there, and I'm thinking I might run a handy prog from work called "offset surface" which makes everything a bit thick with rounded edges, before sending the mesh down to the simulation. Besides, we're not allowed sharp edges (big event for schools, lots o kids cluttering up the track...) so I may as well simulate with my surface puffed up to a minimum of 10mm thick after generation...

I've attached a zip with my octave files for doing parameterization - section.m generates 2D slices, para.m takes a set of 2D slices and builds a surface. The values in para.m yield a 'typical looking' vehicle body - a bit over the length limit as I wasn't looking at the specs while playing with code. We get 2.7m long x 1.1m wide x 1.2m high to play with - which makes it easy to limit the search space, if I just clip the point coordinates of the mesh at the size restrictions and a ground clearance value, the flat spots should cause enough drag to send any optimization algorithm running in the other direction. Min volumes (for rider and such) is another story, currently available options for doing boolean ops look a bit flaky, though the 3D mesh generator may be able to do it implicitly.

I'd appreciate any comment on ways to improve my parameterization - currently it's just the set of values passed to the section() function at the top (with special restrictions on nose and tail parameters...)
madact is offline Find More Posts by madact
Reply With Quote
Old Feb 22, 2011, 06:42 PM
Registered User
United States, KS, Andover
Joined Oct 2005
539 Posts
I came across this book today. I'm able to access it online and I read a good part of it today. It does a really good job of explaining the concepts of PSO and improvements that have been made. I wish I could justify the cost, but if you can find it in your library, it is worth picking up.

Got my constraints in my method last night. I've started to examine if I'm actually finding the global minimum or getting stuck in local minima. I might go back to a Genetic Algorithm.

http://www.amazon.com/Particle-Swarm...8421557&sr=1-2
markschaffin is offline Find More Posts by markschaffin
Reply With Quote
Old Feb 27, 2011, 06:49 PM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,515 Posts
Better initial designs

My usual particle swarm method is very slow and gives poor results initially because the control points are just placed randomly all over the design space to start out. This causes XFoil to take a very long time to run for the first 20 iterations or so until "good" designs are found.

Right now I'm trying to solve this problem by initializing the design space with random NACA-like designs using the following parameters:

-Max camber
-Location of max camber
-Max thickness
-Trailing edge slope

The benefit of this is that all initial designs are at least sensible shapes that XFoil doesn't have trouble with, for the most part. They also all end up within the desired thickness constraints, thus avoiding high penalty function values. I think this will also help to come up with a consistently better final design, even using less particles in the swarm, because of the high percentage of good initial designs to draw from.

The downside is that the first iteration takes a long time because it actually consists of two optimizations for each airfoil: find curve-fit coefficients to match each NACA-like airfoil, and find the control point locations to closely match this curve fit. But, I think overall the optimization run time will be reduced.

For the test I'm running now, the best design for the first iteration had an objective function value of 0.0123 (I'm minimizing Cd), whereas with the standard initialization method I sometimes don't get a value less than 1000 (because of penalties for not meeting constraints) for 10 or more iterations.
Montag DP is offline Find More Posts by Montag DP
Last edited by Montag DP; Feb 27, 2011 at 06:54 PM.
Reply With Quote
Old Feb 28, 2011, 06:30 AM
Registered User
United States, KS, Andover
Joined Oct 2005
539 Posts
Dan,

This is close to the way I start. I work of perturbations to a seed airfoil. My starting point is the parameterization values of that seed.

In the literature there are discussions of methods that ensure that all the initial particles are feasible and methods that kill off infeasible particles and create new ones.

Mark
markschaffin is offline Find More Posts by markschaffin
Reply With Quote
Old Feb 28, 2011, 11:52 AM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,515 Posts
For the test case I ran the final result was pretty much the same as usual but it was found in fewer iterations than normal and it also ran a lot faster, except for the first iteration. So I think I'm going to keep using this method. It should also help a lot when running at higher Reynolds number where xfoil seems to have a lot more trouble converging with bad designs.
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old Mar 08, 2011, 10:46 PM
Registered User
Joined Feb 2011
12 Posts
Just on a random note, I found a neat little parametrization called 'bezier-parsec', which combines the use of G2-continuous bezier curves with parsec-style parameters like leading edge radius, max thickness / chord of max thickness, camber curve and amount, trailing edge angles etc. ... I can put together some .m files if anyone is interested - the idea is that they use two bezier curves for the thickness (one each for the leading and trailing edges), and two for the camber, with a total of 12 or 15 parameters for their "BP3333" and "BP3434" variants.

The parameters are all very well-behaved and aerodynamically significant, and according to the paper can match a very large set of existing NACA and Eppler airfoils - not sure how well they'd be able to replicate your funky lower surface bumps, though...

I found direct manipulation of control points wasn't very quick to find an objective-function 'valley' to follow in my case, and I tried a DCT parametrization with even less success. Hopefully this parametrization should help...
madact is offline Find More Posts by madact
Reply With Quote
Old Mar 08, 2011, 10:48 PM
Sink stinks
Montag DP's Avatar
United States, GA, Atlanta
Joined Apr 2005
4,515 Posts
Madact, if you have any more references for that parameterization method I'd be interested in seeing them. I've read about and even tried using PARSEC parameters but never found a good way to implement them because it was always too hard for me to ensure a reasonable shape when applying them directly to curve fits.
Montag DP is offline Find More Posts by Montag DP
Reply With Quote
Old Mar 09, 2011, 05:28 AM
Registered User
Joined Feb 2011
12 Posts
If you have access to ACM or elsevier publications, you can find the paper that I'm working from here: http://portal.acm.org/citation.cfm?id=1840197 . I shan't be posting a copy of the paper due to copyright (if you are a University student, you can probably gain access through the online subscriptions maintained by your library), however I'm happy to share my octave code... I believe implementing a mathematical formula still counts as fair use and/or not covered by copyright.

So, without further ado, here's the thickness curve from BP3434 . You'll need the "nurbs" package (http://octave.sourceforge.net/nurbs/index.html) which I believe works with Matlab or the free alternative 'octave' (which is just as good IMO apart from having fewer funky toolboxes and no JIT compiler to speed up massive loops). Will post more as I implement (prob. over the next few days).

bp3434_thickness

To see what it look like, uncomment some plot commands in bp3434_thickness.m , and/or use the commands from the nurbs package on the result (nrbplot, for example).

Try bp3434_thickness( -0.05, 0.3, 0.08, 0.1, 0, 0.03, 0.8 ) for a randomly chosen plausible thickness curve
madact is offline Find More Posts by madact
Last edited by madact; Mar 09, 2011 at 07:22 AM.
Reply With Quote
Old Mar 09, 2011, 06:15 AM
Registered User
Joined Feb 2011
12 Posts
... Their 'b8' parameter is actually quite similar to what I was doing with my 'nose diameter' variable in my initial parameterization... I've since learned a bit more about bezier curves though - notably G1 and G2 continuity conditions. This reference ( Bezier_curves.pdf ) is absolutely excellent - you can easily see how the BP3434 equations 'fall out' of the G2 continuity conditions given in section 2.6, given the control point parameters chosen for Bezier-Parsec. Bezier curves are very handy for my purposes, as they can be trivially stitched together into NURBS curves with uniform point weighting of 1, which can then be rotated or lofted into 3D surfaces.
madact is offline Find More Posts by madact
Reply With Quote
Reply


Thread Tools