that is helpful. i don't personally have an issue with changing the leading edge in order to keep the points straight. what i have been saying is the ler and data do not agree and something has to change. since for me it is pretty obvious what the ler and ter mean, i have been changing the data points. the difference is minimal. one thing to keep in mind is that the airfoil points you were working with have one point removed, because it was way out there. i can try just giving you something with the exact data points and see how the ler you are doing works out. this whole thing is rather silly to me. but its not a big deal to try out what you are doing. thanks for actually showing a working example.
the airfoil info is ancient, done before computers, most likely with slide rules. so a little bit of an issue with comparing computer generated data to the old data is no surprise to me.
Hey Anthony,
Here's a quick shot of it for Brian. Using an Arc is just slightly off where he was at, but his new blue point looked like it may relate.. Showing a quick tool to see it. Maybe he can make the points make sense with this info...
Here is an update removing the tangent points and adding the point I previously omitted on purpose. The ler and ter definition points are still the last four. I tried burrman's method and it works fine. In this case you can use all the naca points and the ter definition but ignore the ler definition. I don't really care which way you go here. I am keeping the ler and ter and loosening the data point definition. The difference I have been allowing is small. However, if you want to redefine the ler, its fine by mean. Comparing the leading edge you get with burrman's method and using the naca defined radius, the difference is small. I'll let brian and whoever else works on the actual script to decide how they want to do it. I don't plan on using this myself. I just wanted it for others. I have finished all my work on PROP_DESIGN, this was just a loose end I thought could be improved. Either way you go, its about the same for all intensive purposes. The data points, as defined now, should allow you to create the airfoil spline however you like. The main thing is to create a blade that transitions smoothly and follows the naca file i'm referencing as close as possible, since PROP_DESIGN utilizes the performance data for this specific airfoil.
Edit; Latest version is available in a later post.
I tried out your latest update. Very nice. I see the error you found and can duplicate it. I determined it is indeed round-off error. Here are the arrays including the tangent points with as much precision as I can have with the tools available to me:
They do not have the one point I take off to have the curve fit work out. So at this point you have a couple of options you can follow. I compared what burrman did to what I did and the difference is small. I am fine with either one. They both make a nice solid with no ripples or any other distortions. Both deviate from the naca definition to make everything work out, as the naca definition contains some error. I am keeping the le and te radius definitions and relaxing the data points by using a curve fit. With burrmans method you can keep the data points using a control point spline and then modify the le definition. The te definition is fine as is.
Thank you Anthony.
I'll try out the new numbers.
(I previously used the MoI distance script on the two close points, for Y and Z difference, and tried to reverse calculate, and got two multidecimal numbers, but must have messed up the math...)
Also it is possible to drag the spline "tangent" control point, over a tiny bit to meet the arc radius...
Currently trying to script a couple of 3 point arcs, for an intersection. I think "ring circle" script has the techniques to assign a frame, and script enter the
3 points, or two points and an angle.
I'm using this code:
var arcfactory1 = moi.command.createFactory( 'arccenter' );
// angle of +/- _ degrees.
var angleinput = 180.0 ;
arcfactory1.setInput( 0, pt_leArccenter );
arcfactory1.setInput( 1, pt_leArcStart );
arcfactory1.setInput( 3, angleinput );
arcfactory1.update();
arcfactory1.commit();
(repeat for second arc.)
It does not draw anything on the screen. I think the "frame" has to be set?
Next step to create the tangent point, maybe something like this: ?
Mainly just to keep files straight on my computer I made two separate versions of the Fortran code. Option A, the way I have been doing it. Includes tangent points. You don't have to use them. I was just trying to help out if finding them via a script was too much trouble. I believe they are working now. Thanks for finding that error. I made two examples but missed the fact that the chord expanded by a small amount. This version also removes one naca point to aid the curve fit.
The second version, option b, is for use with burrman's method. This uses a different method to create the leading edge arc. You can use all the naca data points with the control point spline. The trailing edge still gets defined the same way. However, the leading edge is defined differently than the naca specification.
I compared the two methods and they are very similar. Whichever you choose is fine by mean. They both yield something close to the naca definition that I need. They also make smooth solids with no ripples or anything.
The naca coordinates reference file has always been in a folder called airfoil model.zip, available on my website. Rather than copy that file into the other folders, I am providing the entire zip file.
Anthony
Edit; Attachments have been removed to save server space and because they are out of date. See later posts for the updated information.
I'm sorry I don't understand your last post, where you say the last one has lots of points. I posted the latest Fortran codes. Are you refering to one of those?
i think i know what you mean now. are you referring to the updated tangent points having more significant digits? if so, the added numbers are for the added precision needed to fix the error you found. i was previously using the same precision as the naca points. but to get it to work out, i had to add as much precision as i could with the tools I have available (i.e. MoI and a pocket calculator). though, even that precision is far less than that which i normally use.
normally i use double precision (16 significant decimal digits). the updated tangent points are single precision (7 significant decimal digits). the naca points are only three significant decimal digits. as i eluded to in a previous post, they were using slide rules back then. no pocket calculators or computers, since they hadn't been invented yet. so this is why i have been curve fitting their numbers, rather than taking them literally. they don't have enough precision to be taken literally. the rail points, on the other hand, i compute with double precision. so they can be fitted using the control point option.
also, keep in mind, you do not need to use the tangent points. i thought it would make things easier for you by adding them. but if you want to calculate the tangent points yourself, with the theorem you found, that is fine with me. so you really have three options right now. any option you choose should work out. so pick whichever option is most appropriate for you.
hopefully, you found the latest version of the Fortran codes and they help you out. hope you have a happy new year.
By using Ring Circle script as a "template" guide for Frame, have succeeded in creating
arcFactory1 and arcFactory2, by script, showing on screen as two intersecting semicircles of 180 degrees.
Now I have a type mismatch in the following:
var myArcList = moi.geometryDatabase.createObjectList();
//NEXT LINE TYPE MISMATCH
myArcList.addObject( arcFactory1 );
myArcList.addObject( arcFactory2 );
var tanPtfactory = moi.command.createFactory( 'intersect' );
tanPtfactory.setInput( 0, myArcList );
tanPtfactory.commit();
I need to turn arcFactory1, an array ?, into a curve. ??
Maybe I need to use Factory '.calculate' method instead of update or commit, on arcFactory1. ?
Will try again tomorrow...
Hi Brian, yeah if you want to generate an object that will only be used for further actions within the script then you can call the .calculate() method on the factory instead of doing update() and commit() like regular commands do.
The .calculate() method generates the output objects from the factory in the form of an object list, but does not add them to the geometry database so they won't be displayed like the regular output of the arc command is.
The other method of calling update() and commit() do add the generated object to the geometry database, so if you are generating arcs and you want the arc to show up as in the regular arc command then you would want to do it that way like the regular arc command does, but if you're only wanting to use the arc factory to generate an arc that will then be used as input for some next internal stage of the script then calculate() is more suited for that.
Eventually there will probably be some more simplified calls to generate some basic curves rather than setting up a factory and setting inputs and all of that, the factory mechanism is more set up to work with the UI inside of a command where the UI controls correspond to the factory inputs.
I found a Fortran source code and executable file that generates NACA 6 and 6A series airfoil ordinates on the PDAS website. I recompiled it, because the exe file they provided wouldn't run on my computer. It contained a program to create a postsript plot of the airfoil. I updated that. Lastly, I made an input file for the NACA 65A009 airfoil file. I am attaching this program here, for those that are interested.
It satisfies questions by Steve and Burrman. Moreover, you get the elliptical fit for the le and the sharp te. Also, you get lots of data points with a bit more significant digits. I looked over the output but haven't had a chance to compare it to the existing options. I don't plan on implementing this method. Some of the reasons being; I would have to remove the sharp trailing edge and put in the radius, I already have a method I prefer, the airfoil was defined and tested long before this code was created, the original definition uses a circle for the le and te that is tangent to the rest of the definition (whereas this version does not). The most important thing for me is to create an airfoil that represents the test data I am using. However, I thought some of you may enjoy having this information for your own work, since you have brought it up. I do plan on comparing it to what I'm doing, just to make sure they are in reasonable agreement, which I expect that they are.
Note, the Fortran code to do the ordinates is over 3,000 lines of code (about the same amount as PROP_DESIGN). Thus the reason I did not want to attempt programming it from scratch. Since I found it on the PDAS site, it was basically no work for me to provide this to you.
Enjoy,
Anthony
Edit; I got a chance to compare all methods and the error is roughly .035 in terms of 100 * x/c and 100 * y/c values. With the majority of the error being contained in the LE transition. Well within the margin of error, considering how the original points were obtained (with slide rules, drafting, charts, etc...). The only option that sticks to the NACA specs is the one I demonstrated with the screencast on my YouTube page. Burrman's method is acceptable as well. I wasn't impressed with the Fortran results. However, they could be beaten into a more usable form if so desired.
Edit 01/04/11: I just noticed in the summary of NASA TM X-3069 they get the same amount of error I am seeing (.035 in terms of percent x/c and y/c). Martin Hepperle's site makes use of this code apparently too. He notes, in the JavaFoil User Manual, not to use the output for the 6 series and instead use the original data sheets, which is what I have been doing. From what I can gather the 6 and 6A series can be traced back to NACA Report 383 by Theodorsen. This work could probably be translated to SMath Studio. A free Mathcad clone.
update; have since determined it is best to use the data points from NACA RM L51I12 for the 65A009 definition.
Thank you Michael.
Interactive creation of two arcs and their intersection is very easy in MoI.
Doing so by Script has been hard, about 50 lines of code, that still doesn't quite work.
Successfully created two arcs, using Frame, Startpoint(s), and angle.
Created one object list by: var arc1List = arcFactory1.calculate();
Created second object by: var arc2List = arcFactory2.calculate();
How is it possible to combine the two lists into one list, with the two arcs in it?
Or create one list in some other script way?
I do not understand the difference between an Object, and the Object List created by
a factory.calculate();
(I need the object list, in order to run intersect script, non-interactively. Then I think the point created can be pushed into the control point array for a curve factory.)
(All this just to find one point.)
(I tried a bunch of permutations, but kept getting type mismatch errors.)
Thought of an alternative method.
Use the script to draw the two arcs.
Modify the menu .htm to request the user to pick the intersection point(s).
Recalculate the control "spline."
Delete arcs, and redraw smaller arcs, or user can do the trims and deletions...
> Created one object list by: var arc1List = arcFactory1.calculate();
> Created second object by: var arc2List = arcFactory2.calculate();
>
> How is it possible to combine the two lists into one list, with the two arcs in it?
An object list has a method addObject( obj ) that you can call to add the given object to the end of the list.
And you can retrieve an object from a list by using the item( index ) method.
So what you are talking about would be something like (assuming each has 1 object in it currently):
arc1List.addObject( arc2List.item(0) );
> Or create one list in some other script way?
You could also create a completely new list by calling moi.geometryDatabase.createObjectList() and then add both arcs to it.
> I do not understand the difference between an Object, and the Object
> List created by a factory.calculate();
Well, an object list is a container that can hold multiple objects - since some geometry factories may generate multiple objects the .calculate() method cannot just return a single object since that would then not work for those kinds of factories that generate multiple outputs.
So in order to be consistent across any kind of use, the calculate() method always returns an object list, even if the output was only a single object like it often is in most of the draw-type commands. So in cases like that it's a list but it contains just 1 object which you can access using the .item() method on the object list.
That's one of the details that's kind of more complicated currently with the factory system being oriented towards working with a number of different commands, at some point in the future it is likely that I'll add some more kinds of geometry creation methods that will just pass all the different parameters to a creation function rather than setting up factory inputs like the current system - the factory input system is more oriented towards each different input being wired up to some kind of UI control.
Check out this previous post for a plug-in command that creates a couple of circles and intersects them to create a point - it sounds like that is pretty close to what you are trying to do currently: http://moi3d.com/forum/index.php?webtag=MOI&msg=3832.15
Attached is "provisory culmination" (just read that in a book...) of the Prop_Design_Geo Script for MoI.
There may still be errors.
The "tangent" points, and the two edge radius arcs, are created non-interactively.
Dealing with the leading edge and trailing edge, non-interactively, took about 100 lines of code.
This might be reduced a bit by calling a few functions..
Creating the points with interactive MoI takes perhaps 10 actions +/-.
Michaels help was invaluable.
Learned a great deal about MoI scripting, on this project.
:-))
got a chance to try it out. works good. a few things though. with the le the way you are doing it you have to take out point .75, .835. Otherwise the curve fit gets messed up. I just manually deleted it and the curve adjusted, however, most people wouldn't know to do that. Also a long time ago burrman and Michael found that you couldn't have the le and te be two arcs. Which is what I had. It would be like mirroring the two that you have in there. So I mirror the spline then make the arcs, so that they are one arc for the le and one for the te. You can do this easily from what you have generated. But most people wouldn't know to do that. I'm curious if its taking 100 lines of code to find the tangent points, wouldn't it have been easier to just enter the tangent point i added into the array?