Show messages:
1-16
…
37-56
57-76
77-96
97-116
117-136
137-156
157-176
…
217-223
From: bemfarmer
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: ?
var myArcList = moi.geometryDatabase.createObjectList();
myArcList.addObject( arcfactory1 );
myArcList.addObject( arcfactory2 );
var tanPtfactory = moi.command.createFactory( 'intersect' )'
tanPtfactory.setInput( 0, myArcList );
tanPtfactory.commit();
?
Still have to study burrman's method...
From: Unknown user
Hi Brian,
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.
From: Unknown user
for anyone that is interested,
i added a link, on my website, to a collection of information regarding naca airfois:
http://propdesign.weebly.com/optional-downloads.html
the file is too big to post here or on my website directly, so i have it on my microsoft skydrive.
anthony
From: bemfarmer
The last one has lots of points.
Is the fortran program still available?
From: Unknown user
hi brian,
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?
anthony
From: Unknown user
hi brian,
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.
anthony
From: bemfarmer
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...
From: Michael Gibson
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.
- Michael
From: Unknown user
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.
From: bemfarmer
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.)
Thank You.
From: bemfarmer
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...
From: Michael Gibson
Hi Brian,
> 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
- Michael
From: bemfarmer
Thank you very much Michael. :-))
It Worked. Have created the leading edge arc, and the spline, for the AirFoil.
Now need to "duplicate" the code for the trailing edge...
From: bemfarmer
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.
:-))
Attachments:
PROP_DESIGN_GEO_1_1_2012.7z
From: Unknown user
thanks brian,
can't wait to check it out.
anthony
From: Unknown user
hey brian,
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?
anthony
From: bemfarmer
Hi Anthony, :-)
I'll remove the .75 and .835 from the code for the spline.
>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.
Edit: Okay, I think I see your point now. A mirrored half arc (even if joined,) has different control points from one full arc.
It should be possible to easily adjust the arc creation code, to do so. Just start on the tangent point, and make the stop point the tangent point adjusted with negative Y value.
>wouldn't it have been easier to just enter the tangent point i added into the array?
Yes, this is true, if the points are on the arc, (or within .001 ?). But initially, did not have the data point, and later the two points did not quite lie on the arc, so got started trying to figure out how to script the arcs and tangent points, to be more or less "exact".
If you like, I can make a version using your given tangent points, if they are within "tolerance"? (for a reduced code linecount.)
From: Unknown user
hi brian,
i didn't realize the tangent points i added were wrong until you pointed it out. i did two checks, but was zoomed out to much to see the error. they had round-off error because i reduced them to the naca three decimal format. so i increased them to the max moi allows. that should fix the problem. but doing it the way you have it now is fine. it should be just as accurate. sorry i was too late to save you all the added coding. but it seems like you enjoyed the process of learning moi scripting.
i look forward to the next version.
anthony
From: Frenchy Pilou (PILOU)
Does this srcipt can be used also for boats' propeller blades ?
From: Unknown user
Hi,
No, sorry. However, if anyone knows enough about marine propellers, it should be a pretty easy code update. I don't know anything about them, but I think you would need to use a hydrofoil model rather than an airfoil model, account for cavitation, chord distribution options appropriate for marine propellers, and use water properties rather than an atmospheric model. Other than that, PROP_DESIGN probably would work for marine propellers. But you would need to consult with an expert or be an expert in that area to know for sure.
I have a version of PROP_DESIGN, that I haven't released, that you can enter any fluid properties. So that part is already done. I looked into hydrofoil properties at one time, but not having any experience with that, I didn't pursue it too much. If that is something you know a lot about, the two of us should be able to get the update done.
I only have expertise with aircraft propellers. Which is why I haven't adapted PROP_DESIGN for helicopters either. I could adapt it to wind turbines but have no desire to. Just not into wind turbines. I have been interested in propellers since college. Studied them for years and then took jobs in that industry to learn more. So a lot of man hours went into PROP_DESIGN. I am not the kind of person to just code something I don't know anything about.
PROP_DESIGN is open source though. I released it as public domain software. So you could do anything you like with it. No need for my permission or anything. My hope is people will develop it more and make it even better. I wanted to give students something better than I had to go through to learn about propellers. I accomplished that. However, as far as software goes, PROP_DESIGN could use the love/development attention of many types of engineers (marine, aerospace, structural, software).
Anthony
Show messages:
1-16
…
37-56
57-76
77-96
97-116
117-136
137-156
157-176
…
217-223