MoI discussion forum
MoI discussion forum

Full Version: NACA Airfoil script

Show messages:  1-20  21-31

From: Hamish Mead (HAIRYKIWI)
23 Mar 2015   [#21]
Here's the latest NACAAirfoilGenerator script with various minor and a few major improvements since first release:



RELEASE NOTES:
- Now generates all 'basic' NACA four-digit and five-digit series airfoils, including 43012A.
- Variable thickness trailing edge (T.E) implemented.
- Zero T.E. thickness airfoils now draw correctly.
- Conformity of output with official NACA ordinates has been verified* for NACA 0012, 6518, 23012, 43012 & 43012A, see file:
NACAAirfoilGenerator ordinates vs airfoils-2015-03-23.3dm in the attached zip.

* "verified" is probably not the best word, as errors are known to exist in the original NACA ordinate data. As you can see though, output from the script appears to be a reasonable match to the ordinates for the above mentioned airfoils at least:



KNOWN LIMITATIONS:
- Five-digit airfoils with reflex camber lines are not yet implemented.
CAUTION:
A4 coefficient (slider) value input can be set by user 'out of NACA limits'.
- Input parameter validation is rudimentary where it has been implemented.
- TODO: Implement four-digit modified, five-digit modified, and six-digit series - http://m-selig.ae.illinois.edu/ads/naca980820.bas contains working (public domain) code likely worth incorporating.

Generating airfoils with less than 60 chord-wise stations is not recommended as the airfoil's curvature smoothness, when checked with a curvature analysis tool, reduces noticeable. Conversely, generating more than 100 stations doesn't appear to yield much if any noticeable improvement.

I'll make a post about how the thickness distribution curve for the 43012A was generated with an additional reverse-action script another day. That kept me pretty busy for quiet a while.

As ever, any feedback - especially bug reports - is always appreciated.

- Hamish

Attachments:
NACAAirfoilGenerator ordinates vs airfoils-2015-03-23.zip
NACAAirfoilGenerator-2015-03-23.zip

Image Attachments:
'NACAAirfoilGenerator ordinates vs airfoils-2015-03-23.png  NACAAirfoilGenerator-2015-03-23.PNG 


From: Hans
26 Mar 2015   [#22]
Hi Hamish

Thank you for the NACA skript that you have made. It is exactly what I need for a real aircraft projekt that I plane to build in my
comming reteirement. (NACA 23012)
Since a longer time I know that moi has a big potential as cad program for aircraft development. Not only for curvatures also for
prepairing structures for framework analysis. Together with a friend - because I have no clue in programming - we tryed to handle with lines and points to get koordinates and a sorting of lines to the right points. Short to say: at the end we have been not succesfull.
The goal was to get a .txt file from moi to make an input file for the FEA programm Z88 from the university of Bayreuth/Germany.
If you or someone other of the experienced programmer would like to have an overlook on this thema I would like to prepair all the files
you need to see what is the way of programming.

As you can read english is not my native language so it needs a longer time for me to prepairing my messages.

For the first is here the adress you can have an impression of the FEA analysis programm.

www.z88.de

There are two FEA programms for free. Both are with with all handbooks and tutorials also in english and realy worth to have a closer look.
Specialy Z88 Aurora.

With a positive answer of interest I start to prepaire the example files.

In every case I thank you again for the airfoil skript.

Hans
From: Hamish Mead (HAIRYKIWI)
27 Mar 2015   [#23] In reply to [#22]
Hi Hans,

It's a pleasure - and great to know the script might also be used by someone else. :)

I'd be very interested in taking a look at what you're trying to do to combine output from MoI with the open source z88 FEA software. z88 looks really interesting! I know only a little about FEA, but always wanted to learn more. I am just starting to build an aircraft from plans - a Corby CJ-1 'Starlet'. It uses the 43012A airfoil, hence my determination to do a nice job scripting it.

I'd describe myself only as a novice programmer, with interest + determination + internet connection for self-improvement. As such, if your requirements are beyond my current abilities, I'm sure there's enough scripting experience among the forum members to achieve what you need. I think what you're trying to achieve is potentially very interesting to lots more people, so hopefully there will be no shortage of interest in helping.

I would suggest though, that you start another discussion specific to the new script you want to see created - just to keep things relevant and possibly easier for other people to find.

Here's a photo of the award-winning Starlet my friend built (and my lovely wife):


- Hamish

Image Attachments:
gilse_heather_dymock_20120929_75pc.png 


From: Frenchy Pilou (PILOU)
27 Mar 2015   [#24]
No possible passenger in this cuty plane ?
From: Hamish Mead (HAIRYKIWI)
28 Mar 2015   [#25] In reply to [#24]
'fraid not Pilou - just one person and all the glorious blue sky they can eat ...maybe with cake and coffee at a neighbouring field for desert. ;)

- Hamish
From: Hamish Mead (HAIRYKIWI)
28 Mar 2015   [#26]
As people may well start using the NACAAirfoilGenerator script (NACAAG) to make airfoils for real wings intended to take litigious cargo safely into the air - and return it just as safely to terra firma, but mostly out of personal pride, I thought I ought to continue making an effort to check the accuracy and quality of its output. That said, I make no claim as to the suitability of the script for any purpose so please DOUBLE-CROSS-CHECK everything it generates meets requirements before relying on it. The full legal disclaimer is included the JavaScript file. Right, enough quasi-legalese waffle... Here's what I've done and discovered so far:

I generated a NACA 23012 airfoil of '100 stations' and 100mm chord length with NACAAG, and compared it firstly with the ordinates and secondly the curve made from the ordinates generated by naca456.exe* - using the input file '23012_dencode3.nml' (below) to generate the greatest number of output points possible; '98 stations'.

Comparison 1
At a number of randomly chosen stations, I measured the perpendicular distance from points generated by naca456.exe to the NACAAG generated NACA 23012 airfoil curve.
Differences of between 0.00001mm to 0.000049mm were observed. Those differences are well within manufacturing tolerances, but why any difference at all? I suspect it may be due to (cumulative) rounding errors - or possibly truncation error, due to the naca456 airfoil ordinates (to 6 DP) being scaled from unit 1 to 100 in CAD, rather than in script. Any other ideas?

Comparison 2
Using Rhino's Curvature Graph tool, I compared relative smoothness of the NACAAG generated NACA 23012 and the through point curve created using the MoI ImportPointFile script and the file 'NACA 23012 points from naca456_dencode3.xyz' - which is simply the actual naca456 ordinate output file, '23012_dencode3.out' reformated to xyz and rearranged to enable one continuous through point curve be created. Considering the relatively small differences measured in Comparison 1, I find the contrast between the two curvature graphs in the following screen capture quite surprising.



It's reassuring to know that the smoother of the two airfoil curves was generated by the NACAAG script, but I have my doubts a wing made using either method would look much different in real life after coming out of the paint-shop. Any thoughts from anyone who uses curvature graphs as part of a pre-manufacturing inspection process? What for example, is a reasonable rule of thumb for setting curvature graph display scale to avoid unnecessary rework of a curve or surface?


As an indication of just how much cross-checking needs to be carried out to verify the results of a new script, the airfoil ordinate generator basic code I previously mentioned - http://m-selig.ae.illinois.edu/ads/naca980820.bas appears be generating unreliable output. Now it could be that the three DEF functions I needed to removed from that program so as to make it acceptable to the QB64 basic compiler on my Win7-64 machine were in fact being used, but I couldn't see where. I'll try to find out why the results are not as expected directly from the author. For the meantime, and especially because I'm not certain I haven't created the problem myself, I won't publish any comparison results - just be aware.

* naca456.exe is a public domain airfoil generator program written in Fortran by renowned aeronautical engineer Ralph L. Carmichael. As he notes on his site pdas.com, naca456 is a further development of NASA's work, first documented in the 1970's, to create a computer program to obtain ordinates for NACA airfoils.

- Hamish

Attachments:
23012_dencode3.nml
23012_dencode3.out
Comapison of NACA 23012 by NACAAirfoilGenerator MoI script and naca456_exe.3dm
NACA 23012 points from naca456_dencode3.xyz

Image Attachments:
Comapison of NACA 23012 by NACAAirfoilGenerator MoI script and naca456_exe - Curvature Analysis .png 


From: Hamish Mead (HAIRYKIWI)
13 Mar 2018   [#27]
Latest (minor) release:
Point access syntax bug discovered under MoI V4 beta - now compatible with MoI V3 and V4.

Bug squashed by r2d3 - many thanks again Ralf :)

Attachments:
NACAAirfoilGenerator_2018-03-12.zip


From: r2d3
13 Mar 2018   [#28] In reply to [#27]
:-)
From: Frenchy Pilou (PILOU)
13 Mar 2018   [#29] In reply to [#27]
Seems i must update my French version! :)
http://moiscript.weebly.com/aile-naca.html
From: Hans
24 Jun 2019   [#30]
Hello Moi user.

If somebody is calculating a new homebuildt aircraft and think about using NACA profiles please read the booklet from
Harry Riblett.

GA Airfoils
A CATALOG OF AIRFOILS FOR GENERAL AVIATION USE

To buy at Aircraft Spruce and Spezialitys for about 20$.
It is an eye opener and may safe your live.

With best regards
Hans
From: Hamish Mead (HAIRYKIWI)
7 Apr 2020   [#31]
Hans, my apologies for this late reply and thanks for adding your sound advice.

I am in no way qualified, however from what I've learned about NACA's early studies - and read about Harry Riblett's work - I couldn't agree with you more.

There's a super article about Harry Riblett here, for anyone interested:
https://www.kitplanes.com/the-airfoil-adventures-of-harry-riblett/

Show messages:  1-20  21-31