Unwrapping a conic loft airfoil section...

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
LVAeronautics
Posts: 105
Joined: Sun Nov 20, 2022 6:21 pm
Contact:

Re: Unwrapping a conic loft airfoil section...

Post by LVAeronautics »

edwilliams16 wrote: Thu Dec 01, 2022 7:25 pm @LVAeronautics
A simple python script could import the upper and lower halves of the airfoil separately. This is likely easier in the long run that trying to repair and split the existing wire. Could you upload the file? The uiuc database doesn't appear to have that particular airfoil. I assume it is typical.

So if I understand you, you plan on lofting different but similar airfoils in short enough spans that the flattening distortion can be neglected?
Correct. They are basic conic shapes. The intent is to piece all of them together to construct a mold for the purpose of producing composite parts off of them. This is the lower cost but acceptable way to do it; if the whole thing was lofted together, we'd be talking about getting a multi-axis CNC mill involved....which could start getting pricey. Besides, the aero analyses we have conducted are based on said differing conic sections.

I am nowhere near Python scripting...yet. I cannot simply place a line connecting the origin points of each leading edge to separate them...or is scripting what I have to do? @hammax , how did you do it on your product above?
"Testing leads to Failure, and Failure leads to Understanding" -Burt Rutan
edwilliams16
Veteran
Posts: 3108
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Unwrapping a conic loft airfoil section...

Post by edwilliams16 »

@LVAeronautics
The following script reads in a dat file split between upper and lower and interpolates them with BSplines..
I used https://m-selig.ae.illinois.edu/ads/coo ... 653218.dat

Code: Select all

import Part
import Draft
from FreeCAD import Vector as V3

path_to_file = '/path_to_my_file_directory/'
filename = 'NACA 65(3)-218.dat'

with open(path_to_file+filename) as f:
    lines = f.readlines()
    name = lines[0]
    upper = []
    lower = []
    isUpper = True
    for line in lines[1:]:
        x, y = [float(c) for c in line.split()]
        if x == 0:  #end upper, start lower
            isUpper = False
            upper.append(V3(x,y,0))
        if isUpper:
            upper.append(V3(x,y,0))
        else:
            lower.append(V3(x,y,0))

upperBspline = Draft.make_bspline(upper, closed=False, placement=None, face=None, support=None)
lowerBspline = Draft.make_bspline(lower, closed=False, placement=None, face=None, support=None)
#Part.makePolygon(lower)
FreeCAD.ActiveDocument.recompute()


Edit the path line and paste into the python console.

I then scaled them and lofted pairs to make a tapered section.
Screen Shot 2022-12-01 at 10.32.18 AM.png
Screen Shot 2022-12-01 at 10.32.18 AM.png (22.84 KiB) Viewed 738 times
Attachments
NACA653218.FCStd
(18.94 KiB) Downloaded 10 times
User avatar
LVAeronautics
Posts: 105
Joined: Sun Nov 20, 2022 6:21 pm
Contact:

Re: Unwrapping a conic loft airfoil section...

Post by LVAeronautics »

@edwilliams16 , thank you for that, but I am still relatively new to this platform. I have zero experience in Python coding (I am an aerodynamics guy & test pilot by trade, and barely grasped Pascal, FORTRAN & C++ back in my college days), so I honestly do not know the first thing to do with what you sent me. That said, I'll start learning Python!

Is this the only way to do what I am seeking to do without 'manually' making upper and lower airfoil splines? I'll do whatever it takes, and I fully realize that no platform out there makes instant products, but if there is a relatively simplified way to do this, accurately, I am all ears. I've already managed to make accurate unwraps with other conic lofts, such as lofted cylinders, ellipses of varying dimention & twist along the loft, and I have seen what guys like you and @hammax do quickly & accurately with airfoils, so I know it can be done. I just need a little assistance learning the workflow sequence of your methods.

If there is something I am doing wrong with my workflow sequences, please by all means point it out! Previous learning experiences in the past have taught me that if I am feeling frustrated the way I am now, I am on the cusp of the "light coming on in my head", and 'getting it'.

Again, thank you to those who have replied, and thank you for your patience! We'll get there; I owe you that!
"Testing leads to Failure, and Failure leads to Understanding" -Burt Rutan
edwilliams16
Veteran
Posts: 3108
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Unwrapping a conic loft airfoil section...

Post by edwilliams16 »

All you have to do is change the path_to_file line to reflect the directory in which the dat file is stored, and filename to be the name of the dat file itself. (For windows, you need backslashes instead of forward ones as folder separators, unlike Mac or Linux) Then open a new FreeCAD file and paste the code into the python window. It will produce the upper and lower half BSplines of the Airfoil. Then we can go from there.

Ed ATP SMEL CFIAI 5000+ hrs PhD
User avatar
hammax
Veteran
Posts: 1985
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee DE

Re: Unwrapping a conic loft airfoil section...

Post by hammax »

... my version of reworked profile ("rubber-profile").
Modern profiles seem to be polynomes, BSpline is it also.
Scaled, twisted by placement, straight Loft.
What is the understanding of "conic"?

FlyWing_3.png
FlyWing_3.png (30.43 KiB) Viewed 611 times
Attachments
NACA653218_H.FCStd
FC.20.1
(26.13 KiB) Downloaded 6 times
User avatar
LVAeronautics
Posts: 105
Joined: Sun Nov 20, 2022 6:21 pm
Contact:

Re: Unwrapping a conic loft airfoil section...

Post by LVAeronautics »

hammax wrote: Fri Dec 02, 2022 7:12 am ... my version of reworked profile ("rubber-profile").
Modern profiles seem to be polynomes, BSpline is it also.
Scaled, twisted by placement, straight Loft.
What is the understanding of "conic"?


FlyWing_3.png
A conic shape is a plane curved in one direction, but straight (ie 'flat) in another. In mathematical terms, it is any curve produced by the intersection of a plane and a right circular cone. Depending on the angle of the plane relative to the cone, the intersection is a circle, an ellipse, a hyperbola, or a parabola. In this case, an unwrapped conic surface, once cut via CNC, can be 4-roll formed into the original curved geometry; sheet metal guys I know (who will be fabricating these pieces once cut out) refer to it as a 'single plane bend'.
james-coleman-zahner-fabrication-graphic-scaled.gif
james-coleman-zahner-fabrication-graphic-scaled.gif (204.28 KiB) Viewed 572 times
I was thinking last night just to make individual upper and lower B-splines for each airfoil, then loft, assemble and or unwrap individually. Not the biggest deal, all truth being told. What is the workflow sequence for "Combing" the B-Spline? For some odd reason, I get nothing but error messages; maybe it is my misunderstanding.
Last edited by LVAeronautics on Fri Dec 02, 2022 12:49 pm, edited 1 time in total.
"Testing leads to Failure, and Failure leads to Understanding" -Burt Rutan
User avatar
LVAeronautics
Posts: 105
Joined: Sun Nov 20, 2022 6:21 pm
Contact:

Re: Unwrapping a conic loft airfoil section...

Post by LVAeronautics »

edwilliams16 wrote: Fri Dec 02, 2022 2:58 am All you have to do is change the path_to_file line to reflect the directory in which the dat file is stored, and filename to be the name of the dat file itself. (For windows, you need backslashes instead of forward ones as folder separators, unlike Mac or Linux) Then open a new FreeCAD file and paste the code into the python window. It will produce the upper and lower half BSplines of the Airfoil. Then we can go from there.

Ed ATP SMEL CFIAI 5000+ hrs PhD
Cool! I'll give it a shot!
"Testing leads to Failure, and Failure leads to Understanding" -Burt Rutan
User avatar
LVAeronautics
Posts: 105
Joined: Sun Nov 20, 2022 6:21 pm
Contact:

Re: Unwrapping a conic loft airfoil section...

Post by LVAeronautics »

@hammax & @edwilliams16

I experimented with the following sequence:

Create upper & lower coordinate sets for the airfoils (saved as a .dat format)
In Part Design WB:
Create Body
Import
In Draft WB:
Wire to Sketch; remove line connecting LE to TE
Sketch to Wire
Wire to B-Spline
Scale & Place accordingly
(repeat for second section)
In Part WB:
Create Loft
In Mesh Design WB:
Select Surface
Create Mesh
Unwrap Mesh

Here is the result:
I think I got it.jpg
I think I got it.jpg (40.12 KiB) Viewed 519 times
I think I have arrived at the solution; a Eureka moment, if you will. If you guys can 'sanity check' for me, I'd appreciate it. I am assuming I can compress all these actions into a macro for future use, correct? [Edit, Ed- I just ordered some recommended texts on Python...looking forward to learning it!]
Attachments
AmIThereYet.FCStd
(83.01 KiB) Downloaded 12 times
"Testing leads to Failure, and Failure leads to Understanding" -Burt Rutan
edwilliams16
Veteran
Posts: 3108
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Unwrapping a conic loft airfoil section...

Post by edwilliams16 »

We cant follow your procedure without the dat file. Please upload or paste it between code tags.
Did you try my python?
edwilliams16
Veteran
Posts: 3108
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Unwrapping a conic loft airfoil section...

Post by edwilliams16 »

To remove the straight edge in your imported wires from the leading to trailing edge, set the Wire's Closed property to false.
Post Reply