MoI discussion forum
MoI discussion forum

Full Version: Anyone wish to develop a custom script?

Show messages:  1  2-21  22-41  42-61  62-81  82-101  102-121  …  222-223

From: Unknown user
25 Dec 2011   [#42] In reply to [#40]
Hi SteveH,

Does the equation you are experimenting with work for the NACA 65A009 airfoil? If so, could you share the equation with me. I would be interesting in trying it out. It could be a better way of doing things depending upon how it deals with the leading and trailing edge. I have modeled a bunch of blades using the data file I have, and haven't had any issues. MoI is easily able to curve fit the data from the NACA file. Creating a very smooth airfoil. But I'm always interested in a better way to do things. Perhaps your method will be better.

Thanks,

Anthony
From: SteveMacc (STEVEH)
25 Dec 2011   [#43]
Here is the formula:



Y is half the thickness above the datum
t is the thickness of the aerofoil as a decimal of the chord

I have attached the spreadsheet I used. It shows the formula at the top as a picture. I have broken down the steps of the calculation to correspond with the formula. I am only showing 29 rows here but you can easily change this to whatever you want. The X figure is in mm direct.

I understand this formula works for all NACA symmetric aerofoils, the variance being in the thickness (t in in the equation). There is some maths rounding error here as in the sheet I have attached, at 500mm (the chord maximum), Y should be zero but calculates to -.225mm. This may be a limitation of Excel, as several of the factors of the equation are very small.

Attachments:
naca general.xlsx

Image Attachments:
Naca Formula.png 


From: Unknown user
25 Dec 2011   [#44] In reply to [#43]
Just doing a quick google search that appears to be the equation for the NACA 4 series airfoils. Which are not good for transonic use (i.e. aircraft propellers).

I did another search and found a document that uses equations to obtain the ordinates for the 6A series. However, looking over it, I don't think its worth the effort to go that route. I already have the points I need. This wouldn't justify the effort to code.
From: SteveMacc (STEVEH)
25 Dec 2011   [#45]
Yes, just realised that the equation I used was for the 4 series airfoil. Back to the drawing board.
From: SteveMacc (STEVEH)
25 Dec 2011   [#46]
Here is the correct formula for a 65A. Too late and too tired to put this in Excel.

http://www.pdas.com/naca456thick6.html
From: Unknown user
25 Dec 2011   [#47] In reply to [#46]
Oh thanks, I was just on that site, but didn't see that page. Way easier than the document I found.

Edit; Oh looking over it more, it appears to be the same. Rather involved. I don't think this will help me any, as I'm getting good results the way I'm doing it. However, its nice to know how the data points I was using were determined.

Thanks
From: SteveMacc (STEVEH)
25 Dec 2011   [#48]
Looking at some of the maths for these airfoils, it seems that the profile is determined by experiment, then the formula is back fitted using polynomials.
From: bemfarmer
26 Dec 2011   [#49] In reply to [#41]
////I downloaded and setup your script. It is running too far to the right of my screen. My screen resolution is 1366 x 768. I attached a picture of the problem. I set it up so that Ctrl+P launches the script. When it launches it runs automatically and a message pops up. Is there a way to have it open but not run right away.

Hi Anthony. The (very wide) menu screen displays correctly in MoI3Beta, and is scrolled in MoI2. I do not know off-hand how to widen the MoI2
side pane body short of maybe some side pane.htm or CSS changes.

To delay execution, there should be a way to add a "begin" button, somehow.....
From: Unknown user
26 Dec 2011   [#50] In reply to [#49]
oh thanks, I did not see the scroll button. now I can check it out.

P.S. Maybe there is a way to have it float, rather than docked in the side. That way you wouldn't have to worry about width.
From: Unknown user
26 Dec 2011   [#51] In reply to [#50]
Looks good bemfarmer,

I imported the points and they lay right over the curve your program generates. Like you said you still have to work out the radius but I like how you have the curve and then the points to make the radius. The only thing would be on your curve fit it looks like the "through points" option whereas for this curve you want the "control points option". I think you'll see that once you start trying to get the radius in there. The first and last point of the curve will change once you get the radius in there too, since they will become a point tangent to the circle.

But looking good man. thanks
From: bemfarmer
26 Dec 2011   [#52] In reply to [#50]
Hi Anthony

I made up a "skinny" menu for MoI version 2. (Not as nice having abbreviated names). (Mostly, I use MoI Beta 3 now, where the wide menu works fine.)
(At this time, believe one must own MoI2 to download Beta3)

Don't know how to "float" a menu. There are lots of posts on "custom UI"...

Working on Rail section now...
From: Unknown user
26 Dec 2011   [#53] In reply to [#52]
Tried it out, works good with my version.
From: bemfarmer
27 Dec 2011   [#54]
Getting close, after many corrections to rails script.


Image Attachments:
RailTest1.PNG 


From: Unknown user
27 Dec 2011   [#55] In reply to [#54]
Looking good. Just a reminder. The rail spines should be made with the through points option. Where as the airfoil should be made with the control points option.
From: bemfarmer
27 Dec 2011   [#56] In reply to [#55]
Regarding through points option, Blue curve and Blue points,
versus control points option, Red curve, and Red points.

Created two AirFoil curves, with two scripts differing by the following two lines, (using Styles for colors):
Blue points and Blue (interpret)curves are created with var factory = moi.command.createFactory( 'interpcurve' );
Red points and Red (curve)curves are created with var factory = moi.command.createFactory( 'curve' );








Note that the Red control points are the same AirFoil points (which would be) generated by the Fortran code, and also,
that these Red points are the Nurb control points for the Red curve.
Note that the Blue (interpret)curves pass through the Red control points.

The Blue control points I interpret to be Nurbs control points, which are NOT the Airfoil points which would be generated by the Fortran code.

Note that creating only the Blue (interpret)curves, that the Airfoil points are not shown, however by generating the Blue (interpret)curves, and
ALSO by using the (second) point factory "for loop", (via a third version of the interpcurve script, indexing the second "for loup" from zero to 28,)
to create ALL of the airfoil Points, that the airfoil Points show up, without using the "var factory = moi.command.createFactory( 'curve' );" code.

Image Attachments:
AirFoilBlueForInterpcurve_RedForCurve.PNG 


From: bemfarmer
27 Dec 2011   [#57]
I have realized that trying to get MoI to access an array element that does not exist, causes an error.

Suggestions to Anthony, (or myself):

1. Do not hardcode the number of elements (27) in the arrays, in the Airfoil Points Do (or for) loup. ?
(Instead use the javascript array length.....)

2. Test to see if the number of elements in the AFXTAB and AFYTAB are the same. ? (With warning alert)

3. Place the Extra (radius) points in separate arrays similar to AFXTAB and AFYTAB. ? (same # of "X" and "Y" types.)

I will change the control points, as per your reminder above.

(Should be possible to have multiple airfoil cross sections, with nested loup......)
From: Unknown user
27 Dec 2011   [#58] In reply to [#57]
Hi bemfarmer,

A lot of that is way over my head. But the reason for the control points aspect of the airfoil curve generation is because of the leading and trailing edge circles. The NACA data points do not agree with the radius they specify for the le and te. If you were to strictly follow everything they specify in the document, you would end up with a lumpy airfoil. The picture you attached with the red and blue curves do not have the leading and trailing edge circles in there. So that may be why you aren't sure why I'm deviating from the data points at this step.

The hard part is going to be coding all that from your aspect. I don't know how you script MoI to generate a model, or if it can be done. So I can only speak about how I am doing it manually. I don't know if that translates to the way it would be coded. But it should become pretty obvious to you when you start to try and generate the whole airfoil, that you will have to use the control points option for the airfoil data points.

To get the whole airfoil curve that you need for the sweep, I do the following:

1) make circles at the leading and trailing edge, using the naca defined radii
2) make a line from the last naca point defined near the le and te to points tangent to the circles
3) make points at the intersection of the lines and circles
4) delete the lines and circles
5) use the new points as the start and end of a spline that runs through the naca defined points, using the control points option
6) mirror that spline
7) make arcs at the le and te
8) select all four curves and join them

Now you have a smooth airfoil that closely follows the naca document. You can sweep it using the le and te rails. The 1/4 chord rail is for reference. You can create the hub cutout with it, measure the radius, and apply loads later on with a different program if desired.

I hope that helps some.

Anthony
From: bemfarmer
27 Dec 2011   [#59] In reply to [#58]
Thanks Anthony.

Looked again at your 16 pictures of your process.
So the key is to find out the y and z coordinates of Tangent point T

I never before heard of Thale's theorem, but it provides another way to locate Tangent point T.
A high school student could probably canculate the formula for point T, given points P[1], P[2], and O. :-)

Not sure exactly which tools in MoI script to use...







http://en.wikipedia.org/wiki/Thales%27_theorem
http://en.wikipedia.org/wiki/Tangent_lines_to_circles

Image Attachments:
ThalesTheorem.PNG 


From: SteveMacc (STEVEH)
27 Dec 2011   [#60]
Aren't you making an assumption that the leading and trailing edges are circular for any distance? I read the NACA specs to say that they are not constant radius at any point of the profile. All that is given is the instantaneous curvature radius at the leading edge point and the trailing edge point. I read one article that suggested using a tilted ellipse at the leading edge replacing the first points of the equation.
From: Unknown user
28 Dec 2011   [#61] In reply to [#60]
Hi bemfarmer,

I never heard of that theorem either. You seem to be on the right track though. SteveMacc, I have the radius going through the end points of the airfoil, so that the chord works out. I have never tried fitting an ellipse to the data. The trailing edge works out as is. You can use the NACA points and the ter they define with no issue. The ler and the data are what do not agree. In order to keep the chord, using the radius they define, I curve fit the data points. If you know of another way, please demonstrate. I'd be interested in looking at it.

Show messages:  1  2-21  22-41  42-61  62-81  82-101  102-121  …  222-223