Oct 20, 2012

Playing with FreeCAD: Airfoils and Blades

FreeCAD is a very interesting tool. One of its advantages is that it can read and use data from various other programs. This feature is very important and can save you a lot of time in various tasks. One of these tasks is airfoil and blade design. There are various tools that can create airfoils and then export them in a format that FreeCAD can use for further editing.
Designing airfoils directly on a CAD program might be a demanding task that requires a lot of time. So it's preferable to use a tool that creates airfoils automatically. Some of these tools are Xfoil, XFLR5 and JavaFoil. All these programs are Linux-friendly and can save their data in a format that FreeCAD can use.

 XFLR5

 XFoil

JavaFoil

XFLR5 and Xfoil save an airfoil as .dat file. This is a text file that contains the coordinates of airfoil's points and you can import these files to FreeCAD directly from the Open File dialog box. JavaFoil can save its airfoils as .dxf .igs or .txt files. Even if .dxf and .igs files can be used with FreeCAD it's better to use the .txt format. But be careful, you have to rename the file from .txt to .dat in order to make it readable from FreeCAD.

 That's what you get if you try to open a .dat file on FreeCAD. You have to choose the option "Common Airfoil Data" to open your airfoil correctly.

An airfoil imported from a .dat file to FreeCAD.

Now you can easily create a blade. Just switch to the Part Workbench and extrude the airfoil . Define the height you want and it's ready.

 A blade created from an extruded airfoil.

But typically blades are not so simple. Sometimes the upper face is much bigger, and/or rotated , and/or it creates an angle with the z axis. Well, there is nothing to worry about it because FreeCAD has all the necessary tools to create the geometry you want.

First, let's see how to create a blade with a much bigger upper face. Once your airfoil has been created correctly you have to switch to Draft Workbench. Then downgrade airfoil's shape twice and get a wire. Now you can use the scale command to scale the wire. Don't forget to select the "Create Copy" option so you will get a copy of the original object.  Change now the properties of the new object to move it along the z axis. The final value affects blade's height. Finally you have to switch to Part Workbench and use the Loft command to create a loft between the two objects. Make sure that the "Create Solid" option is checked in order to get a solid. You will get a solid that looks like the one of the image below.

A blade with a bigger upper face created with the above instructions.

The process to create a blade which has its upper face rotated it's similar. The only change is that now you don't use the Scale command but the Rotate command from the Draft Workbench.

 A blade with a rotated upper face.

 Finally, what about creating a blade in which the upper face creates an angle with the z axis? Here you have two options: The first one is similar with the above method and useful if you want  to combine all the transformations to your blade. Just create a copy of the original object and move it along both x and z axis. If you combine this transformation + rotated upper face + bigger upper face, the final result might be like this:

 A blade with its upper face bigger+rotated+moved along the x axis.

The other option is to create with Sketcher a path and use the Sweep Command to sweep your airfoil along it. Use Sketcher to create a sketch on XZ plane that contains only a single line. Set with constraints the position of your line's start point to 0,0 , the vertical distance between your line's start and end points to your desired height and the angle between your line and z axis to the value you want.

 A fully constrained sketch of your sweep path.

Now you can switch to the Part Workbench and use the Sweep command. Use as sweep path the sketch you have just created. Don't forget to check the "Create Solid" option.

The result of the sweep command.

P.S. Post inspired by the new spash screen of FreeCAD v0.13


10 comments:

  1. Thanks very much for that. It helped me understanding various tools in Freecad.

    ReplyDelete
  2. Good description, many thanks.
    Can you also explain, how to insert a spar, create ribs?

    ReplyDelete
  3. Thanks for the great tutorial! =)
    This really helped me building several wings. I am trying to implement this procedure using python and came across some problems while trying to find the python code for the downgrade operation.
    Do you happen to know anything about it?
    Cheers

    ReplyDelete
  4. Thanks also for this very nice set of discovery hints on how to use FreeCAD. Casually, I found in it the answer to one of such projects I intended to try with FreeCAD for the modelling of model airplanes. In fact, I had never heard about xfoil or xflr5 !! That's great! Once more thanks to all people contributing to open source.

    QuixoAn

    ReplyDelete
  5. Thanks for your greate tutorial!
    I just try to use FreeCAD to design some kind of Aircraft but I got some problem in drawing Fuselage! So.. can you make tutorial in drawing Fuselage?
    Thank for any help!!!!

    ReplyDelete
    Replies
    1. Hi Tuyen,
      Please describe the type of fuselage you want to create.
      If it's difficult for you to do this trough Blogger's comments, please use the "Contact me" form.

      Delete
  6. Nice description. I wrote a python script that generates a foil from the NREL database. Output is here: http://www.thingiverse.com/thing:772107 after duplicating the foil into an array and adding a hub. Message me there if you would like the code.

    I haven't tried printing yet.

    ReplyDelete
  7. Nice. I have two questions:
    1. Can we have different airfoils at different stations and get FreeCAD to morph the shape? Like AG35 airfoil at the root, AG36 at 0.75m and AG37 at 1.5m?

    How to we then 'slice' to create ribs and further extrude them for spar, whole for wire placement, etc?

    Thanks

    ReplyDelete
    Replies
    1. You can use "loft" to do this. Place your foils in the correct places along the z axis, add twist as required then open loft tool. Make sure you select the foils from the root to the tip in order and usually check "create solid" option.
      you can then create spars and cut them from the lofted foils, and create ribs by laying down appropriately sized boxes and use boolian intersect.
      FreeCAD is great for wings!

      Delete
    2. You can use "loft" to do this. Place your foils in the correct places along the z axis, add twist as required then open loft tool. Make sure you select the foils from the root to the tip in order and usually check "create solid" option.
      you can then create spars and cut them from the lofted foils, and create ribs by laying down appropriately sized boxes and use boolian intersect.
      FreeCAD is great for wings!

      Delete