Airfoils: You Are Doing it Wrong

To be fair, I was at least doing it wrong-ish for many years, or at least, not as right as I could be. Allow me to explain – and yes, I’m dusting off this blog after many years of inactivity. I figured I would get things going again by going back to the very beginning, and pass along some of my updated thinking as it pertains to drawing airfoils in NURBS. In case you haven’t read it, here is my original post on drawing airfoils in NURBS. While I feel that was an improvement over how people approached drawing airfoils in the past, in time I’ve found better and more efficient ways of drawing them. By “better” I mean smoother, and more conducive to modeling the things that ATTACH themselves to wings – namely wing tips and wing/body fairings. The method described in that post is the best approach for doing airfoils – IF you are using T-Splines, which I was at the time. I don’t use T-Splines anymore for my work, and so what I found is that there are better ways of drawing airfoils, when you do NOT have the constraint placed upon you that the whole thing shall be one degree 3 curve.  The purpose of this post is not to be  Rhino3D step by step – in fact this is probably not a great post for beginners – rather this is aimed at folks who already have a decent grasp of NURBS modeling.  To a great extent the information in this post is platform agnostic- any NURBS modeling package where you can easily control point count and degree of your curves will work. So, without further ado……

Airfoils1

These are the raw points for a NACA 23012 airfoil. I chose it simply because it’s still in use today on lots of aircraft – namely lots of Cessna business jets. Now, people think that airfoils are complicated, but really they are quite simple. They are the addition of two mathematical curves – a camber deflection, and a thickness distribution. Allow me to explain graphically.

Airfoils2

Airfoil ordinate files have top and bottom sets of points. Connect those points with a straight line, and then run a smooth curve though the mid points of those lines, and you have the camber line for the airfoil. So, that’s your camber deflection. Somewhere there exists a formula for the thickness distribution for the airfoil – that is what determines how far from the camber line each set of points is.  So, you have a thickness distribution, deflected along a camber line. Simple. Right? NOW! Here’s where I’m going to make perhaps the most important point of this post. YOU ARE NOT LOOKING AT “THE AIRFOIL.” YOU ARE LOOKING AT A DUMBED DOWN COPY OF THE AIRFOIL. See, go back to the basics of what an airfoil is – the summation of two mathematical curves, right? How smooth are those curves? INFINITELY SMOOTH. How many points do they have? INFINITE POINTS. Does the data above appear to be either 1) Infinitely smooth or 2) Infinitely defined? Heck no! At best, it’s a copy of the original article. Even worse – the entire system that we use to store airfoils predates the existence of NURBS modeling packages, or even really NURBS math. We are trying to store smooth mathematical functions as degree 1 polylines. We are – in the most literal sense – sending our data back to the 1920’s for archival. Seriously – this method of storing airfoils as ordinate points in text files is pretty much as old as aviation itself, and has not been updated. Why are we surprised when this does not work very well for surface modeling. Why do we keep doing it this way? How is this still a thing? Seriously. This is nuts. Need proof? Here’s how most people make airfoils – they simply run an InterpCrv through all those points and call it done. I outlined why this is a bad idea in my last post on the subject, but here’s what you get when you do that with the NACA 23012:

Airfoils3

That’s actually not as horrendous as most conversions – it’s not awful, but that’s about the best thing I can say about it. Especially when you turn up the scaling on the back section of the airfoil, you can see it has some weird artifacts:

Airfoils4

Again, the best thing I can say is, “it’s not horrible.” And, when you go to actually make things that attach to a wing lofted with this curve, you’re going to propagate those curvature wobbles into the resultant surfaces. Better to make a new airfoil from scratch. Trust me, any time you invest in creating nice smooth airfoils will pay off huge on the back end.

I want you to think of what the Platonic ideal airfoil would look like, especially in terms of it being smooth, and how the curvature graphs would look. This whole post revolves around two very simple tools – point editing/manipulating degree and point count, and the use of curvature graphs to analyze our work. So, imagine in your head what this ideal airfoil would look like, especially the curvature combs. They would peak at the leading edge, and then very smoothly fade out as you travel aft, right? The NACA 23012 is a little odd in that with that drooped nose, it ALMOST creates a flat spot on the bottom, about 15% in from the nose. You can see the curvature dips, rises, and then fades. So, in this case, we would want that feature to be there too of course, but we want our airfoil to be smoother, and ideally with as few points as possible. That ideal airfoil, in your head, should look like this, right?

Airfoils5

Right? Nice and smooth, it peaks at the leading edge and then gradually fades. When I turn up the scaling on the back end, we get this:

Airfoils6

See, we sill get the required curvature dip along the bottom surface, but everything is SMOOTH. Notice how nice and constant the curvature at the back of the airfoil is. This is what an airfoil is SUPPOSED to look like, right? We are now looking at something that is far closer to what the “real” airfoil is, are we not? This is not a copy of a copy. How close is it to the original data? I scaled this up to 60″ in chord length (in the ballpark for a GA plane) and was able to fit my curves to the original data to within 0.005″. What do my curves look like? There’s four of them – two top and two bottom. Here’s the top and bottom “main” curves, with the points turned on:

Airfoils11

 

 

Each is a degree 5 curve with 9 points – so, NOT single span, but not so many that you cannot point edit the curve, or any surface created from the curve. Here are the nose curves, which have the break between them at the leading edge point:

Airfoils8

How did I create these curves? I started with rebuilding the back sections, and point edited them to fit. There’s no magic here – notice there are more points where there is more curvature, and fewer points where there is less. So, place your points accordingly. Then, point edit to get them to fit your data. Add points if you need more control. Check your new curve against your original points, and always always always check with curvature combs. Seriously, just put a curvature comb up on your curve as you work on it, and leave it up till you’re done. Then, when you’re happy with the main top and bottom curves, create your nose pieces just by using whatever is clever – in this case I used BlendCrv, point editing, and curve matching tools. Again, keep asking yourself, “Is this what the curvature graph for an airfoil looks like?” Keep asking yourself that question until the answer is “yes.”

I’m always blown away in my work how many terribly drawn airfoils I see, because really when you get down to it, making proper airfoils doesn’t take fancy or expensive software. Really, it’s just rebuilding curves, point editing them, and constantly checking your curvature graphs. But, you can’t really sell that as a software package, so we get all sorts of “smoothing” plugins and automatic airfoil conversion plugins. Trust me, there is no purpose to those tools, they will only serve to make your life harder. Rebuild. Point Edit. Check your curvature. Done.

-Sky

Published with permission from School Street Design Company Blog. Source.

Free yourself from the insanity of Zebra analysis with Autodesk Shape

So you’re working on your surface model, and you are trying to get everything to match up nicely, usually to either G1 (tangent) continuity, or G2 (curvature) continuity.  You think things look pretty good, you join them all together, you run ShowEdges to see if your model has any naked edges……and then you use Zebra to check that your edges are continuous in the way you desire.  Which, frankly, I think is completely nuts.  Allow me to explain.  Here’s a wingtip I made recently:Wingtip1

It looks very smooth and nice, but……do I know it’s smooth and nice?  If I use Rhino’s Zebra analysis tool, I get something like this:

Wingtip2

Well yeah, that looks good….I think?  Right?  Wait!  What about this little burble here:

Wingtip3

What’s that?  I mean, if you read through the Rhino Level II training material, that would indicate that your model might even have a naked edge there, despite the fact that we know there is not a naked edge (because you always run ShowEdges after you join your models together right?).  It’s at this point that one usually goes onto the Rhino forum, start a thread about continuity and someone points out that hey those Zebra results are totally dependent on your mesh settings.  Oh right!  To illustrate that, let’s see what Zebra looks like with the mesh settings all the way to the most coarse:

Wingtip4

Clearly, my model is a piece of garbage!  Except, it’s not.  In fact it’s the best wingtip I’ve ever made.  So, to review, checking the continuity of your surfaces in Rhino involves jacking up the mesh settings to such a degree that you’re totally (pretty?) sure that if you see something it’s the surface and not the mesh, and then zooming way in on all your seams, and visually inspecting them for breaks in your Zebra analysis.  This sounds crazy, no?  I mean, if only we lived in a day and age where we could program some sort of fancy adding machine to do mindless trivial tasks for us and give us nice numerical results to work against, instead of squinting and zooming and changing our mesh settings, and then squinting again…..more zooming……etc.  Good news!  We do live in such a day and age.  I’ve been using Autodesk Shape for a few years now, and I have to say it’s fantastic.  There are a whole host of tools used for both analysis and surface generation/editing, but the one I use for analysis over and over and over is called Global Matching Analysis, and let me tell you it’s wonderful.  Instead of making you do the whole Zebra dance I outlined above, it actually measures and computes the continuity between joined edges, and gives you very sensible table of results.  Allow me to illustrate.  If you start the tool, select your geometry and then click Apply in the box, you’ll get something like this:

Wingtip5

There’s a lot going on here, but I assure you, it’s very usable.  See near the top where it says “No. of Points?”  That’s how many samples it’s taking along each edge.  50 is plenty for most applications.  Now let’s star by seeing if the model is tangent continuous where I expect it to be so.  First, you have to ask yourself “what do I consider to be good enough for tangent continuous?”  We’re talking degrees here – how many degrees from 0.0 can adjacent surfaces be and still be considered tangent?  I like 0.5 personally.  So I set the low end threshold at that using the Range Min. setting.  The top end setting (9.0 in this case) can be thought of as the “over this setting, and it’s intentionally not tangent continuous” setting.  Like if you had an intentional sharp crease, you would want a way of excluding that edge from the report, since you have not expectation of that being G1.  Now, click the “Defectives only” box under Results.  Here’s what you get:

Wingtip6

Only two edges here are not tangent, but let’s take a look:

Wingtip7Right!  These edges are part of a surface that transitions between the blunt trailing edge and the smooth shape of the tip.  There is no expectation of these being tangent, and since they are transitioning from G0 (positional) to G1 (tangent) of course they are going to set off an alarm.  In short, everything that I expect to be tangent IS.  All is well!  Now, checking for G2 (curvature) continuity, we can set the upper and lower limit just like with Tangency Range Min/Max.  I typically leave it at the default of 0.5/1.   In this case, anything less than 0.5…..curvies?  I actually don’t know what the units are here, in fact it might be unit-less, but really what it comes down to is the rate of change between adjacent surfaces.  So if the delta of the rate of change is less than 0.5, I’m calling it good.  For this model I get this:

Wingtip8

The majority of the edges are indeed G2.  How about that one at the back?  Well, to generate that surface I used the Shape Surface Blend tool, and I was not able to get the overall shape I wanted with it set to Curvature on the edges.  We could go pretty deep down a rabbit hole here, but suffice to say I did not expect those particular edges to be G2, and I’m still very happy with my wingtip.  I’ll be doing a whole set of posts over the next few weeks about Shape and using this wingtip as an example of cool stuff you can do with it.  Hope you found this useful, and hopefully you can free yourself from the insanity of Zebra analysis!

And, just in case you’re wondering – I’ve never been given a free copy of Shape, I’m simply a user of it, a very happy user.

Published with permission from School Street Design Company Blog. Source.