Modeling a wind turbine blade from external data + later animation

Woow wow! …this is going too fast, I cannot keep the pace! I’m very busy right now with many other things. I’ll do my best to post the real blade sections as soon as I can. But reading the previous posts, yes, that’s exactly the idea!!

Thanks again and I’ll be back as soon as possible.

All right, we are waiting for the data.
Ricky, I think that I see what you mean: to build just the mesh and connect it to the armature BEFORE, and then just update its vertices according the input data? Well, yes, it is simpler than my proposal, but also fixed to predefined number of input sections and bones. I have just proposed a more general solution, which would work for any number of sections and blade reference line nodes… Anyway, which is better depends on the santasemilla’s data. We will see. About your UI - do not hurry, i think that that the [Run Script] button will be enough at the beginning :).

script is only general for now need more info for the data and options if needed

but we have to wait and see how the data comes with what format ect…

then might be able to get some real things here

but should be interesting

but no harm done if we get it running with the bones Vgroup already done and may be some V col too

hope he can be back with a more specific shape and some data for the center line and some cross setions
to see how to deal with it

ounce it works with 20 sections it will probably be easy to add more sections!

i’m more concern with time to compute prepare the V group and render all the frames here

santasemilla

can you tell us how many frames your planning to do here or how much time you think you gone need for simulation?

if there is one file per frame (for 20 sections ) for the data we need a way to name these files may be with a sequential number in same folder then easy to read the different file/data then process it

also why is there 150 points for the center line
does it means that the center line is not a straight line like the foil is bend may be at the beginning of simulation meaning there is already a speed on the prop which tends to bend it or because of outside perturbations the prop is bend like the wind changing the shape may be?

and how do we relate this 150 points to the sections
i mean is it linearly subdivibed like 150 /20 ?

for the sections you get some data but it is for the center of the sections i assume and not
the beginning or the end of the section!

@Witold_Jaworski

ok did some experimentation and can get all the bones to be automatically generated

but do you think if we use auto bone assigment it will do a good job or if we gone have to do it manually somehow?

in we use a predefined propeler shape for instance then simply locate the bones where the different sections are located or linearly along the chord /20 !

like using

mod.use_bone_envelopes = True

thanks

I have always used them this way - Blender automatically assigns vertex group that have the same name as a bone, to this bone.
No additional action is needed!

sorry i met defining the vert group automatically not the assignment Vgr to bones!

To learn , how to define a vertex group using Python API, do it first manually, examining the content of the Info window.
You will learn the operators, used in this process, this way.
Then try to build a script, which does the same.
(I have described it in the Programming Add-Ons, section 3.5. This is a general method for learnining “how to do XXX in a script”).

got some good example from Thomas code snipept too

but still wondering about the automatic assigment
it can do a good job in most cases but not always

anyway we can try and test it when we have the real shape

hope he an come back with proper shape and some example of data so we an look at it and see what to do!

salutations

i tried the soft for prop and got this pic with some cross sections i think for the blade

is there any data for this cross section or only the pic

and why is the cross section not the same height then the blade itself?

see pic


and is it possible to draw in 3D the blade’s shape from these datas?

thanks

Hi@RickyBlender

I really don’t know what that software is. If you know the airfoil denomination you could find information online about it, but just from see it in the picture I cannot tell which one it is. Also, what the picture shows you there is the Blade Twist distribution, and he is plotting the airfoil profiles with the corresponding twist along the blade. As it’s a 2D representation, you can’t easily see the “helical shape” and, again, it is just as a technical reference.

For your last question… yes, you can. You need to know the airfoil shapes, position along the axis, and individual twists.

Want to have fun with airfoils? Here you have kind of a “bible” (Not only for Wind energy, regardless of the top picture) :wink:

http://www.ae.illinois.edu/m-selig/ads/coord_database.html

Have fun!

Well,

After many many days of my last post, I’m here to add part of what I promised. I’ve been very busy with other things and my plans to submerge my head into Blender had to be postponed… and will be a bit more unfortunately. Nevertheless I keep preparing the things for that time and work on the Matlab side of the project with the things that I will need to pass to Blender.

Ok, here we go! In the zip file you will find basically the skeleton of a test blade. This test blade is made of 23 airfoil sections, every file contains the structure mentioned way ago on the sample data:

-First archive line: A description. Let’s just don’t pay attention now to this, let’s say that in the future we can put some information here as “section # out of xx” etc.

-Second to last line: This are the X Y Z coordinates that define the airfoil in the exact position on the blade. With this, after loading all the files the blade will be defined, including twist and, if corresponds, the initial design deformations (in this case the blade axis is straight, so don’t worry.)

In the same way we have the axis coordinates. As I just said, the axis is a straight line so for this case only the Z coordinate is nonzero. Here, instead of 23, the points are 93. In the figure I’m attaching, every node of the blade axis is marked with an “ * ”. These nodes are the ones that later will be animated! So yes, you guessed it, the “vertebral column” that we talked about before is this axis. Bones for the animation should be defined by the segments from the coordinates.

The last file in the package contains the coordinates for the blade tip. What is this?! As the blade is a solid that is going to be “extruded” along it axis, there should be a way to define how it ends! If you see the example of the boat I used to describe the idea in the OP, the last cross-section, the after-peak, is inclined to define the way the boat ends. Here the case is a bit different, I know. The boat is an open solid (mesh), here the blade is closed. Here the blade tip is perpendicular to the cross-sections and “extruding” of the blade should have this exact shape at the end. …How I do that in Blender?? I have NO idea. Couple of thoughts:

  • Easiest: If it’s there a command or function under modeling and the problem is easily solved but I just ignore it from my lack of Blender knowledge… just forget about this discussion. :wink:
  • Maybe the blade tip could be part of a second “auxiliary” solid to then subtract to the main blade and get the final shape. Autocad/SolidWorks ideas coming back to my mind after long long time. (mmmm… am I clear here?)
  • I can re-define the airfoil coordinates so I can load them in two halves. Let’s say a bottom and a top one, as if the final blade were made out of two molds (…hehe that’s how they make it in reality!). In this way, the blade would be exactly the same as the boat example, but with a bottom and a top “hull” hehe.

Anyway, by now, I’m just uploading the data, otherwise I’m delaying too much the progress here.

If all is loaded into Blender, you should end up with something like this:


(sorry for the awful perspective! …Matlab’s fault! Hehe)

Well, here the zip file: Blade2BlenderTest.zip (117 KB)

Note: I almost forgot it. You will see that some airfoils are not closed at the trailing edge (the tail). This is not an error. Thick airfoils could have a blunt tail so don’t be surprised if you see this. …mmm yes, again, I don’t know if this could complicate the extruding, hope not. If it does and we need to close it, just let me know.

Note2: All units are in meters.

I have to thank again all the help and interest you are providing to this project people! I really appreciate it.

See you around!
Santasemilla

I was re-reading all the previous posts and thought that maybe my 23 airfoils + 93 axis-nodes could complicate the armature concept. If you guys think that it would be better to define an airfoil section for every axis’ node, I can do that! Just let me know what could be best. Moreover, if I define more sections, maybe the blade-tip curve won’t be necessary (just a thought).

Take care.

Yes, it would be much more easier to have in the input data the 1:1 correspondence of airfoils and axis nodes. Anyway, because programming is the art of proper assumptions, can we assume that:

  • there will always be an element named “Blade tip”. (In spacial cases it can “degenrate” to the last airfoil);
  • all airfoil sections and the tip are described by the same number of points (it is allowed that two different points have identical coordinates, when needed), and the mesh should be created by connecting the points of the same ordinal number (first with first, second with second, etc);
  • points of every airfoil and the tip descibe a single closed loop. The last point should be always topologically connected to the first;
  • there is always element “Axis Coordinates”
  • number of the points of the “Axis coordinates” is equal to the number of airfoil sections
  • the “Blade tip” is fixed to the last airfoil section (they share the same bone)
  • input file format: see below
    Browsing these data, I would propose just to “glue” all the geometric data into a single file. The first line, you have placed at the begininig of each section, will be used as the delimiter, in this case. So the file will begin with line like this:

Blade NREL5MW_s46v23N51 intermediate airfoil # 0001

Can we assume that the format of this delimiter line can be interpreted as:

Blade<space>{Blade name without spaces}<space>{element description}

where:
{Blade name withouth spaces} will be used as the Blender file name;
{element description} may contain following texts:

“intermediate airfoil <ordinal number>”, for example “intermediate airfoil # 0001”
“Blade tip”
“Axis Coordinates”

The order of these elements in the file is not important, but file which would miss any of these elements will be treated as incomplete.

Using the data from the file you have delivered in the previous post, I will prepare a first version of the script that generates the mesh of the blade. For this first test I will skip the bone creation (because the “Axis Coordinates” are required for this). Then, when you will deliver the updated version of the input data, with 1:1 correspondence of the nodes and the airfoils, I will update it to obtain the final setup. Of course, every version of this code will be published here, in a zip file. This way you will be able to examine and modify it.

first requirements to help us work with these files!

is it possible instead of naming the file .dat to name these .txt or as ,py
which is probably even better i can see all the text as normal lines

then we can open directly with txt editor!

wll look at datas today

first problem

i cannot open file 002 and 004 i see chines txt so cannot read data here!

001 and 003 is ok i can open by changing name to txt or py and can read it !

files seems to be corrupted here ?

ok so here we also assume that your blade is vertical like in pic shown
so only Z will change for the height of the section

thanks

Ricky, in these files single CR character is used as the line delimiter (it is a Unix/Linux convenction), instead of CRLF (Windows convention). Use, for example, Notepad++ to scroll their content. If you want to do open them in “one click” way - assign in your Windows the *.dat extension with Notepad++. They are still properly read by Python functions - as the text files.

ok i see i’m on vista hope it does not create any problem

are you on vista and our friend is on vista too or not ?

that could create some problem for the file reading !

just tried to read the first file 001 and get an error on line 28
but cannot see anything wrong in txt file

see error here

airfoil1.py", line 28
SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in positio
n 2-4: truncated \UXXXXXXXX escape

not certain what this error is

if you need new little script to read data let me know i’ll upload it
but basically same as i use before

Hi there,

I can rename them to .txt if that’s what you want, no problem with that. Regarding files 002 and 004, I don’t know what to say. I just downloaded the posted zip file just in case and I can see the data perfectly well. Tried it under Linux and Windows machine… don’t know why you are seeing “chinese” text (I want to believe that means corrupted data). I’m working in the new set of so don’t worry, I’ll re-upload a zip soon.

Your last assumption is right for this case. I say for this case because the axis line could be non straight as previously discussed, but yes, for this case the axis changes only with Z. Once we have the 3D model, we can triplicate it rotate to other positions, combine with other elements, etc. …but that’s for the future.

Thanks!

Ok,
Ricky
, Witold, let me know if I should change the extension from .DAT to .TXT.

Witold, I’m answering your post in a minute :wink:

ok let me do some read text some more

i think the unicode error hasnothing to do withnthe data more with the new path filename i added in the script

i’ll check some more

be back soon

thanks

ok i corrected the little script and now i can read the datas

even file 2 and 4 which i cannot open with txt editor !

now have to check for qty of data not certain why i get 500 instead of 501 data !

let me work on that problem