Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Aerofoil Profile Scripts
darren_13
Member, Developers Posts: 119 PRO
Hi everyone,
I have created two scripts for the rapid generation of aerofoil profiles in OnShape, I have been using my first script for quite a while and seems to work well for me and thought it was about time I shared it with others.
There are two scripts available In the public document 'Aerofoil Script':
Selecting the leading and trailing points does two things, its defines aerofoil orientation and also cord length.
NACA XXXX allows the user to define a four digit aerofoil, I could have imported CSV's and generated from these however thats a lot of files. Therefore this script calculates the profile based upon parameters, however unconventionally allows non integer numbers thus expanding use of the 4 digit system.
Profile Generator requires each profile required to be uploaded in the script, obviously I haven't the time to upload every single script. I have uploaded 3, 1 customs 2 from an aerofoil data base to test robustness. I propose that any profiles you require list them in the comments bellow and I will add them ASAP, this means the database will expand where required. It would also be handy to link the profile .dat file in 'selig' style unless it is easy to find, here is a link to the best resource in my opinion:
http://airfoiltools.com
Below are a few picture that show the scripts in use, I look forward to aerofoil profile requests and allow I am open to Ideas on how to expand existing capability.
Kind regards,
Darren Lynch
An early wind turbine blade, using NACA XXXX and the public 3D spline script.
A wing with winglet, also using NACA XXXX and the 3D spline script.
I have created two scripts for the rapid generation of aerofoil profiles in OnShape, I have been using my first script for quite a while and seems to work well for me and thought it was about time I shared it with others.
There are two scripts available In the public document 'Aerofoil Script':
- NACA XXXX
- Profile Generator
- Select/Define Profile
- Select plane for normal
- Select Leading and Trailing points (Preferably on selected plane)
- Ok, your done
Selecting the leading and trailing points does two things, its defines aerofoil orientation and also cord length.
NACA XXXX allows the user to define a four digit aerofoil, I could have imported CSV's and generated from these however thats a lot of files. Therefore this script calculates the profile based upon parameters, however unconventionally allows non integer numbers thus expanding use of the 4 digit system.
Profile Generator requires each profile required to be uploaded in the script, obviously I haven't the time to upload every single script. I have uploaded 3, 1 customs 2 from an aerofoil data base to test robustness. I propose that any profiles you require list them in the comments bellow and I will add them ASAP, this means the database will expand where required. It would also be handy to link the profile .dat file in 'selig' style unless it is easy to find, here is a link to the best resource in my opinion:
http://airfoiltools.com
Below are a few picture that show the scripts in use, I look forward to aerofoil profile requests and allow I am open to Ideas on how to expand existing capability.
Kind regards,
Darren Lynch
An early wind turbine blade, using NACA XXXX and the public 3D spline script.
A wing with winglet, also using NACA XXXX and the 3D spline script.
8
Comments
Here are few foils used in wind turbines I've been working:
S820, S822
SG6042, SG6041, SG6040
SG6050, SG6051
GOE222, GOE601
S4310, S4320
I'll have to play with the 3D spline script, looks like it made a nice bend around the winglet.
BTW: When I look at your shared example, it is not functional for me.
Regards,
Duane
Thank you for your comment! I have hopefully sorted this out now so the example should be working.
I have added the profiles you were after however I should have mentioned that this script doest work well with open profiles therefore two of your profiles currently plot a curve without a selectable face, I'll start thinking about a fix for this.
Kind regards,
Darren
Did a quick look, and was able to use the scripts. Adding the flip option on the NACA generator will be useful as well.
For some ideas take a look at Qblade.
http://q-blade.org/
Thanks,
Duane
Also I'm unable to use Qblade as I'm a mac user, does it model open profiles well? how does it go about it? was thinking I could do one of two things;
- Add a line between the two points, basic but gets the job done
- add the 1st point as the last point, this will be smoother however there will be a bit of length added.
Which do you think you would prefure?Kind regards,
Darren Lynch
Yes and it is free. Qblade has a foil generator and has tools to modify them, or create a foil from scratch. It works well to compare foils and performance using the basic CFD analysis.
On the trailing edge, I think adding line between the points will suffice. The two points are very close together.
Kind regards,
Duane
Ill shorty update the documentation and add an application example.
Kind regards
Darren Lynch
Linked[in]
Please use and abuse my scripts and let me know what you think
Kind regards,
Darren Lynch
ps. you will need to update the linked document to see changes, I recommend you do this but leave the already used script's un-updated as the changes may have minor impact.
Could you add the following eppler foil profiles to the profile generator feature?
Eppler E836
http://airfoiltools.com/airfoil/seligdatfile?airfoil=e836-il
Eppler E837
http://airfoiltools.com/airfoil/seligdatfile?airfoil=e837-il
Eppler E838
http://airfoiltools.com/airfoil/seligdatfile?airfoil=e838-il
The links are the selig format dat files you've requested.
Cheers, Anthony
If so you should be able to find it in the list, I realise at the moment it is a mission to find your desired aerofoil but I'm having a think about how to improve this! If you are not seeing the above script (has both generator and NACA in the same script) then you might need to remove the script and re-add it.
Let me know if this works for you (or even doesn't!)
Kind regards,
Darren
After I figure that out, I'll play around with changing from NACA to Eppler, it's great that's in the same feature so I don't need to rebuild the whole thing.
Anthony
I was using a copy of your file, and adding tabs to the application examples to use the features you've created.
Here's link to my doc:
https://cad.onshape.com/documents/58ca8ea34dd37e0f6849aa06/w/7cb6299da6520f5fa9e33cbb/e/b5d1f68ad2537ec5986c7acd
Thanks
https://cad.onshape.com/documents/4bf18c75321ea2c8c2ea770d/w/978aece63f59e09169309756/e/de5fbb69d8eecfb3610e4e03
Once there you should see a 'use this feature' option, it will then get added to the toolbar. If you use this method you can just update the feature every time I update it
also here:
https://www.onshape.com/featurescript
down the page is a 'START USING CUSTOM FEATURES' video.
Hope this helps,
Darren
I also saw you were using many 3D splines as guides for lofting, did you know that I have a multispline lofting feature for aerofoils exactly for this job? if so was it not good in your application? and how could I modify it for your needs?
Sorry for the number of questions
Kind regards,
Darren
Firstly I just wanted to say I have been busy updating the profile generator script and I haven't had the opportunity to announce it yet... So this is me announcing "Check out my latest update!!"
*Note there is a current issue with the manipulator.
So this got me thinking, I keep updating this script with lots of options that I need, however, in general use are these options needed? I could hide some options and show then in some sort of 'advance mode' or if people use these options as much as I do then I would obviously just leave them in. As a reminder here is what the current GUI looks like:
This is just a screen grab from the documentation, much of these options are hidden under the enums such as TE type etc, however, the types could be hidden and only produce a single spline aerofoil unless in advance mode. Or as I said leave as is.
So right now If you have a preference let me know otherwise I'll leave current options in and decide wich future options are relevant.
Also, I don't think I have had a chance to properly announce my 'Wing structure script':
Full documentation for this is now provided, but better still see 'application example 4 - FEA' as this shows the steps taken to create the above structure. This script is new so please report any issues you find with me. There is currently only one know 'bug' where the thickness is incorrect for one of the options.
Finally, I just wanted to share an insight into the direction of these scripts.
- Complete parametric aerofoils starting with a twin circle and twin spline type aerofoil and progressing over time.
- Integrated testing and debugging into the code to allow me and any user to see what is happening internally simply with an input of a string.
- Making 'Aerofoil functions' module public and documented for using within custom scripts.
- Wing structure updates to include aerodynamic features and call it 'Wing Features' or something similar (this is to adapt the script for some of my CFD work).
So that's all I want to say, any feedback is always welcome.Cheers,
Darren
Im interested in finding out how to use the wing structure tool. i've made few wing structures like the one below myself and it's a bit tedious.....Looks like This could be huge help to me! is there a guide to how to use the multi spline and wing structure Featurescript? (where do i find Application example 4 FEA?? ) i cant seem to get it to work properly. Cheers
Michael
I have the documentation which gives an overview of steps and the above-mentioned application example:
https://cad.onshape.com/documents/4bf18c75321ea2c8c2ea770d/w/978aece63f59e09169309756/e/10159a5a243e6d7e2b619a5e
(Application examples>Application example 4 (FEA)).
I just loaded it and seems to work on mine, however, if you made a copy and you have linked my latest scripts I can see you would have issues. The reason being I have retired the NACA script (which the application example uses) in favour of its parent 'Profile Generator' I will update this tonight as it is very important to have this example working. for now, just explore it in the read-only document, sorry.
As for multi-spline, I no longer see this as the way to go as the recently beefed loft function does very well. I use a line through the centre of the aerofoils and loft using the additional profiles thing. I get really good results here, that said if your lazy like me multispline is quick.
If your still having troubles you can add me to your practice project or something and we can get it going with a basic setup.
The code is quite expandable so if you have any suggestions then please let me know
As an afterthought, looking at the wing tips of your design you might want to try surfacing instead of multi-spline anyway. Multi-spline only supports profiles (not mixed like edges to aerofoils etc.)
Anything else just give me a shout!
Darren
Kind regards,
Darren
Some of the rc 3D printed wings have curved ribs https://3dlabprint.com/shop/spitfire-mk-xvi-s3d-cura-ready/ would this be possible to achieve with the script ?
Thanks for the script it's going to save a lot of work.
In response to arc like ribs, unfortunately not at the moment although it would interest me to expand the script to cater for more general use, I imagine I could do this by allowing you to sketch an arc to follow, however, I don't see me having time to do this in the near future, really sorry. I would suggest just create an arc shape solid and boolean it with the wing to get the desired shape, patterning the arc shape would allow a more automated approach to this.
Thank you very much for posting, I very much like to receive feedback and see how the scripts are used, I will post again once the issue has been fixed.
Kind regards,
Darren
I'm seriously considering taking up the RC model airplane hobby again given the advent of 3D printing and electric propulsion so I'm paying close attention.
I was curious about the angled ribs until I started printing them. The wings that I have printed are printed vertically. (wingspan is vertical) When 3d printing it is nearly impossible to print horizontal surfaces (except the on the bed) without a printing a great deal of support for the surface. This support adds a great deal of time to a print that already is taking a very long time. When printed the angle of the ribs allows the printing of the structure without any support.
Here: https://cad.onshape.com/documents/036c42b11608e644f19f3541/w/194e03a1b72bfb9967a180ba/e/deef0361d1ef6e5782d028d7 is a test wing section that I have been experimenting with. It was time-consuming and is in need of a script to automate. Carbon fiber tube would be used as a spar.
The Airfoil Profile Scripts don't seem to "return" an offsettable drawing.
I consider myself a newbie to 3d modeling and may just be ignorant of an obvious solution. Would someone point me to a solution?
My templated drawing is HERE
As for automating, where do you think automation is needed in your workflow?
Many thanks,
Darren