December 19, 2019
Description
#Propeller
Realistic propeller, repeller (e.g. used for wind turbines) and wing designs lead to highly organic shapes. They are usually constructed by skinning a sequence of airfoil-shaped ribs, with each rib being designed with an individual airfoil profile and having its dedicated position in 3D space.
Using OpenSCAD to model such an object can be quite challenging and requires the use of several advanced programming techniques and in particular an efficient description which I present and explain in this post.
The example code given shows the construction of two typical propellers, a Graupner 33/20 cm E-prop (i.e. diameter 33cm and advance 20cm per revolution) and a blade pair for Mavic pro mini 11/6.6 cm.
Just for fun I extended the design scheme (i.e. the description format and interpreter) to be able to do a loop propeller according to the invention of Rudolf Bannasch. This kind of propeller is supposed to have a high efficiency and to run extremly silent. I don't know, whether I got the twist in the right way. Please comment in case you have a better unterstanding of this interesting propeller type.
The basic ingredients for composing your own blades and wings are:
M = [// naca_params, chord, TX, TY, TZ RX, Ry, RZ
[ .0, .4, .15, 4, 0, 0, 2, 0, 0, -0], // ascending pitch
[ .1, .4, .15, 5, 0, 0, 4, 0, 0, -10],
[ .1, .4, .1, 10, 0, 0, 12, 0, 0, -pa(12)], // from here proper pitch ...
[ .1, .4, .1, 11, 0, 0, 18, 0, 0, -pa(18)],
[ .1, .4, .061, 5, 0, 0, 53, 0, 0, -pa(53)],
[ .1, .4, .06, 2, 0, .1, 55, 0, 0, -pa(55)],
];
Thus the second line
[ .1, .4, .15, 5, 0, 0, 4, 0, 0, -10],
will be interpreted as follows:
while the third line
[ .1, .4, .1, 10, 0, 0, 12, 0, 0, -pa(12)], // from here proper pitch ...
will be interpreted as:
The gendat() function interprets the description format and returns a list of polygons that can be fed into sweep().
function gendata(M) = // main function to generate airfoil slices
[ for(i=[0:len(M)-1])
let(N=M[i])
let(af = Tx(-N[3]/2, vec3(airfoil_data(part(N, 0, 2), L=N[3])))) // generate polygon for slice
T(part(N, 4, 6), R(part(N, 7,9), af))] // place (=rotate + translate) slice in 3D
;
The functions T(x,y,z, polygon), R(x,y,z, polygon) and Tx(x, polygon) are affine transformations: translation, rotation and translation along X, respectively. They are defined in the Naca_sweep library further explained in my post NACA airfoil sweep - OpenSCAD library.
This library also contains the implementation of the sweep() function that skins the polygon sequence into a 3D object. Note, that this function presumes that each polygon has the same number of points, and that polygons do not self-intersect, nor mutually intersect. (It does not check this and will have a malformed output, in case intersections occur. Check the output with thrown together view, F12. Any non-expected coloring indicates problems.) The call for this mighty function is quite simple:
sweep(gendata(M_), showslices = sl); // extrude blade along interpolated path
the showslices parameter can be set true to visualize the frames (see images showing the ribs for the interpolated and the uninterpolated description). Note that the TZ column mainly defines the displacement in the sequence.
The hard work required to form an organic shape is done by some kind of magic multi-dimensional interpolation scheme on the basis of splines. It is called nSpline() and its implementation is contained in the splines.scad library. Please refer to my post boat propeller customizable - OpenSCAD nSpline() library with show cases if you are interested in a somehow more explicit explanation and additional showcases of its usage.
It operates over the description format and expands it to any desired refinement. The call is very simple. You provide the matrix and the desired refinement:
N = 50; // # of slices to be interpolated
M_ = nSpline(M, N); // interpolation
Note that interpolations can overshoot, if some parameters in a column are not properly selected (too close, too edgy).
License:
Creative Commons - Attribution - Non-Commercial