[WIP] airfoil workbench

Show off your FreeCAD projects here!
User avatar
looo
Posts: 3096
Joined: Mon Nov 11, 2013 5:29 pm

Re: [WIP] airfoil workbench

Post by looo » Sat Dec 14, 2019 10:51 pm

montagdude wrote:
Sat Dec 14, 2019 2:42 pm
Looks really cool. Could this be used to smooth out "wiggles" in existing airfoils, i.e. ones generated by Xoptfoil?
I didn't know about this library. Can you share some insights how it works? How is the geometry modified?

I wanted to use the splines directly to optimize the foils. Similar as it is shown in the clip above (which is not a project of mine). This guarantees smooth foils.
For sure the calibration task can be used to create a smooth representation of any foil given by coordinates. For further use in freecad, a spline representation is needed anyway. So having a kind of standard for these spline foils will help to interface design and analysis (hopefully)

The optimization and interpolation of aerodynamics is something I would like to experiment with. Not sure if it will provide any output.
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
montagdude
Posts: 33
Joined: Tue Jan 08, 2019 9:04 pm

Re: [WIP] airfoil workbench

Post by montagdude » Sun Dec 15, 2019 12:45 pm

looo wrote:
Sat Dec 14, 2019 10:51 pm
montagdude wrote:
Sat Dec 14, 2019 2:42 pm
Looks really cool. Could this be used to smooth out "wiggles" in existing airfoils, i.e. ones generated by Xoptfoil?
I didn't know about this library. Can you share some insights how it works? How is the geometry modified?
It uses something called shape functions. Specifically, I am using a formulation by Hicks-Henne. A reference is attached. (I have another one, but it was too large to attach. If you want it, PM me your email address.) These shape functions can be thought of as "humps" that get added onto a base airfoil to modify the shape.
looo wrote:
Sat Dec 14, 2019 10:51 pm
I wanted to use the splines directly to optimize the foils. Similar as it is shown in the clip above (which is not a project of mine). This guarantees smooth foils.
That video is actually mine. 8-) Splines are a decent way to parametrize an airfoil, but they don't guarantee a smooth shape. They can generate "wiggles" of various sizes, just like most other methods, depending on how many points you use. Fewer control points will generally produce smoother airfoils, at the expense of fewer degrees of freedom and thus less possibility of getting close to the true optimal solution.
Attachments
tashnizi_hicks-henne.pdf
(645.33 KiB) Downloaded 14 times
User avatar
looo
Posts: 3096
Joined: Mon Nov 11, 2013 5:29 pm

Re: [WIP] airfoil workbench

Post by looo » Mon Dec 16, 2019 10:01 am

montagdude wrote:
Sun Dec 15, 2019 12:45 pm
It uses something called shape functions. Specifically, I am using a formulation by Hicks-Henne. A reference is attached. (I have another one, but it was too large to attach. If you want it, PM me your email address.) These shape functions can be thought of as "humps" that get added onto a base airfoil to modify the shape.
Sounds interesting.
montagdude wrote:
Sun Dec 15, 2019 12:45 pm
That video is actually mine. Splines are a decent way to parametrize an airfoil, but they don't guarantee a smooth shape. They can generate "wiggles" of various sizes, just like most other methods, depending on how many points you use. Fewer control points will generally produce smoother airfoils, at the expense of fewer degrees of freedom and thus less possibility of getting close to the true optimal solution.
I guess "wiggles" can be avoided by some constraints. For example if one only uses the y-values and weights to be used for the optimization. Or use some kind of radial basis function to move the x-values to ensure the order of the values is kept the same.
Also I have seen a paper which shows that "wiggles" can be a feature to get a higher target value at certain operation points. So using a smooth integral formulation (Re, Ma, cl, ncrit) for the target-value might help as well.

I am not yet sure if it makes sense to further investigate this topic. But an airfoil workbench which only provides a way to create an airfoil doesn't make much sense either. Maybe it's possible to add the current functions to any other workbench?
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
User avatar
Zolko
Posts: 627
Joined: Mon Dec 17, 2018 10:02 am

Re: [WIP] airfoil workbench

Post by Zolko » Mon Dec 16, 2019 12:43 pm

looo wrote:
Mon Dec 16, 2019 10:01 am
I guess "wiggles" can be avoided by some constraints.
X-Foil is known for producing wiggles, contrary to the Eppler code which doesn't.

And I still don't understand how this fits with FreeCAD.
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
montagdude
Posts: 33
Joined: Tue Jan 08, 2019 9:04 pm

Re: [WIP] airfoil workbench

Post by montagdude » Mon Dec 16, 2019 2:38 pm

looo wrote:
Mon Dec 16, 2019 10:01 am
I guess "wiggles" can be avoided by some constraints. For example if one only uses the y-values and weights to be used for the optimization. Or use some kind of radial basis function to move the x-values to ensure the order of the values is kept the same.
Also I have seen a paper which shows that "wiggles" can be a feature to get a higher target value at certain operation points. So using a smooth integral formulation (Re, Ma, cl, ncrit) for the target-value might help as well.

I am not yet sure if it makes sense to further investigate this topic. But an airfoil workbench which only provides a way to create an airfoil doesn't make much sense either. Maybe it's possible to add the current functions to any other workbench?
There's still a lot of useful things you could do even without an automatic airfoil generation / optimization function. It would be cool to be able to slide control points around and see how the performance changes, or import an existing airfoil and re-fit it with a spline curve with a given number of control points.
User avatar
looo
Posts: 3096
Joined: Mon Nov 11, 2013 5:29 pm

Re: [WIP] airfoil workbench

Post by looo » Tue Dec 17, 2019 10:29 am

Zolko wrote:
Mon Dec 16, 2019 12:43 pm
And I still don't understand how this fits with FreeCAD.
Think of it like this:
Normally tools working with airfoils are working with coordinates directly. But this can hide some information (how does the airfoil look in between discrete points?). Interfacing airfoils in spline format (parametrized form) is in my mind a better approach.

What are the advantages of the spline approach?
1. Wing-design in FreeCAD should be done with splines. A fixed number of poles will help too.
2. Discretizing splines is easy, so existing analysis tools can be interfaced easily
3. Iterative modifications like they are needed for optimization tasks can be done with the basic geometry definition.

Why not using the sketcher?
This should be possible, but accessing all the degrees of freedom from a sketch might be difficult (automatic calibration, optimization).
A different number of poles for each airfoil of a wing needs some recompution of the splines to generate spline-surfaces
But yes, using a sketch for this task might be the more generic approach in the long run.
montagdude wrote:
Mon Dec 16, 2019 2:38 pm
There's still a lot of useful things you could do even without an automatic airfoil generation / optimization function. It would be cool to be able to slide control points around and see how the performance changes, or import an existing airfoil and re-fit it with a spline curve with a given number of control points.
There is not much difference between fitting an airfoil and optimizing an airfoil. I would like to use a local (nonlinear) optimizer which minimize a user-given target function .So the user selects a start configuration and the optimizer should find a better design.
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
User avatar
Zolko
Posts: 627
Joined: Mon Dec 17, 2018 10:02 am

Re: [WIP] airfoil workbench

Post by Zolko » Tue Dec 17, 2019 11:16 am

looo wrote:
Tue Dec 17, 2019 10:29 am
A different number of poles for each airfoil of a wing needs some recomputing of the splines to generate spline-surfaces
yes, this is a good point: fitting coordinates so that all airfoils from different families are treated equal in FreeCAD is a good idea.

looo wrote:
Tue Dec 17, 2019 10:29 am
So the user selects a start configuration and the optimizer should find a better design.
I think you're joking: you pretend to make a tool with which any random user can make better airfoils than the Seligs and Epplers and NACAs and RGs and HQs and Hepperles have done ? An optimizer only optimizes what the user has input, it's not some magic that will always give good results.
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
User avatar
hammax
Posts: 997
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee

Re: [WIP] airfoil workbench

Post by hammax » Tue Dec 17, 2019 3:40 pm

… discretizing coordinates from a spline foil.
Chris_G's CurvesWB has a tool "DiscretizedEdge" with different parameter options.
One of them is curvature controlled with a special algorithm (???) by angular and curvature properties.
Low curvature => extended distances; sharp curvature => small distances.
Result should be a smaller dataset than with prefixed distances (LE narrow - to TE bigger dist.)
How to harvest those points? => PointsWB => convert to points => export points

Rippe_4.PNG
Rippe_4.PNG (30.63 KiB) Viewed 200 times
Attachments
Camber.asc.txt
(541 Bytes) Downloaded 4 times
PSide.txt
(641 Bytes) Downloaded 4 times
SSide.txt
(600 Bytes) Downloaded 4 times
montagdude
Posts: 33
Joined: Tue Jan 08, 2019 9:04 pm

Re: [WIP] airfoil workbench

Post by montagdude » Tue Dec 17, 2019 6:40 pm

hammax wrote:
Tue Dec 17, 2019 3:40 pm
… discretizing coordinates from a spline foil.
Chris_G's CurvesWB has a tool "DiscretizedEdge" with different parameter options.
One of them is curvature controlled with a special algorithm (???) by angular and curvature properties.
Low curvature => extended distances; sharp curvature => small distances.
Result should be a smaller dataset than with prefixed distances (LE narrow - to TE bigger dist.)
How to harvest those points? => PointsWB => convert to points => export points


Rippe_4.PNG
Thanks for the tip. That will be useful for me when I am doing my own airfoil/wing designs.
User avatar
looo
Posts: 3096
Joined: Mon Nov 11, 2013 5:29 pm

Re: [WIP] airfoil workbench

Post by looo » Tue Dec 17, 2019 9:53 pm

Zolko wrote:
Tue Dec 17, 2019 11:16 am
I think you're joking: you pretend to make a tool with which any random user can make better airfoils than the Seligs and Epplers and NACAs and RGs and HQs and Hepperles have done ? An optimizer only optimizes what the user has input, it's not some magic that will always give good results.
You are absolutely right. The question is always what the target is. Designing an airfoil that might work good at all possible aoa's is for sure a difficult task. So getting a better overall-performance might be difficult. But optimizing for some specific areas an optimizing tool might help a bit.
I did one example and to me it doesn't look like this is total nonsense. I approximate (fitting) a clark-y airfoil and afterwards minimized drag for ca=[0.5, 0.6]. Looking at the polars, shows the improvements in this area.
Bildschirmfoto von 2019-12-17 22-27-22.png
Bildschirmfoto von 2019-12-17 22-27-22.png (7.1 KiB) Viewed 153 times
Bildschirmfoto von 2019-12-17 22-28-01.png
Bildschirmfoto von 2019-12-17 22-28-01.png (22.14 KiB) Viewed 153 times
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests